Skip to content

feat(infra): apply proposals P1-P6 P8 — contract audit, UTF-8 guard, … - #7

Merged
munna-chauhan merged 4 commits into
mainfrom
proposals/infra-improvements
May 19, 2026
Merged

feat(infra): apply proposals P1-P6 P8 — contract audit, UTF-8 guard, …#7
munna-chauhan merged 4 commits into
mainfrom
proposals/infra-improvements

Conversation

@munna-chauhan

Copy link
Copy Markdown
Owner

…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

  • What changed and why (1–3 bullets).

Scope

  • Files / components touched.
  • Pipeline phases affected.

Validation

  • pytest scripts/tests/ -q green
  • sh scripts/audit_inventory.py green
  • sh scripts/config_utils.py validate config.yml.example green
  • If .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.md Contribution Rules)

Notes

Anything reviewers should know — backwards-incompatibility, follow-ups, deferred work.

munna-chauhan and others added 4 commits May 19, 2026 12:35
…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>
@munna-chauhan
munna-chauhan merged commit bf48deb into main May 19, 2026
1 check passed
@munna-chauhan
munna-chauhan deleted the proposals/infra-improvements branch May 19, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant