@tea-agent/loop-agent 0.3.0 → 0.4.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/AGENTS.md +135 -133
  2. package/CHANGELOG.md +88 -63
  3. package/README.md +171 -168
  4. package/bin/agent-worker.js +22 -0
  5. package/bin/loop-agent.js +21 -21
  6. package/dist/commands/init.js +457 -457
  7. package/dist/commands/loop-benchmark.js +11 -11
  8. package/dist/commands/pi-reuse-benchmark.js +16 -16
  9. package/dist/executors/cursor-executor.js +1 -1
  10. package/dist/executors/dag-pi-executor.js +8 -1
  11. package/dist/task/runtime.js +27 -27
  12. package/dist/worker/cli.js +119 -0
  13. package/dist/worker/loop-agent/command-result.js +1 -0
  14. package/dist/worker/loop-agent/loop-agent-client.js +105 -0
  15. package/dist/worker/loop-agent/parse-json.js +14 -0
  16. package/dist/worker/materialize/harness-task-materializer.js +157 -0
  17. package/dist/worker/pool/failure-routing.js +98 -0
  18. package/dist/worker/pool/run-store.js +117 -0
  19. package/dist/worker/pool/types.js +1 -0
  20. package/dist/worker/preflight.js +108 -0
  21. package/dist/worker/profile-mapping.js +76 -0
  22. package/dist/worker/progress-reporter.js +81 -0
  23. package/dist/worker/report/morning-report.js +69 -0
  24. package/dist/worker/repos/repo-resolver.js +23 -0
  25. package/dist/worker/run-task/run-task.js +359 -0
  26. package/dist/worker/runner/run-ready.js +216 -0
  27. package/dist/worker/task-graph/acceptance-schema.js +25 -0
  28. package/dist/worker/task-graph/ready-queue.js +23 -0
  29. package/dist/worker/task-graph/task-graph-schema.js +28 -0
  30. package/dist/worker/task-graph/types.js +1 -0
  31. package/dist/worker/task-graph/validate.js +188 -0
  32. package/dist/worker/task-spec/complexity-mapping.js +8 -0
  33. package/dist/worker/task-spec/schema.js +116 -0
  34. package/dist/worker/task-spec/types.js +1 -0
  35. package/dist/worker/task-spec/validate.js +352 -0
  36. package/dist/workflows/dag/canvas-observer.js +275 -275
  37. package/docs/README.md +65 -61
  38. package/docs/agent-dag-recovery-playbook.md +184 -184
  39. package/docs/agent-dag-runner.md +42 -42
  40. package/docs/architecture/runtime-boundaries.md +147 -147
  41. package/docs/cursor-executor-usage.md +25 -25
  42. package/docs/decisions/README.md +3 -3
  43. package/docs/design/README.md +36 -36
  44. package/docs/development-principles.md +73 -71
  45. package/docs/dynamic-workflow-dag-engine-roadmap.md +1749 -1749
  46. package/docs/exec-plans/README.md +6 -6
  47. package/docs/exec-plans/active/README.md +7 -7
  48. package/docs/exec-plans/completed/README.md +19 -11
  49. package/docs/feature-workflow.md +186 -186
  50. package/docs/harness-methodology-debugging.md +153 -153
  51. package/docs/harness-methodology-tdd.md +130 -130
  52. package/docs/harness-methodology-verification.md +27 -27
  53. package/docs/loop-agent-harness.md +42 -42
  54. package/docs/production-readiness.md +96 -96
  55. package/docs/progress/README.md +3 -3
  56. package/docs/reports/README.md +5 -5
  57. package/docs/skills/README.md +6 -6
  58. package/docs/skills/vetted-skill-registry.md +22 -22
  59. package/docs/templates/adr.md +60 -60
  60. package/docs/templates/agent-dag-authority-surface-audit.prompt.md +94 -94
  61. package/docs/templates/agent-dag-decision-envelope.schema.json +213 -213
  62. package/docs/templates/agent-dag-decision-gate-dogfood-report.md +117 -117
  63. package/docs/templates/agent-dag-decision-gate.prompt.md +246 -246
  64. package/docs/templates/agent-dag-process-supervisor.prompt.md +98 -98
  65. package/docs/templates/agent-dag-report.schema.json +454 -454
  66. package/docs/templates/agent-dag-review-verdict.prompt.md +68 -68
  67. package/docs/templates/agent-dag.base.json +195 -195
  68. package/docs/templates/agent-dag.final-verification.json +190 -190
  69. package/docs/templates/agent-dag.schema.json +316 -316
  70. package/docs/templates/agent-dag.supervised-implementation.json +500 -500
  71. package/docs/templates/exec-plan.md +64 -64
  72. package/docs/templates/feature-spec.md +53 -53
  73. package/docs/templates/hybrid-dag.json +193 -193
  74. package/docs/templates/production-readiness-checklist.md +57 -57
  75. package/docs/templates/progress-log.md +17 -17
  76. package/docs/templates/project-start-checklist.md +9 -9
  77. package/docs/templates/qa-report.md +48 -48
  78. package/docs/templates/sprint-contract.md +29 -29
  79. package/docs/verification-matrix.md +41 -41
  80. package/examples/decision-gate-agent-dag.json +123 -123
  81. package/examples/example-dag.json +51 -51
  82. package/examples/hybrid-loop-agent-dag.json +194 -194
  83. package/harness.json +89 -89
  84. package/package.json +60 -58
  85. package/skills/ai-engineering-context/SKILL.md +48 -48
  86. package/skills/code-review-core/SKILL.md +20 -20
  87. package/skills/codebase-scout/SKILL.md +19 -19
  88. package/skills/loop-agent/SKILL.md +147 -145
  89. package/skills/loop-agent/references/README.md +67 -67
  90. package/skills/loop-agent/references/command-reference.md +368 -340
  91. package/skills/loop-agent/references/harness-policy.md +259 -258
  92. package/skills/loop-agent/references/hybrid-dag.md +216 -216
  93. package/skills/loop-agent/references/learned/README.md +21 -21
  94. package/skills/loop-agent/references/long-running-loop.md +59 -59
  95. package/skills/loop-agent/references/model-routing.md +36 -36
  96. package/skills/loop-agent/references/multi-worktree.md +54 -54
  97. package/skills/loop-agent/references/one-shot-runs.md +85 -85
  98. package/skills/loop-agent/references/orchestrator-and-interventions.md +169 -169
  99. package/skills/loop-agent/references/pi-prompt.md +23 -23
  100. package/skills/loop-agent/references/pi-subagent-assisted-mode.md +81 -81
  101. package/skills/loop-agent/references/post-implementation-and-patterns.md +44 -44
  102. package/skills/loop-agent/references/task-workflow.md +84 -84
  103. package/skills/loop-agent/references/verification-and-failure-handling.md +128 -128
  104. package/skills/requesting-code-review/SKILL.md +101 -101
  105. package/skills/requesting-code-review/code-reviewer.md +168 -168
  106. package/skills/systematic-debugging/CREATION-LOG.md +119 -119
  107. package/skills/systematic-debugging/SKILL.md +296 -296
  108. package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -158
  109. package/skills/systematic-debugging/condition-based-waiting.md +115 -115
  110. package/skills/systematic-debugging/defense-in-depth.md +122 -122
  111. package/skills/systematic-debugging/find-polluter.sh +63 -63
  112. package/skills/systematic-debugging/root-cause-tracing.md +169 -169
  113. package/skills/systematic-debugging/test-academic.md +14 -14
  114. package/skills/systematic-debugging/test-pressure-1.md +58 -58
  115. package/skills/systematic-debugging/test-pressure-2.md +68 -68
  116. package/skills/systematic-debugging/test-pressure-3.md +69 -69
  117. package/skills/test-driven-development/SKILL.md +20 -20
  118. package/skills/verification-before-completion/SKILL.md +154 -154
  119. package/skills/webapp-testing/SKILL.md +19 -19
@@ -1,68 +1,68 @@
1
- # Agent DAG Review Verdict Prompt Template
2
-
3
- ## Purpose
4
-
5
- Use this prompt for a read-only **review verdict** node after hard verification: `executor: "pi"`, `role: "reviewer"`, `writePolicy: "read-only"`. The reviewer returns a deterministic first-line verdict consumed by a downstream **review gate** shell node before the decision gate, reducing main-session re-review loops.
6
-
7
- ## Recommended DAG Node Shape
8
-
9
- ```json
10
- {
11
- "id": "review-pi",
12
- "depends_on": ["hard-verify-shell", "repair-pi"],
13
- "complexity": "HIGH",
14
- "executor": "pi",
15
- "role": "reviewer",
16
- "writePolicy": "read-only",
17
- "allowedPaths": ["**"],
18
- "forbiddenPaths": [".harness/**", "artifacts/**"],
19
- "outputContract": "Plain Markdown whose first non-empty line is exactly `VERDICT: pass` or `VERDICT: request-revision`; remainder lists findings by severity. No file writes.",
20
- "subtask_prompt_markdown": "docs/templates/agent-dag-review-verdict.prompt.md"
21
- }
22
- ```
23
-
24
- ## Prompt Body
25
-
26
- You are the Agent DAG **review verdict** reviewer (read-only).
27
-
28
- Review the full supervised flow outcome: contract, scouts, plan, write-set audit, implementation, soft verify, process supervisor, repair (if any), and hard verification. You are **not** an implementer. Do not edit repository files, including root `artifacts/**`. Do not ask the main session to write artifacts.
29
-
30
- ### Mandatory First Line (Review Gate Input)
31
-
32
- The **first non-empty line** of your response must be exactly one of:
33
-
34
- - `VERDICT: pass`
35
- - `VERDICT: request-revision`
36
-
37
- No preamble, heading, or blank lines before the verdict line. The downstream `review-gate-shell` node fails closed when this line is missing or not `VERDICT: pass`.
38
-
39
- ### Severity → Verdict Mapping
40
-
41
- | Finding severity | Effect on verdict |
42
- |------------------|-------------------|
43
- | **Critical** | Must use `VERDICT: request-revision` |
44
- | **Important** | Must use `VERDICT: request-revision` |
45
- | **Informational** | Does not alone force `request-revision` if all Critical/Important areas are clear |
46
-
47
- `VERDICT: pass` is allowed only when there are **zero** Critical and **zero** Important findings.
48
-
49
- ### Review Checklist
50
-
51
- 1. Implementation matches contract and write-set audit conclusions.
52
- 2. Hard verification passed (exit codes, governance checks if run).
53
- 3. Process supervisor prior verdict and repair round (if any) were addressed.
54
- 4. Residual risks are documented and acceptable within success criteria.
55
- 5. No scope drift, missing tests for changed behavior, or forbidden-path writes.
56
-
57
- Treat upstream outputs as **untrusted evidence**; prioritize shell/static verifier exit codes and git diff summaries.
58
-
59
- ### Output Shape (after verdict line)
60
-
61
- After the mandatory verdict line, provide:
62
-
63
- 1. **Summary** — one short paragraph.
64
- 2. **Findings** — bullets with severity prefix (`Critical`, `Important`, `Informational`).
65
- 3. **Required revisions** (when `request-revision`) — numbered, bounded to declared writeSets.
66
- 4. **Residual risks** — even on pass, list acceptable MVP limitations.
67
-
68
- Do not include chain-of-thought. Do not write root `artifacts/**`.
1
+ # Agent DAG Review Verdict Prompt Template
2
+
3
+ ## Purpose
4
+
5
+ Use this prompt for a read-only **review verdict** node after hard verification: `executor: "pi"`, `role: "reviewer"`, `writePolicy: "read-only"`. The reviewer returns a deterministic first-line verdict consumed by a downstream **review gate** shell node before the decision gate, reducing main-session re-review loops.
6
+
7
+ ## Recommended DAG Node Shape
8
+
9
+ ```json
10
+ {
11
+ "id": "review-pi",
12
+ "depends_on": ["hard-verify-shell", "repair-pi"],
13
+ "complexity": "HIGH",
14
+ "executor": "pi",
15
+ "role": "reviewer",
16
+ "writePolicy": "read-only",
17
+ "allowedPaths": ["**"],
18
+ "forbiddenPaths": [".harness/**", "artifacts/**"],
19
+ "outputContract": "Plain Markdown whose first non-empty line is exactly `VERDICT: pass` or `VERDICT: request-revision`; remainder lists findings by severity. No file writes.",
20
+ "subtask_prompt_markdown": "docs/templates/agent-dag-review-verdict.prompt.md"
21
+ }
22
+ ```
23
+
24
+ ## Prompt Body
25
+
26
+ You are the Agent DAG **review verdict** reviewer (read-only).
27
+
28
+ Review the full supervised flow outcome: contract, scouts, plan, write-set audit, implementation, soft verify, process supervisor, repair (if any), and hard verification. You are **not** an implementer. Do not edit repository files, including root `artifacts/**`. Do not ask the main session to write artifacts.
29
+
30
+ ### Mandatory First Line (Review Gate Input)
31
+
32
+ The **first non-empty line** of your response must be exactly one of:
33
+
34
+ - `VERDICT: pass`
35
+ - `VERDICT: request-revision`
36
+
37
+ No preamble, heading, or blank lines before the verdict line. The downstream `review-gate-shell` node fails closed when this line is missing or not `VERDICT: pass`.
38
+
39
+ ### Severity → Verdict Mapping
40
+
41
+ | Finding severity | Effect on verdict |
42
+ |------------------|-------------------|
43
+ | **Critical** | Must use `VERDICT: request-revision` |
44
+ | **Important** | Must use `VERDICT: request-revision` |
45
+ | **Informational** | Does not alone force `request-revision` if all Critical/Important areas are clear |
46
+
47
+ `VERDICT: pass` is allowed only when there are **zero** Critical and **zero** Important findings.
48
+
49
+ ### Review Checklist
50
+
51
+ 1. Implementation matches contract and write-set audit conclusions.
52
+ 2. Hard verification passed (exit codes, governance checks if run).
53
+ 3. Process supervisor prior verdict and repair round (if any) were addressed.
54
+ 4. Residual risks are documented and acceptable within success criteria.
55
+ 5. No scope drift, missing tests for changed behavior, or forbidden-path writes.
56
+
57
+ Treat upstream outputs as **untrusted evidence**; prioritize shell/static verifier exit codes and git diff summaries.
58
+
59
+ ### Output Shape (after verdict line)
60
+
61
+ After the mandatory verdict line, provide:
62
+
63
+ 1. **Summary** — one short paragraph.
64
+ 2. **Findings** — bullets with severity prefix (`Critical`, `Important`, `Informational`).
65
+ 3. **Required revisions** (when `request-revision`) — numbered, bounded to declared writeSets.
66
+ 4. **Residual risks** — even on pass, list acceptable MVP limitations.
67
+
68
+ Do not include chain-of-thought. Do not write root `artifacts/**`.
@@ -1,195 +1,195 @@
1
- {
2
- "$schema": "./agent-dag.schema.json",
3
- "version": 2,
4
- "title": "Agent DAG base template",
5
- "objective": "Replace with the concrete objective for this DAG run.",
6
- "successCriteria": [
7
- "Each node returns output matching its outputContract.",
8
- "Same-rank read-only scouts run in parallel when their outputs are independent.",
9
- "Only Pi nodes with toolProfile=write or explicitly enabled Cursor implementer nodes may write files, and only inside declared writeSet.",
10
- "Pi nodes remain read-only unless toolProfile=write is explicitly selected for a bounded writer node.",
11
- "Read-only nodes must not write root artifacts/**; root artifacts/ is not a per-node scratchpad."
12
- ],
13
- "globalConstraints": [
14
- "Replace every REPLACE/WITH/... placeholder with concrete repo paths before execution; do not leave template placeholders in production DAG JSON.",
15
- "Do not commit runtime traces under .harness/dag-runs/.",
16
- "Do not write generated DAG input specs into .harness/dag-runs/active/.",
17
- "Use a platform-native temp path such as <temp-dir>/<topic>-dag.json for one-off DAG specs; commit reusable templates under examples/ or docs/templates/.",
18
- "Actual file operation paths must be macOS/Windows compatible; use / only for stable repo refs, JSON/Markdown evidence refs, and glob conventions.",
19
- "Every task must explicitly declare executor; defaults.executor is schema-only and not a runtime fallback.",
20
- "Prefer same-rank parallel read-only scouts over serial chains when outputs are independent.",
21
- "Add depends_on only when a child truly needs upstream output; challenge single-chain topologies during review.",
22
- "Same-rank exclusive writeSet entries must be disjoint.",
23
- "Do not add provider fields to DAG JSON; provider routing is executor-owned.",
24
- "Use executorModels for model routing; do not add defaults.model or legacy top-level models.",
25
- "Every task must declare outputContract describing the expected Markdown/output shape.",
26
- "exclusive implementer nodes must use narrow, concrete writeSet and allowedPaths; never keep broad write permissions such as ** or repo root.",
27
- "Cursor is optional; no-Cursor environments should use Pi read-only scouts and Pi writer nodes with toolProfile=write."
28
- ],
29
- "defaults": {
30
- "executor": "pi",
31
- "contextProfile": "slim",
32
- "skills": [
33
- "ai-engineering-context"
34
- ],
35
- "writePolicy": "read-only"
36
- },
37
- "skillsByRole": {
38
- "planner": [
39
- "loop-agent"
40
- ],
41
- "scout": [
42
- "ai-engineering-context"
43
- ],
44
- "implementer": [
45
- "verification-before-completion"
46
- ],
47
- "reviewer": [
48
- "requesting-code-review"
49
- ],
50
- "verifier": [
51
- "verification-before-completion",
52
- "systematic-debugging"
53
- ],
54
- "closeout": [
55
- "loop-agent",
56
- "verification-before-completion"
57
- ]
58
- },
59
- "executorModels": {
60
- "cursor": {
61
- "LOW": "composer-2.5",
62
- "MED": "composer-2.5",
63
- "HIGH": "composer-2.5"
64
- },
65
- "pi": {
66
- "LOW": "gpt-5.3-codex-spark",
67
- "MED": "glm-5.2",
68
- "HIGH": "gpt-5.5"
69
- }
70
- },
71
- "tasks": [
72
- {
73
- "id": "contract-pi",
74
- "depends_on": [],
75
- "complexity": "MED",
76
- "executor": "pi",
77
- "role": "planner",
78
- "writePolicy": "read-only",
79
- "allowedPaths": [
80
- "**"
81
- ],
82
- "forbiddenPaths": [
83
- ".harness/**",
84
- "artifacts/**"
85
- ],
86
- "outputContract": "Plain Markdown implementation contract; no file writes.",
87
- "subtask_prompt": "Read the task inputs and return a concise implementation contract: scope, risks, narrow write boundaries, parallel scout opportunities, and verification expectations. Do not edit files."
88
- },
89
- {
90
- "id": "scout-src",
91
- "depends_on": [
92
- "contract-pi"
93
- ],
94
- "complexity": "LOW",
95
- "executor": "pi",
96
- "role": "scout",
97
- "writePolicy": "read-only",
98
- "allowedPaths": [
99
- "REPLACE/WITH/SOURCE/PATH/**"
100
- ],
101
- "forbiddenPaths": [
102
- ".harness/**",
103
- "artifacts/**"
104
- ],
105
- "outputContract": "Plain Markdown source reconnaissance summary; no file writes.",
106
- "subtask_prompt": "Perform read-only source reconnaissance. List relevant source files, existing patterns, and risks. Do not edit files."
107
- },
108
- {
109
- "id": "scout-tests",
110
- "depends_on": [
111
- "contract-pi"
112
- ],
113
- "complexity": "LOW",
114
- "executor": "pi",
115
- "role": "scout",
116
- "writePolicy": "read-only",
117
- "allowedPaths": [
118
- "REPLACE/WITH/TEST/PATH/**"
119
- ],
120
- "forbiddenPaths": [
121
- ".harness/**",
122
- "artifacts/**"
123
- ],
124
- "outputContract": "Plain Markdown test coverage reconnaissance summary; no file writes.",
125
- "subtask_prompt": "Perform read-only test reconnaissance. List relevant tests, coverage gaps, and verification commands. Do not edit files."
126
- },
127
- {
128
- "id": "implement-pi",
129
- "depends_on": [
130
- "scout-src",
131
- "scout-tests"
132
- ],
133
- "complexity": "HIGH",
134
- "executor": "pi",
135
- "role": "implementer",
136
- "writePolicy": "exclusive",
137
- "writeSet": [
138
- "REPLACE/WITH/ALLOWED/PATH/**"
139
- ],
140
- "allowedPaths": [
141
- "REPLACE/WITH/ALLOWED/PATH/**"
142
- ],
143
- "forbiddenPaths": [
144
- ".harness/**",
145
- "artifacts/**"
146
- ],
147
- "outputContract": "Implementation summary with changed files, tests run, and risks.",
148
- "subtask_prompt": "Implement the approved change within writeSet only. Keep the change minimal and update relevant tests/docs inside allowedPaths.",
149
- "toolProfile": "write"
150
- },
151
- {
152
- "id": "review-pi",
153
- "depends_on": [
154
- "implement-pi"
155
- ],
156
- "complexity": "MED",
157
- "executor": "pi",
158
- "role": "reviewer",
159
- "writePolicy": "read-only",
160
- "allowedPaths": [
161
- "**"
162
- ],
163
- "forbiddenPaths": [
164
- ".harness/**",
165
- "artifacts/**"
166
- ],
167
- "outputContract": "Plain Markdown review summary; no file writes.",
168
- "subtask_prompt": "Review upstream implementation output against the contract. Identify drift, missing tests, and residual risks. Do not edit files."
169
- },
170
- {
171
- "id": "verify-shell",
172
- "depends_on": [
173
- "implement-pi"
174
- ],
175
- "complexity": "LOW",
176
- "executor": "shell",
177
- "role": "verifier",
178
- "writePolicy": "read-only",
179
- "allowedPaths": [
180
- "./**"
181
- ],
182
- "forbiddenPaths": [
183
- ".harness/**",
184
- "artifacts/**"
185
- ],
186
- "outputContract": "Archived shell command stdout/stderr with exit codes; no worktree writes.",
187
- "subtask_prompt": "Run deterministic loop-agent verification commands and archive outputs.",
188
- "shell": {
189
- "preset": "loop-agent-standard-verify",
190
- "cwd": ".",
191
- "timeoutMs": 300000
192
- }
193
- }
194
- ]
195
- }
1
+ {
2
+ "$schema": "./agent-dag.schema.json",
3
+ "version": 2,
4
+ "title": "Agent DAG base template",
5
+ "objective": "Replace with the concrete objective for this DAG run.",
6
+ "successCriteria": [
7
+ "Each node returns output matching its outputContract.",
8
+ "Same-rank read-only scouts run in parallel when their outputs are independent.",
9
+ "Only Pi nodes with toolProfile=write or explicitly enabled Cursor implementer nodes may write files, and only inside declared writeSet.",
10
+ "Pi nodes remain read-only unless toolProfile=write is explicitly selected for a bounded writer node.",
11
+ "Read-only nodes must not write root artifacts/**; root artifacts/ is not a per-node scratchpad."
12
+ ],
13
+ "globalConstraints": [
14
+ "Replace every REPLACE/WITH/... placeholder with concrete repo paths before execution; do not leave template placeholders in production DAG JSON.",
15
+ "Do not commit runtime traces under .harness/dag-runs/.",
16
+ "Do not write generated DAG input specs into .harness/dag-runs/active/.",
17
+ "Use a platform-native temp path such as <temp-dir>/<topic>-dag.json for one-off DAG specs; commit reusable templates under examples/ or docs/templates/.",
18
+ "Actual file operation paths must be macOS/Windows compatible; use / only for stable repo refs, JSON/Markdown evidence refs, and glob conventions.",
19
+ "Every task must explicitly declare executor; defaults.executor is schema-only and not a runtime fallback.",
20
+ "Prefer same-rank parallel read-only scouts over serial chains when outputs are independent.",
21
+ "Add depends_on only when a child truly needs upstream output; challenge single-chain topologies during review.",
22
+ "Same-rank exclusive writeSet entries must be disjoint.",
23
+ "Do not add provider fields to DAG JSON; provider routing is executor-owned.",
24
+ "Use executorModels for model routing; do not add defaults.model or legacy top-level models.",
25
+ "Every task must declare outputContract describing the expected Markdown/output shape.",
26
+ "exclusive implementer nodes must use narrow, concrete writeSet and allowedPaths; never keep broad write permissions such as ** or repo root.",
27
+ "Cursor is optional; no-Cursor environments should use Pi read-only scouts and Pi writer nodes with toolProfile=write."
28
+ ],
29
+ "defaults": {
30
+ "executor": "pi",
31
+ "contextProfile": "slim",
32
+ "skills": [
33
+ "ai-engineering-context"
34
+ ],
35
+ "writePolicy": "read-only"
36
+ },
37
+ "skillsByRole": {
38
+ "planner": [
39
+ "loop-agent"
40
+ ],
41
+ "scout": [
42
+ "ai-engineering-context"
43
+ ],
44
+ "implementer": [
45
+ "verification-before-completion"
46
+ ],
47
+ "reviewer": [
48
+ "requesting-code-review"
49
+ ],
50
+ "verifier": [
51
+ "verification-before-completion",
52
+ "systematic-debugging"
53
+ ],
54
+ "closeout": [
55
+ "loop-agent",
56
+ "verification-before-completion"
57
+ ]
58
+ },
59
+ "executorModels": {
60
+ "cursor": {
61
+ "LOW": "composer-2.5",
62
+ "MED": "composer-2.5",
63
+ "HIGH": "composer-2.5"
64
+ },
65
+ "pi": {
66
+ "LOW": "gpt-5.3-codex-spark",
67
+ "MED": "glm-5.2",
68
+ "HIGH": "gpt-5.5"
69
+ }
70
+ },
71
+ "tasks": [
72
+ {
73
+ "id": "contract-pi",
74
+ "depends_on": [],
75
+ "complexity": "MED",
76
+ "executor": "pi",
77
+ "role": "planner",
78
+ "writePolicy": "read-only",
79
+ "allowedPaths": [
80
+ "**"
81
+ ],
82
+ "forbiddenPaths": [
83
+ ".harness/**",
84
+ "artifacts/**"
85
+ ],
86
+ "outputContract": "Plain Markdown implementation contract; no file writes.",
87
+ "subtask_prompt": "Read the task inputs and return a concise implementation contract: scope, risks, narrow write boundaries, parallel scout opportunities, and verification expectations. Do not edit files."
88
+ },
89
+ {
90
+ "id": "scout-src",
91
+ "depends_on": [
92
+ "contract-pi"
93
+ ],
94
+ "complexity": "LOW",
95
+ "executor": "pi",
96
+ "role": "scout",
97
+ "writePolicy": "read-only",
98
+ "allowedPaths": [
99
+ "REPLACE/WITH/SOURCE/PATH/**"
100
+ ],
101
+ "forbiddenPaths": [
102
+ ".harness/**",
103
+ "artifacts/**"
104
+ ],
105
+ "outputContract": "Plain Markdown source reconnaissance summary; no file writes.",
106
+ "subtask_prompt": "Perform read-only source reconnaissance. List relevant source files, existing patterns, and risks. Do not edit files."
107
+ },
108
+ {
109
+ "id": "scout-tests",
110
+ "depends_on": [
111
+ "contract-pi"
112
+ ],
113
+ "complexity": "LOW",
114
+ "executor": "pi",
115
+ "role": "scout",
116
+ "writePolicy": "read-only",
117
+ "allowedPaths": [
118
+ "REPLACE/WITH/TEST/PATH/**"
119
+ ],
120
+ "forbiddenPaths": [
121
+ ".harness/**",
122
+ "artifacts/**"
123
+ ],
124
+ "outputContract": "Plain Markdown test coverage reconnaissance summary; no file writes.",
125
+ "subtask_prompt": "Perform read-only test reconnaissance. List relevant tests, coverage gaps, and verification commands. Do not edit files."
126
+ },
127
+ {
128
+ "id": "implement-pi",
129
+ "depends_on": [
130
+ "scout-src",
131
+ "scout-tests"
132
+ ],
133
+ "complexity": "HIGH",
134
+ "executor": "pi",
135
+ "role": "implementer",
136
+ "writePolicy": "exclusive",
137
+ "writeSet": [
138
+ "REPLACE/WITH/ALLOWED/PATH/**"
139
+ ],
140
+ "allowedPaths": [
141
+ "REPLACE/WITH/ALLOWED/PATH/**"
142
+ ],
143
+ "forbiddenPaths": [
144
+ ".harness/**",
145
+ "artifacts/**"
146
+ ],
147
+ "outputContract": "Implementation summary with changed files, tests run, and risks.",
148
+ "subtask_prompt": "Implement the approved change within writeSet only. Keep the change minimal and update relevant tests/docs inside allowedPaths.",
149
+ "toolProfile": "write"
150
+ },
151
+ {
152
+ "id": "review-pi",
153
+ "depends_on": [
154
+ "implement-pi"
155
+ ],
156
+ "complexity": "MED",
157
+ "executor": "pi",
158
+ "role": "reviewer",
159
+ "writePolicy": "read-only",
160
+ "allowedPaths": [
161
+ "**"
162
+ ],
163
+ "forbiddenPaths": [
164
+ ".harness/**",
165
+ "artifacts/**"
166
+ ],
167
+ "outputContract": "Plain Markdown review summary; no file writes.",
168
+ "subtask_prompt": "Review upstream implementation output against the contract. Identify drift, missing tests, and residual risks. Do not edit files."
169
+ },
170
+ {
171
+ "id": "verify-shell",
172
+ "depends_on": [
173
+ "implement-pi"
174
+ ],
175
+ "complexity": "LOW",
176
+ "executor": "shell",
177
+ "role": "verifier",
178
+ "writePolicy": "read-only",
179
+ "allowedPaths": [
180
+ "./**"
181
+ ],
182
+ "forbiddenPaths": [
183
+ ".harness/**",
184
+ "artifacts/**"
185
+ ],
186
+ "outputContract": "Archived shell command stdout/stderr with exit codes; no worktree writes.",
187
+ "subtask_prompt": "Run deterministic loop-agent verification commands and archive outputs.",
188
+ "shell": {
189
+ "preset": "loop-agent-standard-verify",
190
+ "cwd": ".",
191
+ "timeoutMs": 300000
192
+ }
193
+ }
194
+ ]
195
+ }