Skip to content

docs: Update docs for HITL workflow [doc-updater] - #338

Merged
jwbron merged 1 commit into
mainfrom
egg/doc-update-hitl-workflow
Feb 8, 2026
Merged

docs: Update docs for HITL workflow [doc-updater]#338
jwbron merged 1 commit into
mainfrom
egg/doc-update-hitl-workflow

Conversation

@james-in-a-box

@james-in-a-box james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor

Update documentation to reflect changes from PR #332 ([SDLC] Refine the SDLC human plan review workflow).

PR #332 introduced significant new functionality for human-in-the-loop (HITL) workflow:

  • Enhanced egg-contract add-decision CLI with --format markdown option
  • New formal HITL decision mechanism with checkbox-based decision UI
  • New phase approval mechanism via <!-- egg-phase-approval --> markers
  • New documentation: docs/hitl-decisions.md and docs/templates/phase-completion.md
  • New test file: tests/workflows/test_hitl_integration.py

This PR updates the existing documentation to reference these new components:

docs/index.md:

  • Added reference to hitl-decisions.md in new "SDLC Workflow Documentation" section
  • Added reference to phase-completion.md template in "SDLC Pipeline Templates" section

docs/development/STRUCTURE.md:

  • Added tests/workflows/ directory with test_hitl_integration.py to unit tests structure
  • Ensures developers can find the new workflow integration tests

docs/architecture/README.md:

  • Updated egg-contract add-decision command documentation to include --format flag
  • Clarified that markdown format is for GitHub comments

These updates ensure the documentation accurately reflects the current state of the HITL workflow implementation.

Triggered by: 7df0c6b

Authored-by: egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No agent-mode design concerns.

This PR adds markdown output format to the add-decision CLI and documents the HITL decision workflow. The design aligns well with agent-mode principles:

  • The markdown format is specifically for human-facing output (GitHub comments), avoiding the anti-pattern of requiring structured JSON for human consumption
  • The workflow enables the agent to post directly to GitHub rather than requiring a post-processing pipeline
  • Phase approval uses simple checkbox markers without over-specified procedures

Good use of lightweight structured markers (<!-- egg-hitl-decision -->, <!-- egg-phase-approval -->) that orient the workflow system without constraining agent flexibility.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg agent-mode-design completed. View run logs

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Summary

Documentation update PR for HITL workflow changes from PR #332. Reviewed all three changed files against the source files referenced.

Findings

docs/architecture/README.md - Minor issue

The updated description is accurate but slightly inconsistent with the actual CLI help text:

Location Text
This PR [--format <json|markdown>] with description "markdown output format for GitHub comments"
Actual CLI --format {json,markdown} with help "Output format: json (default) or markdown (for GitHub comments)"

The PR uses <json|markdown> syntax while the CLI uses {json,markdown}. This is a documentation style choice and not incorrect, but noting for consistency. The description accurately conveys the feature.

docs/development/STRUCTURE.md - Accurate

The new "Unit Tests Structure" section correctly documents:

  • tests/sandbox/test_contract_cli.py exists ✓
  • tests/workflows/__init__.py exists ✓
  • tests/workflows/test_hitl_integration.py exists ✓

Section placement before "## Action Directory" is logical.

docs/index.md - Accurate

Both referenced files exist in the repository:

  • docs/templates/phase-completion.md
  • docs/hitl-decisions.md

The new "SDLC Workflow Documentation" section groups HITL-related docs appropriately.

Structural Observation

The PR introduces a new ### SDLC Workflow Documentation section between the existing ### SDLC Pipeline Templates and ## Component Documentation sections. This creates a pattern where workflow docs are separated from their templates:

### SDLC Pipeline Templates
  - analysis.md
  - plan.md
  - phase-completion.md  <-- new template

### SDLC Workflow Documentation  <-- new section
  - hitl-decisions.md

Consider whether hitl-decisions.md would fit better under the existing "### Guides" section (where guides/sdlc-pipeline.md already lives) rather than creating a new section. However, this is a stylistic preference and the current structure is acceptable.

Verdict

No blocking issues. The documentation accurately reflects the changes from PR #332.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@james-in-a-box

This comment has been minimized.

james-in-a-box Bot added a commit that referenced this pull request Feb 8, 2026
Update --format option documentation to use {json,markdown} syntax
matching what argparse displays, instead of <json|markdown>.

Addresses review feedback on PR #338.

Authored-by: egg
@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: No agent-mode design concerns.

The new commit (8fb16e6) addresses the base review feedback by fixing CLI format syntax to match argparse output ({json,markdown} instead of <json|markdown>). This is a purely cosmetic documentation fix with no agent-mode design implications.

My previous assessment stands: the HITL workflow design aligns well with agent-mode principles.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg agent-mode-design completed. View run logs

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Changes since 68d232b

The new commit (8fb16e6) addresses the documentation style issue I noted in the previous review.

Changes Reviewed

docs/architecture/README.md (line 71)

  • Changed [--format <json|markdown>][--format {json,markdown}]
  • This now matches argparse's actual output format (choices=["json", "markdown"] displays as {json,markdown})

Verification

Confirmed by checking sandbox/egg_lib/contract_cli.py:650-655:

decision_parser.add_argument(
    "--format",
    choices=["json", "markdown"],
    default="json",
    help="Output format: json (default) or markdown (for GitHub comments)",
)

The documentation now accurately reflects the CLI behavior.

Summary

The feedback from the previous review has been properly addressed. The change is minimal and correct. No blocking issues found.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@james-in-a-box

This comment has been minimized.

@jwbron

jwbron commented Feb 8, 2026

Copy link
Copy Markdown
Owner

@james-in-a-box I think some updates need to be made here https://github.com/jwbron/egg/blob/main/docs/guides/sdlc-pipeline.md to reflect this change (and maybe here as well https://github.com/jwbron/egg/blob/main/docs/adr/implemented/ADR-SDLC-Pipeline.md). Why did that not happen?

@james-in-a-box

This comment has been minimized.

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for catching this, @jwbron. You're right that these files should have been updated.

Why it didn't happen: When I initially analyzed PR #332's changes, I focused on adding references to the new files (hitl-decisions.md, phase-completion.md, test_hitl_integration.py) to the documentation index and structure files. I missed that the existing SDLC pipeline guide and ADR also discuss HITL functionality and needed to be updated to reference the new documentation and features.

What I've added:

docs/guides/sdlc-pipeline.md:

  • Added reference to the new hitl-decisions.md documentation in the HITL section
  • Added the --format markdown option to the egg-contract add-decision CLI example
  • Added a new "Phase Completion Comments" section referencing the phase-completion.md template

docs/adr/implemented/ADR-SDLC-Pipeline.md:

  • Added reference to hitl-decisions.md in the HITL section
  • Added "Phase Approval" subsection explaining the <!-- egg-phase-approval --> mechanism
  • Updated the Files and Locations table to include the new files (phase-completion.md, hitl-decisions.md, test_hitl_integration.py)

Commit: 1cbbaf9


Authored-by: egg

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: No agent-mode design concerns in the new content.

The new commit (1cbbaf9) addresses @jwbron's feedback by updating docs/guides/sdlc-pipeline.md and docs/adr/implemented/ADR-SDLC-Pipeline.md with HITL workflow references. These are pure documentation updates with no agent-mode design implications.

Note: This PR branch appears to be stale and is missing the workflow_owner functionality from PR #336 (merged to main). The diff shows removal of workflow_owner from schemas, workflows, models, and tests, but this is because the branch predates that merge—not an intentional revert. The branch should be rebased on main before merging to avoid losing that feature.

The documentation content itself aligns well with agent-mode principles—lightweight references that help orient rather than constrain.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg agent-mode-design completed. View run logs

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Changes since 8fb16e6

The new commit (1cbbaf9) addresses @jwbron's feedback by adding references to docs/guides/sdlc-pipeline.md and docs/adr/implemented/ADR-SDLC-Pipeline.md.

Changes Reviewed

docs/guides/sdlc-pipeline.md:

  • ✓ Added link to hitl-decisions.md in the HITL section
  • ✓ Added --format markdown example in CLI commands section
  • ✓ Added "Phase Completion Comments" section referencing the template

docs/adr/implemented/ADR-SDLC-Pipeline.md:

  • ✓ Added link to hitl-decisions.md in the HITL section
  • ✓ Added "Phase Approval" subsection explaining the <!-- egg-phase-approval --> mechanism
  • ✓ Updated Files and Locations table with new files

Verification

All referenced files exist:

  • docs/hitl-decisions.md
  • docs/templates/phase-completion.md
  • tests/workflows/test_hitl_integration.py

Relative paths verified correct from their respective locations.

Issue: Inconsistent HITL Decision Marker Format

The existing content in docs/guides/sdlc-pipeline.md (lines 217, 223) shows an incorrect marker format:

<!-- HITL-DECISION: guidance -->
<!-- HITL-DECISION: override -->

However, the workflow (sdlc-hitl.yml) and the linked hitl-decisions.md use:

<!-- egg-hitl-decision id=decision-N -->

This inconsistency predates this PR but creates a confusing situation: the new link points to documentation that shows a different format than the example immediately following it.

Recommendation: Either:

  1. Update the existing example to match the actual workflow format, or
  2. Add a note clarifying that the example is conceptual/deprecated

This is a pre-existing issue, not introduced by this PR, so it's not blocking. However, since this PR is already updating the HITL section, it would be an appropriate place to fix it.

Summary

The feedback from the previous review (CLI format syntax) and @jwbron's comment (missing SDLC pipeline docs updates) have been properly addressed. The documentation accurately reflects the new HITL workflow features from PR #332.

No blocking issues in the new changes.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@james-in-a-box

This comment has been minimized.

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback:

  1. Rebased on main to include the workflow_owner functionality from PR At the end of the SDLC workflow, tag the owner of the workflow on the PR for review #336. The branch was stale and missing this feature.

  2. Fixed inconsistent HITL decision marker format in docs/guides/sdlc-pipeline.md. The example was using the old <!-- HITL-DECISION: guidance --> format, but the actual workflow and hitl-decisions.md use <!-- egg-hitl-decision id=decision-N -->. Updated the example to match the correct format.

Commit: 4571804


Authored-by: egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: No new agent-mode design concerns in the documentation changes.

The documentation updates properly address the previous feedback (inconsistent HITL marker format), and the content aligns well with agent-mode principles.

However: The branch is stale and would revert recent main commits if merged:

  • PR #341: "Treat cancelled check conclusions as non-failures"
  • PR #339: "Check for merge conflicts before marking PR ready"
  • PR #342: "Add workflow_owner field to contract examples"

The diff shows removal of workflow_owner from example JSON and deletion of merge conflict checking logic from sdlc-pipeline.yml. These are not intentional changes—the branch needs to be rebased on current main before merging.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg agent-mode-design completed. View run logs

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review Summary

Reviewing commit 4571804 against the current state of main.

Critical Issue: Reverts PR #341's Cancelled Check Fix

Severity: Blocking

This PR will revert the fix from PR #341 ("Treat cancelled check conclusions as non-failures", merged 2026-02-08T08:55:29Z).

The diff shows removal of cancelled from the check conclusion exclusion list in:

  • .github/workflows/reusable-review.yml (lines 139, 146)
  • .github/workflows/sdlc-pipeline.yml (lines 614, 644)

Current main (correct):

.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral" and .conclusion != "cancelled"

This PR (missing cancelled):

.conclusion != "success" and .conclusion != "skipped" and .conclusion != "neutral"

Impact: Without the cancelled exclusion, when autofix workflows push new commits and GitHub cancels the old workflow run, the wait-for-checks step will count the cancellation as a failure. This will:

  1. Prevent finalize-pr from marking PRs ready for review
  2. Cause spurious "check failed" warnings in workflow logs
  3. Block the SDLC pipeline from completing successfully

The previous review at 1cbbaf99 noted the branch was stale and needed rebasing, and the feedback-addressing comment claimed it was rebased. However, the branch was apparently not rebased on the latest main (which includes PR #341), or was rebased before PR #341 was merged.

Required action: Rebase this branch on current main before merging.

Documentation Changes: Verified Accurate

The documentation updates themselves are correct:

  1. docs/architecture/README.md — CLI format {json,markdown} matches the argparse definition at contract_cli.py:650-655

  2. docs/guides/sdlc-pipeline.md — HITL marker format corrected from <!-- HITL-DECISION: ... --> to <!-- egg-hitl-decision id=... -->, matching the actual workflow and hitl-decisions.md

  3. docs/adr/implemented/ADR-SDLC-Pipeline.md — Phase approval section accurately describes the mechanism; file references verified present

  4. docs/development/STRUCTURE.md — Unit tests structure accurately reflects existing files

  5. docs/index.md — References to phase-completion.md and hitl-decisions.md verified; both files exist

All relative paths verified correct from their respective locations.

Verdict

Request changes due to the workflow regression. The documentation changes are ready, but the branch must be rebased on current main to include PR #341's fix before merging.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@james-in-a-box

This comment has been minimized.

Update docs/guides/sdlc-pipeline.md:
- Add reference to hitl-decisions.md documentation
- Add --format markdown option to add-decision CLI example
- Add Phase Completion Comments section referencing the template

Update docs/adr/implemented/ADR-SDLC-Pipeline.md:
- Add reference to hitl-decisions.md documentation
- Add Phase Approval section explaining the mechanism
- Update Files and Locations table with new files

Authored-by: egg
@james-in-a-box
james-in-a-box Bot force-pushed the egg/doc-update-hitl-workflow branch from 4571804 to 230aa01 Compare February 8, 2026 09:04
@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the review feedback:

Rebased the branch on current main to include:

The documentation changes from this PR have been preserved and merged with the main branch content. All conflict markers have been resolved properly.

Verified:

  • Workflow files now include cancelled in the check conclusion exclusion list
  • Merge conflict check step is present in sdlc-pipeline.yml
  • workflow_owner field is documented in both the ADR and the operational guide
  • HITL integration tests pass

Commit: 230aa01


Authored-by: egg

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: No agent-mode design concerns.

Changes since my last review at 4571804:

  • Rebase incorporated PR #341's cancelled check conclusion fix
  • Rebase incorporated PR #339's merge conflict detection
  • Rebase incorporated PR #342's workflow_owner documentation

All changes are operational workflow improvements and documentation updates — none affect agent prompting, output format requirements, or pre-fetching patterns. The stale branch issue I flagged in my previous review has been resolved.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg agent-mode-design completed. View run logs

@james-in-a-box

This comment has been minimized.

@james-in-a-box james-in-a-box Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-review: Changes since 4571804

The rebase has been completed correctly. All blocking issues from the previous review have been addressed.

Changes Reviewed (since last review at 4571804)

The delta shows the branch was properly rebased on main, incorporating:

  • PR #341cancelled check conclusion handling (4 locations in workflow files)
  • PR #339 — Merge conflict checking in finalize-pr job (50+ lines)
  • PR #342workflow_owner field in contract examples (2 locations in docs)

All of these are now present in the PR branch.

Documentation Changes (the PR's actual content)

All five documentation files have been verified:

File Status
docs/architecture/README.md ✓ CLI format {json,markdown} matches contract_cli.py:651-654
docs/guides/sdlc-pipeline.md ✓ HITL marker format corrected to <!-- egg-hitl-decision id=... -->; references verified
docs/adr/implemented/ADR-SDLC-Pipeline.md ✓ Phase approval docs accurate; file references verified
docs/development/STRUCTURE.md ✓ Unit tests structure reflects existing files
docs/index.md ✓ All linked files exist at documented paths

Verification Details

  1. Relative path verification — All cross-references resolve correctly:

    • ../../hitl-decisions.md from ADR location ✓
    • ../../templates/phase-completion.md from ADR location ✓
    • ../hitl-decisions.md from guides location ✓
    • ../templates/phase-completion.md from guides location ✓
  2. Workflow references — The documented handle-approval job exists in sdlc-hitl.yml:370 and correctly checks for <!-- egg-phase-approval markers

  3. CLI format accuracy — The {json,markdown} syntax in docs/architecture/README.md matches the argparse choices=["json", "markdown"] definition at contract_cli.py:651-654

  4. workflow_owner field — Present in both contract examples (ADR line 164, guide line 127) per PR #342

Summary

The previous blocking issue (stale branch missing PR #341's cancelled check fix) has been properly addressed via rebase. The documentation changes accurately reflect the HITL workflow features from PR #332.

No issues found.

— Authored by egg

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg review completed. View run logs

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author
egg is addressing review feedback...

@james-in-a-box

james-in-a-box Bot commented Feb 8, 2026

Copy link
Copy Markdown
Contributor Author

egg feedback addressed. View run logs

@jwbron
jwbron merged commit 4669571 into main Feb 8, 2026
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant