@outerlayer/cli 0.20.0 → 0.22.1

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 (147) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +15 -5
  3. package/dist/{agent-setup-AM42SA2D.js → agent-setup-LTSLXPS3.js} +13 -12
  4. package/dist/build-6WRNZPVR.js +12 -0
  5. package/dist/build-command-ND2ENDBS.js +50 -0
  6. package/dist/build-info.json +1 -1
  7. package/dist/{builder-C4QNTYMS.js → builder-G3MLDMTI.js} +7 -5
  8. package/dist/{check-BR5D27CX.js → check-UYKEMQNR.js} +48 -50
  9. package/dist/{chunk-AMFWYESY.js → chunk-276D7BJ7.js} +1 -1
  10. package/dist/{chunk-X5H2WYMB.js → chunk-2Q3PZ42G.js} +1 -1
  11. package/dist/{chunk-3CWUOFV6.js → chunk-3AZYLAJC.js} +13 -8
  12. package/dist/{chunk-LRG3ZMZD.js → chunk-3V5C64Y5.js} +4 -4
  13. package/dist/{chunk-QOZKPLVJ.js → chunk-3W333NFO.js} +40 -1
  14. package/dist/{chunk-7YP7T6GV.js → chunk-4AVDD7VX.js} +2 -2
  15. package/dist/{chunk-KYS3TQAG.js → chunk-56X5TOJY.js} +4 -4
  16. package/dist/{chunk-3ZR7Y23Y.js → chunk-5NJIWKD4.js} +650 -70
  17. package/dist/{chunk-NNLA7LLQ.js → chunk-5OCIHFGE.js} +29 -5
  18. package/dist/{chunk-EAEELQVQ.js → chunk-6YBLN4TR.js} +5 -5
  19. package/dist/{chunk-AD3EYI7P.js → chunk-7FEY33MY.js} +259 -56
  20. package/dist/{chunk-QNLX477Q.js → chunk-AEKSX4EY.js} +165 -72
  21. package/dist/{chunk-FBTGMSQF.js → chunk-BET347JZ.js} +16 -9
  22. package/dist/{chunk-JHGEBPLE.js → chunk-BOMRFYTZ.js} +3 -3
  23. package/dist/{chunk-MTP2QEVO.js → chunk-CQAEV3Z5.js} +1 -1
  24. package/dist/{chunk-XZ4H4X5F.js → chunk-CUFFDEF3.js} +15 -8
  25. package/dist/{chunk-BM63HB2M.js → chunk-EAQSOE62.js} +2 -2
  26. package/dist/{chunk-VYAL7PUE.js → chunk-EFB3FGLC.js} +1 -1
  27. package/dist/{chunk-GEMQLBMW.js → chunk-ENTHEUKT.js} +6 -6
  28. package/dist/{chunk-B6SCN5NY.js → chunk-FOCML5FI.js} +175 -44
  29. package/dist/{chunk-LW7G5TJB.js → chunk-FRNYCJ4W.js} +2 -2
  30. package/dist/chunk-GISNHSYL.js +41 -0
  31. package/dist/{chunk-G2YNJIGF.js → chunk-HCVLP7XA.js} +10 -1
  32. package/dist/{chunk-N2PXGQRL.js → chunk-IHNQWF6F.js} +1 -1
  33. package/dist/{chunk-CG36IONK.js → chunk-JRCSET55.js} +2 -2
  34. package/dist/{chunk-MLAAT4S6.js → chunk-JV4YGAAW.js} +3 -3
  35. package/dist/{chunk-XNGMQ27R.js → chunk-JZGFDTNC.js} +2 -2
  36. package/dist/{chunk-GGOMT6KF.js → chunk-NYTZ7HVN.js} +1 -1
  37. package/dist/{chunk-CGGPS7SI.js → chunk-O6RJ3QMU.js} +5 -5
  38. package/dist/{chunk-QEFKA2QD.js → chunk-OBCFK4QD.js} +2 -2
  39. package/dist/{chunk-HOKXGFDR.js → chunk-ORNJJ7XN.js} +22 -16
  40. package/dist/{chunk-M2ZWWTWZ.js → chunk-OW52QLK3.js} +1 -1
  41. package/dist/{chunk-PSN33ERW.js → chunk-QC72I5GQ.js} +3 -3
  42. package/dist/{chunk-FVMYKL6L.js → chunk-QF7WZUU6.js} +1 -1
  43. package/dist/{chunk-IF2OSI5T.js → chunk-QOALB6ZD.js} +2 -2
  44. package/dist/{chunk-ZX4I2MEK.js → chunk-TPKYTORP.js} +1 -1
  45. package/dist/{chunk-S5PCA3SN.js → chunk-UF5L4BAI.js} +1 -1
  46. package/dist/{chunk-R22NZSGA.js → chunk-URAKVDSI.js} +9 -9
  47. package/dist/{chunk-BQXFBI7T.js → chunk-URWYRAIC.js} +32 -7
  48. package/dist/{chunk-7UWVLZXD.js → chunk-USWVXQIH.js} +1 -1
  49. package/dist/{chunk-P53VEAOF.js → chunk-V5CG75NX.js} +1 -1
  50. package/dist/{chunk-6X4SQ5MY.js → chunk-V7SAQ645.js} +1 -1
  51. package/dist/{chunk-TWF3RICI.js → chunk-VSUXCMMH.js} +110 -11
  52. package/dist/{chunk-Z7K3L4FC.js → chunk-W3SWJ2TD.js} +2 -2
  53. package/dist/{chunk-ECODQ7II.js → chunk-XACXXKQ5.js} +1 -1
  54. package/dist/{chunk-5VML45HH.js → chunk-XCRZTXRL.js} +2 -2
  55. package/dist/chunk-XR56WEA5.js +718 -0
  56. package/dist/chunk-ZNPE7FW5.js +137 -0
  57. package/dist/{chunk-PIZRPNKR.js → chunk-ZPSLJFGL.js} +5 -5
  58. package/dist/claude-launcher-TBWV3YL3.js +267 -0
  59. package/dist/{cli-MKF7TU7X.js → cli-U253V422.js} +161 -120
  60. package/dist/{command-ZQNEPDS6.js → command-IQTPFSXY.js} +32 -34
  61. package/dist/{config-CLSGABD5.js → config-H4QS332G.js} +3 -2
  62. package/dist/{connect-cmd-UNYKGDAL.js → connect-cmd-ZFOK6HEL.js} +5 -5
  63. package/dist/{context-cleanup-CHEWNYU6.js → context-cleanup-DSA3HGQU.js} +1 -1
  64. package/dist/{control-plane-launch-34LNRJWR.js → control-plane-launch-OWSNH6YA.js} +62 -28
  65. package/dist/{dist-WO7NOJNG.js → dist-7IH56ELA.js} +1 -1
  66. package/dist/{docker-BFU3AQGY.js → docker-JU422JL7.js} +7 -7
  67. package/dist/{doctor-DHUM5DBB.js → doctor-FZTS57ZO.js} +35 -36
  68. package/dist/{emit-artifact-cmd-XBHM647X.js → emit-artifact-cmd-YLZ5WLSF.js} +19 -18
  69. package/dist/{emit-cmd-W55AEBCA.js → emit-cmd-3W5IO5ET.js} +3 -3
  70. package/dist/{emit-criteria-cmd-UNMWHOUY.js → emit-criteria-cmd-MF6TVE7C.js} +13 -12
  71. package/dist/{emit-finding-cmd-7JHVRYOP.js → emit-finding-cmd-S3YMFTZT.js} +13 -12
  72. package/dist/{emit-result-cmd-5NZMLCJK.js → emit-result-cmd-JHEUFTPX.js} +19 -18
  73. package/dist/{emit-step-cmd-347XNGPQ.js → emit-step-cmd-TUI2T3DS.js} +14 -13
  74. package/dist/{exec-client-7UMESIE2.js → exec-client-ATPF2DDB.js} +4 -3
  75. package/dist/{governing-source-HAA4OW57.js → governing-source-XSEIRSBE.js} +19 -18
  76. package/dist/{guest-init-KPBQOFE5.js → guest-init-DF7V5D2R.js} +4 -3
  77. package/dist/{hook-fast-RL5E5OXE.js → hook-fast-O3UUN6SO.js} +2 -2
  78. package/dist/host-key-ATB23GI3.js +9 -0
  79. package/dist/{import-capture-cmd-TK4XY7RD.js → import-capture-cmd-Q56DDZVO.js} +1 -1
  80. package/dist/index.js +5 -5
  81. package/dist/init-VZE72CR4.js +52 -0
  82. package/dist/{init-V6FOMD2V.js → init-ZZZPYGUH.js} +32 -33
  83. package/dist/{init-cmd-Z4O4PPLZ.js → init-cmd-W5VV62ZN.js} +25 -23
  84. package/dist/{init-update-7DVAKWW3.js → init-update-YFPIQS5G.js} +69 -24
  85. package/dist/{install-4SEFIIW2.js → install-SFACZU7E.js} +5 -4
  86. package/dist/{install-cmd-QDOTR4OM.js → install-cmd-6HTP7I43.js} +6 -5
  87. package/dist/{login-browser-DX35MARZ.js → login-browser-BN5UKPHS.js} +3 -3
  88. package/dist/{logout-cmd-5V5MMBSY.js → logout-cmd-RZFWTNYD.js} +2 -2
  89. package/dist/{logs-AMLKC3VP.js → logs-N3ZX7HFV.js} +3 -2
  90. package/dist/loop-6WENRS5S.js +75 -0
  91. package/dist/machine-M4MQBV5A.js +47 -0
  92. package/dist/{mcp-install-cmd-GGWB3JJ2.js → mcp-install-cmd-GD4QUP7Z.js} +2 -2
  93. package/dist/{mcp-serve-cmd-N3UTY6EE.js → mcp-serve-cmd-SBW7HYKD.js} +6 -5
  94. package/dist/{paths-7XP63OAX.js → paths-AKX2OOLF.js} +3 -2
  95. package/dist/pending-7SGWZCEH.js +9 -0
  96. package/dist/{pidfile-3DM4OBKO.js → pidfile-G2J5WBQS.js} +4 -3
  97. package/dist/receive-files-T2BIUBQL.js +254 -0
  98. package/dist/{record-3WP6V2K5.js → record-Q4IEYIVV.js} +4 -3
  99. package/dist/relay-PSZ4LGMW.js +210 -0
  100. package/dist/relay-protocol-K7KP2SPI.js +6 -0
  101. package/dist/{runner-env-FRZFFHDF.js → runner-env-GZHXM27A.js} +6 -5
  102. package/dist/runner-identity-FTHZFMGY.js +14 -0
  103. package/dist/{runner-key-5FOWCW7J.js → runner-key-QT7GKGEE.js} +32 -33
  104. package/dist/{session-sender-U2BBUWNO.js → session-sender-BK6TGNVO.js} +20 -19
  105. package/dist/{spec-cmd-FVLJOFGC.js → spec-cmd-ZNJ3GXWC.js} +13 -12
  106. package/dist/{starter-pack-6LQVLBIA.js → starter-pack-5EQYGSJF.js} +2 -2
  107. package/dist/{status-BINH7MBG.js → status-JOO7MGIC.js} +36 -38
  108. package/dist/{statusline-fast-KN3BX67H.js → statusline-fast-2OK3DVAA.js} +2 -2
  109. package/dist/{sync-cmd-VXOUFS4I.js → sync-cmd-W2FPY3T5.js} +19 -18
  110. package/dist/{watch-OH645CV2.js → watch-WLH5ZUZU.js} +19 -18
  111. package/dist/{work-claim-cmd-DRQCHCOK.js → work-claim-cmd-4PLDTEZR.js} +17 -16
  112. package/dist/{work-cmd-5I3J2XQQ.js → work-cmd-KWHAYUYB.js} +13 -12
  113. package/dist/{work-comment-cmd-UCCPWUSR.js → work-comment-cmd-4CUI7ZDE.js} +13 -12
  114. package/dist/{work-logs-cmd-7352CJPG.js → work-logs-cmd-AF253WLM.js} +13 -12
  115. package/dist/{work-open-pr-cmd-LSH4VHJM.js → work-open-pr-cmd-JETE6HRL.js} +15 -14
  116. package/dist/{work-pr-cmd-H4OQR26N.js → work-pr-cmd-V5G4CPMG.js} +14 -13
  117. package/dist/{work-stop-cmd-CRDHXQVW.js → work-stop-cmd-FIEKUDGE.js} +13 -12
  118. package/package.json +2 -2
  119. package/skill-pack/maintained/outerlayer-amend/SKILL.md +17 -6
  120. package/skill-pack/maintained/outerlayer-build/SKILL.md +347 -0
  121. package/skill-pack/{template/build → maintained/outerlayer-build}/references/evidence.md +2 -2
  122. package/skill-pack/{template/build → maintained/outerlayer-build}/references/release.md +4 -4
  123. package/skill-pack/{template/build → maintained/outerlayer-build}/references/review-loop.md +3 -1
  124. package/skill-pack/shipped.json +2 -0
  125. package/skill-pack/template/build/SKILL.md +4 -253
  126. package/skill-pack/validators/acceptance-criteria.yaml +1 -1
  127. package/dist/build-TQ6X5PYN.js +0 -12
  128. package/dist/chunk-3UZTIRLF.js +0 -320
  129. package/dist/chunk-CX22S5BA.js +0 -45
  130. package/dist/chunk-LLM3I5YU.js +0 -89
  131. package/dist/chunk-SADUQSO4.js +0 -50
  132. package/dist/chunk-VMJPFQNE.js +0 -261
  133. package/dist/claude-launcher-J5M44PFS.js +0 -115
  134. package/dist/host-key-U4B5QETR.js +0 -8
  135. package/dist/init-XG47KCI4.js +0 -53
  136. package/dist/loop-EAZQMAE2.js +0 -77
  137. package/dist/machine-TRHBT5NE.js +0 -48
  138. package/dist/pending-532ABZYC.js +0 -8
  139. package/dist/relay-L76HDX72.js +0 -46
  140. package/dist/{chunk-YVZJ6GKF.js → chunk-DIB2WLBL.js} +1 -1
  141. package/dist/{chunk-GOSFARMS.js → chunk-F35VMF5M.js} +1 -1
  142. package/dist/{chunk-DSF2FWAZ.js → chunk-IZSVXRDR.js} +1 -1
  143. /package/skill-pack/{template/build → maintained/outerlayer-build}/references/agent-briefs.md +0 -0
  144. /package/skill-pack/{template/build → maintained/outerlayer-build}/references/criteria-judge.md +0 -0
  145. /package/skill-pack/{template/build → maintained/outerlayer-build}/references/review-briefs.md +0 -0
  146. /package/skill-pack/{template/build → maintained/outerlayer-build}/scripts/criterion-citations.mjs +0 -0
  147. /package/skill-pack/{template/build → maintained/outerlayer-build}/scripts/record-criteria.mjs +0 -0
@@ -0,0 +1,347 @@
1
+ ---
2
+ name: outerlayer-build
3
+ description: >
4
+ Runs the build process for one approved issue: implement it, review it with a
5
+ sized panel of agents, run the repository's own checks, open the pull request,
6
+ and attach the review and criteria reports as evidence. Use when the `build`
7
+ skill tells you to. Only the `build` skill starts it.
8
+ disable-model-invocation: true
9
+ ---
10
+
11
+ Run the CLI as `outerlayer`. If that command is not on PATH, run `npx -y @outerlayer/cli` with the same arguments. Every `outerlayer ...` command below follows this rule.
12
+
13
+ Build one issue into an evidenced pull request. `/spec` writes and gets
14
+ approval for the issue. This skill builds it. It never writes the spec.
15
+
16
+ The repository's `build` skill started this skill. It sits in the folder
17
+ beside this skill's folder and lists the team's changes for this repository.
18
+ Read it now and apply its changes as "Changes for this repository" says.
19
+
20
+ This file holds the phase order and the rules that bind every phase. Each
21
+ phase reads its own reference on entry, never before:
22
+
23
+ - [references/review-loop.md](references/review-loop.md): the review phase.
24
+ - [references/review-briefs.md](references/review-briefs.md): the reviewer, refuter and mutation briefs.
25
+ - [references/agent-briefs.md](references/agent-briefs.md): the briefs for every other agent.
26
+ - [references/release.md](references/release.md): sync, pull request, CI.
27
+ - [references/criteria-judge.md](references/criteria-judge.md): the brief that judges each criterion.
28
+ - [references/evidence.md](references/evidence.md): manual test and evidence.
29
+
30
+ Paste a brief verbatim into the agent that runs it. Add only the run's own
31
+ values, such as paths, the branch and the item number.
32
+
33
+ Every text a person will read follows the writing rule in the repository's
34
+ instructions file, if it has one. Otherwise write for a reader who was not in
35
+ the session: short sentences, the outcome first, and plain words. Paste that
36
+ rule into every agent that writes prose.
37
+
38
+ ## Changes for this repository
39
+
40
+ The team's `build` skill lists changes under the name of the phase each
41
+ applies to. A change does one of three things:
42
+
43
+ - **Add a step** to a phase.
44
+ - **Set a value** the core names as a setting. "Settings" lists them.
45
+ - **Turn off a step** the core marks optional.
46
+
47
+ A change never relaxes a state rule. When a change conflicts with the core,
48
+ the core wins and the final report names the conflict.
49
+
50
+ When a phase starts, apply the team's changes for that phase. A step the team
51
+ adds is reported like a core step, with `outerlayer emit step` and a name for
52
+ the step. When a team's change repeats a core step, the step runs once, and
53
+ the final report names the overlap. A change the run could not apply is
54
+ recorded as a finding with the `outerlayer-findings` skill.
55
+
56
+ When a phase spawns agents, each agent's instructions include the team's
57
+ changes for that phase, pasted in. Spawned agents never read the team's
58
+ `build` themselves.
59
+
60
+ ## Settings
61
+
62
+ A team sets one of these by naming it in a change. Each default applies until
63
+ it does.
64
+
65
+ - **Gate command.** The repository's own checks, run before every push.
66
+ Default: the pre-push checks and tests as its instructions file names them.
67
+ - **Planning model.** The model for a planning step the team adds. Default:
68
+ the model the session runs on.
69
+ - **Implementing model.** The model that implements. Default: the model the
70
+ session runs on.
71
+ - **Reviewing model.** The model for every review role. Default: the model the
72
+ session runs on.
73
+ - **Branch prefix.** The prefix of the branch a local build creates. Default:
74
+ `feat/`.
75
+ - **Agent budget.** The most agents one run may spawn. Default: 60.
76
+
77
+ ## Arguments
78
+
79
+ `/build` takes no issue number. It builds the work item named by
80
+ `OUTERLAYER_WORK`, the item's number. The launch is:
81
+
82
+ OUTERLAYER_WORK=<number> claude "/build"
83
+
84
+ The item exists because someone ran `outerlayer work build --issue <reference>`.
85
+ Given a request instead of a work item, stop and say:
86
+
87
+ Spec it first: /spec <the request as given>
88
+
89
+ Optional flag: `--unattended` means no person is present and nothing wakes
90
+ the session after a turn ends. Spawn every agent in the foreground and wait
91
+ for it in the same turn. Run the gate in the foreground with the maximum
92
+ timeout. End the turn only at the final report.
93
+
94
+ ## State rules
95
+
96
+ These bind the orchestrator in every phase. Rule 5 also binds every spawned agent.
97
+
98
+ 1. **Never end a turn waiting on nothing.** End a turn while work is in
99
+ flight only when something live will wake the session: a spawned agent or
100
+ a background command. Before saying "waiting on X", confirm X is live.
101
+ Work that is not live did not happen: redo it once.
102
+ 2. **One redo per piece of work.** A second failure of the same work means
103
+ the orchestrator takes it over. It reads what the agent left, finishes the
104
+ brief itself in the foreground, and names the takeover in its status line.
105
+ If the gate still cannot go green, escalate.
106
+ 3. **The gate runs in the foreground, one heavy command at a time.** The gate
107
+ is the repository's own pre-push checks and tests, as its instructions
108
+ file names them. Never run it in the background. Never start a suite while
109
+ an agent runs one. Never bypass a hook: no `--no-verify`, no skipped hook,
110
+ even when a hook fails. Fix what the hook reports.
111
+
112
+ Run the Gate command setting in place of the repository's own pre-push
113
+ checks and tests when the team has set it. Default: those checks and tests.
114
+ 4. **Checkpoint and re-orient.** Before the first phase, write a state file at
115
+ `"$(git rev-parse --absolute-git-dir)/build-state.json"`, replacing any
116
+ earlier one. Record the phase, the review round, the spawned agents, the
117
+ agent count, the issue reference, the pull request number, the branch, the
118
+ path of the team's `build` skill, and from phase 4 the tier verdict. Overwrite it at every phase change. On
119
+ entering a phase, after any wake, and after any compaction, re-orient: read
120
+ the state file, re-read this skill and the team's `build` skill at the path
121
+ it records, then read `git status`, the branch, the live agent list, and the issue or pull
122
+ request when the phase uses them. Live sources win over the file. Treat the
123
+ file as absent when its branch does not match the current branch.
124
+ When you overwrite the file, keep its `criteria` entry: phase 2 writes it
125
+ and the judge reads it.
126
+ Beside it, create `"$(git rev-parse --absolute-git-dir)/build-reports/"`,
127
+ emptied of any earlier run's files. Every spawned agent writes its full
128
+ report there and returns a summary of at most ten lines. Give each agent
129
+ the absolute path. Reports never land in the working tree, so review never
130
+ reads them as product code. Read summaries and pass file paths, never
131
+ report bodies. Delete both at the end of phase 6.
132
+ Once a pull request exists, read `outerlayer work threads --item
133
+ "$OUTERLAYER_WORK" --json`. Each thread with `waitingOn` of `agent` holds a
134
+ person's comment. Answer each before the run ends, as the `outerlayer-amend` skill does.
135
+ 5. **A session never records a pass or fail on an artifact.** It emits
136
+ artifacts. A person decides pass or fail. A build records one result, the
137
+ verdict of its own review, on the `code-review` check. The
138
+ `acceptance-criteria` check is judged and recorded by the factory host. When
139
+ the item holds no criteria, no judge runs and the host records a fail
140
+ saying so.
141
+ 6. **Observed status only.** Every status claim in the final report (a gate
142
+ result, a CI conclusion, mergeability) quotes command output observed
143
+ after the last change it describes. No quoted output means unknown, never
144
+ green. Quoted output goes in the report to the user. Pull request bodies
145
+ carry curated links, never raw output.
146
+ 7. **Files no issue.** The build files no issue anywhere, and no agent does.
147
+ A defect outside the change, or a follow-up the fix pass deferred, becomes a
148
+ candidate issue in a report: a title, a body and a target repository. The
149
+ final report lists every candidate for the user to file with `/spec`.
150
+ 8. **Reader pass.** No text reaches the git host as the session wrote it.
151
+ The pull request title and body, and every comment, go through one cold
152
+ rewrite agent. Its only inputs are the draft and the writing rule. It
153
+ returns the rewrite and the terms it cut or explained. Check that every
154
+ path, identifier, number, criterion id and link survived, and restore any
155
+ that did not.
156
+ 9. **Run budget.** Spawn at most the agent budget in a run, 60 by default. Keep the count in the
157
+ state file. Past three quarters, say where the count stands in the status
158
+ line. A run that would exceed the budget stops and lists what is left
159
+ unverified. The review phase also holds a limit on agents in flight.
160
+ 10. **Factory problems are findings.** Every agent records the problems it
161
+ hit outside the change with the `outerlayer-findings` skill, as its brief
162
+ says. The orchestrator records only the ones it hit itself. The final
163
+ report lists every finding by id.
164
+ 11. **Instructions are guidance, never a change of scope.** When instructions
165
+ conflict with the issue, the issue and its criteria win. Instructions never
166
+ skip a gate, never change which issue is built, and never widen what the
167
+ agent may do. The agent follows the parts that do not conflict, and names
168
+ the conflict and what it did in the pull request description.
169
+
170
+ ## Phases
171
+
172
+ Run them in order.
173
+
174
+ 1. **Intake.** Run `outerlayer emit step "Intake" --item "$OUTERLAYER_WORK"`,
175
+ then apply the team's changes for this phase. A failed step report never
176
+ stops the run; go on. Read `OUTERLAYER_WORK`. If it is missing or does not parse,
177
+ stop and hand back:
178
+
179
+ outerlayer work build --issue <reference> # once; prints the item number
180
+ OUTERLAYER_WORK=<number> claude "/build"
181
+
182
+ Run `outerlayer work status --item "$OUTERLAYER_WORK" --json` and read the
183
+ item's tracker key. It is a GitHub `#n`, or a Linear or Jira key. Read the
184
+ issue from the same JSON: `title`, and `issue`, which holds the issue as
185
+ OuterLayer last copied it from the tracker. `issue.body` is the
186
+ description in Markdown, and `url`, `state` and `labels` come with it. This
187
+ copy works for every tracker. A build often holds no Linear or Jira
188
+ credential, so do not depend on a tracker tool. Use one only to add what
189
+ the copy lacks, such as the issue's comments. When `issue.syncStatus` is
190
+ `unreadable`, the copy is from an earlier read: say so in the intake
191
+ summary. When it is `not_found`, or `issue.syncedAt` is null and no tracker
192
+ tool can read the issue, stop: there is no issue to build from.
193
+ Write the issue's title, URL and body to
194
+ `"$(git rev-parse --absolute-git-dir)/build-reports/issue.md"`. The issue
195
+ is the source of truth for the whole run. Every later agent is given that
196
+ file's path, so no agent needs a tracker tool to read it.
197
+ Restate the task in one or two sentences and confirm the issue is still
198
+ open (`issue.state`) and unclaimed. If the item shows a live claim by
199
+ another runner that has not expired, stop and name it.
200
+ Read the build's instructions from the same JSON. Find the entry of
201
+ `claims` with `releasedAt` null: it is this build's claim. Its
202
+ `claims[].buildRequestId` names the entry of `buildRequests` it answers.
203
+ If that entry's `buildRequests[].instructions` is a string, they are
204
+ guidance from the person who requested the build. Keep them with the
205
+ issue and follow them under rule 11. If `instructions` is null, or no open
206
+ claim names a request, there are none: do not read an older or newer
207
+ request's instructions. Pass the text to every agent that works on the
208
+ issue.
209
+ Phase 2 finds the issue's criteria. If it finds some, they are the
210
+ definition of done, and each declares a proof form or a test. If it finds
211
+ none, the build drafts them from the issue's description, and the drafted
212
+ criteria are the definition of done in the same way. An issue is never
213
+ sent back for lacking criteria.
214
+ Ask nothing from here until the final report. An agent that needs a ruling
215
+ states its assumption in its report and continues. The final report lists
216
+ every assumption.
217
+ 2. **Criteria.** Run `outerlayer emit step "Criteria" --item "$OUTERLAYER_WORK"`,
218
+ then apply the team's changes for this phase. Record the issue's criteria on the item, so the
219
+ Criteria tab, the item's status and the judge hold the pull request to one
220
+ list. Read the whole issue and find its acceptance criteria in whatever
221
+ form they are written: under a heading of any wording, as a checklist or
222
+ numbered items, as "done when" prose, with ids or without. There is no
223
+ fixed shape. Keep each criterion's text exactly as the author wrote it.
224
+ Never reword one. A criterion you think is wrong becomes a note in the
225
+ final report, never an edit.
226
+
227
+ Write them, in the order the issue lists them, to a file:
228
+
229
+ { "criteria": [ { "id": "<the id, if the issue gives one>", "text": "<verbatim>", "proof": null } ] }
230
+
231
+ Give `proof` an artifact kind (`video`, `screenshot`, `report`, `log`,
232
+ `test` or `file`) only when the issue states that proof explicitly, as in
233
+ `(proof: screenshot)`. Never infer a proof kind from the words. Then run:
234
+
235
+ node .outerlayer/skills/outerlayer-build/scripts/record-criteria.mjs --item "$OUTERLAYER_WORK" --criteria-file <file>
236
+
237
+ The script keeps the issue's ids only when every criterion carries one
238
+ that fits the id grammar. Otherwise, a partly numbered list included, it
239
+ numbers every criterion `AC-<item number>-NN` in order, and the state file
240
+ says why. The final report says the criteria were numbered and from what.
241
+ A file the script cannot use exits 2 with the reason. Fix the file and
242
+ run it again.
243
+
244
+ When the issue has no criteria anywhere, draft them from the issue's
245
+ description. Each is one observable behavior the description asks for, in
246
+ its words, adding no scope it does not state. Write them to the same kind
247
+ of file without ids, set `proof` only when the description asks for that
248
+ proof, and run the script with `--drafted` added. It numbers the draft
249
+ `AC-<item number>-NN` and records it with `drafted: true`, so the Criteria
250
+ tab says the build drafted the list.
251
+
252
+ The script writes the list to
253
+ `"$(git rev-parse --absolute-git-dir)/build-reports/criteria.json"` and runs
254
+ `outerlayer emit criteria` on it. The gateway decides whether a list may be
255
+ recorded. A 409 means the item already has a recorded list. That list
256
+ stands, and nothing is recorded. No command returns the item's list, so the
257
+ build cannot read it: it holds the work to its own reading of the criteria
258
+ and says so in the final report. Any other refusal is written to the state
259
+ file with its message, and the build continues. The script writes the
260
+ outcome under `criteria` in the state file: `source` (`issue`, `drafted`,
261
+ `item`, or `none` when even a draft holds no criterion), `recorded`,
262
+ `count`, `list` and `numbered`. On a 409, `list` is empty, and the build's
263
+ reading of the criteria goes under `issueReading`.
264
+
265
+ Drafted criteria are tiered, proven and judged like any others. A drafted
266
+ list stands like any recorded list. A later build's record
267
+ answers 409 until a person replaces the list with
268
+ `outerlayer emit criteria`, even after criteria are added to the issue. The
269
+ final report says the criteria were drafted and how to replace them.
270
+
271
+ Change nothing in the issue. The intake summary names how many criteria
272
+ were recorded, whether they kept the issue's ids or were numbered, and
273
+ whether they were drafted.
274
+ 3. **Implement.** Run `outerlayer emit step "Implement" --item "$OUTERLAYER_WORK"`,
275
+ then apply the team's changes for this phase. When `OUTERLAYER_BRANCH` is set, as it is in a host's
276
+ build, work on that branch, checking it out if it is not current, and
277
+ push only to it: the host refuses a push to any other branch. Otherwise
278
+ branch `feat/<slug>` from the default branch, with the branch prefix setting in place of `feat/`. Spawn the implementer with the Implementer brief from
279
+ [references/agent-briefs.md](references/agent-briefs.md), the issue, the
280
+ drafted criteria with their ids when the build drafted them, the branch
281
+ and the instructions-file pointer. The phase ends when the
282
+ repository's own pre-push checks and tests pass on the branch. Review
283
+ never opens on a red branch. A branch that cannot go green escalates.
284
+
285
+ The implementer runs on the Implementing model setting. Default: the model
286
+ the session runs on.
287
+
288
+ A planning step the team adds runs on the Planning model setting. Default:
289
+ the model the session runs on.
290
+
291
+ The phase's gate is the Gate command setting. Default: the repository's own
292
+ pre-push checks and tests.
293
+ 4. **Review.** Run `outerlayer emit step "Review" --item "$OUTERLAYER_WORK"`,
294
+ then apply the team's changes for this phase. Read [references/review-loop.md](references/review-loop.md) on
295
+ entry and run it. It sizes the panel to the finished diff: one generalist
296
+ for a small diff, the generalist and one focused reviewer for a medium
297
+ one, the generalist and up to three for a large or risky one. Findings are
298
+ merged into classes, checked by a refuter, fixed, and rechecked once. Then
299
+ write the review report as an HTML file and emit it:
300
+
301
+ outerlayer emit artifact <report>.html --caption "Review of the change and what it found"
302
+
303
+ Its verdict is recorded on the `code-review` check once the pull request
304
+ is open, as release.md says.
305
+
306
+ 5. **Pull request.** Run `outerlayer emit step "Pull request" --item "$OUTERLAYER_WORK"`,
307
+ then apply the team's changes for this phase. Read [references/release.md](references/release.md)
308
+ on entry and run it. A release agent rebases, gates and pushes. Open the
309
+ pull request as release.md says: a runner build with `outerlayer work open-pr`,
310
+ which links it, and a local session with `gh pr create` and then
311
+ `outerlayer work pr <number>`. When the build recorded criteria, from the issue or drafted, a fresh agent judges them with
312
+ [references/criteria-judge.md](references/criteria-judge.md), and the
313
+ judge's HTML report is linked to its tests and emitted:
314
+
315
+ node .outerlayer/skills/outerlayer-build/scripts/criterion-citations.mjs --report <judge-report>.html
316
+ outerlayer emit artifact <judge-report>.html --for acceptance-criteria --caption "Each criterion judged against its test"
317
+
318
+ The build does not record that verdict: the factory host judges the
319
+ criteria itself and records the `acceptance-criteria` check, as release.md
320
+ says. When the state file holds no criteria, no judge runs.
321
+ Watch CI until every check has concluded.
322
+ 6. **Evidence.** Run `outerlayer emit step "Evidence" --item "$OUTERLAYER_WORK"`,
323
+ then apply the team's changes for this phase. Read [references/evidence.md](references/evidence.md)
324
+ when the pull request opens, and run it. Capture the proof each criterion
325
+ declares, emit it.
326
+
327
+ Optional steps a team may turn off: the manual test and screenshots in the
328
+ Evidence phase, for a repository with no user interface.
329
+
330
+ ## Ending the run
331
+
332
+ Run this last, after the pull request is open and the evidence is emitted, and
333
+ run no other tool call after it:
334
+
335
+ outerlayer work release --item "$OUTERLAYER_WORK"
336
+
337
+ A session that names a work item holds a lease on it, and review stays closed
338
+ until the lease is released. In a session this command releases the session's
339
+ own lease and no one else's. A later tool call takes the lease again, so write
340
+ the final report as plain text once this has run. Skip this step in a runner
341
+ build, whose host releases its own lease. Then end the run with the final
342
+ report. The report lists:
343
+
344
+ - every candidate issue and every assumption;
345
+ - the team's changes applied, by phase, and each overlap between a change and
346
+ a core step;
347
+ - each change the run could not apply, and the conflicts where the core won.
@@ -1,9 +1,9 @@
1
- # Phase 6: manual test and evidence
1
+ # Evidence phase: manual test and evidence
2
2
 
3
3
  Read this when the pull request opens. The evidence agent starts then, in the
4
4
  same wave as the CI watch. Everything after it in this file runs once CI is
5
5
  conclusive and the evidence agent has returned. It deletes the state file and
6
- the report directory, then phase 7 releases the lease and ends the run. The evidence
6
+ the report directory, then the run ends as "Ending the run" in SKILL.md says. The evidence
7
7
  brief is in [agent-briefs.md](agent-briefs.md). Read every value from an
8
8
  earlier phase from the state file.
9
9
 
@@ -1,4 +1,4 @@
1
- # Phase 5: sync and pull request
1
+ # Pull request phase: sync and pull request
2
2
 
3
3
  Run this once the review loop reaches zero confirmed blocking findings. The
4
4
  release briefs are in [agent-briefs.md](agent-briefs.md). Read every value
@@ -76,7 +76,7 @@ The judge writes an HTML report with one verdict per criterion. Link each
76
76
  criterion to the tests that cite it, which the Criteria tab lists. With several
77
77
  judges, run it on the merged report. Then emit it:
78
78
 
79
- node .outerlayer/skills/build/scripts/criterion-citations.mjs --report <judge-report>.html
79
+ node .outerlayer/skills/outerlayer-build/scripts/criterion-citations.mjs --report <judge-report>.html
80
80
  outerlayer emit artifact <judge-report>.html --for acceptance-criteria --caption "Each criterion judged against the test that cites it"
81
81
 
82
82
  Then run `outerlayer sync`. List every unsatisfied criterion in the final
@@ -115,8 +115,8 @@ captures, so the two waits overlap.
115
115
 
116
116
  Act on the release agent's return. A failed check has the standing of a red
117
117
  gate: fix it within the review phase's remaining budget or escalate. Never
118
- carry it into phase 6. A persistent unknown mergeability escalates. A
118
+ carry it into the Evidence phase. A persistent unknown mergeability escalates. A
119
119
  conflict means one more sync through the release agent, told it is a resync so
120
120
  it gates the merge's diff and not the branch's. A second conflict escalates.
121
121
  Any fix or sync that lands after the evidence agent captured goes through
122
- phase 6's late-commit rule.
122
+ the Evidence phase's late-commit rule.
@@ -1,4 +1,4 @@
1
- # Phase 4: the review loop
1
+ # Review phase: the review loop
2
2
 
3
3
  Run this after the implementer's branch is green and before anything is
4
4
  pushed. The reviewer, refuter and mutation briefs are in
@@ -64,6 +64,8 @@ Models: use one model for every review role unless the team says otherwise.
64
64
  A reviewer on a risky surface, or the refuter of a blocking class, never
65
65
  moves to a weaker model than the rest.
66
66
 
67
+ The Reviewing model setting names that model. Default: the model the session runs on.
68
+
67
69
  ## Panel
68
70
 
69
71
  Write `build-reports/round-1-bundle.md` first: the branch diff against its
@@ -14,6 +14,7 @@
14
14
  "815c0b5816511e8f7c927aa3fd3bf386537dcdd039b9c6ec4d18d30c8c3c9b1a",
15
15
  "93953397c31d47a6f1c06edb8ae2190e1d8a3fca20c616deb33991311cee39a8",
16
16
  "a6743050c5c387e962ad4264526d9a3c10edf36823e4b6829f200bf79a4e45e7",
17
+ "a68ead00e1d1789896380a45c1b3d00a62d5c2bc0e041fe9225345fb07537e49",
17
18
  "a7671ebf0d8f4119b77ed9322d4070e1a7f0c94108b8ad17925b985f677cd37a",
18
19
  "b0aa9b6962675f772b67a4390c15b6b0100390983d958c656a826a066399f3d0",
19
20
  "b95986e95ea3b1ef4202f7f0c00bfcd35865d4fda033b3d6947a5bb9d33cd24c",
@@ -93,6 +94,7 @@
93
94
  "b00f5970b568159ca0bfbc75c3834938749ad5e2e73a80769d88bbe3c8c26737"
94
95
  ],
95
96
  ".outerlayer/validators/acceptance-criteria.yaml": [
97
+ "1e0e10fb2296ca1b2458036993abe2a13cb7fafffb0d95502fc878ec3aae4142",
96
98
  "3b2054aa1d4bd9f7441e88eec1a3bdf61b61ad00efa79736e26a5dd601d43910",
97
99
  "79679ed304b64f2b100dab2a24e91aa403a0a831e5a91ef4e6d7e7f06478ada0",
98
100
  "ca0da7d98a7922577d9725b615510f964de4d49987697b956d5ac1a45a3d2c6a",