feat(governance): complete traceability gate depth checks - #178
feat(governance): complete traceability gate depth checks#178bouillipx wants to merge 2 commits into
Conversation
Finish tasks 3.2-3.4 for enhance-doc-governance-traceability by extending the governance traceability gate beyond feature index integrity. Key changes: - enforce required frontmatter on the governance baseline standard/design docs and all concrete TODO ledger records under docs/todos - require active feature docs with todo_ids to map those ids through a tasks artifact TODO Coverage section - validate master TODO and slice-planning change targets resolve back to concrete feature docs and tasks artifacts, while skipping planned placeholder claims - add red/green regressions for frontmatter enforcement, task coverage, reverse TODO mapping, and archive-path edge cases - backfill the affected governance and TODO docs with canonical frontmatter and add TODO Coverage to the agentscope D2/D4 pilot tasks file - sync OpenSpec task status and feature evidence so the change now sits at 21/22 tasks complete Rationale: The previous slice left three governance gaps open: non-feature docs were not machine-checked for frontmatter, TODO-linked feature slices were not forced to declare their task coverage, and master TODO ledgers could drift away from actual change artifacts in the reverse direction. This commit closes those gaps with deterministic shell checks and fixture-backed regressions without widening scope to unrelated runtime behavior. Verification: - ../../.venv/bin/python -m pytest -q tests/unit/test_governance_traceability_gate.py tests/unit/test_governance_evidence_truth_gate.py - ./scripts/ci/check_governance_traceability.sh - ./scripts/ci/check_governance_evidence_truth.sh - openspec validate enhance-doc-governance-traceability --type change --strict --json --no-interactive - openspec list
…hecks Record the new implementation PR for the post-#175 traceability gate depth work in the active feature aggregation document. Key changes: - relabel earlier governance PRs as baseline/previous implementation references - point the current implementation PR link at #178 - preserve the active feature doc as the review and merge-gate source of truth Rationale: The branch was rebased onto the latest main before opening the new implementation PR. The feature aggregation document must reflect the current review surface so governance evidence and merge-gate history remain accurate and machine-checkable. Verification: - ./scripts/ci/check_governance_traceability.sh - ./scripts/ci/check_governance_evidence_truth.sh - openspec validate enhance-doc-governance-traceability --type change --strict --json --no-interactive
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2eaeaa2985
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| docs/guides/Documentation_First_Development_SOP.md \ | ||
| docs/guides/Development_Constraints.md \ | ||
| docs/guides/Evidence_Truth_Implementation_Strategy.md; do | ||
| [[ -f "$file" ]] && check_governance_doc_frontmatter "$file" "standard" |
There was a problem hiding this comment.
Fail when baseline governance docs are missing
check_governance_tracked_frontmatter only validates baseline standard/design docs when they already exist, so removing a required governance file (for example docs/guides/Development_Constraints.md) still lets the gate pass. I verified this by running the script against this commit with that file deleted and it returned success, which means CI no longer protects the required governance corpus from accidental deletion and traceability can silently regress.
Useful? React with 👍 / 👎.
Summary
This PR completes the remaining implementation work for
enhance-doc-governance-traceabilitytask group3.2-3.4.It extends the governance traceability gate to:
todo_idsto be covered by a## TODO Coveragesection in their OpenSpec tasks artifactWhy
PR #175 established the baseline governance traceability gate and hardened the initial index / claim matching contract.
The remaining gap was depth coverage:
todo_idswithout a corresponding tasks-level coverage sectionThis PR closes those gaps and leaves only
5.3(closeout/archive) pending after merge.Scope
Included:
scripts/ci/check_governance_traceability.shtests/unit/test_governance_traceability_gate.pydocs/governance/,docs/guides/,docs/design/, anddocs/todos/openspec/changes/agentscope-d2-d4-thinking-transport/tasks.mdenhance-doc-governance-traceabilityNot included:
5.3)p0-conformance-gateTODO / Change Mapping
enhance-doc-governance-traceability3.23.33.45.3Validation
Executed on the rebased branch after syncing to latest
origin/main:../../.venv/bin/python -m pytest -q tests/unit/test_governance_traceability_gate.py tests/unit/test_governance_evidence_truth_gate.py->53 passed./scripts/ci/check_governance_traceability.sh->passed./scripts/ci/check_governance_evidence_truth.sh->passedopenspec validate enhance-doc-governance-traceability --type change --strict --json --no-interactive->valid=trueReview Focus
Please focus review on:
## TODO Coverageresolution rules for active features withtodo_idsplanned-claim exclusion semantics