Repository navigation
Description
Context & Rationale
The rule is written down and nothing reads it. AGENTS.md:98-100 requires defect fixes to add AGENTS.md guardrails when the cause cannot be fixed at source; docs/SELF_IMPROVEMENT.md:58 says every unexpected failure 'is immediately codified into AGENTS.md'. No workflow references AGENTS.md (grep -rln AGENTS.md .github/workflows exits 1) and devops pr check-readiness (src/devops_cli/commands/pr.py:1405-1406) reads neither labels nor files. The taxonomy leaks: PR #485 carries type/security plus scope/infra, undefined in .github/labels.yml; .github/ISSUE_TEMPLATE/bug_report.yml:3-4 mandates a fix(<scope>): title. vibes' .github/workflows/recursive-hardening.yml first real run saw 0 files instead of 12 and accused an author who had hardened (tests/test_workflow_contracts.py:1-14, 249-263; recursive-hardening.yml:51).
Scope & Deliverables
- Context & Rationale*: The rule is written down and nothing reads it.
AGENTS.md:98-100requires defect fixes to add AGENTS.md guardrails when the cause cannot be fixed at source;docs/SELF_IMPROVEMENT.md:58says every unexpected failure 'is immediately codified into AGENTS.md'. No workflow references AGENTS.md (grep -rln AGENTS.md .github/workflowsexits 1) anddevops pr check-readiness(src/devops_cli/commands/pr.py:1405-1406) reads neither labels nor files. The taxonomy leaks: PR fix(security): close the keyring's remaining plaintext and host-credential gaps #485 carriestype/securityplusscope/infra, undefined in.github/labels.yml;.github/ISSUE_TEMPLATE/bug_report.yml:3-4mandates afix(<scope>):title. vibes'.github/workflows/recursive-hardening.ymlfirst real run saw 0 files instead of 12 and accused an author who had hardened (tests/test_workflow_contracts.py:1-14, 249-263;recursive-hardening.yml:51). - Deliverable*: Slice 1 measures:
devops pr hardening-report [--pr N]lists merged defect PRs (type/bug,type/security, or afix(/fix:title) and reports per PR which declared surfaces gained lines (AGENTS.md,src/devops_cli/ai/tasks/*.md,src/devops_cli/ai/knowledge_base/,common_hallucinations.json) fromgh pr view --json files, ignoring labels absent fromlabels.yml, plus fix-titled PRs lackingtype/bug; it also rewordsdocs/SELF_IMPROVEMENT.md:58to name the surfaces actually used. Slice 2, behind--require-hardening:_check_hardening_blockerin_evaluate_pr_blockers(pr.py:1304) requires additions to a declared surface, reporting 'touched but added nothing' separately from 'not touched'; default-on with--allow-unhardenedonly after slice 1 covers the full merged-defect population. Slice 3: apull_request: types: [closed]job gated onmerged == trueplus the two labels, runninghardening-report --pr $PR_NUMBER --fail-on-missingand opening an issue on failure viacreate_repository_issue(src/devops_cli/github/issues.py:245) withlabels.yml-defined labels. Prerequisite: a newtests/test_workflow_contracts.pyextendingtests/test_ci.py:537-628to resolve eachuv run devops ...inrun:against the Typer app, assert triggers, and fail on a GitHub Actions expression insiderun:(update-prs.yml:74-86violates this). Port only vibes' decisions: label gating (recursive-hardening.yml:34), two-way verdict (tools/project_tooling.py:200-221), empty file list is an error (recursive-hardening.yml:74-76), skip-not-fail for fork tokens (pr-sentinel.yml:69-74); not its range walk orcount_guardrail_lines(project_tooling.py:186), since the files endpoint is merge-strategy independent. - Constraint*: An AGENTS.md-only check accuses all 32 merged
type/bugPRs though 25 wrote their lesson intodocs/ROADMAP.md, so the surface set must be declared and the verdict must name it;docs/ROADMAP.mdis no longer one, because it becomes a generated view (feat(github): github-sourced roadmap, migration and generated roadmap view (devops roadmap migrate,render) #739) and lessons enter as items through intake (feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742);tests/anddocs/agent/tasks/(32 and 31 of 32) are vacuous. Atype/bug-only gate misses the 29 of the last 100 merged PRs that are fix-titled without it. A job that never fires is indistinguishable from one that passes;ci.yml:65-66actionlint checks syntax only. Commit to slice 1 and the contract test first; slices 2-3 depend on its result. - Measured*:
gh pr list --repo dan-petty/devops-cli --state merged --label type/bug --limit 100 --json number --jq length= 32. Iteratinggh pr view <n> --json filesover those 32 and counting paths withadditions > 0:AGENTS.md0,docs/ROADMAP.md25 (thetests/anddocs/agent/tasks/counts in Constraint come from the same iteration).gh pr list --state merged --limit 100 --json number,title,labelsfiltered with jq forfix-prefixed titles lackingtype/bug= 29. - Source*: vibes
.github/workflows/recursive-hardening.yml,.github/workflows/autonomous-triage.yml,.github/workflows/pr-sentinel.yml,tools/project_tooling.py,tests/test_workflow_contracts.py,tests/test_project_tooling.py,patterns/root-cause-hardening.md,AGENTS.md
Strategic Alignment
- Milestone: Backlog (no release) (Reactive Workstation Command Center, Interactive TUI & Unified Operations Hub)
- Roadmap Reference:
docs/ROADMAP.md
Amendment (2026-10-01 assessment)
- Corrections to this body: The milestone line says
v0.2.24, but the issue has no milestone; it is in the backlog. - Coordination:
- Resolver: The prerequisite
tests/test_workflow_contracts.pyresolvesuv run devops ...in workflowrun:blocks. It should reuse the resolver from fix(mcp): mcp tools and resources call commands and options that exist #836. That item builds the resolver behinddevops docs check, following the design in ROADMAP.md:908. - Classifier: The defect-PR classifier (
type/bug,type/security, or afix(/fix:title) is also needed by feat(ci): fail-to-pass check. Whichever lands first owns it, insrc/devops_cli/github/.
- Resolver: The prerequisite
Update 2026-10-08: refinement
Nothing is built (rule at AGENTS.md:107-109). Slice 3 hands findings to intake (AGENTS.md:106), not create_repository_issue, and the PR says how the job reaches it. The SELF_IMPROVEMENT.md rewording is gone. #861's contract test is the same test; whichever lands first builds it in tests/test_workflow_contracts.py, and (proposed) the expression-in-run: rule moves to #861. Slice 2 becomes a predicate of #998's verdict.
Proposed design
Problem statement
The rule requiring defect PRs to add guardrails to declared surfaces (AGENTS.md, task files, knowledge base) is documented in AGENTS.md and SELF_IMPROVEMENT.md but unenforced: no workflow reads AGENTS.md, devops pr check-readiness ignores labels and files, and the label taxonomy leaks with undefined labels on PRs. This issue delivers a measurement command (devops pr hardening-report), a post-merge audit workflow that hands findings to intake, and a shared defect-PR classifier, so the hardening rule is actually checked and violations are surfaced. Per the 2026-10-08 refinement, Slice 2 (the readiness blocker) is deferred to #998's verdict module, the SELF_IMPROVEMENT.md rewording is dropped, and Slice 3 hands findings to intake rather than opening an issue via create_repository_issue.
Acceptance criteria
- Criterion 1: devops pr hardening-report [--pr N] lists merged defect PRs (type/bug, type/security, or a fix(/fix: title) and reports per PR which declared surfaces gained lines (additions > 0), reading file data from gh pr view --json files
Verification: Run uv run devops pr hardening-report against the repository and confirm it lists the 32 merged type/bug PRs plus the 29 fix-titled PRs lacking type/bug, showing per-PR surface additions; run with --pr N for a single PR and confirm the same per-PR detail - Criterion 2: The declared surface set is AGENTS.md, src/devops_cli/ai/tasks/*.md, src/devops_cli/ai/knowledge_base/, and common_hallucinations.json; docs/ROADMAP.md is excluded because it is a generated view
Verification: Inspect the surface list in the hardening-report source and confirm docs/ROADMAP.md is absent and the four listed surfaces are present; run the report and confirm no PR is credited for ROADMAP.md additions - Criterion 3: A post-merge audit workflow triggers on pull_request types [closed] gated on merged == true plus the two defect labels, runs hardening-report --pr $PR_NUMBER --fail-on-missing, and hands findings to intake on failure
Verification: Inspect the workflow YAML for the correct trigger, gate conditions, and run command; confirm the failure path calls the intake mechanism (not create_repository_issue) and uses labels.yml-defined labels - Criterion 4: The defect-PR classifier (type/bug, type/security, or fix(/fix: title) lives in src/devops_cli/github/ and is importable by other commands such as the fail-to-pass check
Verification: Import the classifier from src/devops_cli/github/ in a test and confirm it correctly classifies a PR with type/bug, a PR with type/security, a PR with a fix(ci): title, and a PR with none of these - Criterion 5: The workflow contract test in tests/test_workflow_contracts.py validates the new audit workflow's structure (triggers, permissions, run commands) and is shared with fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861
Verification: Run pytest tests/test_workflow_contracts.py and confirm the new workflow passes its structural assertions; confirm the test file is importable and reusable by fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861's tests
Key questions
- Which surfaces are declared for the hardening check, and is docs/ROADMAP.md one of them?: The declared surfaces are AGENTS.md, src/devops_cli/ai/tasks/*.md, src/devops_cli/ai/knowledge_base/, and common_hallucinations.json. docs/ROADMAP.md is excluded because it becomes a generated view (feat(github): github-sourced roadmap, migration and generated roadmap view (
devops roadmap migrate,render) #739) and lessons enter as items through intake (feat(github): single-entry item intake with duplicate detection and placement (devops roadmap intake) #742). [sources: docs/ROADMAP.md, docs/adr/0001-github-is-the-roadmap-source.md] - Is Slice 2 (the _check_hardening_blocker readiness gate) in this issue's scope?: No. Per the 2026-10-08 refinement, Slice 2 becomes a predicate of refactor(github): pr readiness is one verdict module that the pr commands, the monitor and mcp consume #998's verdict module. This issue delivers only the measurement command, the post-merge audit workflow, and the shared classifier. (proposed) [sources: docs/agent/tasks/task-697-defect-prs-carry-their-hardening-readiness-blocker-and-post.md]
- Is the SELF_IMPROVEMENT.md rewording still in scope?: No. The 2026-10-08 refinement states 'The SELF_IMPROVEMENT.md rewording is gone.' (proposed) [sources: docs/agent/tasks/task-697-defect-prs-carry-their-hardening-readiness-blocker-and-post.md]
- How does the post-merge audit workflow hand findings to intake on failure?: The 2026-10-08 refinement says 'Slice 3 hands findings to intake (AGENTS.md:106), not create_repository_issue, and the PR says how the job reaches it.' The specific mechanism (e.g., a webhook to the roadmap service, a CLI call, or a board field write) is a design decision the implementing PR must specify. (proposed) [sources: docs/agent/tasks/task-697-defect-prs-carry-their-hardening-readiness-blocker-and-post.md]
- Who builds the shared workflow contract test in tests/test_workflow_contracts.py?: Whichever of feat(github): defect prs carry their hardening readiness blocker and post-merge audit #697 and fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861 lands first builds it. The expression-in-run: rule moves to fix(github): supply-chain claims made true — live Dependabot, zizmor and workflow invocation contracts #861. The test should reuse the resolver from fix(mcp): mcp tools and resources call commands and options that exist #836. (proposed) [sources: docs/agent/tasks/task-697-defect-prs-carry-their-hardening-readiness-blocker-and-post.md, tests/test_workflow_contracts.py]
- Where does the defect-PR classifier live, and who owns it if feat(ci): fail-to-pass check proves a fix's tests fail on its base (
devops ci fail-to-pass) #844 also needs it?: It lives in src/devops_cli/github/. Whichever of feat(github): defect prs carry their hardening readiness blocker and post-merge audit #697 and feat(ci): fail-to-pass check proves a fix's tests fail on its base (devops ci fail-to-pass) #844 lands first owns it; the other reuses it. (proposed) [sources: docs/agent/tasks/task-697-defect-prs-carry-their-hardening-readiness-blocker-and-post.md, src/devops_cli/github/init.py] - Does the workflow need to handle fork tokens (skip-not-fail)?: Yes. The issue ports the skip-not-fail decision for fork tokens from vibes' pr-sentinel.yml:69-74, so the audit job skips (not fails) when the token lacks the required scope for a fork. [sources: docs/agent/tasks/task-697-defect-prs-carry-their-hardening-readiness-blocker-and-post.md]
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
[end-marker]
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Sep 30, 2026
Revised for the roadmap design (#739-#746):
docs/ROADMAP.mdis dropped from the declared hardening surfaces, because ADR 0001 makes it a generated view. A defect PR's lesson now enters as an item through intake (#742).chore(docs): record roadmap planning glossary and github-source adr (#…
dan-petty commentedon Sep 30, 2026
Moved from v0.2.25 to v0.2.26. v0.2.25 is capped at 12 items (#740): it keeps #739-#742, their dependency #704, and the oldest P1 items. This P1 item is next in line.
dan-petty commentedon Oct 1, 2026
Moved from v0.2.26 to the backlog. After the v0.2.23 P1 leftovers were retargeted (they were committed earlier), v0.2.25 and v0.2.26 are full at 12 items each, and the roadmap-service items placed in v0.2.26 stay. It is next in line for a planned release.
feat(release): v0.2.24 (#905)
dan-petty-bot commentedon Oct 9, 2026
Status set to Ready at b5ea6ff (see proposed design in issue body).
feat(github): defect prs carry their hardening readiness blocker and …
dan-petty commentedon Oct 11, 2026
Merged
feat(release): v0.2.34 (#1566)