feat: add Canonical Thread Handoff protocol (Closes #505) #509

Merged
sysadmin merged 2 commits from feat/issue-505-canonical-thread-handoff into master 2026-07-09 07:49:13 -05:00
Owner

Summary

Closes #505.

Adds the CTH (Canonical Thread Handoff) protocol so issue and PR threads carry an authoritative workflow handoff comment with status, blockers, proof, and a ready-to-paste next prompt.

Changes

  • canonical_thread_handoff.py — CTH types, template renderer, parser, validator, latest-CTH discovery
  • docs/canonical-thread-handoff.md — protocol definition, discovery/posting rules, six examples
  • docs/llm-workflow-runbooks.md — CTH section for agent operators
  • skills/llm-project-workflow/templates/canonical-thread-handoff.md — paste-ready template
  • Updated author/reviewer/merger prompts and canonical workflows to require CTH discovery and posting
  • tests/test_canonical_thread_handoff.py — module + documentation checks (10 tests)

Validation

/Users/jasonwalker/Development/Gitea-Tools/venv/bin/python -m pytest tests/test_canonical_thread_handoff.py -q
# 10 passed

Worktree

/Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff @ 25cf323

LLM Handoff Metadata

  • LLM-Agent-SHA: llm-25cf323
  • LLM-Role: implementer
  • Authenticated-Gitea-User: jcwalker3
  • MCP-Profile: prgs-author
  • Branch: feat/issue-505-canonical-thread-handoff
  • Self-review allowed: no
## Summary Closes #505. Adds the **CTH (Canonical Thread Handoff)** protocol so issue and PR threads carry an authoritative workflow handoff comment with status, blockers, proof, and a ready-to-paste next prompt. ## Changes - `canonical_thread_handoff.py` — CTH types, template renderer, parser, validator, latest-CTH discovery - `docs/canonical-thread-handoff.md` — protocol definition, discovery/posting rules, six examples - `docs/llm-workflow-runbooks.md` — CTH section for agent operators - `skills/llm-project-workflow/templates/canonical-thread-handoff.md` — paste-ready template - Updated author/reviewer/merger prompts and canonical workflows to require CTH discovery and posting - `tests/test_canonical_thread_handoff.py` — module + documentation checks (10 tests) ## Validation ```bash /Users/jasonwalker/Development/Gitea-Tools/venv/bin/python -m pytest tests/test_canonical_thread_handoff.py -q # 10 passed ``` ## Worktree `/Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff` @ `25cf323` ## LLM Handoff Metadata - LLM-Agent-SHA: llm-25cf323 - LLM-Role: implementer - Authenticated-Gitea-User: jcwalker3 - MCP-Profile: prgs-author - Branch: feat/issue-505-canonical-thread-handoff - Self-review allowed: no
jcwalker3 added 1 commit 2026-07-08 02:45:10 -05:00
Define CTH comment types, base template, parser/validator helpers, protocol
documentation with examples, and workflow/runbook/prompt updates so agents
discover and post authoritative thread handoffs before acting.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Author
Owner

pr: #509
branch: feat/issue-505-canonical-thread-handoff
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff
profile: prgs-author
session_id: unknown
phase: claimed
head_before: 25cf323d14
expires_at: 2026-07-09T04:31:14Z
reviewer_active: no

<!-- mcp-conflict-fix-lease:v1 --> pr: #509 branch: feat/issue-505-canonical-thread-handoff worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff profile: prgs-author session_id: unknown phase: claimed head_before: 25cf323d143f56b7d2a959c5f6cb381c745c619f expires_at: 2026-07-09T04:31:14Z reviewer_active: no
jcwalker3 added 1 commit 2026-07-08 21:32:25 -05:00
Merge prgs/master into PR branch to restore mergeability.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #509
issue: #505
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 63070-ce744cc38fb9
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr509-issue-505
phase: claimed
candidate_head: 05ea99cd32
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T02:48:55Z
expires_at: 2026-07-09T04:48:55Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #509 issue: #505 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 63070-ce744cc38fb9 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr509-issue-505 phase: claimed candidate_head: 05ea99cd3213248b3de2ab8fcc20231a27de62f8 target_branch: master target_branch_sha: none last_activity: 2026-07-09T02:48:55Z expires_at: 2026-07-09T04:48:55Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #509
issue: #505
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 63070-ce744cc38fb9
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr509-issue-505
phase: released
candidate_head: 05ea99cd32
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T02:52:20Z
expires_at: 2026-07-09T04:52:20Z
blocker: manual-release

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #509 issue: #505 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 63070-ce744cc38fb9 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/review-pr509-issue-505 phase: released candidate_head: 05ea99cd3213248b3de2ab8fcc20231a27de62f8 target_branch: master target_branch_sha: none last_activity: 2026-07-09T02:52:20Z expires_at: 2026-07-09T04:52:20Z blocker: manual-release
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #509
issue: #505
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 94966-7714d3af380d
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff
phase: claimed
candidate_head: 05ea99cd32
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:47:03Z
expires_at: 2026-07-09T14:47:03Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #509 issue: #505 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 94966-7714d3af380d worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff phase: claimed candidate_head: 05ea99cd3213248b3de2ab8fcc20231a27de62f8 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:47:03Z expires_at: 2026-07-09T14:47:03Z blocker: none
Owner

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #509
issue: #505
reviewer_identity: sysadmin
profile: prgs-reviewer
session_id: 94966-7714d3af380d
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff
phase: claimed
candidate_head: 05ea99cd32
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:48:09Z
expires_at: 2026-07-09T14:48:09Z
blocker: none

<!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #509 issue: #505 reviewer_identity: sysadmin profile: prgs-reviewer session_id: 94966-7714d3af380d worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff phase: claimed candidate_head: 05ea99cd3213248b3de2ab8fcc20231a27de62f8 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:48:09Z expires_at: 2026-07-09T14:48:09Z blocker: none
sysadmin approved these changes 2026-07-09 07:48:30 -05:00
sysadmin left a comment
Owner

APPROVE PR #509 (Closes #505)

Head: 05ea99cd3213248b3de2ab8fcc20231a27de62f8
Reviewer: sysadmin / prgs-reviewer
Author: jcwalker3 (not self-review)

Scope (10 files, additive)

  • canonical_thread_handoff.py CTH types/render/parse/validate
  • Protocol docs + template
  • Author/reviewer/merger workflow hooks require latest-CTH discovery and posting
  • Explicit: CTH is not merge approval

Validation

pytest tests/test_canonical_thread_handoff.py -q
# 10 passed

APPROVE — mergeable; ready for prgs-merger.

## APPROVE PR #509 (Closes #505) **Head:** `05ea99cd3213248b3de2ab8fcc20231a27de62f8` **Reviewer:** sysadmin / prgs-reviewer **Author:** jcwalker3 (not self-review) ### Scope (10 files, additive) - `canonical_thread_handoff.py` CTH types/render/parse/validate - Protocol docs + template - Author/reviewer/merger workflow hooks require latest-CTH discovery and posting - Explicit: CTH is not merge approval ### Validation ``` pytest tests/test_canonical_thread_handoff.py -q # 10 passed ``` **APPROVE** — mergeable; ready for prgs-merger.
Owner

adopted_at: 2026-07-09T12:48:53Z
adopted_by_identity: sysadmin
adopted_by_profile: prgs-merger
adopted_from_session_id: 94966-7714d3af380d
adopted_from_profile: prgs-reviewer
adopted_from_reviewer_identity: sysadmin
adopted_from_comment_id: 7883
adoption_reason: merger-handoff-approved-head

repo: Scaled-Tech-Consulting/Gitea-Tools
pr: #509
issue: #505
reviewer_identity: sysadmin
profile: prgs-merger
session_id: 97845-6cb30b115f84
worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff
phase: adopted
candidate_head: 05ea99cd32
target_branch: master
target_branch_sha: none
last_activity: 2026-07-09T12:48:53Z
expires_at: 2026-07-09T14:48:53Z
blocker: none

<!-- mcp-review-lease-adoption:v1 --> adopted_at: 2026-07-09T12:48:53Z adopted_by_identity: sysadmin adopted_by_profile: prgs-merger adopted_from_session_id: 94966-7714d3af380d adopted_from_profile: prgs-reviewer adopted_from_reviewer_identity: sysadmin adopted_from_comment_id: 7883 adoption_reason: merger-handoff-approved-head <!-- mcp-review-lease:v1 --> repo: Scaled-Tech-Consulting/Gitea-Tools pr: #509 issue: #505 reviewer_identity: sysadmin profile: prgs-merger session_id: 97845-6cb30b115f84 worktree: /Users/jasonwalker/Development/Gitea-Tools/branches/issue-505-canonical-thread-handoff phase: adopted candidate_head: 05ea99cd3213248b3de2ab8fcc20231a27de62f8 target_branch: master target_branch_sha: none last_activity: 2026-07-09T12:48:53Z expires_at: 2026-07-09T14:48:53Z blocker: none
sysadmin merged commit 7274b76e81 into master 2026-07-09 07:49:13 -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#509