Unified audit CHG-001..013 + governance institutionalization (TASK-1102..1106) - #50
Open
arcobaleno64 wants to merge 35 commits into
Open
Unified audit CHG-001..013 + governance institutionalization (TASK-1102..1106)#50arcobaleno64 wants to merge 35 commits into
arcobaleno64 wants to merge 35 commits into
Conversation
…ition working_tree_precondition for CHG-011/CHG-012: commit the pending BKL-001 triage-resolution paragraph (root + EXACT_SYNC template twin) before those changes touch the same file. Release-manifest regen deferred to the single end-of-run regen per manifest release_manifest_regen_note. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…nstant
S7-001 + D3-note; HC-2 YES. Constant superseded by resolve_verification_policy
resolver pipeline (TASK-1008); its verifying={task,code,status} set diverged
from any computed set and only misled. Zero consumers repo-wide (only the
definition line + 2 historical artifacts referencing it, which stay untouched).
- gsv L79-88 constant removed (root + EXACT_SYNC twin, byte-identical)
- docs/repo_structure_workflow_maturity_assessment.md: drop stale mention
- state_required_artifacts()/resolve_verification_policy untouched (files_must_not_touch)
Verified: grep 0 hits; pytest 2022 passed / 2 pre-existing release-integrity
fails (clear at final regen) / 2 skipped — no new failures; guard_contract [OK].
Release-manifest regen deferred to single end-of-run regen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…stage 1/2) S7-002; HC-3 MODIFY TO deprecation-first (scaffold/propagate_downstream already shipped templates; buffer before removal). Zero behavior change this stage — legacy (current_state) status still validates; only the warning text is升级 to signal removal ahead. Actual legacy-branch removal is a next-release follow-up (out of this manifest). - gsv validate_status_schema warning -> "DEPRECATED legacy status schema (current_state) detected; support will be removed in a future release — run reconcile to migrate" (root + EXACT_SYNC twin) - new test test_legacy_schema_deprecation_warning asserts DEPRECATED + removal notice (root + EXACT_SYNC test twin — required to keep guard_contract [OK]) - LEGACY_STATE_ALIASES / migrate_artifact_schema.py untouched (files_must_not_touch) Verified: pytest -k legacy 33 passed; full pytest 2023 passed / 2 pre-existing release-integrity fails / 2 skipped (no new failures); guard_contract [OK]. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
D9-002; spot-check#3 TIGHTEN-CODE 逐條變體; HC-9 YES. A banned/vague phrase inside an R-block that is missing any required field is now an error (a stub dismissal); the same phrase in an otherwise-complete block stays a warning. Whole-doc field check preserved (backward compat); premortem errors still only block in coding state (gsv gate unchanged) — zero retroactive impact. - gsv: new split_premortem_risk_blocks() + per-block escalation loop (root+twin). Block regex handles all 3 real header shapes: bare R1, list "- R1", "### R1". - tests: keep test_banned_phrase_warning (phrase+complete->warning) + new test_banned_phrase_incomplete_block_errors (phrase+missing-field->error) (root+twin) - RT-031 static case (red_team/case_builders.py + cases_metadata.json, root+twin) + runbook registration; suite --phase static exit 0, RT-031 as-expected - PREMORTEM_BANNED_PHRASES / classify_premortem_policy / min_risks untouched Verified (hard AC): backscan over all 111 plans = 0 NEW errors, 0 removed (post set == baseline 8 plans/46 errors exactly; 0 plans contain any banned phrase). pytest -k premortem 24 passed; full pytest 2024 passed / 2 pre-existing release-integrity fails / 2 skipped; guard_contract [OK]. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t enforcement claim D9-001 + D2-001; HC-10 fix-doc + HC-13(i). Docs claimed behavior the guards never implement; aligned to actual gsv behavior (no enforcement relaxation). - workflow-gates.md (root-only): Last Verified -> 2026-07-03; Sources section now stated as blocking (CRITICAL) not "警告但不擋"; premortem note adds the CHG-007 per-block escalation; scope-drift line rewritten to the real git-backed hard-fail + decision waiver mechanism (removes non-existent status "scope-drift-detected"); ## Environment restated as suggested field (NOT guard-enforced) at both verify-gate and lightweight-standard spots. - CLAUDE.md + template/CLAUDE.md: lightweight verify sentence rewritten — relaxation governed by resolved policy; Environment is not a guard-enforced substitute for Build Guarantee. SOURCE_REQUIRED_PHRASES literals untouched. - prompt_regression_cases.json + twin: new PR-034 locks the corrected contract (guard_contract requires the cases file be touched alongside any prompt-entry edit; no existing case pinned the changed sentence, so a new one was added). Verified: prompt_regression_validator exit 0 (PR-034 pass, all cases pass); guard_contract [OK]; full pytest 2024 passed / 2 pre-existing release-integrity fails / 2 skipped. Note: test_invoke_gemini_agent lifecycle test flaked once (Windows subprocess/stash-baseline, isolated tmp_repo) — passed in isolation and on full-suite re-run; unrelated to this docs/JSON change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…s under EXACT_SYNC D6-001; Phase-3 FINAL-C; spot-check#2 (normalize 後 3/6 檔實質 drift); HC-4 YES. Pure tightening — validate_exact_sync now covers 5 previously-unguarded docs; no relaxation. (BKL-002 predicted this drift; now closed for these files.) - template/docs/security_cadence.md + repo_structure_workflow_maturity_assessment.md: re-synced verbatim from authoritative root (template was stale — 11962 vs 16592, 7291 vs 30868 bytes; no placeholders; maturity_assessment also carries the CHG-001 root edit forward per CHG-001's delegation). root not touched. - guard_contract_validator EXACT_SYNC_FILES +5 (hooks, orchestration-workflow, raci-matrix, security_cadence, repo_structure_workflow_maturity_assessment), alphabetical convention kept (root + twin, byte-identical) - template/docs/red_team_scorecard.generated.md removed (root-only generated artifact, must not be dual-written); docs/red_team_scorecard.md notes its root-only nature (root + EXACT_SYNC twin) Verified: guard_contract [OK] (all 5 new entries pass normalize); security_cadence root==template (CRLF-normalized diff empty); template generated-twin gone; full pytest 2024 passed / 2 pre-existing release-integrity fails (clear at final regen) / 2 skipped. Release-manifest regen deferred to single end-of-run regen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
S3-001 + D9-003; HC-6 direction a (subagent_roles.md §2 = true source). The
"§2 拆分" refactor was left incomplete — the table stayed in subagent_roles.md
(hybrid-sync bound) while raci-matrix.md kept a duplicate that drifted +1 row.
- docs/subagent_roles.md §2: merge back the Codex Reviewer (Council) row from
raci-matrix.md:16 (root + EXACT_SYNC twin)
- workflow_constants.RACI_MATRIX: add "Codex Reviewer (Council)":
{"review notes (3 model votes)"} — single R-token (no '/'), verified against
the hybrid-sync parser's '/'-split before fixing the literal (root + twin)
- docs/raci-matrix.md: delete the duplicate §2 table, replace with a pointer to
subagent_roles.md §2; §2.1 TAO Trace table (this file's unique content) kept
untouched (root + EXACT_SYNC twin)
- test_workflow_constants: pin the new entry + its no-'/' parser property (root+twin)
- validate_raci_hybrid_sync logic untouched (files_must_not_touch)
Verified: guard_contract [OK] (hybrid sync passes new row; raci-matrix twin in
sync); grep 'Codex Reviewer' raci-matrix.md=0 / subagent_roles.md=1; full pytest
2025 passed / 2 pre-existing release-integrity fails / 2 skipped.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…reconcile routing↔RACI) D4-001; HC-7 direction a (承認現行實務). The routing matrix routes Codex to author workflow-contract docs, but RACI_MATRIX_V2 didn't grant that category — the sole root cause of the 2 logged historical violations. Direction a fixes the RACI side (routing unchanged); fail-closed on unknown paths preserved, Codex doc-writes still bounded by CODEX.md write-scope discipline. - workflow_constants.RACI_MATRIX_V2['Codex CLI'] += 'workflow_contract_docs' (root + twin); other V2 agent entries + routing docs untouched - test_workflow_constants: pin the new grant + task-still-fail-closed (root+twin) - raci-violations-log.md: reconciliation note (root cause fixed, NOT a retroactive waiver; historical entries preserved) Verified: audit-raci docs/orchestration.md "Codex CLI" --dry-run -> result=PASS (was VIOLATION); audit-raci TASK-1000.task.md "Codex CLI" --dry-run -> VIOLATION (only workflow_contract_docs expanded); guard_contract [OK]; full pytest 2026 passed / 2 pre-existing release-integrity fails / 2 skipped. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… + CI aux scan D2-002; HC-8 YES; Occam PASS. Pure added check point; audit fail-closed logic untouched. Design confirmed with advisor. - Invoke-CodexAgent.ps1 / Invoke-GeminiAgent.ps1 (root + twins): after the stash-based post-dispatch delta is computed, run `guard_contract_validator.py --audit-raci <file> <agent>` per changed path. Violations tracked in a SEPARATE $raciViolations list — reported and, under the SAME existing $AutoRestore enforcement gate, exit 2; but NEVER fed to Restore-PostDispatchDelta (they are legitimately path-allowed writes, only the artifact CLASS is wrong). Only audit exit 1 counts as a violation; other non-zero logged inconclusive. Lifecycle pre-existing untracked files skipped (same hash check). Detect mode (no -AutoRestore) prints only — existing callers/tests unaffected. - test_invoke_codex_agent.py / test_invoke_gemini_agent.py (root + twins): +2 cases each — within-AllowedPaths wrong-class write -> exit 2 + not deleted; within-AllowedPaths correct-class write -> exit 0. - workflow-guards.yml (root + twin): aux step classifies changed files under the governance dirs and fails closed on UNKNOWN category (no per-agent). classify_path is directory-based so enumerated dirs always resolve known -> this is a fail-closed structural invariant / defense-in-depth; primary enforcement is the wrapper. Robust to shallow clone (skip+warn); full history via CHG-012 fetch-depth. - _run_raci_audit_v2 body + RACI_MATRIX_V2 untouched (files_must_not_touch). Verified: 37 wrapper tests pass (33 existing + 4 new); PS parse OK both wrappers; YAML lint OK; CI classify logic dry-run pass(known)=0 / fail(unknown)=1; guard_contract [OK]; full pytest 2030 passed / 2 pre-existing release-integrity fails / 2 skipped. NOTE: literal enumerated CI scope never yields UNKNOWN (classify_path is dir-based) — the fail branch is proven by dry-run, not by the scoped dirs; documented as a structural invariant. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-ruling terminal D9-004; HC-13(ii). Documentary disposition (same pattern as §5.1(b)); no guard change, blocked-sink discipline not weakened — (c) is explicitly limited to commander/human ruling + decision artifact (risk-acceptance or equivalent); a general stuck task cannot use it to bypass Gate-E. - §5.1 (c): 3 identification conditions (decision ruling + not-resume reason; status.json blocked_reason starts ABANDONED + ruling date; NO successor obligation, the key distinction from (b)); Gate-E N/A same as (b); example TASK-901. Verified the 3 conditions match TASK-901's actual decision/status records. §5.1 (a)(b) text + guard_status_validator.py untouched. - root + EXACT_SYNC twin (byte-identical). Verified: guard_contract [OK] (twin match). release-integrity pytest deferred to the single end-of-run manifest regen (stays red until then, as expected). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
D9-005; HC-13(iii). LEDGER stopped at 7 rows on 2026-05-06 (~30 done tasks since) — with no fill-in rule the architecture-synthesizer N=10 trigger could never accumulate. Pure documentation. - PROCESS_LEDGER.md head 維護規則: add "何時必記" rule — any task producing an improvement artifact (Gate E or retrospective) must log a row; pure lightweight/docs tasks may skip. Existing 7 entries untouched. - orchestration-workflow.md Stage 6 Closure item 6: cross-ref sentence (root + EXACT_SYNC twin). - GEMINI.md deliberately untouched (avoids prompt-case coupling); the template PROCESS_LEDGER twin is a downstream placeholder (not EXACT_SYNC) and is out of the manifest's scope, so left unchanged. Verified: guard_contract [OK] (orchestration-workflow.md twin match); 何時必記 present; 7 ledger entries intact; GEMINI.md clean. Full pytest + release-integrity covered by the end-of-run batch after the single manifest regen. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…e check) + BKL-006 (governance archive flag)
D9-006 (friction F-1, Occam PASS) + HC-12 DOWNGRADE TO FLAG-ONLY. Pure doc
expansion, three-part format matching existing entries.
- BKL-005: check-item — before cross-referencing two documents as mutual
evidence, first verify the level/scope of the problem each describes is the
same; literal similarity ("必填", "所有 code artifact") is not evidence of the
same problem (friction: 2026-07-02 scope-drift session, 3 recurrences + auto-memory).
- BKL-006: ~13 zero-runtime-caller superseded files in governance/; archiving
downgraded to flag-only (HC-12) because evidence-ref breakage risk outweighs
directory readability; defer to a future evidence-ref migration.
- BKL-001..004 untouched (precondition BKL-001 定案段 already committed in 3942eec).
- root + EXACT_SYNC twin (byte-identical).
Verified: guard_contract [OK] (twin match); BKL-005/006 present in 3-part format;
BKL-001..004 intact. release-integrity deferred to end-of-run regen.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
S2-001; HC-11 YES. real_dispatch_count=0 for adr/debug/rtm/srs since TASK-1050
created them (2026-05-06, ~2 months). Revivable archive, not deletion; templates
are not a gate — discover_templates.py scan converges naturally.
- git mv docs/templates/{adr,debug,rtm,srs} -> docs/templates/archive/... (root
+ template mirror, 8 renames). discover_templates.py uses a single-level glob
`*/TEMPLATE.md`, so archived dirs (2 levels deep) drop out automatically — no
exclude rule needed (discover_templates.py untouched).
- docs/templates/archive/README.md: archive reason, revival steps, source TASK-1050.
- docs/subagent_task_templates.md: archive note (the 4 were never in this curated
index, so removal is vacuous) — root + EXACT_SYNC twin.
- architecture-synthesizer / security / other 8 kept dirs untouched; TASK-1050
historical artifacts untouched.
Verified: discover_templates.py output contains no adr/debug/rtm/srs/archive
(9 templates remain; security has no direct TEMPLATE.md so was never listed);
subagent_task_templates twin identical; TASK-1050 artifacts clean; guard_contract
[OK]. Full pytest + release-integrity in the end-of-run batch.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…C-touching clean-task closures D7 scope-drift TIGHTEN; BKL-001 resolved A2 (range-limited); spot-check#1 confirms replay arms KEEP as the precondition. Highest-risk change — independent commit, forward + regression both run. Branch A dirty-worktree path untouched; new rule is fail-closed and forward-only (no retroactive impact on existing done tasks). - gsv: is_sensitive_guard_path() (EXACT_SYNC_FILES via LAZY import — gcv imports gsv at top, so a module-level import back would be circular; lazy import reads gcv's live list, no mirror/drift) ∪ guard_*.py, run_quality_gates.py, workflow_constants.py. New check in validate_artifact_presence's historical (else) branch, gated on enforce_clean_diff_evidence — set True ONLY by write_transition's target_presence call for to_state==done, default False everywhere else. So a NEW verifying→done write-transition touching the sensitive set without ## Diff Evidence fails closed, while validate_all/--task-id re-validation (incl. CI Status Guard) is unaffected. detect_git_backed_scope_drift / collect_github_pr_files / load_archive_snapshot untouched (files_must_not_touch). - workflow-guards.yml: checkout fetch-depth: 0 (commit-range replay + RACI aux scan need full history) — root + twin. - tests (root + EXACT_SYNC twin): 5 — sensitive+no-evidence→FAIL, sensitive+commit-range →OK, non-sensitive→unchanged, sensitive+flag-False (re-validation)→OK, is_sensitive_guard_path. - RT-032 (case_builders + cases_metadata + runbook, root+twins): verifying→done write-transition with guard-touching code + no Diff Evidence -> fail-closed. - artifact-spec-code.md: register the conditional-mandatory rule (root+twin). - red_team_backlog.md: BKL-001 待決段 -> 已裁決 HC-1 A2 (root + EXACT_SYNC twin). - prompt_regression_cases.json: NO change — PR-017/018 pin Diff Evidence structural fields (still present), not the optional wording changed; artifact-spec-code.md is not a PROMPT_ENTRY file so no prompt-contract-sync trigger (grep-confirmed). Verified (real output): - 116 done tasks re-run via validate_all (flag=False / --task-id path): 0 NEW CHG-012 errors (the 55 that touch the sensitive set without Diff Evidence stay [OK]) — forward-only proof. - forward: sensitive+no-evidence flag=True -> ERROR; +commit-range -> OK; non-sensitive -> OK; flag=False -> OK. pytest 5/5 pass. - RT suite --phase static exit 0, RT-032 as-expected (fail/exit1/"clean-task closure touches guard"). - guard_contract [OK]; prompt_regression PR-017/018 pass; full pytest 2035 passed / 2 pre-existing release-integrity fails (clear at final regen) / 2 skipped. - NOTE: enforcement is transition-path-scoped (write_transition / --write-transition). The CI Status Guard uses --task-id (validate_all) and will NOT trigger it. fetch-depth: 0 is present + YAML-valid; a real CI-run proof needs a push (not performed here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Per manifest release_manifest_regen_note: one deterministic `snapshot_manifest.py generate` after all 13 changes land, rather than per-change regen. Reflects every template/ change from CHG-001..013 (notably the CHG-003 security_cadence/maturity_assessment re-sync + red_team_scorecard.generated.md removal, and the CHG-013 template archive move). 244 entries; root 452c9551b25b. Normalized to LF (.gitattributes eol=lf; Windows text-mode write produced CRLF). .agents/ (repo-root, untracked) is not under template/ so it is excluded. Verified: both release-integrity tests now pass (test_council_forge_release_manifest_matches_template_snapshot + test_integrity_gate_passes_on_valid_repo). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…dispatch decision CLAUDE.md lacked any mention that -AutoRestore defaults to $false (detect-only, exit 0) and must be explicitly passed by the orchestrator for write-scope violations to actually be blocked. GEMINI.md's violation clause still used the pre-TASK-1059 absolute "git checkout HEAD --" restore language, contradicting the conditional -AutoRestore description immediately below it. CODEX.md was verified already compliant and is intentionally left unchanged. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Premortem (R1-R4) was self-authored and self-graded: guard_status_validator.py only lints format/wording (P1-P8), never checks whether the risk judgment itself holds up. Existing independent-review mechanisms don't cover this — Council Reviewer acts after a code diff exists, and the RACI Auditor / Architecture Synthesizer is a periodic batch review, not per-plan. docs/premortem_rules.md gains §12: plans meeting one of four high-risk conditions (security fix / upstream PR / cross-module or cross-repo / unfamiliar framework) must have their R1-R4 challenged by an agent outside the plan author's own conversation context before planned -> coding, with results appended under a new `### Independent Premortem Challenge` subsection of the plan's ## Risks. CLAUDE.md's STOP triggers now reference this. No new artifact type, slash command, or automated guard enforcement. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… UTF-8 stdin decode + context convention docs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ce / Swiss Cheese (+ Campbell rejection) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
council-forge | 50e950e | Jul 17 2026, 03:53 AM |
There was a problem hiding this comment.
Pull request overview
This PR combines a “unified audit” bundle and follow-on governance institutionalization work, tightening workflow enforcement (RACI + write-scope + diff-evidence requirements), expanding red-team coverage, and aligning root/template governance documentation and prompt contracts.
Changes:
- Strengthens enforcement and regression-pin coverage around governance rules (RACI single-sourcing, wrapper post-dispatch auditing, prompt regression pins PR-034..PR-038).
- Adds new/updated governance SOPs and documentation (rule lifecycle audit, governance lenses, security cadence, workflow state machine terminals), mirrored into
template/. - Extends guard/validator behaviors and red-team cases (premortem vague-phrase escalation; conditional Diff Evidence enforcement for guard/EXACT_SYNC-sensitive clean-task closures).
Reviewed changes
Copilot reviewed 113 out of 121 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
.github/memory-bank/project-facts.md |
Documents pytest baseline invocation + stdin fixture expectations. |
.github/memory-bank/raci-violations-log.md |
Adds reconciliation note tying historical violations to RACI policy update. |
.github/memory-bank/workflow-gates.md |
Updates “Last Verified” and clarifies gate semantics and new escalations. |
.github/workflows/workflow-guards.yml |
Uses full git history and adds aux changed-file RACI category scan in CI. |
.well-known/release-manifest.json |
Regenerated release snapshot manifest after governance/template changes. |
AGENTS.md |
Adds rule lifecycle audit SOP to the documentation index. |
CLAUDE.md |
Documents -AutoRestore as orchestrator decision; clarifies lightweight verify constraints; adds high-risk premortem challenge requirement. |
GEMINI.md |
Fixes write-scope consequence wording to be conditional on -AutoRestore. |
README.md |
Adds “governance lenses” explanation above the two-layer model. |
README.zh-TW.md |
Adds Traditional Chinese “governance lenses” explanation above the two-layer model. |
artifacts/code/TASK-1102.code.md |
Records TASK-1102 doc changes + prompt regression pin update. |
artifacts/code/TASK-1103.code.md |
Records TASK-1103 premortem challenge doc changes + pins. |
artifacts/code/TASK-1104.code.md |
Records TASK-1104 rule lifecycle audit SOP + relaxation log introduction. |
artifacts/code/TASK-1105.code.md |
Records TASK-1105 stdin/pytest drift fix (conftest + conventions) with amendment. |
artifacts/code/TASK-1106.code.md |
Records TASK-1106 governance lenses and SOP additions + pins. |
artifacts/improvement/PROCESS_LEDGER.md |
Clarifies “must record” rule and links N=10 trigger to lifecycle audit. |
artifacts/improvement/RELAXATION_LOG.md |
Seeds in-repo relaxation log with prior relaxations + provenance guidance. |
artifacts/research/TASK-1102.research.md |
Research evidence for AutoRestore behavior and contract constraints. |
artifacts/research/TASK-1103.research.md |
Research evidence for independent premortem challenge gap + integration plan. |
artifacts/research/TASK-1104.research.md |
Research evidence for rule lifecycle audit trigger placement and constraints. |
artifacts/research/TASK-1106.research.md |
Research evidence mapping governance lenses to mechanisms and docs. |
artifacts/scripts/Invoke-CodexAgent.ps1 |
Adds post-dispatch RACI category audit (Codex) gated by -AutoRestore. |
artifacts/scripts/Invoke-GeminiAgent.ps1 |
Adds post-dispatch RACI category audit (Gemini) gated by -AutoRestore. |
artifacts/scripts/conftest.py |
Switches fake-exe stdin capture to raw bytes decoded as UTF-8 (PowerShell parity). |
artifacts/scripts/drills/prompt_regression_cases.json |
Adds PR-034..PR-038 regression pins for governance text/contracts. |
artifacts/scripts/guard_contract_validator.py |
Updates EXACT_SYNC file set to include new governance/SOP/docs files. |
artifacts/scripts/guard_status_validator.py |
Adds premortem per-block vague-phrase escalation; adds sensitive clean-task Diff Evidence enforcement. |
artifacts/scripts/red_team/case_builders.py |
Adds RT-031/RT-032 red-team cases covering new validator behaviors. |
artifacts/scripts/red_team/cases_metadata.json |
Registers RT-031/RT-032 in red-team metadata. |
artifacts/scripts/test_invoke_codex_agent.py |
Adds wrapper-level tests for new Codex RACI audit behavior. |
artifacts/scripts/test_invoke_gemini_agent.py |
Adds wrapper-level tests for new Gemini RACI audit behavior. |
artifacts/scripts/test_workflow_constants.py |
Adds tests for RACI matrix updates and Codex ownership of workflow contract docs. |
artifacts/scripts/workflow_constants.py |
Adds council reviewer entry + expands Codex CLI RACI v2 categories. |
artifacts/status/TASK-1102.status.json |
Adds TASK-1102 status to lifecycle as done. |
artifacts/status/TASK-1103.status.json |
Adds TASK-1103 status to lifecycle as done. |
artifacts/status/TASK-1104.status.json |
Adds TASK-1104 status to lifecycle as done. |
artifacts/status/TASK-1105.status.json |
Adds TASK-1105 status to lifecycle as done. |
artifacts/status/TASK-1106.status.json |
Adds TASK-1106 status to lifecycle as done. |
artifacts/tasks/TASK-1102.task.md |
Adds TASK-1102 task artifact documenting acceptance criteria and constraints. |
artifacts/tasks/TASK-1105.task.md |
Adds TASK-1105 task artifact documenting drift investigation and fix criteria. |
artifacts/test/TASK-1102.test.md |
Adds TASK-1102 test report (docs-spec adapter NOT_APPLICABLE_BY_ADAPTER). |
artifacts/test/TASK-1103.test.md |
Adds TASK-1103 test report (docs-spec adapter NOT_APPLICABLE_BY_ADAPTER). |
artifacts/test/TASK-1104.test.md |
Adds TASK-1104 test report (docs-spec adapter NOT_APPLICABLE_BY_ADAPTER). |
artifacts/test/TASK-1105.test.md |
Adds TASK-1105 test report validating stdin drift fix across shells. |
artifacts/test/TASK-1106.test.md |
Adds TASK-1106 test report (docs-spec adapter NOT_APPLICABLE_BY_ADAPTER). |
docs/orchestration-workflow.md |
Tightens PROCESS_LEDGER recording rule (improvement-producing closures must log). |
docs/orchestration.md |
Adds governance lenses rows + rejects Campbell’s Law (Goodhart equivalent). |
docs/premortem_rules.md |
Adds §12 independent premortem challenge convention for high-risk plans. |
docs/raci-matrix.md |
Removes duplicated role table; points single source to docs/subagent_roles.md. |
docs/red_team_backlog.md |
Updates backlog with HC-1 A2 Diff Evidence decision and adds new check items. |
docs/red_team_runbook.md |
Adds RT-031/RT-032 descriptions to the static phase table. |
docs/red_team_scorecard.md |
Clarifies generated scorecard file is root-only (not EXACT_SYNC). |
docs/repo_structure_workflow_maturity_assessment.md |
Updates constant-management description to reflect removal of STATE_REQUIRED_ARTIFACTS. |
docs/schemas/artifact-spec-code.md |
Makes Diff Evidence conditionally required for guard/EXACT_SYNC-sensitive clean-task closures. |
docs/security_cadence.md |
Adds schedule cadence and expands component list (SAST/SBOM/security.txt/release integrity). |
docs/sop/dispatch_implementation.md |
Adds fallback-tier acceptance discipline section (TASK-1106). |
docs/sop/rule_lifecycle_audit.md |
Introduces Occam/Chesterton audit SOP and records verdict vocabulary and guardrails. |
docs/subagent_roles.md |
Adds “Codex Reviewer (Council)” row to the role index. |
docs/subagent_task_templates.md |
Notes archived templates and how to restore them. |
docs/templates/architecture-synthesizer/TEMPLATE.md |
Cross-references lifecycle audit to the N=10 trigger batch. |
docs/templates/archive/README.md |
Documents archived templates rationale + restoration path. |
docs/templates/archive/adr/TEMPLATE.md |
Adds archived ADR template content. |
docs/templates/archive/debug/TEMPLATE.md |
Adds archived debug runbook template content. |
docs/templates/archive/rtm/TEMPLATE.md |
Adds archived RTM template content. |
docs/templates/archive/srs/TEMPLATE.md |
Adds archived SRS template content. |
docs/workflow_state_machine.md |
Adds “abandoned-via-ruling” blocked terminal disposition definition. |
template/.github/memory-bank/project-facts.md |
Mirrors project-facts updates into template. |
template/.github/workflows/workflow-guards.yml |
Mirrors workflow-guards changes into template. |
template/AGENTS.md |
Mirrors AGENTS index update into template. |
template/CLAUDE.md |
Mirrors CLAUDE.md governance changes into template. |
template/GEMINI.md |
Mirrors GEMINI.md conditional AutoRestore wording into template. |
template/artifacts/improvement/PROCESS_LEDGER.md |
Mirrors PROCESS_LEDGER header rule updates into template. |
template/artifacts/improvement/RELAXATION_LOG.md |
Adds template skeleton Relaxation Log. |
template/artifacts/scripts/Invoke-CodexAgent.ps1 |
Mirrors post-dispatch RACI audit into template wrapper. |
template/artifacts/scripts/Invoke-GeminiAgent.ps1 |
Mirrors post-dispatch RACI audit into template wrapper. |
template/artifacts/scripts/conftest.py |
Mirrors stdin capture change into template. |
template/artifacts/scripts/drills/prompt_regression_cases.json |
Mirrors prompt regression case additions into template. |
template/artifacts/scripts/guard_contract_validator.py |
Mirrors EXACT_SYNC list expansion into template. |
template/artifacts/scripts/guard_status_validator.py |
Mirrors premortem escalation + Diff Evidence enforcement into template validator. |
template/artifacts/scripts/red_team/case_builders.py |
Mirrors RT-031/RT-032 builders into template. |
template/artifacts/scripts/red_team/cases_metadata.json |
Mirrors RT-031/RT-032 metadata into template. |
template/artifacts/scripts/test_invoke_codex_agent.py |
Mirrors wrapper RACI audit tests into template. |
template/artifacts/scripts/test_invoke_gemini_agent.py |
Mirrors wrapper RACI audit tests into template. |
template/artifacts/scripts/test_workflow_constants.py |
Mirrors workflow_constants tests into template. |
template/artifacts/scripts/workflow_constants.py |
Mirrors workflow_constants updates into template. |
template/docs/orchestration-workflow.md |
Mirrors orchestration-workflow update into template. |
template/docs/orchestration.md |
Mirrors orchestration governance lenses updates into template. |
template/docs/premortem_rules.md |
Mirrors premortem rules §12 into template. |
template/docs/raci-matrix.md |
Mirrors raci-matrix single-source update into template. |
template/docs/red_team_backlog.md |
Mirrors red-team backlog updates into template. |
template/docs/red_team_runbook.md |
Mirrors red-team runbook RT additions into template. |
template/docs/red_team_scorecard.md |
Mirrors generated-scorecard note into template. |
template/docs/schemas/artifact-spec-code.md |
Mirrors conditional Diff Evidence requirement into template. |
template/docs/security_cadence.md |
Mirrors security cadence expansions into template. |
template/docs/sop/dispatch_implementation.md |
Mirrors fallback-tier acceptance discipline into template. |
template/docs/sop/rule_lifecycle_audit.md |
Mirrors new rule lifecycle audit SOP into template. |
template/docs/subagent_roles.md |
Mirrors subagent role index update into template. |
template/docs/subagent_task_templates.md |
Mirrors archived templates notice into template. |
template/docs/templates/architecture-synthesizer/TEMPLATE.md |
Mirrors N=10 trigger cross-reference into template. |
template/docs/templates/archive/adr/TEMPLATE.md |
Mirrors archived ADR template into template. |
template/docs/templates/archive/debug/TEMPLATE.md |
Mirrors archived debug template into template. |
template/docs/templates/archive/rtm/TEMPLATE.md |
Mirrors archived RTM template into template. |
template/docs/templates/archive/srs/TEMPLATE.md |
Mirrors archived SRS template into template. |
template/docs/workflow_state_machine.md |
Mirrors abandoned-via-ruling terminal disposition into template. |
Comment on lines
+549
to
+555
| & python (Join-Path $PSScriptRoot 'guard_contract_validator.py') --audit-raci $p 'Codex CLI' --dry-run 2>&1 | Out-Null | ||
| $auditExit = $LASTEXITCODE | ||
| if ($auditExit -eq 1) { | ||
| $raciViolations += $p | ||
| } elseif ($auditExit -ne 0) { | ||
| Write-Host " [GUARD][RACI] audit inconclusive (exit $auditExit), treating as non-violation: $p" -ForegroundColor DarkYellow | ||
| } |
Comment on lines
+478
to
+484
| & python (Join-Path $PSScriptRoot 'guard_contract_validator.py') --audit-raci $p 'Gemini CLI' --dry-run 2>&1 | Out-Null | ||
| $auditExit = $LASTEXITCODE | ||
| if ($auditExit -eq 1) { | ||
| $raciViolations += $p | ||
| } elseif ($auditExit -ne 0) { | ||
| Write-Host " [GUARD][RACI] audit inconclusive (exit $auditExit), treating as non-violation: $p" -ForegroundColor DarkYellow | ||
| } |
Comment on lines
+549
to
+555
| & python (Join-Path $PSScriptRoot 'guard_contract_validator.py') --audit-raci $p 'Codex CLI' --dry-run 2>&1 | Out-Null | ||
| $auditExit = $LASTEXITCODE | ||
| if ($auditExit -eq 1) { | ||
| $raciViolations += $p | ||
| } elseif ($auditExit -ne 0) { | ||
| Write-Host " [GUARD][RACI] audit inconclusive (exit $auditExit), treating as non-violation: $p" -ForegroundColor DarkYellow | ||
| } |
Comment on lines
+478
to
+484
| & python (Join-Path $PSScriptRoot 'guard_contract_validator.py') --audit-raci $p 'Gemini CLI' --dry-run 2>&1 | Out-Null | ||
| $auditExit = $LASTEXITCODE | ||
| if ($auditExit -eq 1) { | ||
| $raciViolations += $p | ||
| } elseif ($auditExit -ne 0) { | ||
| Write-Host " [GUARD][RACI] audit inconclusive (exit $auditExit), treating as non-violation: $p" -ForegroundColor DarkYellow | ||
| } |
…t Radius / Separation of Duties / Least Privilege / Gall's Law / Modernized Postel's Law (+ Policy Engine rejection) Six complementary governance lenses added to the Governance Lenses table alongside a decision-schema conditional-optional Reversibility & Blast Radius section and an explicit rejection of an independent policy engine (OPA/Rego/CEL), per Gall's Law.
…n to Goodhart's Law Lucas Critique added as the 16th governance lens; Campbell's Law's operational rules are folded into the existing Goodhart's Law row instead of a new lens, honoring the TASK-1106 rejection of a separate Campbell's Law lens. Decision schema gains conditional-optional Metrics Policy and Policy Regime sections.
…ed regressions Resolve a caller-side dispatch incident (overlapping foreground/background Codex runs after a tool-level timeout, plus a wrapper false-positive on a misplaced log redirect): clean conflict markers, remove duplicated test methods, drop the superseded stash. Fix the two pytest regressions this task introduced (literal BOM in the plan artifact, stale release manifest after template edits) and document the remaining pre-existing git-root test failures as an out-of-scope baseline exception. Add decision, verify, and improvement (Gate E) artifacts. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…d lists Add replayable ## Diff Evidence (commit-range) covering the full TASK-1107 diff span, and complete the code/plan Files Changed and Files Likely Affected lists to include the lifecycle artifacts themselves so the scope-drift replay is internally consistent. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rmalization) normalize_path_token() strips the leading dot from .well-known/... paths; recompute the hash over the normalized token set to match the validator's own replay computation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…ardening Formalize two caller-side dispatch operational rules surfaced by the TASK-1107 incident: don't re-dispatch after a tool-level timeout without confirming the prior process has actually exited, and never redirect a dispatch wrapper's stdout/stderr into a path inside the repo tree. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rify artifact Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…lf-references Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…anged Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This branch carries two related bodies of work:
Unified audit 2026-07-03 (CHG-001..013) — 12-change manifest execution: dead-constant removal, legacy schema deprecation stage 1, EXACT_SYNC twin re-sync + coverage expansion, RACI single-sourcing + wrapper post-dispatch wiring, premortem banned-phrase escalation, workflow-gates doc alignment, abandoned-via-ruling terminal disposition, PROCESS_LEDGER trigger clarification, red-team backlog additions, zero-dispatch template archival, and the HC-1 A2 ruling (conditional
## Diff Evidencefor guard/EXACT_SYNC-touching clean-task closures).Governance institutionalization (TASK-1102..1106):
-AutoRestoreis the orchestrator's explicit dispatch decisiondocs/premortem_rules.md§12)docs/sop/rule_lifecycle_audit.md), four-verdict vocabulary (retire/relax/keep/open), N=10 PROCESS_LEDGER co-trigger, in-repo RELAXATION_LOG seedingVerification
guard_contract_validator(incl.--check-readme),guard_status_validatorper task,prompt_regression_validatorPR-001..PR-038🤖 Generated with Claude Code
https://claude.ai/code/session_01JRiUJzZEHSTe1rPkRgKnk6