@outerlayer/cli 0.37.0-next.20261104191505 → 0.37.0-next.20261104205100

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.
@@ -1 +1 @@
1
- {"id":"2026-11-04T19:21:15.290Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
1
+ {"id":"2026-11-04T20:56:44.572Z","root":"/home/runner/work/outerlayer/outerlayer","pkg":"outerlayer"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outerlayer/cli",
3
- "version": "0.37.0-next.20261104191505",
3
+ "version": "0.37.0-next.20261104205100",
4
4
  "description": "OuterLayer CLI — commands: init, claude, connect, doctor, login, logout, sync, daemon (alias: watch), emit, demo, findings, work, spec, runner, hooks, mcp, context. Capture and sync coding-agent sessions, and record proof of factory work.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Magu Studios, Inc.",
@@ -155,8 +155,9 @@ These bind the orchestrator in every phase. Rule 5 also binds every spawned agen
155
155
  Run the Gate command setting in place of the repository's own pre-push
156
156
  checks and tests when the team has set it. Default: those checks and tests.
157
157
 
158
- The gate checks the whole branch at the end of implementation, and again
159
- after each merge of the base branch. Every other run checks only what
158
+ The gate checks the whole branch at the end of implementation. After a
159
+ merge of the base branch, a run checks what changed since the head before
160
+ the merge, when that head passed the gate. Every other run checks only what
160
161
  changed since the commit in `build-reports/gate-passed`, when the
161
162
  repository's instructions say how to limit a run to a diff. After a run
162
163
  fails, fix the failure and commit. Then run the gate over only what changed
@@ -384,7 +385,7 @@ Run them in order.
384
385
  If `outerlayer findings show` fails twice, open the pull request anyway, and
385
386
  say in its description that the covered problems were not checked.
386
387
  Read [references/release.md](references/release.md)
387
- on entry and run it. A release agent merges the base branch in, gates and pushes. Open the
388
+ on entry and run it. A release agent gates the branch, merges the base branch in only when the two conflict, and pushes. Open the
388
389
  pull request as release.md says: a runner build with `outerlayer work open-pr`,
389
390
  which links it, and a local session with `gh pr create` and then
390
391
  `outerlayer work pr <number>`. When the build recorded criteria, from the issue or drafted, a fresh agent judges them with
@@ -59,8 +59,9 @@ coverage run, a repository-wide typecheck or the full gate only where this
59
59
  brief names it. Two of those at once overrun the cap, and the kernel kills
60
60
  test workers that then look like flaky tests.
61
61
 
62
- A gate run checks the whole branch only at the end of implementation and
63
- after a merge of the base branch. Every other gate run checks only what
62
+ A gate run checks the whole branch only at the end of implementation. After
63
+ a merge of the base branch, a run checks what changed since the head before
64
+ the merge, when that head passed the gate. Every other gate run checks only what
64
65
  changed since the commit in `build-reports/gate-passed`, when the
65
66
  repository's instructions say how to limit a run to a diff. After a run fails,
66
67
  fix the failure and commit. Then run the gate over only what changed since the
@@ -119,8 +120,9 @@ checks, and the second to merge breaks the build for everyone.
119
120
 
120
121
  While iterating, run only the tests of the packages the diff touches. Never
121
122
  run the full gate first to see where things stand. When the last change is in,
122
- sync with the base branch and run the repository's own pre-push checks and
123
- tests, as its instructions file names them, in the foreground, once. You are
123
+ run the repository's own pre-push checks and tests, as its instructions file
124
+ names them, in the foreground, once. Do not merge the base branch: the release
125
+ step merges it, and only when the two conflict. You are
124
126
  not done until they pass. If they cannot be made to pass, stop and escalate.
125
127
  Never hand a red branch to review.
126
128
 
@@ -203,38 +205,46 @@ The shared rules apply. Your inputs are the state file path, the branch and
203
205
  the instructions-file pointer. You run no write command against the tracker
204
206
  or the git host beyond the push.
205
207
 
206
- Bring the base branch into the branch as
207
- `.outerlayer/skills/outerlayer-cli/references/merge-base-branch.md` says.
208
- Resolve every conflict on the branch, never in a web editor.
209
-
210
- A migration this branch adds whose version is at or below the newest one on
211
- the base branch is renamed to the current UTC time, with every reference to
212
- its file updated.
213
-
214
- Run the repository's own pre-push checks and tests, as its instructions file
215
- names them, in the foreground with the maximum timeout. When the repository
216
- has a changed-lines mutation tool, run it over the final branch diff. Run it
217
- the way its instructions say to run it before a push, not with CI's settings.
218
- CI's time budget is sized for a CI job. On this machine it can stop a run
219
- before the run scores anything. Run the tool again after the review's run,
220
- because fixes changed lines after it. When the tool can reuse an earlier run's
221
- results, let it. Then this run tests again only what the fixes changed. A run
222
- that ends over its time budget, or with no score, is a red gate, as a low
223
- score is: run it again with a larger budget. Then run any check the repository runs only in CI, when the diff
224
- touches its domain, each in the foreground, and quote every result in your
225
- report. A check this machine cannot
226
- run is named in the report with the reason. A check that fails is a red gate,
227
- and you never push over it. Then push. The hooks run, and you never bypass
228
- them.
208
+ Gate the branch as the review left it, then sync, then push straight away.
209
+ The base branch keeps moving while you work, so the sync is the last step
210
+ before the push.
211
+
212
+ 1. Fetch the base branch. A migration this branch adds whose version is at
213
+ or below the newest one on `origin/<base>` is renamed to the current UTC
214
+ time, with every reference to its file updated.
215
+ 2. Run the repository's own pre-push checks and tests, as its instructions
216
+ file names them, in the foreground with the maximum timeout. Limit the run
217
+ to what changed since the commit in `build-reports/gate-passed`, when the
218
+ repository's instructions say how to limit a run to a diff.
219
+ 3. When the repository has a changed-lines mutation tool, run it over the
220
+ final branch diff. Run it the way its instructions say to run it before a
221
+ push, not with CI's settings. CI's time budget is sized for a CI job. On
222
+ this machine it can stop a run before the run scores anything. Run the
223
+ tool again after the review's run, because fixes changed lines after it.
224
+ When the tool can reuse an earlier run's results, let it. Then this run
225
+ tests again only what the fixes changed. A run that ends over its time
226
+ budget, or with no score, is a red gate, as a low score is: run it again
227
+ with a larger budget.
228
+ 4. Do not run the checks the repository runs only in CI. CI runs them on the
229
+ pull request, and the factory host starts a run that fixes a check that
230
+ fails there. Run here, they hold the push for up to an hour while the base
231
+ branch moves.
232
+ 5. Check for a conflict with the base branch, and merge it in only when there
233
+ is one, as
234
+ `.outerlayer/skills/outerlayer-cli/references/merge-base-branch.md` says.
235
+ Resolve every conflict on the branch, never in a web editor.
236
+ 6. Push. The hooks run, and you never bypass them.
237
+
238
+ A check that fails is a red gate, and you never push over it.
229
239
 
230
240
  When your brief says this is a resync of a branch already pushed and reviewed,
231
- the surface is the merge's diff, not the branch's. Run the extra checks only
232
- when that diff reaches their domain, and say which ones the resync did not
233
- need and why.
241
+ the pull request conflicts with its base. Merge the base branch as
242
+ merge-base-branch.md says, and gate only the merge's diff.
234
243
 
235
- Write `build-reports/release.md` naming every conflict you resolved and every
236
- file the sync moved that the review had already cleared. The orchestrator acts
237
- on that second list, so do not omit a file because the move looked harmless.
244
+ Write `build-reports/release.md`. Say whether you merged the base branch. Name
245
+ every conflict you resolved and every file the merge moved that the review had
246
+ already cleared. The orchestrator acts on that second list, so do not omit a
247
+ file because the move looked harmless.
238
248
 
239
249
  ## Release brief: mergeability
240
250
 
@@ -10,12 +10,14 @@ file, not from the transcript.
10
10
  The orchestrator does not sync, run the gate, or push itself. Spawn
11
11
  one release agent in a fresh context on the "sync and push" brief, with the
12
12
  state file path, the branch and the instructions-file pointer. The agent
13
- brings the base branch in as
13
+ gates the branch first. As its last step before the push, it checks for a
14
+ conflict with the base branch and merges the base branch in only when there
15
+ is one, as
14
16
  `.outerlayer/skills/outerlayer-cli/references/merge-base-branch.md` says. A
15
17
  check that fails there has the standing of a red gate and returns to the
16
- review phase's remaining budget. If its report names files the sync moved that
17
- the review had already cleared, run one check round on the merged diff before
18
- going on.
18
+ review phase's remaining budget. If its report names files the merge moved
19
+ that the review had already cleared, run one check round on the merged diff
20
+ before going on.
19
21
 
20
22
  ## Open the pull request
21
23
 
@@ -78,9 +78,10 @@ steps, and what each outcome and reason means, are in
78
78
 
79
79
  ## Merging the base branch
80
80
 
81
- A build merges the base branch into its branch before the pull request opens.
82
- A run that resolves a merge conflict does the same on an open pull request.
83
- Both follow one procedure in
81
+ A build checks for a conflict with the base branch as the last step before
82
+ its push, and merges the base branch in only when the two conflict. A run that
83
+ resolves a merge conflict merges it into an open pull request's branch. Both
84
+ follow one procedure in
84
85
  [references/merge-base-branch.md](references/merge-base-branch.md).
85
86
 
86
87
  ## Reading work items
@@ -8,6 +8,30 @@ for both.
8
8
  Merge the base branch. Never rebase, and never force-push. A merge keeps the
9
9
  commits a reviewer already read and keeps review comments on their lines.
10
10
 
11
+ ## A build's last sync: merge only on a conflict
12
+
13
+ A build checks for a conflict as the last step before its push, after its
14
+ gate passed. It merges the base branch only when the two conflict. CI tests a
15
+ pull request merged into its base, so a branch that merges cleanly needs no
16
+ merge to be tested. A branch that conflicts gets no CI run at all.
17
+
18
+ 1. Fetch the base branch and check the merge without changing the branch.
19
+
20
+ git fetch origin <base>
21
+ git merge-tree --write-tree HEAD origin/<base>
22
+
23
+ 2. When the command exits 0, the merge is clean. Merge nothing, and push the
24
+ branch as step 7 of the merge says.
25
+ 3. When it exits 1, the branch conflicts with the base. Follow every step
26
+ of the merge, then push straight after the gate passes. When the base moves again
27
+ during that gate, push anyway. The build's mergeability check catches a new
28
+ conflict once the pull request is open.
29
+
30
+ A run that resolves a merge conflict on an open pull request skips this check
31
+ and follows every step of the merge.
32
+
33
+ ## The merge
34
+
11
35
  1. Fetch the base branch. Use the pull request's base, which the item's
12
36
  `outerlayer work status --item "$OUTERLAYER_WORK" --json` names in
13
37
  `pullRequests[].conflict.baseBranch`, or the repository's default branch
@@ -47,8 +71,11 @@ commits a reviewer already read and keeps review comments on their lines.
47
71
 
48
72
  6. Run the repository's pre-push gate in the foreground, with the maximum
49
73
  timeout. It names its own command in the repository's instructions file.
50
- Wait for it to end. This first run checks the whole branch, even when an
51
- earlier run recorded a passed commit.
74
+ Wait for it to end. When the head from step 2 is the commit in
75
+ `"$(git rev-parse --absolute-git-dir)/build-reports/gate-passed"`, this
76
+ first run checks only what the merge changed: what changed since that
77
+ head, as the repository's instructions say to limit a run to a diff.
78
+ Otherwise it checks the whole branch.
52
79
  - **When the gate fails,** fix the cause and commit the fix. Run the gate
53
80
  again as the repository's instructions say for a run after a fix. When
54
81
  they say nothing, use the same scope as the run that failed.