dev-loops 0.7.1 → 0.8.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.
- package/.claude/.claude-plugin/plugin.json +1 -1
- package/.claude/agents/dev-loop.md +7 -7
- package/.claude/agents/fixer.md +1 -0
- package/.claude/agents/refiner.md +4 -4
- package/.claude/agents/review.md +10 -13
- package/.claude/commands/loop-continue.md +2 -1
- package/.claude/commands/loop-enqueue.md +9 -2
- package/.claude/commands/loop-info.md +1 -1
- package/.claude/commands/loop-start-spike.md +1 -1
- package/.claude/hooks/_bash-command-classify.mjs +7 -6
- package/.claude/hooks/_hook-decisions.mjs +5 -4
- package/.claude/skills/copilot-pr-followup/SKILL.md +42 -28
- package/.claude/skills/dev-loop/SKILL.md +8 -8
- package/.claude/skills/docs/acceptance-criteria-verification.md +13 -4
- package/.claude/skills/docs/anti-patterns.md +6 -5
- package/.claude/skills/docs/artifact-authority-contract.md +17 -14
- package/.claude/skills/docs/confirmation-rules.md +2 -1
- package/.claude/skills/docs/contract-style-guide.md +37 -0
- package/.claude/skills/docs/copilot-loop-operations.md +21 -15
- package/.claude/skills/docs/cross-harness-regression-contract.md +2 -2
- package/.claude/skills/docs/debt-remediation-contract.md +1 -1
- package/.claude/skills/docs/epic-tree-refinement-procedure.md +25 -22
- package/.claude/skills/docs/issue-intake-procedure.md +37 -22
- package/.claude/skills/docs/merge-preconditions.md +17 -13
- package/.claude/skills/docs/pr-lifecycle-contract.md +45 -36
- package/.claude/skills/docs/public-dev-loop-contract.md +61 -44
- package/.claude/skills/docs/retrospective-checkpoint-contract.md +25 -9
- package/.claude/skills/docs/spike-mode-contract.md +14 -7
- package/.claude/skills/docs/stop-conditions.md +30 -15
- package/.claude/skills/docs/tracker-first-loop-state.md +13 -8
- package/.claude/skills/docs/validation-policy.md +4 -5
- package/.claude/skills/local-implementation/SKILL.md +49 -143
- package/.claude/skills/loop-grill/SKILL.md +34 -14
- package/AGENTS.md +1 -1
- package/CHANGELOG.md +36 -0
- package/README.md +95 -189
- package/agents/dev-loop.agent.md +8 -8
- package/agents/fixer.agent.md +1 -0
- package/agents/refiner.agent.md +4 -4
- package/agents/review.agent.md +10 -13
- package/extension/README.md +5 -4
- package/package.json +7 -5
- package/scripts/_core-helpers.mjs +2 -0
- package/scripts/claude/headless-dev-loop.mjs +1 -1
- package/scripts/docs/validate-rule-ownership.mjs +442 -0
- package/scripts/docs/validate-state-machine-conformance.mjs +1169 -0
- package/scripts/github/_gate-names.mjs +5 -0
- package/scripts/github/_review-thread-mutations.mjs +5 -2
- package/scripts/github/capture-review-threads.mjs +2 -2
- package/scripts/github/create-pr.mjs +119 -10
- package/scripts/github/detect-checkpoint-evidence.mjs +109 -24
- package/scripts/github/edit-issue.mjs +259 -0
- package/scripts/github/list-review-threads.mjs +277 -0
- package/scripts/github/post-gate-findings.mjs +6 -3
- package/scripts/github/probe-ci-status.mjs +18 -0
- package/scripts/github/probe-copilot-review.mjs +24 -3
- package/scripts/github/reconcile-draft-gate.mjs +13 -13
- package/scripts/github/request-copilot-review.mjs +109 -42
- package/scripts/github/upsert-checkpoint-verdict.mjs +98 -27
- package/scripts/github/verify-briefing-prefixes.mjs +382 -0
- package/scripts/github/verify-fresh-review-context.mjs +78 -3
- package/scripts/github/wait-pr-checks.mjs +171 -0
- package/scripts/github/write-gate-context.mjs +220 -10
- package/scripts/github/write-gate-findings-log.mjs +54 -2
- package/scripts/loop/_post-convergence-change.mjs +2 -2
- package/scripts/loop/_pr-runner-coordination.mjs +112 -13
- package/scripts/loop/check-retro-tooling.mjs +14 -9
- package/scripts/loop/copilot-pr-handoff.mjs +47 -16
- package/scripts/loop/detect-change-scope.mjs +2 -2
- package/scripts/loop/detect-copilot-loop-state.mjs +34 -14
- package/scripts/loop/detect-internal-only-pr.mjs +6 -6
- package/scripts/loop/detect-pr-gate-coordination-state.mjs +152 -18
- package/scripts/loop/detect-refinement-grill-state.mjs +136 -0
- package/scripts/loop/resolve-dev-loop-startup.mjs +145 -8
- package/scripts/loop/run-watch-cycle.mjs +42 -7
- package/scripts/loop/sanctioned-commands.mjs +3 -0
- package/scripts/loop/validate-pr-body-spec.mjs +21 -5
- package/scripts/pages/build-state-atlas.mjs +65 -48
- package/scripts/projects/_resolve-project.mjs +1 -148
- package/scripts/projects/add-queue-item.mjs +87 -4
- package/scripts/projects/list-queue-items.mjs +3 -377
- package/scripts/projects/move-queue-item.mjs +3 -410
- package/scripts/projects/reorder-queue-item.mjs +3 -22
- package/skills/copilot-pr-followup/SKILL.md +42 -28
- package/skills/dev-loop/SKILL.md +3 -3
- package/skills/docs/acceptance-criteria-verification.md +13 -4
- package/skills/docs/anti-patterns.md +6 -5
- package/skills/docs/artifact-authority-contract.md +17 -14
- package/skills/docs/confirmation-rules.md +2 -1
- package/skills/docs/contract-style-guide.md +37 -0
- package/skills/docs/copilot-loop-operations.md +21 -15
- package/skills/docs/cross-harness-regression-contract.md +2 -2
- package/skills/docs/debt-remediation-contract.md +1 -1
- package/skills/docs/epic-tree-refinement-procedure.md +25 -22
- package/skills/docs/issue-intake-procedure.md +37 -22
- package/skills/docs/merge-preconditions.md +17 -13
- package/skills/docs/pr-lifecycle-contract.md +45 -36
- package/skills/docs/public-dev-loop-contract.md +61 -44
- package/skills/docs/required-rules.json +165 -0
- package/skills/docs/retrospective-checkpoint-contract.md +25 -9
- package/skills/docs/spike-mode-contract.md +14 -7
- package/skills/docs/stop-conditions.md +30 -15
- package/skills/docs/tracker-first-loop-state.md +13 -8
- package/skills/docs/validation-policy.md +4 -5
- package/skills/local-implementation/SKILL.md +49 -143
- package/skills/loop-grill/SKILL.md +38 -17
- package/scripts/docs/validate-no-duplicate-rules.mjs +0 -250
|
@@ -9,7 +9,7 @@ user-invocable: false
|
|
|
9
9
|
|
|
10
10
|
# Local Implementation
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Canonical owner for the internal `local_implementation` route behind the public `dev-loop` façade.
|
|
13
13
|
|
|
14
14
|
Use it only after the public dispatcher has already resolved `selectedStrategy: local_implementation`. This skill owns the local phase procedure and artifact discipline for that route; it does not redefine the shipped runtime semantics of helper CLIs, shared loop logic, or extension commands.
|
|
15
15
|
|
|
@@ -57,47 +57,38 @@ When the local spec already lives in a tracker issue:
|
|
|
57
57
|
- resolve the tracker reference deterministically from a GitHub issue URL or explicit `<owner/name>` + issue number
|
|
58
58
|
- use the bounded GitHub helper `scripts/github/resolve-tracker-local-spec.mjs` when you need a machine-readable spec bundle
|
|
59
59
|
- treat the tracker issue title/body/url/state as the durable local spec bundle
|
|
60
|
-
- do not
|
|
60
|
+
- the no-duplicate-phase-doc rule is owned by `ARTIFACT-TRACKER-FIRST-NO-DUP` in [Artifact Authority Contract](../docs/artifact-authority-contract.md); do not read [Phase Plan](../../docs/phases/phase-x.md) for that same tracker-backed session either
|
|
61
61
|
- sync durable scope / acceptance / status changes back to the tracker issue rather than maintaining a duplicate local phase doc
|
|
62
62
|
- keep `tmp/` as temporary local execution state only; it does not become a second durable spec surface
|
|
63
63
|
- for tracker-backed sessions, the handoff path is always: push the working branch → open a PR → merge via GitHub
|
|
64
|
-
- for tracker-backed sessions,
|
|
65
|
-
-
|
|
64
|
+
- <!-- rule: LOCAL-PR-CREATE-CANONICAL --> for tracker-backed sessions, you MUST open PRs through the canonical `dev-loops pr create` path — always draft and always assigned — self-assigned by default (`--assignee @me` when none is given; honors an explicit `--assignee <login>` / `-a <login>`) — and MUST NOT open them via raw `gh pr create`. The PR body MUST contain `Closes #N` (or `Fixes #N`) for the linked issue so GitHub auto-closes it on merge. When `.devloops` sets `workflow.requireDraftFirst` to true, use `dev-loops pr create --assignee @me ...`; the always-draft creation mechanism is owned by [`OPS-DRAFT-FIRST-PR`](../docs/copilot-loop-operations.md) — `create-pr.mjs` is unconditionally draft-only regardless of the toggle, which separately governs whether the draft-gate boundary is enforced before ready.
|
|
65
|
+
- <!-- rule: LOCAL-TRACKER-NO-DIRECT-MERGE --> `LOCAL-TRACKER-NO-DIRECT-MERGE`: for tracker-backed sessions, agents MUST NOT suggest a direct local-main merge and MUST NOT merge the working branch into local `main` at phase completion
|
|
66
66
|
|
|
67
67
|
## Primary execution rules
|
|
68
68
|
|
|
69
69
|
### Step 0: Pre-flight gate (mandatory for local_implementation)
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
<!-- rule: LOCAL-PREFLIGHT-GATE-MANDATORY -->
|
|
72
|
+
For the `local_implementation` strategy, before any planning or implementation mutation, you MUST run the pre-flight gate:
|
|
72
73
|
|
|
73
74
|
```sh
|
|
74
75
|
node scripts/loop/pre-flight-gate.mjs --expected-branch <working-branch> --check-subagents
|
|
75
76
|
```
|
|
76
77
|
|
|
77
|
-
Before creating or reusing a worktree for local implementation, use the canonical lifecycle entrypoint
|
|
78
|
+
Before creating or reusing a worktree for local implementation, use the canonical lifecycle entrypoint (`WORKTREE-CREATE-PROVISION`, see [Worktree usage guidance](../../docs/worktree-guidance.md#create-or-reuse--provision-ensure-worktreemjs)):
|
|
78
79
|
|
|
79
80
|
```sh
|
|
80
81
|
node scripts/loop/ensure-worktree.mjs --repo-root <main> --issue <n>
|
|
81
82
|
```
|
|
82
83
|
|
|
83
|
-
This
|
|
84
|
+
This validates worktree isolation (current directory under `tmp/worktrees/`) and branch identity (current branch matches the working branch); `--check-subagents` only reports subagent availability and is advisory (fails-open, does not block the gate). If the gate fails, **stop and fix the violation** before proceeding — do not bypass it in normal workflow execution.
|
|
84
85
|
|
|
85
|
-
This
|
|
86
|
-
- Worktree isolation (current directory is under `tmp/worktrees/`)
|
|
87
|
-
- Branch identity (current branch matches the working branch)
|
|
88
|
-
- Subagent availability (subagents should be used for fan-out when available)
|
|
89
|
-
|
|
90
|
-
If the gate fails, **stop and fix the violation** before proceeding. Do not bypass the gate in normal workflow execution.
|
|
91
|
-
|
|
92
|
-
Note: `--check-subagents` is advisory — it reports availability but does not block the gate. The worktree and branch checks are the mandatory gates.
|
|
93
|
-
|
|
94
|
-
This gate does **not** apply to other routed strategies (`copilot_pr_followup`, `external_pr_followup`, `reviewer_fixer`, `wait_watch`, `final_approval`, `issue_intake`). Those strategies have their own execution rules and may edit code from any checkout as needed.
|
|
95
|
-
|
|
96
|
-
Development-only bypass (`DEVLOOPS_PREFLIGHT_BYPASS=1`) exists for testing the gate itself but must not be used in production workflow runs. The bypass variable is a testing convenience, not an operational escape hatch.
|
|
86
|
+
This gate does **not** apply to other routed strategies (`copilot_pr_followup`, `external_pr_followup`, `reviewer_fixer`, `wait_watch`, `final_approval`, `issue_intake`); those strategies have their own execution rules and may edit code from any checkout as needed. The development-only bypass (`DEVLOOPS_PREFLIGHT_BYPASS=1`) exists for testing the gate itself and MUST NOT be used in production workflow runs — it is a testing convenience, not an operational escape hatch.
|
|
97
87
|
|
|
98
88
|
## Narrow failure-triage fast path
|
|
99
89
|
|
|
100
|
-
|
|
90
|
+
<!-- rule: LOCAL-FAILURE-TRIAGE-ORDER -->
|
|
91
|
+
When resuming local implementation with dirty work or an observed failing command, you MUST follow this ordered path before broad discovery:
|
|
101
92
|
|
|
102
93
|
1. run startup once from the relevant worktree/context
|
|
103
94
|
2. inspect current state with `git status` and the changed files
|
|
@@ -111,20 +102,13 @@ Follow [Anti-patterns](../docs/anti-patterns.md) for the general tooling-interna
|
|
|
111
102
|
|
|
112
103
|
### Step 1
|
|
113
104
|
|
|
114
|
-
-
|
|
115
|
-
- Do not refine later phases in detail before the current phase is complete.
|
|
105
|
+
- <!-- rule: LOCAL-PHASE-ONE-AT-A-TIME --> You MUST implement **one phase at a time** and MUST NOT refine later phases in detail before the current phase is complete.
|
|
116
106
|
- Use the `refiner` agent for phase-refinement work when subagents are available; escalate RFC-worthy technical decisions to the parent session / human operator.
|
|
117
|
-
-
|
|
118
|
-
- Maintain **90% coverage** thresholds.
|
|
107
|
+
- <!-- rule: LOCAL-TEST-FIRST-COVERAGE --> You MUST work **test-first** for all non-trivial logic; coverage thresholds are owned by [VALIDATE-COVERAGE-THRESHOLD](../docs/validation-policy.md).
|
|
119
108
|
- Log detailed iteration artifacts under `tmp/` using the required structure below.
|
|
120
|
-
-
|
|
121
|
-
- Treat `tmp/` as temporary local execution state. Do not rely on it as durable repo history and do not force-add it to git unless the user explicitly wants checked-in examples or fixtures.
|
|
109
|
+
- Spec-of-record split (phase-doc-backed vs. tracker-backed vs. lightweight): see [Tracker-backed local implementation](#tracker-backed-local-implementation) above.
|
|
122
110
|
- When a phase changes durable product truth in ways `PLAN.md` should express (for example command surface, accepted product decisions, resolved open questions, or scope changes), update [Project Plan](../../PLAN.md) before closing the phase.
|
|
123
|
-
-
|
|
124
|
-
- If the repo has no commits yet, still create the working branch first so the first commits land off `main`; only move `main` forward after review and validation.
|
|
125
|
-
- Use small atomic local commits as progress checkpoints whenever a coherent slice is green and reviewable.
|
|
126
|
-
- Before a branch is considered review-complete, approval-ready, merge-ready, or ready for final handoff, run the default pre-approval gate as a full review / fix loop with the review angles resolved from config (`resolveGateAngles(config, "preApproval")`), then apply accepted fixes and rerun validation. Shipped defaults include the `deep` angle.
|
|
127
|
-
- A phase is only fully complete when its scoped work, required support files, artifacts, validation, review/fix pass, commit(s), and finalization (merge into local `main` for phase-doc-backed sessions; PR merge for tracker-backed sessions) are done, or when the only remaining step is an explicitly noted authorization-gated finalization action.
|
|
111
|
+
- Branch, commit, pre-approval-gate, and finalization mechanics: see [Branch / review / merge policy](#branch--review--merge-policy), [Commit policy](#commit-policy), and [Implementation loop for the phase](#implementation-loop-for-the-phase) below.
|
|
128
112
|
- When subagents are used, log what each subagent was asked to do and what it concluded.
|
|
129
113
|
- If [Project Plan](../../PLAN.md) is too rough or ambiguous to safely start the current phase, do not guess: run a clarification/interview step with the user first.
|
|
130
114
|
|
|
@@ -134,32 +118,14 @@ Apply [Structural Quality](../docs/structural-quality.md) from the `deep` review
|
|
|
134
118
|
|
|
135
119
|
## Light mode (small changes)
|
|
136
120
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
**Escalation:**
|
|
140
|
-
1. Auto-escalate — if the inline check surfaces any finding whose severity is in the gate's `blockCleanOnFindingSeverities` (i.e. ≥ `worth-fixing-now`), dispatch escalates to full fan-out.
|
|
141
|
-
2. Label override — the `gate:full` label forces full fan-out regardless of PR size.
|
|
142
|
-
|
|
143
|
-
The `draft_gate` boundary (draft → ready) is still recorded because `requireDraftFirst` is honored: light mode only changes HOW the gate runs (inline vs fan-out), not WHETHER the draft boundary exists.
|
|
144
|
-
|
|
145
|
-
Dispatch is resolved deterministically via `resolveGateDispatchMode(config, gate, { scope, hasFullLabel, inlineFindingSeverities })` from `@dev-loops/core/config`. `scripts/loop/resolve-gate-dispatch.mjs` is the CLI wrapper the orchestrator calls, combining `detect-change-scope.mjs` output with the `gate:full` label fact.
|
|
121
|
+
<!-- rule: LOCAL-LIGHT-MODE-CONFIG-SURFACE -->
|
|
122
|
+
`localImplementation.lightMode` (`.devloops` field; this repo sets `maxLines: 20`, `maxFiles: 2`) is this skill's config surface for light-mode gate dispatch. Gate-collapse mechanics, escalation, and dispatch resolution (`resolveGateDispatchMode`, `scripts/loop/resolve-gate-dispatch.mjs`) are owned by [Light-mode inline acceptance](../../docs/gate-review-sub-loop-contract.md#light-mode-inline-acceptance-under-threshold-micro-prs); this skill MUST NOT redefine them.
|
|
146
123
|
|
|
147
124
|
Use `scripts/loop/detect-change-scope.mjs` to determine scope:
|
|
148
125
|
```sh
|
|
149
126
|
node scripts/loop/detect-change-scope.mjs
|
|
150
127
|
```
|
|
151
128
|
|
|
152
|
-
**Override threshold:**
|
|
153
|
-
```yaml
|
|
154
|
-
localImplementation:
|
|
155
|
-
lightMode:
|
|
156
|
-
enabled: true
|
|
157
|
-
maxFiles: 2
|
|
158
|
-
maxLines: 20
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
Scope above threshold falls back to the full fan-out/fan-in path.
|
|
162
|
-
|
|
163
129
|
## Deterministic logging structure
|
|
164
130
|
|
|
165
131
|
Treat the workflow as three layers:
|
|
@@ -405,7 +371,8 @@ If the review finds real issues, revise the merged plan and briefly update the r
|
|
|
405
371
|
|
|
406
372
|
### 6. Only then start implementation
|
|
407
373
|
|
|
408
|
-
|
|
374
|
+
<!-- rule: LOCAL-PLAN-REVIEW-GATE -->
|
|
375
|
+
You MUST NOT begin coding before the merged phase plan has passed review.
|
|
409
376
|
Update `manifest.json` to show that phase implementation has started.
|
|
410
377
|
|
|
411
378
|
## Task breakdown & delegation
|
|
@@ -424,7 +391,8 @@ into parallel executable tasks and dispatch them to the right specialist subagen
|
|
|
424
391
|
|
|
425
392
|
### Delegation contract
|
|
426
393
|
|
|
427
|
-
|
|
394
|
+
<!-- rule: LOCAL-DELEGATION-TABLE -->
|
|
395
|
+
Implementation tasks MUST be dispatched to dedicated specialist agents per this table:
|
|
428
396
|
|
|
429
397
|
| Task type | Delegate to |
|
|
430
398
|
|---|---|
|
|
@@ -524,7 +492,7 @@ After the phase plan passes review:
|
|
|
524
492
|
5. Run the default pre-approval gate as a full review / fix loop on the branch before calling it review-complete, approval-ready, merge-ready, or ready for final handoff:
|
|
525
493
|
- resolve review angles from config: `resolveGateAngles(config, "preApproval")` from `@dev-loops/core/config` (shipped defaults enable all 11 pre-approval gate angle families; consumer repos may opt out individual angles via `excludeAngles`); run via the chain prescription below
|
|
526
494
|
- run the resolved angle-focused passes in parallel with fresh context when practical
|
|
527
|
-
-
|
|
495
|
+
- the sequential-fallback rule is owned by `GATE-EXEC-FANOUT-SEQUENTIAL-FALLBACK` in [Gate Review Sub-Loop Contract](../../docs/gate-review-sub-loop-contract.md); when it applies, record the fallback in `Phase Review` (`tmp/phases/phase-x/review.md`) (or the equivalent merged review artifact)
|
|
528
496
|
- for each angle, resolve its persona and prompt via `resolveReviewerRole(config, angle)` — start each reviewer in fresh context with a concise briefing including the angle-specific prompt, the branch/phase, intended behavior, acceptance criteria, relevant files or artifacts, and current validation status
|
|
529
497
|
- run the mandatory chain defined in [Gate Review Sub-Loop Contract](../../docs/gate-review-sub-loop-contract.md). Retry rule: in subsequent cycles, only re-run reviewers that produced findings in the previous pass. Do not fork the parent session for parallel reviewers; write a compact handoff artifact under `tmp/` and point the reviewer at it.
|
|
530
498
|
- when reviewer subagents stumble on raw source-tree reads (for example unresolved build artifacts or import assumptions), generate a deterministic diff/review artifact under `tmp/` and have reviewers inspect that artifact instead of the raw file set
|
|
@@ -538,8 +506,8 @@ After the phase plan passes review:
|
|
|
538
506
|
9. Write `Retrospective` (`tmp/phases/phase-x/retrospective.md`) using [Retrospective Template](../dev-loop/templates/retrospective.md).
|
|
539
507
|
10. Update `tmp/phases/phase-x/manifest.json` and `tmp/phases/index.json`.
|
|
540
508
|
11. Update [Implementation State](../../docs/IMPLEMENTATION_STATE.md).
|
|
541
|
-
12. **Exit validation gate — no uncommitted changes.** Before the subagent session terminates, run `git status --porcelain` and verify the output is empty. If uncommitted changes exist, first determine whether they are intended implementation changes or unintended/post-validation deltas. Revert any unintended or speculative changes. For intended changes, rerun the narrowest justified validation (`npm run verify` or equivalent) before staging and committing with an appropriate message; for tracker-backed sessions, also push the branch. A subagent session that exits with uncommitted changes in the worktree is a workflow defect and
|
|
542
|
-
13. For tracker-backed sessions, create the PR from the working branch
|
|
509
|
+
12. <!-- rule: LOCAL-COMMIT-BEFORE-EXIT --> **Exit validation gate — no uncommitted changes.** Before the subagent session terminates, run `git status --porcelain` and verify the output is empty. If uncommitted changes exist, first determine whether they are intended implementation changes or unintended/post-validation deltas. Revert any unintended or speculative changes. For intended changes, rerun the narrowest justified validation (`npm run verify` or equivalent) before staging and committing with an appropriate message; for tracker-backed sessions, also push the branch. A subagent session that exits with uncommitted changes in the worktree is a workflow defect and MUST NOT be treated as a clean completion. After committing, verify `git status --porcelain` is empty before declaring phase completion.
|
|
510
|
+
13. For tracker-backed sessions, create the PR from the working branch: `dev-loops pr create --assignee @me --repo <owner/name> --base main --head <branch> --title "..." --body-file <body-file>` (fallback when the CLI helper is unavailable: `node <resolved-skill-scripts>/github/create-pr.mjs --repo <owner/name> --assignee @me --base main --head <branch> --title "..." --body-file <body-file>`); never raw `gh pr create`. Draft/assignment/`Closes #N` policy: [LOCAL-PR-CREATE-CANONICAL](#tracker-backed-local-implementation) above.
|
|
543
511
|
14. If authorized, merge the fully reviewed, locally validated phase branch back into local `main` (phase-doc-backed sessions) or proceed through the PR gate pipeline (tracker-backed sessions).
|
|
544
512
|
15. If authorization for PR creation or merge is still pending (commit authorization is already enforced by the exit validation gate in step 12), mark the phase as `awaiting-finalization` rather than `completed`, and record exactly which finalization step is pending.
|
|
545
513
|
|
|
@@ -552,85 +520,32 @@ The retrospective must capture:
|
|
|
552
520
|
- what should change in the skill or workflow next time
|
|
553
521
|
- what a fresh session should know before the next phase
|
|
554
522
|
|
|
555
|
-
|
|
523
|
+
<!-- rule: LOCAL-RETROSPECTIVE-REQUIRED -->
|
|
524
|
+
This is the infrastructure for self-improvement; you MUST NOT skip it.
|
|
556
525
|
|
|
557
526
|
## Dev mode
|
|
558
527
|
|
|
559
|
-
Dev mode
|
|
560
|
-
|
|
561
|
-
A repository may also declare a formal-dev-mode default through `.devloops` field `workflow.devModeDefault`. Treat that config as the policy source of truth when present, but explicit user opt-in or opt-out for the current run still wins. Runtime consumption of that config may be staged separately from this documentation update.
|
|
562
|
-
|
|
563
|
-
Trigger it when the user explicitly asks for dev mode, self-improvement mode, or says they want the skill to refine itself as it goes.
|
|
564
|
-
|
|
565
|
-
In dev mode, after the normal phase summary and retrospective are written, run one extra bounded self-improvement pass before moving on:
|
|
566
|
-
|
|
567
|
-
1. collect a deterministic context bundle for the phase using:
|
|
568
|
-
- `../dev-loop/scripts/dev-mode-context.mjs`
|
|
569
|
-
- output to `tmp/phases/phase-x/dev-mode-context.json`
|
|
570
|
-
2. review the phase artifacts and logs with emphasis on the workflow itself:
|
|
571
|
-
- planning quality
|
|
572
|
-
- review quality
|
|
573
|
-
- validation friction
|
|
574
|
-
- bash exit-code-1 patterns
|
|
575
|
-
- places where skill or agent prompts should be tightened
|
|
576
|
-
- places where deterministic tooling should replace ad hoc work
|
|
577
|
-
3. write `Dev Mode Retrospective` (`tmp/phases/phase-x/dev-mode-retrospective.md`)
|
|
578
|
-
- this is the required dev-mode retrospective artifact
|
|
579
|
-
- it should name the highest-value prompt/workflow follow-ups revealed by the phase
|
|
580
|
-
4. optionally write `Dev Mode Review` (`tmp/phases/phase-x/dev-mode-review.md`) when separate analytical notes help support the retrospective
|
|
581
|
-
5. apply at least one bounded follow-up update to a relevant skill and/or agent prompt
|
|
582
|
-
- deterministic tooling, docs, templates, or tests may accompany that change
|
|
583
|
-
- but they do not replace the required prompt update
|
|
584
|
-
- keep the change phase-bounded and tied directly to the retrospective findings
|
|
585
|
-
6. write `Dev Mode Skill Changes` (`tmp/phases/phase-x/dev-mode-skill-changes.md`)
|
|
586
|
-
- record which skill and/or agent prompts changed
|
|
587
|
-
- record any supporting tooling/docs/template changes that accompanied them
|
|
588
|
-
- if no prompt update can be justified safely, stop and report that dev-mode exit criteria were not met
|
|
589
|
-
7. if skill scripts or deterministic tooling changed, rerun the skill-local tests
|
|
590
|
-
8. stop after this bounded self-improvement pass; do not recurse into endless self-editing loops
|
|
591
|
-
|
|
592
|
-
Dev mode is still phase-bounded. It improves the loop around the completed phase; it does not authorize work on the next product phase.
|
|
528
|
+
Dev mode improves the local implementation loop itself while using it. A repo may declare a default via `.devloops` field `workflow.devModeDefault`; explicit user opt-in/opt-out for the current run still wins over that default. Trigger it when the user explicitly asks for dev mode, self-improvement mode, or says they want the skill to refine itself as it goes.
|
|
593
529
|
|
|
594
|
-
|
|
530
|
+
After the normal phase summary and retrospective, run one extra bounded self-improvement pass:
|
|
595
531
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
- optional `Variant C` (`tmp/phases/phase-x/variant-c.md`) when a third variant was actually useful
|
|
607
|
-
- `bash-exit-1.jsonl` when any bash call during the phase exited with code `1`
|
|
608
|
-
- `clarification.md` when a plan-sufficiency interview or auto-clarification step was needed
|
|
609
|
-
- subagent summaries when subagents were used
|
|
610
|
-
- raw subagent outputs only when they were saved separately on purpose
|
|
611
|
-
- in dev mode: `dev-mode-context.json`, `dev-mode-retrospective.md`, and `dev-mode-skill-changes.md`
|
|
612
|
-
- optional in dev mode: `dev-mode-review.md` when separate analytical notes were useful
|
|
613
|
-
|
|
614
|
-
These `tmp/` artifacts are normally temporary and do not need to be checked into git.
|
|
615
|
-
|
|
616
|
-
Also log validation output summaries and notable decisions if they help evaluate the local dev loop later.
|
|
617
|
-
|
|
618
|
-
Additionally, append every bash call that exits with code `1` to:
|
|
619
|
-
- `tmp/phases/phase-x/bash-exit-1.jsonl`
|
|
532
|
+
1. Collect a deterministic context bundle: `../dev-loop/scripts/dev-mode-context.mjs` → `tmp/phases/phase-x/dev-mode-context.json`.
|
|
533
|
+
2. Review the phase artifacts/logs for planning quality, review quality, validation friction, bash exit-code-1 patterns, and places where prompts or deterministic tooling should improve.
|
|
534
|
+
3. Write `Dev Mode Retrospective` (`tmp/phases/phase-x/dev-mode-retrospective.md`) — required; name the highest-value prompt/workflow follow-ups revealed by the phase.
|
|
535
|
+
4. Optionally write `Dev Mode Review` (`tmp/phases/phase-x/dev-mode-review.md`) when separate analytical notes help.
|
|
536
|
+
5. Apply at least one bounded follow-up update to a relevant skill and/or agent prompt (supporting tooling/docs/template changes may accompany it but do not replace the prompt update), kept phase-bounded and tied directly to the retrospective findings.
|
|
537
|
+
6. Write `Dev Mode Skill Changes` (`tmp/phases/phase-x/dev-mode-skill-changes.md`) recording which prompts and supporting changes landed; if no prompt update can be justified safely, stop and report that dev-mode exit criteria were not met.
|
|
538
|
+
7. If skill scripts or deterministic tooling changed, rerun the skill-local tests.
|
|
539
|
+
8. Stop after this bounded pass — do not recurse into endless self-editing loops.
|
|
540
|
+
|
|
541
|
+
Dev mode is still phase-bounded: it improves the loop around the completed phase and does not authorize work on the next product phase.
|
|
620
542
|
|
|
621
|
-
|
|
622
|
-
- `../dev-loop/scripts/log-bash-exit-1.mjs`
|
|
543
|
+
## tmp/ logging requirements
|
|
623
544
|
|
|
624
|
-
|
|
625
|
-
- `
|
|
626
|
-
- `phase`
|
|
627
|
-
- `cwd`
|
|
628
|
-
- `command`
|
|
629
|
-
- `exitCode`
|
|
630
|
-
- `purpose`
|
|
631
|
-
- `summary`
|
|
545
|
+
<!-- rule: LOCAL-TMP-EPHEMERAL-STATE -->
|
|
546
|
+
The required durable-doc + `tmp/` artifact set for a phase is defined once in [Deterministic logging structure](#deterministic-logging-structure); this section MUST NOT duplicate that list. Those artifacts are normally temporary and do not need to be checked into git; do not force-add them unless the user explicitly wants checked-in examples or fixtures. Also log validation output summaries and notable decisions if they help evaluate the local dev loop later.
|
|
632
547
|
|
|
633
|
-
|
|
548
|
+
Additionally, append every bash call that exits with code `1` to `tmp/phases/phase-x/bash-exit-1.jsonl` using the deterministic helper `../dev-loop/scripts/log-bash-exit-1.mjs`. Each line is one JSON object with at least `timestamp`, `phase`, `cwd`, `command`, `exitCode`, `purpose`, `summary` (optionally truncated `stdout`/`stderr` or a path to a larger saved artifact). This log improves the local dev loop itself, so do not skip it just because the command was exploratory.
|
|
634
549
|
|
|
635
550
|
## Stop conditions
|
|
636
551
|
|
|
@@ -638,29 +553,20 @@ See [Stop Conditions](../docs/stop-conditions.md). Local-specific stops: phase c
|
|
|
638
553
|
|
|
639
554
|
## Branch / review / merge policy
|
|
640
555
|
|
|
641
|
-
-
|
|
642
|
-
-
|
|
643
|
-
-
|
|
644
|
-
-
|
|
645
|
-
-
|
|
646
|
-
- Rerun validation after review-driven fixes.
|
|
647
|
-
- A phase is not operationally closed until its branch state is captured in commit history and the reviewed branch has been finalized according to session type (merged into local `main` for phase-doc-backed sessions; merged via GitHub PR for tracker-backed sessions), unless authorization for that finalization is still pending.
|
|
648
|
-
- For tracker-backed sessions, the handoff path is always: push the working branch → open a PR → merge via GitHub; never merge the working branch into local `main`.
|
|
649
|
-
- PR creation always goes through `dev-loops pr create`, which is ALWAYS draft and always assigned — self-assigned by default (`--assignee @me` when none is given; honors an explicit `--assignee <login>` / `-a <login>`), never via raw `gh pr create`, and the PR body must contain `Closes #N` (or `Fixes #N`) for the linked issue so GitHub auto-closes it on merge. When `.devloops` sets `workflow.requireDraftFirst` to true, use `dev-loops pr create --assignee @me ...`. Do not create a fresh PR directly in ready-for-review state unless the user explicitly overrides that policy for the current PR scope. The draft gate inspection is a real workflow boundary, so a new PR must exist in draft before `gh pr ready` is eligible.
|
|
650
|
-
- When authorization is pending, record the phase as `awaiting-finalization` and describe the exact missing step.
|
|
556
|
+
- Implement on a dedicated local working branch, never directly on `main`, switching to it before the first mutating step; if the repo is unborn (no commits yet), still create the working branch first and make the initial atomic commits there.
|
|
557
|
+
- Use atomic local commits to log progress, but only for coherent reviewable slices — [Commit policy](#commit-policy) below governs commit timing/authorization.
|
|
558
|
+
- Before merging, run a full parallel review / fix loop and resolve accepted findings on the same branch; rerun validation after review-driven fixes.
|
|
559
|
+
- A phase is not operationally closed until its branch state is captured in commit history and the reviewed branch has been finalized according to session type (merged into local `main` for phase-doc-backed sessions; merged via GitHub PR for tracker-backed sessions); when authorization for that finalization is still pending, record the phase as `awaiting-finalization` and describe the exact missing step.
|
|
560
|
+
- For tracker-backed sessions, the handoff path is always: push the working branch → open a PR → merge via GitHub; never merge the working branch into local `main`. PR creation follows [LOCAL-PR-CREATE-CANONICAL](#tracker-backed-local-implementation) above; a new PR must exist in draft before `gh pr ready` is eligible.
|
|
651
561
|
- For phase-doc-backed sessions, merge the fully reviewed, locally validated branch back into local `main` when authorized.
|
|
652
562
|
- Behind-branch integration before merge (for example a sibling PR merged first and both touch shared files): prefer a merge commit (`git merge origin/main`) over rebase + force-push. Since dev-loop PRs are squash-merged, intermediate branch history is discarded at merge time, so a merge commit lands an identical result on `main` while avoiding a non-fast-forward push to the remote. Force-push (`--force-with-lease` only, never bare `--force`) remains acceptable only for a branch the loop solely owns and where no integration alternative exists (rare); document that carve-out rather than leaving it implicit. After any integration that changes the head SHA, re-verify gate evidence at the new head (existing behavior — see [Merge Preconditions](../docs/merge-preconditions.md#required-before-merge)).
|
|
653
563
|
|
|
654
564
|
## Commit policy
|
|
655
565
|
|
|
656
|
-
- Do not commit speculative work.
|
|
657
|
-
- Do not commit before the relevant validation for that slice passes.
|
|
566
|
+
- Do not commit speculative work or before the relevant validation for that slice passes.
|
|
658
567
|
- Immediately before every `git add && git commit` sequence, assert branch identity with `git branch --show-current` and stop if it does not match the intended local working branch.
|
|
659
|
-
-
|
|
660
|
-
- Do not leave completed phase work stranded off `main`; once the reviewed branch is ready and authorized, finalize it according to session type (merge into local `main` for phase-doc-backed sessions; complete via PR merge for tracker-backed sessions).
|
|
661
|
-
- Commit only when the coordination/main agent has decided the slice or phase is ready. **Exception:** in non-interactive subagent sessions, commit authorization is implicit — the subagent was dispatched to implement and must commit before exiting (see the commit sub-bullet under implementation loop step 3 and the exit validation gate in step 12).
|
|
568
|
+
- Commit only when the coordination/main agent has decided the slice or phase is ready. **Exception:** in non-interactive subagent sessions, commit authorization is implicit — the subagent was dispatched to implement and must commit before exiting, enforced by [LOCAL-COMMIT-BEFORE-EXIT](#implementation-loop-for-the-phase) (implementation loop step 12; `git status --porcelain` must be empty before the session terminates).
|
|
662
569
|
- If commit/merge authorization has not yet been given, do not call the phase `completed`; call it `awaiting-finalization` instead.
|
|
663
|
-
- **Subagent exit contract:** before a subagent session terminates, the exit validation gate (implementation loop step 12) must pass — `git status --porcelain` must be empty. A subagent that exits with uncommitted changes in the worktree has not completed its task, regardless of what was implemented.
|
|
664
570
|
|
|
665
571
|
## Anti-patterns
|
|
666
572
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "loop-grill"
|
|
3
|
-
description: "Standalone pre-loop Socratic Q&A grill for issues (tracker-first) or local plan files (local-planning). Detects spec gaps, asks clarifying questions (interactive) or self-answers them from codebase context (--auto), then
|
|
3
|
+
description: "Standalone pre-loop Socratic Q&A grill for issues (tracker-first), PR bodies, or local plan files (local-planning). Detects spec gaps, asks clarifying questions (interactive) or self-answers them from codebase context (--auto), then synthesizes Acceptance criteria / Definition of done / Non-goals into the body while keeping the raw Q&A only in an ephemeral tmp artifact."
|
|
4
4
|
allowed-tools: Read Bash Edit Write
|
|
5
5
|
user-invocable: false
|
|
6
6
|
---
|
|
@@ -12,15 +12,23 @@ A standalone, on-demand pre-loop grilling skill. Run it against an issue or a lo
|
|
|
12
12
|
|
|
13
13
|
It is entirely separate from the in-loop docs-grill (`docs/docs-grill-step.md`), which audits code/doc drift while the loop runs. This skill operates on the *spec* before any implementation begins.
|
|
14
14
|
|
|
15
|
+
## State machine
|
|
16
|
+
|
|
17
|
+
This grill is the bounded, closed sub-loop modeled by `packages/core/src/loop/refinement-grill-state.mjs` (detector `scripts/loop/detect-refinement-grill-state.mjs`), rendered on the State atlas; see `docs/refinement-grill-state-graph.md`. It obeys `GRILL-SUBLOOP-STATE-MACHINE`, `GRILL-SUBLOOP-ITERATE-TO-CLEAN`, `GRILL-SUBLOOP-NO-EMBED-SYNTHESIS`, and `GRILL-SUBLOOP-HONEST-HANDOFF`. Iteration lives in the transition graph; the answer/synthesis is the bounded input consumed at the `await_answers` state.
|
|
18
|
+
|
|
15
19
|
## Interface
|
|
16
20
|
|
|
17
21
|
```
|
|
18
22
|
/loop-grill <issue-number> # tracker-first, interactive
|
|
19
23
|
/loop-grill <issue-number> --auto # tracker-first, auto-answer
|
|
24
|
+
/loop-grill <pr-url-or-number> # PR body, interactive
|
|
25
|
+
/loop-grill <pr-url-or-number> --auto # PR body, auto-answer
|
|
20
26
|
/loop-grill <path/to/plan.md> # local-planning, interactive
|
|
21
27
|
/loop-grill <path/to/plan.md> --auto # local-planning, auto-answer
|
|
22
28
|
```
|
|
23
29
|
|
|
30
|
+
PR bodies are supported the same way as issues: fetch/edit the PR body via the existing PR wrappers (`scripts/github/view-pr.mjs` / `scripts/github/edit-pr.mjs`), never raw `gh`.
|
|
31
|
+
|
|
24
32
|
## Argument validation (fail-closed)
|
|
25
33
|
|
|
26
34
|
Before doing anything else:
|
|
@@ -33,9 +41,12 @@ Before doing anything else:
|
|
|
33
41
|
|
|
34
42
|
## Step 1 — Load the target
|
|
35
43
|
|
|
36
|
-
- **Tracker-first:** fetch the issue body (title + description
|
|
44
|
+
- **Tracker-first:** fetch the issue body (title + description).
|
|
45
|
+
- **PR body:** fetch the PR body via `scripts/github/view-pr.mjs` (never raw `gh`).
|
|
37
46
|
- **Local-planning:** read the plan file from disk.
|
|
38
47
|
|
|
48
|
+
"Is it refined" is decided by `detectIssueRefinementArtifact` (`packages/core/src/loop/issue-refinement-artifact.mjs`) — the single source of truth, same as the enqueue gate; do not add a divergent check. An already-refined artifact (AC/DoD present) is a zero-iteration `grill_clean`: do not rewrite the body.
|
|
49
|
+
|
|
39
50
|
## Step 1b — Surface external resources
|
|
40
51
|
|
|
41
52
|
Before detecting gaps, scan the loaded content for external resource references: links, other repo URLs, API endpoints, doc URLs, screenshots, or Playwright navigation descriptors.
|
|
@@ -89,15 +100,20 @@ Record the evidence source for every answer. Flag a question as **`unresolved`**
|
|
|
89
100
|
|
|
90
101
|
Do not silently guess an `inferred` answer when no evidence can be cited — flag it `unresolved` instead.
|
|
91
102
|
|
|
92
|
-
## Step 4 — Write back (
|
|
103
|
+
## Step 4 — Write back (synthesize sections; raw Q&A to tmp only)
|
|
93
104
|
|
|
94
|
-
|
|
105
|
+
Synthesize the answers into the body as sharpened `## Acceptance criteria`, `## Definition of done`, and `## Non-goals` sections. Per canonical heading, use **replace-section** semantics:
|
|
95
106
|
|
|
96
|
-
- **Find** the existing
|
|
97
|
-
- **Replace** that range in place with the
|
|
98
|
-
- If no `## Grill findings` section exists, **append** it.
|
|
107
|
+
- **Find** the existing section: the range from that `##`-level heading through the next `##`-level heading (exclusive) or end of file.
|
|
108
|
+
- **Replace** that range in place with the synthesized content; if the section is absent, **append** it.
|
|
99
109
|
- This makes re-runs idempotent — no accumulated noise, no duplicate sections.
|
|
100
|
-
- If parsing
|
|
110
|
+
- If parsing a section boundary fails, **abort with an error** rather than silently truncating.
|
|
111
|
+
|
|
112
|
+
The body carries ONLY the synthesized sharpened sections. Do NOT write a `## Grill findings` section and do NOT embed the raw Q&A table in the body (`GRILL-SUBLOOP-NO-EMBED-SYNTHESIS`).
|
|
113
|
+
|
|
114
|
+
If a body migrated from older embed behavior still carries a `## Grill findings` section, **remove** it as part of write-back — strip from that heading through the next `##`-level heading (exclusive) or end of file, using the same replace-section boundary logic. This is a removal-only migration, never a re-introduction of the embed.
|
|
115
|
+
|
|
116
|
+
Write the raw Q&A transcript ONLY to the gitignored, ephemeral, session-scoped artifact `tmp/issues/issue-<n>/grill/<timestamp>.md` (`tmp/` is already gitignored; never committed). For PR-body and plan-file surfaces, use the same tmp path shape scoped by surface (issues: `tmp/issues/issue-<n>/grill/`; a parallel `tmp/...` path for PR/plan).
|
|
101
117
|
|
|
102
118
|
**Tracker-first write-back:** update the GitHub issue body using:
|
|
103
119
|
|
|
@@ -105,19 +121,23 @@ Write a `## Grill findings` section back to the source artifact using **replace-
|
|
|
105
121
|
gh issue edit <n> --repo <owner/repo> --body-file <tmp-path>
|
|
106
122
|
```
|
|
107
123
|
|
|
108
|
-
The
|
|
124
|
+
The synthesized sections live in the issue body, not as a comment. Do not use `comment-issue.mjs` here — that creates a comment, not a body update.
|
|
125
|
+
|
|
126
|
+
**PR-body write-back:** update the PR body via `scripts/github/edit-pr.mjs` (never raw `gh`), same replace-section semantics.
|
|
109
127
|
|
|
110
|
-
**GitHub body size guard:** issue bodies are capped at 65,536 characters. Before writing back, check whether the updated body would exceed this limit. If so, warn: `Warning: updated body would exceed GitHub's 65,536-character limit — write-back skipped.
|
|
128
|
+
**GitHub body size guard:** issue/PR bodies are capped at 65,536 characters. Before writing back, check whether the updated body would exceed this limit. If so, warn: `Warning: updated body would exceed GitHub's 65,536-character limit — write-back skipped. Sharpen the sections or the body manually.` Do not silently truncate.
|
|
111
129
|
|
|
112
130
|
**Local-planning write-back:** update the plan file in place using the edit tool.
|
|
113
131
|
|
|
114
132
|
## Output artifact format
|
|
115
133
|
|
|
116
|
-
|
|
134
|
+
Two distinct artifacts:
|
|
117
135
|
|
|
118
|
-
|
|
119
|
-
## Grill findings
|
|
136
|
+
1. **Synthesized body sections** (issue/PR/plan body): only `## Acceptance criteria`, `## Definition of done`, and `## Non-goals`, sharpened from the answers. No raw Q&A.
|
|
120
137
|
|
|
138
|
+
2. **Raw Q&A transcript** (ephemeral `tmp/issues/issue-<n>/grill/<timestamp>.md` only — never the body):
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
121
141
|
<!-- loop-grill: <timestamp> mode:<interactive|auto> -->
|
|
122
142
|
|
|
123
143
|
### Resolved gaps
|
|
@@ -152,7 +172,7 @@ When `CONTEXT.md` is absent from the repo root, skip the context-source check si
|
|
|
152
172
|
|
|
153
173
|
## Idempotency guarantee
|
|
154
174
|
|
|
155
|
-
Running `/loop-grill` twice on the same target must
|
|
175
|
+
Running `/loop-grill` twice on the same target must not accumulate duplicate sections: the per-heading replace-section logic replaces the synthesized `## Acceptance criteria` / `## Definition of done` / `## Non-goals` sections in place. An already-refined target is a zero-iteration `grill_clean` and its body is left unchanged. The raw Q&A transcript is written to a fresh timestamped tmp file per run; the body never carries it.
|
|
156
176
|
|
|
157
177
|
## Non-goals
|
|
158
178
|
|
package/AGENTS.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
- When creating GitHub issues via `gh issue create`, always include `--assignee @me` so the new artifact is self-assigned.
|
|
17
17
|
- When creating PRs in this repo, use the canonical `dev-loops pr create ...` path (always draft, self-assigned by default; `--assignee @me` is the default) — never raw `gh pr create`.
|
|
18
18
|
- Never start implementation (file mutation, branch creation, PR creation) without explicit instruction. "Queue," "add to list," "track," "note" are NOT implementation triggers. Only proceed when the user says "start," "go," "implement," "do it," "work on," or equivalent imperative. Confirm if unsure.
|
|
19
|
-
- All work must originate from a tracked artifact: a GitHub issue (tracker-first)
|
|
19
|
+
- All work must originate from a tracked artifact: a GitHub issue (tracker-first), a persisted markdown plan file (local-planning), or — on the sanctioned lightweight path — the PR description itself as the spec-of-record (`--lightweight`, `canonicalSpecSource: pr_body`; no committed plan artifact). See [Artifact Authority Contract](skills/docs/artifact-authority-contract.md) for canonical mode definitions and settings. No work may originate from a PR (other than the sanctioned lightweight PR-body-as-spec path) or a direct local change unless explicitly requested.
|
|
20
20
|
- Implement one phase at a time; if durable repo docs explicitly record a reprioritization exception, follow [Implementation State](docs/IMPLEMENTATION_STATE.md) and the active phase doc.
|
|
21
21
|
- Keep compatibility surface minimal; do not add legacy aliases, wrappers, or duplicate docs unless explicitly requested.
|
|
22
22
|
- A question requires an answer, not an action. When the user asks a question — even one implying criticism or correction — answer first before taking any action. Do not treat a question as implicit authorization to act.
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,42 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 0.8.0 - 2026-07-08
|
|
8
|
+
|
|
9
|
+
<!-- Release date is set at tag time; see the release runbook. This section is prepared ahead of the v0.8.0 tag. -->
|
|
10
|
+
|
|
11
|
+
Everything merged since v0.7.1 — the v0.7.x contract-audit epic (#1104) plus follow-on release-gate fixes. **Versioning note:** most of these commits are ancestors of the `v0.7.2` tag and therefore already ship in the published `0.7.2` npm artifact, but `v0.7.2`'s release notes documented only the #1241 packaging hotfix (see the 0.7.2 section below). This section backfills that omitted changelog and adds the nine changes that genuinely postdate the `v0.7.2` tag (#1240, #1242, #1244, #1249, #1250, #1253, #1254, #1256, and #1236/#1252); it becomes the notes for the eventual `v0.8.0` tag.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **Issue-less lightweight PR-first flow (#1210/#1215).** A PR with no backing issue can drive the lightweight path with a configurable composed Copilot round cap; such PRs auto-enqueue as board items so they are still tracked (#1218/#1226).
|
|
16
|
+
- **State-machine conformance and invariant harness (#1148/#1189).** Built on a rule-ownership foundation (#1183). The PR lifecycle state machine is exported from `@dev-loops/core` as the single source for docs, the state atlas, and the conformance harness (#1193/#1216), and `public-dev-loop-routing` is wired into the L2/L3 conformance harness so all five machines are covered (#1233/#1239).
|
|
17
|
+
- **Inline reviewer briefing prefix (#1220/#1229).** The reviewed content is carried inline, size-capped and hash-enforced, on top of invariant-prefix-first reviewer briefings with prefix-hash enforcement (#1207/#1214).
|
|
18
|
+
- **First-class loop primitives (#1198/#1223).** `list-review-threads` and `wait-pr-checks`, plus a sanctioned `edit-issue.mjs` wrapper for AC-reflection body edits (#1253) and a refinement-artifact-at-enqueue requirement so no un-refined item enters Next Up (#1251/#1254).
|
|
19
|
+
- **State-atlas fullscreen lightbox for diagrams (#1217).** Diagrams open in a fullscreen lightbox for readable inspection.
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **Package-escaping `@dev-loops/core` imports broke consumer installs (#1241).** Shipped as the v0.7.2 hotfix; full detail is in the 0.7.2 section below.
|
|
24
|
+
- **Converge-then-gate enforced at `pre_approval` entry (#1190/#1219).** Retires the known gap where a gate could run before Copilot convergence.
|
|
25
|
+
- **Fanout provenance fails closed on missing mandatory or foreign angles (#1196/#1225).** Briefing-prefix verification is also scoped by (gate, headSha) (#1249).
|
|
26
|
+
- **Reviewer-loop submission-failure edges join the transition table (#1200/#1221).** Copilot summon literals are sanitized on write with a code-span-aware guard and an honest blocked status (#1213/#1222).
|
|
27
|
+
- **Issue-less lightweight PR-first three-origin contracts reconciled (#1242).** Adds a gate-coordination `specSource` branch; a contradiction sweep covers gate-skip scoping, coverage-modality ownership, and advisory wording (#1244).
|
|
28
|
+
- **run-claim coordination file anchored at the git common dir, not CWD (#1250).** The per-PR runner lease now resolves its coordination file from the shared git common dir, so a runner started from a different worktree/CWD attaches to the same lease instead of forking a second one.
|
|
29
|
+
- **`queue --item` accepts the full node-ID alphabet across the projects scripts (#1227/#1230).** The `--item` node-ID parser now accepts the complete GitHub node-ID character set, so board items whose IDs use previously-rejected characters resolve consistently across the projects scripts.
|
|
30
|
+
- **release.yml dispatches npm-publish.yml explicitly after creating the release (#1187/#1188).** Pages deploy is bumped to deploy-pages v5 (#1211/#1212) and the gate-hub flowchart renders left-to-right (#1208/#1209).
|
|
31
|
+
- **docs-validator manifest gap and corpus→manifest completeness (#1238).** Epic AC1/AC2 zero-states restored — canonical-owner openers plus remaining phrase pins (#1240).
|
|
32
|
+
|
|
33
|
+
### Changed
|
|
34
|
+
|
|
35
|
+
- **Contract corpus condensation + single-owner rule IDs.** Rule ownership migrated to single-owner IDs across the gate, queue, loop, worktree, intake, and public-loop clusters, with residual normative phrase-pins retired to a zero-pin end state (#1149–#1159, #1191–#1206). Inline interpreters were banned from coordinator flows in favor of sanctioned paths by reference (#1224/#1228), a final corpus condensation sweep rewired rule IDs with zero semantic change (#1236/#1252), and RFC-2119 modality was harmonized on newly-tagged merge/confirmation clauses (#1256).
|
|
36
|
+
|
|
37
|
+
## 0.7.2 - 2026-07-06
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- **Package-escaping imports in `@dev-loops/core` broke every consumer install (#1241).** `queue-board-sync.mjs` and `queue-board-ordering.mjs` imported `move-queue-item`/`list-queue-items` via `../../../../scripts/projects/*`, paths outside the package root that the published tarball (src/**+bin/** only) cannot resolve — so `resolve-active-board-item` (loop startup) and `ready-for-review` threw `ERR_MODULE_NOT_FOUND` on install for every release from 0.3.0 to 0.7.1. The `main` implementations now live in `@dev-loops/core` (`src/projects/`, exported via the package map); the two `scripts/projects/*` files are thin CLI wrappers importing core by package name. A packaged-install smoke test (`test:pack`) npm-packs both packages, installs them in a temp dir, imports every `@dev-loops/core` export-map entry, and runs the affected CLIs with `--help` — closing the artifact-layout gap that let five releases ship broken.
|
|
42
|
+
|
|
7
43
|
## 0.7.1 - 2026-07-05
|
|
8
44
|
|
|
9
45
|
### Changed
|