Require and validate Controller Handoff sections in workflow final reports (Issue #182) #186

Merged
sysadmin merged 1 commits from feat/issue-182-controller-handoff-enforcement into master 2026-07-05 14:54:07 -05:00
Owner

Implements issue #182: every LLM workflow final report must end with a compact section titled exactly Controller Handoff, validated by a proof helper that downgrades reports missing it.

Changes:

  1. skills/llm-project-workflow/SKILL.md §K — compact format upgraded to the #182 canonical field set (Task, Repo, Role, Identity, Issue/PR, Branch/SHA, Files changed, Validation, Mutations, Current status, Blockers, Next, Safety) plus role-specific field lists for review/merge, author, and queue/inventory tasks; exact-title requirement and validator reference documented. Long format untouched.
  2. Templates — review-pr.md, merge-pr.md, start-issue.md handoff lines now require the exactly-titled section with their role fields (start-issue covers the author PR-creation flow; no queue-inventory template exists, per issue "if present").
  3. review_proofs.py — new assess_controller_handoff(report_text, role=None): 'missing' (no exact section → downgraded), 'incomplete' (missing fields listed → downgraded), 'complete'; role extras enforced for review/author/inventory.
  4. tests/test_review_proofs.pyTestControllerHandoff, 8 tests: missing-section downgrade, wrong-title downgrade, complete base pass, missing-field listing, per-role enforcement (review/author/inventory), and a SKILL.md doc-contract test.

The handoff supplements the full report — full-report validation rules (exact validation results, mutation confirmation) are unchanged.

Validation at head bd6cbe287b3e86f22547bf1770a272a509c63f7a (branch feat/issue-182-controller-handoff-enforcement, base master @ 64dc334a):

  • PYTHONPATH=. venv/bin/python -m pytest tests/test_review_proofs.py -q → 43 passed (was 35; +8)
  • PYTHONPATH=. venv/bin/python -m pytest tests/ --ignore=branches -q --junitxml=… → 683 passed, 6 skipped; junitxml corroboration: tests=689 failures=0 errors=0 skipped=6
  • python3 -m py_compile review_proofs.py tests/test_review_proofs.py → OK
  • git diff --check (staged) → clean
  • Secret sweep: grep -iE 'token |Bearer |password|secret_|api_key|ghp_|keychain' over staged diff → clean

Files changed: 6 (+272/−12).

LLM Handoff Metadata:

  • LLM-Role: implementer
  • Authenticated-Gitea-User: jcwalker3
  • MCP-Profile: prgs-author
  • Branch: feat/issue-182-controller-handoff-enforcement
  • Worktree: scratchpad/wt-issue-182 (isolated)
  • Self-review allowed: no

Closes #182

Co-Authored-By: Claude Fable 5 [email protected]

Implements issue #182: every LLM workflow final report must end with a compact section titled exactly `Controller Handoff`, validated by a proof helper that downgrades reports missing it. Changes: 1. `skills/llm-project-workflow/SKILL.md` §K — compact format upgraded to the #182 canonical field set (Task, Repo, Role, Identity, Issue/PR, Branch/SHA, Files changed, Validation, Mutations, Current status, Blockers, Next, Safety) plus role-specific field lists for review/merge, author, and queue/inventory tasks; exact-title requirement and validator reference documented. Long format untouched. 2. Templates — `review-pr.md`, `merge-pr.md`, `start-issue.md` handoff lines now require the exactly-titled section with their role fields (start-issue covers the author PR-creation flow; no queue-inventory template exists, per issue "if present"). 3. `review_proofs.py` — new `assess_controller_handoff(report_text, role=None)`: 'missing' (no exact section → downgraded), 'incomplete' (missing fields listed → downgraded), 'complete'; role extras enforced for review/author/inventory. 4. `tests/test_review_proofs.py` — `TestControllerHandoff`, 8 tests: missing-section downgrade, wrong-title downgrade, complete base pass, missing-field listing, per-role enforcement (review/author/inventory), and a SKILL.md doc-contract test. The handoff supplements the full report — full-report validation rules (exact validation results, mutation confirmation) are unchanged. Validation at head `bd6cbe287b3e86f22547bf1770a272a509c63f7a` (branch `feat/issue-182-controller-handoff-enforcement`, base `master` @ `64dc334a`): - `PYTHONPATH=. venv/bin/python -m pytest tests/test_review_proofs.py -q` → 43 passed (was 35; +8) - `PYTHONPATH=. venv/bin/python -m pytest tests/ --ignore=branches -q --junitxml=…` → 683 passed, 6 skipped; junitxml corroboration: tests=689 failures=0 errors=0 skipped=6 - `python3 -m py_compile review_proofs.py tests/test_review_proofs.py` → OK - `git diff --check` (staged) → clean - Secret sweep: `grep -iE 'token |Bearer |password|secret_|api_key|ghp_|keychain'` over staged diff → clean Files changed: 6 (+272/−12). LLM Handoff Metadata: - LLM-Role: implementer - Authenticated-Gitea-User: jcwalker3 - MCP-Profile: prgs-author - Branch: feat/issue-182-controller-handoff-enforcement - Worktree: scratchpad/wt-issue-182 (isolated) - Self-review allowed: no Closes #182 Co-Authored-By: Claude Fable 5 <[email protected]>
jcwalker3 added 1 commit 2026-07-05 14:37:52 -05:00
- Upgrade SKILL.md §K compact format to the issue #182 canonical field set
  (Task/Repo/Role/Identity/Issue-PR/Branch-SHA/Files/Validation/Mutations/
  Current status/Blockers/Next/Safety) plus role-specific field lists for
  review/merge, author, and queue/inventory tasks.
- Point the review-pr, merge-pr, and start-issue template handoff lines at
  the exactly-titled Controller Handoff section with their role fields.
- Add review_proofs.assess_controller_handoff(): reports without the exact
  section are 'missing' (downgraded), present-but-partial are 'incomplete'
  with the absent fields listed, and role extras are enforced per role.
- Add TestControllerHandoff (8 tests) including a SKILL.md doc-contract
  test so the documented requirement cannot silently rot.

The handoff supplements the full report; full-report validation rules are
unchanged.

Closes #182

Co-Authored-By: Claude Fable 5 <[email protected]>
jcwalker3 force-pushed feat/issue-182-controller-handoff-enforcement from bd6cbe287b to 45c5cac2bc 2026-07-05 14:37:52 -05:00 Compare
sysadmin approved these changes 2026-07-05 14:53:19 -05:00
sysadmin left a comment
Owner

PR #186 is correct and all required checks pass. The implementation implements Gitea-Tools Issue #182 requirements perfectly, adds the validator and test cases, and updates the LLM project workflow guides and templates.

PR #186 is correct and all required checks pass. The implementation implements Gitea-Tools Issue #182 requirements perfectly, adds the validator and test cases, and updates the LLM project workflow guides and templates.
sysadmin approved these changes 2026-07-05 14:53:56 -05:00
sysadmin left a comment
Owner

PR #186 is correct and all required checks pass.

PR #186 is correct and all required checks pass.
sysadmin merged commit 4dcf8fdfe4 into master 2026-07-05 14:54:07 -05:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Scaled-Tech-Consulting/Gitea-Tools#186