@structor-dev/cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +405 -0
  3. package/bin/structor.mjs +576 -0
  4. package/docs/INIT.md +109 -0
  5. package/docs/adr/0001-default-generated-repo-name.md +9 -0
  6. package/docs/issues/0001-structor-doctor.md +39 -0
  7. package/examples/frontend-backend/harness.config.json +35 -0
  8. package/examples/openai-and-anthropic/harness.config.json +28 -0
  9. package/examples/single-repo/harness.config.json +26 -0
  10. package/harness.config.example.json +38 -0
  11. package/package.json +58 -0
  12. package/schemas/contract-manifest.schema.json +18 -0
  13. package/schemas/harness-config.schema.json +85 -0
  14. package/schemas/task-brief.schema.json +37 -0
  15. package/scripts/check-config.mjs +76 -0
  16. package/scripts/check-contract-manifests.mjs +85 -0
  17. package/scripts/check-model-overlays.mjs +30 -0
  18. package/scripts/check-placeholders.mjs +48 -0
  19. package/scripts/check-task-template.mjs +53 -0
  20. package/scripts/check-template-files.mjs +110 -0
  21. package/scripts/init-harness.mjs +270 -0
  22. package/scripts/lib.mjs +190 -0
  23. package/scripts/smoke-template.mjs +309 -0
  24. package/scripts/validate-governance.mjs +3 -0
  25. package/scripts/validate-template.mjs +16 -0
  26. package/template/.claude/CLAUDE.md.tpl +12 -0
  27. package/template/.claude/rules/harness-client-surfaces.md.tpl +20 -0
  28. package/template/.claude/settings.json.tpl +10 -0
  29. package/template/.codex/hooks.json.tpl +77 -0
  30. package/template/AGENTS.md.tpl +22 -0
  31. package/template/CLAUDE.md.tpl +16 -0
  32. package/template/README.md.tpl +109 -0
  33. package/template/ai/AGENT-GARBAGE-COLLECTION.md.tpl +18 -0
  34. package/template/ai/AGENTS.md.tpl +36 -0
  35. package/template/ai/ARCHITECTURE.md.tpl +35 -0
  36. package/template/ai/CODEX-HOOKS.md.tpl +23 -0
  37. package/template/ai/DECISIONS.md.tpl +22 -0
  38. package/template/ai/DESIGN.md.tpl +22 -0
  39. package/template/ai/HARNESS-ENGINEERING.md.tpl +107 -0
  40. package/template/ai/HARNESS.md.tpl +53 -0
  41. package/template/ai/HUB.md.tpl +53 -0
  42. package/template/ai/PRODUCT-SUMMARY.md.tpl +28 -0
  43. package/template/ai/PRODUCT.md.tpl +32 -0
  44. package/template/ai/QUALITY.md.tpl +37 -0
  45. package/template/ai/READINESS.md.tpl +39 -0
  46. package/template/ai/RUNNER-READINESS.md.tpl +14 -0
  47. package/template/ai/RUNNER-SAFETY.md.tpl +21 -0
  48. package/template/ai/VERSIONING.md.tpl +16 -0
  49. package/template/ai/WORKFLOW.md.tpl +42 -0
  50. package/template/ai/context.md.tpl +17 -0
  51. package/template/ai/contracts/README.md.tpl +23 -0
  52. package/template/ai/contracts/api-boundary.contract.json.tpl +11 -0
  53. package/template/ai/contracts/api-boundary.md.tpl +17 -0
  54. package/template/ai/contracts/app-legibility.contract.json.tpl +11 -0
  55. package/template/ai/contracts/app-legibility.md.tpl +24 -0
  56. package/template/ai/contracts/codex-hooks.contract.json.tpl +15 -0
  57. package/template/ai/contracts/codex-hooks.md.tpl +18 -0
  58. package/template/ai/contracts/github-safety.contract.json.tpl +11 -0
  59. package/template/ai/contracts/github-safety.md.tpl +15 -0
  60. package/template/ai/contracts/release-flow.contract.json.tpl +12 -0
  61. package/template/ai/contracts/release-flow.md.tpl +15 -0
  62. package/template/ai/contracts/repo-boundaries.contract.json.tpl +12 -0
  63. package/template/ai/contracts/repo-boundaries.md.tpl +18 -0
  64. package/template/ai/contracts/security-boundary.contract.json.tpl +11 -0
  65. package/template/ai/contracts/security-boundary.md.tpl +19 -0
  66. package/template/ai/knowledge-manifest.json.tpl +149 -0
  67. package/template/ai/model-overlays/anthropic/CLAUDE.md.tpl +14 -0
  68. package/template/ai/model-overlays/openai/AGENTS.md.tpl +13 -0
  69. package/template/ai/plans/README.md.tpl +10 -0
  70. package/template/ai/plans/tech-debt.md.tpl +7 -0
  71. package/template/ai/skills/README.md.tpl +15 -0
  72. package/template/ai/skills/review-architecture.md.tpl +41 -0
  73. package/template/ai/skills/review-contract-drift.md.tpl +41 -0
  74. package/template/ai/skills/review-governance-drift.md.tpl +42 -0
  75. package/template/ai/skills/review-security.md.tpl +40 -0
  76. package/template/ai/specs/README.md.tpl +14 -0
  77. package/template/ai/templates/README.md.tpl +13 -0
  78. package/template/ai/templates/fixtures/issues/invalid-placeholder.md.tpl +20 -0
  79. package/template/ai/templates/fixtures/issues/invalid-protected-surface.md.tpl +21 -0
  80. package/template/ai/templates/fixtures/issues/valid-ready.md.tpl +105 -0
  81. package/template/ai/templates/issue-template.md.tpl +107 -0
  82. package/template/ai/templates/task-brief-template.md.tpl +185 -0
  83. package/template/ai/workspace/LOCAL-STACK.md.tpl +21 -0
  84. package/template/ai/workspace/REPOS.md.tpl +19 -0
  85. package/template/ai/workspace/SESSION-BOOTSTRAP.md.tpl +27 -0
  86. package/template/ai/workspace/SYSTEM-MAP.md.tpl +19 -0
  87. package/template/ai/workspace/TEST-STRATEGY.md.tpl +22 -0
  88. package/template/consumer/.claude/CLAUDE.md.tpl +14 -0
  89. package/template/consumer/AGENTS.md.tpl +23 -0
  90. package/template/consumer/CLAUDE.md.tpl +15 -0
  91. package/template/scripts/bootstrap-codex-worktree.mjs.tpl +52 -0
  92. package/template/scripts/bootstrap-workspace.mjs.tpl +100 -0
  93. package/template/scripts/check-claude-compatibility.mjs.tpl +120 -0
  94. package/template/scripts/check-codex-hooks.mjs.tpl +190 -0
  95. package/template/scripts/check-contract-manifests.mjs.tpl +81 -0
  96. package/template/scripts/check-garbage-collection.mjs.tpl +25 -0
  97. package/template/scripts/check-html-views.mjs.tpl +60 -0
  98. package/template/scripts/check-issue-template.mjs.tpl +167 -0
  99. package/template/scripts/check-knowledge-manifest.mjs.tpl +82 -0
  100. package/template/scripts/check-overlay-drift.mjs.tpl +49 -0
  101. package/template/scripts/check-plans.mjs.tpl +70 -0
  102. package/template/scripts/check-readiness.mjs.tpl +130 -0
  103. package/template/scripts/check-review-skills.mjs.tpl +48 -0
  104. package/template/scripts/check-task-template.mjs.tpl +63 -0
  105. package/template/scripts/check-template-governance.mjs.tpl +161 -0
  106. package/template/scripts/check-workspace.mjs.tpl +212 -0
  107. package/template/scripts/check-worktree-bootstrap-fixtures.mjs.tpl +122 -0
  108. package/template/scripts/check-worktrees.mjs.tpl +69 -0
  109. package/template/scripts/fixtures/worktrees/README.md.tpl +4 -0
  110. package/template/scripts/generate-html-views.mjs.tpl +189 -0
  111. package/template/scripts/hooks/codex-hook.mjs.tpl +21 -0
  112. package/template/scripts/hooks/lib/codex-hooks-core.mjs.tpl +114 -0
  113. package/template/scripts/lib/worktree-bootstrap.mjs.tpl +388 -0
  114. package/template/scripts/validate-governance.mjs.tpl +78 -0
  115. package/template/workspace/.claude/CLAUDE.md.tpl +9 -0
  116. package/template/workspace/.claude/rules/harness-client-surfaces.md.tpl +15 -0
  117. package/template/workspace/.claude/settings.json.tpl +10 -0
  118. package/template/workspace/AGENTS.md.tpl +17 -0
  119. package/template/workspace/CLAUDE.md.tpl +18 -0
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": "codex-hooks",
3
+ "name": "Codex Hooks Contract",
4
+ "version": "1.0.0",
5
+ "owners": ["{{HARNESS_REPO_NAME}}"],
6
+ "affectedRepos": ["{{HARNESS_REPO_NAME}}"],
7
+ "requiredFiles": [
8
+ ".codex/hooks.json",
9
+ "scripts/hooks/codex-hook.mjs",
10
+ "scripts/hooks/lib/codex-hooks-core.mjs",
11
+ "ai/contracts/codex-hooks.md"
12
+ ],
13
+ "forbiddenTokens": ["fetch(", "writeFile(", "appendFile("],
14
+ "validation": ["node scripts/check-codex-hooks.mjs"]
15
+ }
@@ -0,0 +1,18 @@
1
+ # Codex Hooks Contract
2
+
3
+ Codex hooks are local advisory guardrails.
4
+
5
+ ## Requirements
6
+
7
+ - Hook config lives in `.codex/hooks.json`.
8
+ - Hook code lives under `scripts/hooks/`.
9
+ - Hooks are deterministic and local.
10
+ - Deny rules must include remediation and policy references.
11
+ - Hooks must not write files, call external services, or supervise long-running
12
+ processes.
13
+ - Hooks are not a complete security boundary and do not replace sandboxing,
14
+ permission controls, code review, CI policy, or secret management.
15
+
16
+ ## Validation
17
+
18
+ - `node scripts/check-codex-hooks.mjs`
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "github-safety",
3
+ "name": "GitHub Safety Contract",
4
+ "version": "1.0.0",
5
+ "owners": ["{{HARNESS_REPO_NAME}}"],
6
+ "affectedRepos": ["{{HARNESS_REPO_NAME}}"],
7
+ "requiredFiles": [
8
+ "ai/contracts/github-safety.md"
9
+ ],
10
+ "validation": ["node scripts/validate-governance.mjs"]
11
+ }
@@ -0,0 +1,15 @@
1
+ # GitHub Safety Contract
2
+
3
+ GitHub and other remote development platforms are external systems.
4
+
5
+ ## Requirements
6
+
7
+ - Inspect local state before remote mutation.
8
+ - Do not push, force-push, merge, close issues, edit PRs, or change repository
9
+ settings unless explicitly requested.
10
+ - Preserve user changes in dirty worktrees.
11
+ - Prefer dry-run or read-only inspection before high-impact operations.
12
+
13
+ ## Validation
14
+
15
+ - `node scripts/validate-governance.mjs`
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "release-flow",
3
+ "name": "Release Flow Contract",
4
+ "version": "1.0.0",
5
+ "owners": ["{{HARNESS_REPO_NAME}}"],
6
+ "affectedRepos": ["{{HARNESS_REPO_NAME}}"],
7
+ "requiredFiles": [
8
+ "ai/VERSIONING.md",
9
+ "ai/contracts/release-flow.md"
10
+ ],
11
+ "validation": ["node scripts/validate-governance.mjs"]
12
+ }
@@ -0,0 +1,15 @@
1
+ # Release Flow Contract
2
+
3
+ This contract defines harness release safety for `{{PROJECT_NAME}}`.
4
+
5
+ ## Requirements
6
+
7
+ - Keep release decisions human-reviewed.
8
+ - Keep generated artifacts reproducible.
9
+ - Run governance validation before marking harness changes ready.
10
+ - Do not push, tag, publish, deploy, or mutate external services without
11
+ explicit approval in the current task.
12
+
13
+ ## Validation
14
+
15
+ - `node scripts/validate-governance.mjs`
@@ -0,0 +1,12 @@
1
+ {
2
+ "id": "repo-boundaries",
3
+ "name": "Repo Boundaries Contract",
4
+ "version": "1.0.0",
5
+ "owners": ["{{HARNESS_REPO_NAME}}"],
6
+ "affectedRepos": ["{{HARNESS_REPO_NAME}}"],
7
+ "requiredFiles": [
8
+ "ai/contracts/repo-boundaries.md",
9
+ "ai/workspace/REPOS.md"
10
+ ],
11
+ "validation": ["node scripts/check-workspace.mjs"]
12
+ }
@@ -0,0 +1,18 @@
1
+ # Repo Boundaries
2
+
3
+ This contract defines ownership boundaries for {{PROJECT_NAME}}.
4
+
5
+ ## Harness Repo
6
+
7
+ Owns policy, context routing, contracts, task templates, review skills, quality
8
+ tracking, and validation scripts.
9
+
10
+ ## Consumer Repos
11
+
12
+ {{CONSUMER_REPOS_LIST}}
13
+
14
+ Consumer repos own product implementation and local runtime checks.
15
+
16
+ ## Runner
17
+
18
+ Any future runner owns execution runtime outside this harness.
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": "security-boundary",
3
+ "name": "Security Boundary Contract",
4
+ "version": "1.0.0",
5
+ "owners": ["{{HARNESS_REPO_NAME}}"],
6
+ "affectedRepos": {{CONSUMER_REPO_NAMES_JSON}},
7
+ "requiredFiles": [
8
+ "ai/contracts/security-boundary.md"
9
+ ],
10
+ "validation": ["node scripts/validate-governance.mjs"]
11
+ }
@@ -0,0 +1,19 @@
1
+ # Security Boundary
2
+
3
+ Security-sensitive changes require explicit scope and human review.
4
+
5
+ ## Protected Surfaces
6
+
7
+ - authentication
8
+ - authorization
9
+ - secrets
10
+ - payment or billing behavior
11
+ - production data
12
+ - infrastructure
13
+ - deployment configuration
14
+ - database migrations
15
+
16
+ ## Rule
17
+
18
+ Tasks that touch protected surfaces must state approval requirements,
19
+ validation, rollback, and review routing.
@@ -0,0 +1,149 @@
1
+ {
2
+ "version": 1,
3
+ "canonicalDocs": [
4
+ {
5
+ "path": "ai/AGENTS.md",
6
+ "status": "active",
7
+ "purpose": "Canonical agent operating policy.",
8
+ "linkedFrom": ["ai/HUB.md"]
9
+ },
10
+ {
11
+ "path": "ai/HUB.md",
12
+ "status": "active",
13
+ "purpose": "Routing index for harness guidance.",
14
+ "linkedFrom": ["ai/AGENTS.md"]
15
+ },
16
+ {
17
+ "path": "ai/context.md",
18
+ "status": "active",
19
+ "purpose": "Always-loaded project and repo context.",
20
+ "linkedFrom": ["ai/HUB.md"]
21
+ },
22
+ {
23
+ "path": "ai/HARNESS.md",
24
+ "status": "active",
25
+ "purpose": "Harness scope and non-goals.",
26
+ "linkedFrom": ["ai/HUB.md"]
27
+ },
28
+ {
29
+ "path": "ai/PRODUCT-SUMMARY.md",
30
+ "status": "active",
31
+ "purpose": "Compact product context for consumer repo work.",
32
+ "linkedFrom": ["ai/HUB.md"]
33
+ },
34
+ {
35
+ "path": "ai/PRODUCT.md",
36
+ "status": "active",
37
+ "purpose": "Product context gathered from consumer repos.",
38
+ "linkedFrom": ["ai/HUB.md"]
39
+ },
40
+ {
41
+ "path": "ai/ARCHITECTURE.md",
42
+ "status": "active",
43
+ "purpose": "Architecture map and ownership guidance.",
44
+ "linkedFrom": ["ai/HUB.md"]
45
+ },
46
+ {
47
+ "path": "ai/DESIGN.md",
48
+ "status": "active",
49
+ "purpose": "Design context and UI direction.",
50
+ "linkedFrom": ["ai/HUB.md"]
51
+ },
52
+ {
53
+ "path": "ai/HARNESS-ENGINEERING.md",
54
+ "status": "active",
55
+ "purpose": "Engineering practices for harness changes.",
56
+ "linkedFrom": ["ai/HUB.md"]
57
+ },
58
+ {
59
+ "path": "ai/READINESS.md",
60
+ "status": "active",
61
+ "purpose": "Post-generation readiness verdicts, gates, and manual review domains.",
62
+ "linkedFrom": ["ai/HUB.md"]
63
+ },
64
+ {
65
+ "path": "ai/QUALITY.md",
66
+ "status": "active",
67
+ "purpose": "Quality bar and validation evidence expectations.",
68
+ "linkedFrom": ["ai/HUB.md"]
69
+ },
70
+ {
71
+ "path": "ai/WORKFLOW.md",
72
+ "status": "active",
73
+ "purpose": "Human and agent workflow boundaries.",
74
+ "linkedFrom": ["ai/HUB.md"]
75
+ },
76
+ {
77
+ "path": "ai/RUNNER-SAFETY.md",
78
+ "status": "active",
79
+ "purpose": "Runner safety boundaries and non-goals.",
80
+ "linkedFrom": ["ai/HUB.md"]
81
+ },
82
+ {
83
+ "path": "ai/RUNNER-READINESS.md",
84
+ "status": "active",
85
+ "purpose": "Future runner readiness criteria.",
86
+ "linkedFrom": ["ai/HUB.md"]
87
+ },
88
+ {
89
+ "path": "ai/AGENT-GARBAGE-COLLECTION.md",
90
+ "status": "active",
91
+ "purpose": "Repeated mistake capture and cleanup guidance.",
92
+ "linkedFrom": ["ai/HUB.md"]
93
+ },
94
+ {
95
+ "path": "ai/DECISIONS.md",
96
+ "status": "active",
97
+ "purpose": "Harness decisions and rationale.",
98
+ "linkedFrom": ["ai/HUB.md"]
99
+ },
100
+ {
101
+ "path": "ai/VERSIONING.md",
102
+ "status": "active",
103
+ "purpose": "Harness release and compatibility policy.",
104
+ "linkedFrom": ["ai/HUB.md"]
105
+ },
106
+ {
107
+ "path": "ai/CODEX-HOOKS.md",
108
+ "status": "active",
109
+ "purpose": "Codex hook behavior and safety constraints.",
110
+ "linkedFrom": ["ai/HUB.md"]
111
+ },
112
+ {
113
+ "path": "ai/workspace/REPOS.md",
114
+ "status": "active",
115
+ "purpose": "Workspace repo map and ownership.",
116
+ "linkedFrom": ["ai/HUB.md", "ai/workspace/SESSION-BOOTSTRAP.md"]
117
+ },
118
+ {
119
+ "path": "ai/workspace/SYSTEM-MAP.md",
120
+ "status": "active",
121
+ "purpose": "System relationship map across harness and consumer repos.",
122
+ "linkedFrom": ["ai/HUB.md"]
123
+ },
124
+ {
125
+ "path": "ai/workspace/SESSION-BOOTSTRAP.md",
126
+ "status": "active",
127
+ "purpose": "Session-start checks for agents.",
128
+ "linkedFrom": ["ai/HUB.md"]
129
+ },
130
+ {
131
+ "path": "ai/workspace/LOCAL-STACK.md",
132
+ "status": "active",
133
+ "purpose": "Local setup assumptions and validation ownership.",
134
+ "linkedFrom": ["ai/HUB.md"]
135
+ },
136
+ {
137
+ "path": "ai/workspace/TEST-STRATEGY.md",
138
+ "status": "active",
139
+ "purpose": "Harness-owned and consumer-owned validation split.",
140
+ "linkedFrom": ["ai/HUB.md"]
141
+ },
142
+ {
143
+ "path": "ai/views/index.html",
144
+ "status": "generated",
145
+ "purpose": "Generated human review index.",
146
+ "linkedFrom": ["ai/HUB.md"]
147
+ }
148
+ ]
149
+ }
@@ -0,0 +1,14 @@
1
+ # Anthropic/Claude Overlay
2
+
3
+ This file is a thin compatibility pointer for Anthropic/Claude-compatible
4
+ agents.
5
+
6
+ Canonical policy lives in:
7
+
8
+ 1. `../../../CLAUDE.md`
9
+ 2. `../../CLAUDE.md`
10
+ 3. `../../HUB.md`
11
+ 4. `../../context.md`
12
+
13
+ Use Claude-specific tool conventions according to the active runtime
14
+ environment, but do not add model-specific policy here.
@@ -0,0 +1,13 @@
1
+ # OpenAI/Codex Overlay
2
+
3
+ This file is a thin compatibility pointer for OpenAI/Codex-compatible agents.
4
+
5
+ Canonical policy lives in:
6
+
7
+ 1. `../../../AGENTS.md`
8
+ 2. `../../AGENTS.md`
9
+ 3. `../../HUB.md`
10
+ 4. `../../context.md`
11
+
12
+ Use Codex tools according to the active runtime environment, but do not add
13
+ model-specific policy here.
@@ -0,0 +1,10 @@
1
+ # Plans
2
+
3
+ Plans hold multi-step governance work. Do not store runtime state here.
4
+
5
+ ## Rules
6
+
7
+ - Active plans live in `ai/plans/active/`.
8
+ - Active plans must include status, goal, next step, and validation plan.
9
+ - Completed plans should move out of active work surfaces with evidence.
10
+ - Runtime logs, worktree state, and runner artifacts do not belong here.
@@ -0,0 +1,7 @@
1
+ # Tech Debt
2
+
3
+ Track harness debt here.
4
+
5
+ ## Open Items
6
+
7
+ - None yet.
@@ -0,0 +1,15 @@
1
+ # Review Skills
2
+
3
+ Review skills define repeatable review workflows.
4
+
5
+ ## Index
6
+
7
+ - `review-architecture.md`
8
+ - `review-security.md`
9
+ - `review-contract-drift.md`
10
+ - `review-governance-drift.md`
11
+
12
+ ## Rule
13
+
14
+ Report blocking findings first. Keep non-blocking observations separate from
15
+ defects.
@@ -0,0 +1,41 @@
1
+ # Architecture Review
2
+
3
+ ## Purpose
4
+
5
+ Find boundary, ownership, and change-amplification risks.
6
+
7
+ ## Required Inputs
8
+
9
+ - task brief
10
+ - relevant contract docs
11
+ - changed files
12
+
13
+ ## When to Use
14
+
15
+ Use when changes affect ownership, routing, repo boundaries, data flow, or
16
+ shared abstractions.
17
+
18
+ ## Blocking Findings
19
+
20
+ Report behavior regressions, boundary violations, missing validation, and
21
+ changes that make future work harder to reason about.
22
+
23
+ ## Non-Blocking Observations
24
+
25
+ Report style, naming, or organization improvements only after blocking findings.
26
+
27
+ ## Output Format
28
+
29
+ - Blocking Findings
30
+ - Non-Blocking Observations
31
+ - Validation Or Evidence
32
+ - Verdict: `Pass`, `Block`, or `Needs follow-up`
33
+
34
+ ## Escalation Rules
35
+
36
+ Escalate protected surfaces, cross-repo contracts, and remote mutations to
37
+ human review.
38
+
39
+ ## Validation Or Evidence
40
+
41
+ Name the exact files, commands, and evidence used for the review.
@@ -0,0 +1,41 @@
1
+ # Contract Drift Review
2
+
3
+ ## Purpose
4
+
5
+ Find mismatches between contracts and implementation.
6
+
7
+ ## Required Inputs
8
+
9
+ - relevant contract docs
10
+ - changed files
11
+ - validation output
12
+
13
+ ## When to Use
14
+
15
+ Use when code, docs, generated files, or validation may disagree with canonical
16
+ contracts.
17
+
18
+ ## Blocking Findings
19
+
20
+ Report missing contract updates, stale generated artifacts, contradictory path
21
+ contracts, and unvalidated contract changes.
22
+
23
+ ## Non-Blocking Observations
24
+
25
+ Report wording or discoverability improvements only after blocking findings.
26
+
27
+ ## Output Format
28
+
29
+ - Blocking Findings
30
+ - Non-Blocking Observations
31
+ - Validation Or Evidence
32
+ - Verdict: `Pass`, `Block`, or `Needs follow-up`
33
+
34
+ ## Escalation Rules
35
+
36
+ Escalate shared contract changes that affect consumer repos or protected
37
+ surfaces.
38
+
39
+ ## Validation Or Evidence
40
+
41
+ Name the contract source, generated artifacts, and validation commands checked.
@@ -0,0 +1,42 @@
1
+ # Governance Drift Review
2
+
3
+ ## Purpose
4
+
5
+ Find duplicated policy, stale routing, missing validation, and runner boundary
6
+ drift.
7
+
8
+ ## Required Inputs
9
+
10
+ - harness docs
11
+ - changed governance files
12
+ - validation output
13
+
14
+ ## When to Use
15
+
16
+ Use for harness policy, routing, templates, generated views, and validation
17
+ script changes.
18
+
19
+ ## Blocking Findings
20
+
21
+ Report stale routing, missing manifest entries, duplicated policy, invalid
22
+ templates, and runner behavior that moved into the harness.
23
+
24
+ ## Non-Blocking Observations
25
+
26
+ Report clarity and organization improvements only after blocking findings.
27
+
28
+ ## Output Format
29
+
30
+ - Blocking Findings
31
+ - Non-Blocking Observations
32
+ - Validation Or Evidence
33
+ - Verdict: `Pass`, `Block`, or `Needs follow-up`
34
+
35
+ ## Escalation Rules
36
+
37
+ Escalate remote mutation, generated policy source changes, and broad validation
38
+ changes to human review.
39
+
40
+ ## Validation Or Evidence
41
+
42
+ Name the docs, manifest entries, generated files, and commands checked.
@@ -0,0 +1,40 @@
1
+ # Security Review
2
+
3
+ ## Purpose
4
+
5
+ Find security-sensitive behavior changes and missing approval gates.
6
+
7
+ ## Required Inputs
8
+
9
+ - task brief
10
+ - security boundary contract
11
+ - changed files
12
+
13
+ ## When to Use
14
+
15
+ Use when changes mention secrets, auth, permissions, tenant boundaries,
16
+ external services, infrastructure, or data handling.
17
+
18
+ ## Blocking Findings
19
+
20
+ Report missing approval gates, unsafe secret handling, auth bypass risk,
21
+ external mutation, or unvalidated security-sensitive behavior.
22
+
23
+ ## Non-Blocking Observations
24
+
25
+ Report hardening ideas that do not block the requested change.
26
+
27
+ ## Output Format
28
+
29
+ - Blocking Findings
30
+ - Non-Blocking Observations
31
+ - Validation Or Evidence
32
+ - Verdict: `Pass`, `Block`, or `Needs follow-up`
33
+
34
+ ## Escalation Rules
35
+
36
+ Escalate protected surfaces and any real external mutation request.
37
+
38
+ ## Validation Or Evidence
39
+
40
+ Name the security boundary, affected files, and commands checked.
@@ -0,0 +1,14 @@
1
+ # Specs
2
+
3
+ Use this folder for durable shared specs that do not belong exclusively to one
4
+ consumer repo.
5
+
6
+ Good candidates:
7
+
8
+ - cross-repo feature specs
9
+ - shared API or event contracts
10
+ - product language that multiple repos must preserve
11
+ - migration plans that require coordinated consumer repo changes
12
+
13
+ Avoid storing runtime state or transient task notes here.
14
+
@@ -0,0 +1,13 @@
1
+ # Templates
2
+
3
+ Templates define reusable task and planning shapes.
4
+
5
+ ## Index
6
+
7
+ - `task-brief-template.md`: canonical task brief shape
8
+ - `issue-template.md`: issue-ready implementation brief shape
9
+ - `fixtures/issues/`: validator fixtures for valid and invalid briefs
10
+
11
+ ## Rule
12
+
13
+ Templates may contain placeholders. Ready task briefs must use concrete values.
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: <ISSUE-ID>
3
+ status: Ready for Agent
4
+ risk: medium
5
+ autonomy: pr_ready
6
+ model_policy: standard
7
+ repos:
8
+ - {{HARNESS_REPO_NAME}}
9
+ allowed_paths:
10
+ - <path>
11
+ forbidden_paths:
12
+ - workspace/**
13
+ requires_human_approval: false
14
+ ---
15
+
16
+ # Invalid Placeholder Fixture
17
+
18
+ ## Summary
19
+
20
+ This fixture intentionally contains placeholder text.
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: HARNESS-FIXTURE-002
3
+ status: Ready for Agent
4
+ risk: medium
5
+ autonomy: pr_ready
6
+ model_policy: standard
7
+ repos:
8
+ - {{HARNESS_REPO_NAME}}
9
+ allowed_paths:
10
+ - ai/RUNNER-SAFETY.md
11
+ forbidden_paths:
12
+ - workspace/**
13
+ requires_human_approval: false
14
+ ---
15
+
16
+ # Invalid Protected Surface Fixture
17
+
18
+ ## Summary
19
+
20
+ This fixture mentions auth, billing, secrets, and database migration work
21
+ without requiring human approval.