feat(infra): apply proposals P1-P6 P8 — contract audit, UTF-8 guard, … - #7
Merged
Conversation
…oneshot policy, confluence actions, revision lifecycle hardening P6: audit_skill_contracts.py detects SKILL.md→script drift via AST (argparse choices + subparsers + sys.argv dispatch). 11 tests. P5: .gitattributes + .editorconfig enforce UTF-8/LF. check_utf8.py pre-commit hook rejects mojibake. 7 tests. P4: scripts/oneshot/ policy dir. Three _oneshot_ scripts migrated with LIFETIME/Provenance headers and fixed repo-root paths. P2: confluence_publish.py gains fetch/update/create/patch/validate actions. Ports one-shot HTTP logic. SKILL.md contract now matches implementation. P8: revision_manager.py populates pipeline.current_revision on reopen, clears on close, adds revisions[] history, adds current-revision query command. gate_transition.py blocks phase advance while revision_open is set. /design SKILL.md reads revision scope on entry. 7 new tests. P3+P1: /reopen SKILL.md documents close lifecycle and adds Design Review Gate (tdd-reviewer before TDD edits for design revisions). tdd-author MEMORY.md: call-site sanity + 2D-matrix keying entries. 284 tests pass. audit_skill_contracts exits 0. Co-Authored-By: HeadMaster ADLC <noreply@headmaster.dev>
…g checks - Delete scripts/oneshot/ — project-specific content belongs in memory/ or docs/, not scripts/ - Delete scripts/_oneshot_*.py untracked root files (same violation) - Merge audit_skill_contracts.py into audit_inventory.py — one audit tool (counts + contracts) - Merge check_utf8.py mojibake detection into secret_scanner.py — one pre-commit file check - Remove "Syndigo workstations" from publish-confluence/SKILL.md (project-specific) - Update test imports to reflect merged locations 284 tests pass. audit_inventory exits 0. Co-Authored-By: HeadMaster ADLC <noreply@headmaster.dev>
Delete test_audit_skill_contracts.py and test_check_utf8.py (stale names after their sources were merged). Replace with test_audit_inventory.py (11 contract tests + 5 count-audit tests) and test_secret_scanner.py (7 encoding tests + 2 scan_file integration tests). Removes has_mojibake wrapper, dead Path-as-_Path import, and __main__ runner boilerplate. Co-Authored-By: HeadMaster ADLC <noreply@headmaster.dev>
All four internal subprocess calls that spawned sibling .py scripts via sys.executable now use ["sh", str(script), ...] instead, matching the sh foo.py convention used everywhere else (skills, CI, hooks CLI commands). The polyglot shebang on each script handles Python discovery uniformly. Co-Authored-By: HeadMaster ADLC <noreply@headmaster.dev>
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.
…oneshot policy, confluence actions, revision lifecycle hardening
P6: audit_skill_contracts.py detects SKILL.md→script drift via AST (argparse choices + subparsers + sys.argv dispatch). 11 tests.
P5: .gitattributes + .editorconfig enforce UTF-8/LF. check_utf8.py pre-commit hook rejects mojibake. 7 tests.
P4: scripts/oneshot/ policy dir. Three oneshot scripts migrated with LIFETIME/Provenance headers and fixed repo-root paths.
P2: confluence_publish.py gains fetch/update/create/patch/validate actions. Ports one-shot HTTP logic. SKILL.md contract now matches implementation.
P8: revision_manager.py populates pipeline.current_revision on reopen, clears on close, adds revisions[] history, adds current-revision query command. gate_transition.py blocks phase advance while revision_open is set. /design SKILL.md reads revision scope on entry. 7 new tests.
P3+P1: /reopen SKILL.md documents close lifecycle and adds Design Review Gate (tdd-reviewer before TDD edits for design revisions). tdd-author MEMORY.md: call-site sanity + 2D-matrix keying entries.
284 tests pass. audit_skill_contracts exits 0.
Summary
Scope
Validation
pytest scripts/tests/ -qgreensh scripts/audit_inventory.pygreensh scripts/config_utils.py validate config.yml.examplegreen.claude/agents/,.claude/skills/,.claude/workflows/,.claude/hooks/,.claude/settings.json, or a guarded script changed → human approval requested in this PR (per.claude/CLAUDE.mdContribution Rules)Notes
Anything reviewers should know — backwards-incompatibility, follow-ups, deferred work.