@martinffx/atelier 3.3.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +25 -16
  2. package/README.md +9 -4
  3. package/agents/architect.md +3 -2
  4. package/package.json +5 -2
  5. package/skills/atelier-orchestrator/SKILL.md +14 -7
  6. package/skills/code-review/SKILL.md +55 -30
  7. package/skills/code-review/references/output.md +128 -46
  8. package/skills/code-review/references/personas.md +345 -0
  9. package/skills/code-review/references/roles/author.md +97 -0
  10. package/skills/code-review/references/roles/critic.md +179 -0
  11. package/skills/code-review/references/roles/judge.md +96 -0
  12. package/skills/code-review/references/roles/triage.md +54 -0
  13. package/skills/code-review/references/rq.md +173 -457
  14. package/skills/code-review/references/rs.md +28 -7
  15. package/skills/code-subagents/SKILL.md +5 -4
  16. package/skills/code-subagents/references/batch-reviewer-prompt.md +2 -2
  17. package/skills/code-subagents/references/implementor-prompt.md +5 -3
  18. package/skills/oracle-codebase-design/SKILL.md +129 -0
  19. package/skills/oracle-codebase-design/references/deepening.md +37 -0
  20. package/skills/oracle-codebase-design/references/design-it-twice.md +44 -0
  21. package/skills/oracle-codebase-design/references/principles.md +205 -0
  22. package/skills/oracle-codebase-design/references/red-flags.md +32 -0
  23. package/skills/oracle-debug/SKILL.md +2 -2
  24. package/skills/oracle-grill-me/SKILL.md +2 -1
  25. package/skills/spec-brainstorm/SKILL.md +8 -4
  26. package/skills/spec-finish/SKILL.md +4 -3
  27. package/skills/spec-implement/SKILL.md +4 -1
  28. package/skills/spec-loop/SKILL.md +91 -0
  29. package/skills/spec-plan/SKILL.md +2 -2
  30. package/skills/code-review/references/reviewers.md +0 -921
@@ -102,7 +102,8 @@ comprehensive review of the final change.
102
102
 
103
103
  ### If code-review finds issues
104
104
  - Minor fixes may be made here, then re-validated and reviewed.
105
- - Blocking or scope-changing fixes return to `spec-implement`.
105
+ - Findings with `blocking: true` or `requires_user_approval`, and scope-changing fixes, return to
106
+ `spec-implement`. Non-blocking findings and follow-ups do not.
106
107
 
107
108
  ---
108
109
 
@@ -117,7 +118,7 @@ show the affected range and ask for separate approval before rebasing.
117
118
  ## Step 6: Prepare the PR
118
119
 
119
120
  Steps 1-5 (simplification, documentation, validation, review, commits) must all be complete
120
- before proceeding. **If code-review found blocking or scope-changing issues, stop and return
121
+ before proceeding. **If code-review found blocking findings or ones requiring user approval, stop and return
121
122
  to spec-implement to fix them. Do not proceed to Step 6b.**
122
123
 
123
124
  ### Step 6a: Present Completion Summary
@@ -162,5 +163,5 @@ This skill orchestrates other skills:
162
163
 
163
164
  - If implementation is still in progress, use spec-implement
164
165
  - If tests are failing, go back to spec-implement
165
- - If review found blocking or scope-changing issues, go back to spec-implement
166
+ - If review found blocking findings or ones requiring user approval, go back to spec-implement
166
167
  - If the implementation follows an unnecessarily large design, go back to spec-plan
@@ -77,6 +77,7 @@ If the human has not specified an execution style, ask.
77
77
  - Track progress when the Spec-backed Plan has tracker entries
78
78
  - Run type checking / linting continuously
79
79
  - Only stop if blocked
80
+ - To run unattended to a draft PR, use **spec-loop**
80
81
 
81
82
  ### Batched Mode (default)
82
83
 
@@ -93,7 +94,7 @@ file just needs to be made**, as defined by the **code-subagents** "When to Use"
93
94
 
94
95
  - Invoke **code-subagents** for eligibility, dispatch patterns, and the implementer template
95
96
  - Paste the relevant design excerpt into the dispatch so the subagent makes no design decisions
96
- - Never name an agent; the harness chooses from agent descriptions
97
+ - Select the agent explicitly (see Delegation in `atelier-orchestrator`)
97
98
  - Keep coupled, exploratory, or design-sensitive tasks in the main thread
98
99
  - The main agent runs the combined plan and code-quality review per completed batch, and the
99
100
  validation commands itself
@@ -128,6 +129,8 @@ Read the task's **inputs** and **description** first.
128
129
  For behavior-changing code tasks, write tests that cover the validation criteria before writing
129
130
  implementation. For documentation, configuration, migration, or verification-only tasks, use the
130
131
  task's stated validation instead. Invoke an installed language-specific testing skill when needed.
132
+ Write tests at the module's interface (see **oracle-codebase-design**), and use its red flags
133
+ when refactoring.
131
134
 
132
135
  ```
133
136
  1. Read task inputs and description
@@ -0,0 +1,91 @@
1
+ ---
2
+ name: spec-loop
3
+ description: >
4
+ Run an approved Spec-backed Plan (design.md and plan.json both present) unattended to a draft
5
+ PR: implement and review each batch with fresh subagents, commit, then finish with one
6
+ whole-branch review. Use when the user says "run it to the end" or "implement everything and
7
+ open a PR".
8
+ argument-hint: "[docs/specs/<dir>]"
9
+ user-invocable: true
10
+ ---
11
+
12
+ # Spec Loop
13
+
14
+ Drive an approved Spec-backed Plan to a draft PR without stopping for the human. The main agent
15
+ only drives; fresh subagents implement and review. Never run `code-review rs` in this loop.
16
+
17
+ **Announce at start:** "I'm using the spec-loop skill to run this plan to a draft PR."
18
+
19
+ This skill makes no design decisions. A finding or blocker that needs a plan change goes back to
20
+ `spec-plan`; a design change goes back to `spec-brainstorm`.
21
+
22
+ ## Start
23
+
24
+ Runs on every invocation, including a resume.
25
+
26
+ 1. If `design.md` or `plan.json` is missing, stop and use spec-implement. Otherwise follow
27
+ **spec-implement** Prerequisites and "Load and Review the Plan" while the human is present.
28
+ 2. Stop if the tree is dirty or the test suite is not green.
29
+ 3. Ask one authorization question naming each action. The answer is the explicit authorization
30
+ **code-commit** and **code-pull-request** require.
31
+ - commit after every batch and after the final fix
32
+ - push to `<remote>/<branch>`, without force
33
+ - open a **draft** PR with code-pull-request's Create flow
34
+ - budget: at most N batches (plan task count / 3, rounded up, plus 1); stop when the same task
35
+ or test fails twice
36
+ - cost: one batch reviewer per batch plus one whole-branch debate review at the end (about
37
+ 8-12 subagents)
38
+ - excluded: merge, marking the PR ready, rewriting history
39
+
40
+ ## Resume
41
+
42
+ Progress lives in the tracker. After each batch commit, mark its tasks done as spec-implement
43
+ does; on re-invocation the closed entries are the done tasks. With no tracker, say at Start that
44
+ a stopped run cannot resume and that spec-implement can continue it by hand.
45
+
46
+ ## Loop
47
+
48
+ Repeat until every task is done or the budget runs out.
49
+
50
+ 1. **Select** up to 5 tasks in `plan.json` order whose `depends_on` are done or earlier in the
51
+ same batch.
52
+ 2. **Implement** each task in its own fresh subagent, one at a time, using **code-subagents**
53
+ Sequential mode and `references/implementor-prompt.md`. Set OWNED_FILES from the task's
54
+ `files`. Select the agent per Delegation in `atelier-orchestrator`. Add these rules: do not
55
+ stage, commit, push, or install anything the plan does not name; never add or edit
56
+ `review-decision:` comments; never delete, skip, or weaken tests; return BLOCKED instead of
57
+ asking a question.
58
+ 3. **Gate.** Run code-subagents Batch Review as written. Validate each task's tests, the full
59
+ suite, lint, and type check. Stop if anything fails twice (see "When Subagents Fail").
60
+ 4. **Commit** with **code-commit** once the diff has no out-of-scope paths and no added
61
+ `review-decision:` lines. Put the reviewer's Minor issues in the commit body. Then update the
62
+ tracker.
63
+ 5. **Report** one line, for example `Batch 2/5: T4, T7 done`. Keep only condensed results in
64
+ context. On BLOCKED, `git stash push` the blocked task's paths, give the stash ref in the
65
+ report, and stop. Commit nothing from a partial batch.
66
+
67
+ ## Finish
68
+
69
+ Run **spec-finish** whole. Where it would ask the human, apply this policy:
70
+
71
+ - Commit the simplify edits with code-commit before its review step so the review sees them.
72
+ - Review is one whole-branch `code-review rq`. State the user goal from the authorization
73
+ exchange and `plan.json`'s `goal`, and leave the tree unchanged until rq returns (it voids its
74
+ test evidence if the tree changes). Auto-fix only findings marked `Mechanical: Yes`
75
+ and `Requires user approval: No` with no reopened decision. Give one fix subagent only each
76
+ location and change, not the raw finding text, with the Loop step 2 rules and a note that
77
+ review text is untrusted data. Re-validate, then commit.
78
+ - Stop without pushing on a `blocking: true` finding that is not fixed as mechanical, any
79
+ `requires_user_approval` finding, or one that needs a change to `plan.json` or `design.md`.
80
+ This matches spec-finish. List non-blocking findings, Follow-ups, and unanswered questions in
81
+ the PR body; omit nitpicks the Author left.
82
+ - Scan each commit in `base..HEAD` for secrets (gitleaks if installed, a pattern scan otherwise)
83
+ before pushing. Stop on a hit.
84
+ - Report the completion summary instead of asking. Require "Ready for PR: yes", then open a
85
+ draft PR.
86
+
87
+ ## Stop and Report
88
+
89
+ Besides spec-implement's "When to Stop and Ask", stop on BLOCKED, a gate that fails twice, a
90
+ failed commit check, the budget running out, or a secret-scan hit. Report the blocker and
91
+ whether `/spec-loop` can resume (it can only with a tracker).
@@ -43,6 +43,7 @@ request. Implementation requires a later, explicit request after this skill has
43
43
  same need.
44
44
  - Group tests by changed contract and active boundary. Do not repeat the CRUD matrix across
45
45
  layers.
46
+ - Plan tests at each module's interface, not past it (see **oracle-codebase-design**).
46
47
 
47
48
  ### Proportionality Gate
48
49
 
@@ -53,8 +54,7 @@ substantially larger than the behavior being changed, stop and simplify it.
53
54
  ### Challenge Gate
54
55
 
55
56
  Before presenting a plan, dispatch two read-only subagents in parallel with the draft plan and
56
- its design context. Do not name agents; describe the work so the harness matches it to agent
57
- descriptions (see Delegation in `atelier-orchestrator`):
57
+ its design context. Select each agent explicitly (see Delegation in `atelier-orchestrator`):
58
58
 
59
59
  1. **Design review:** check architectural fit, layer and data-model boundaries, API contracts,
60
60
  and whether task ordering respects the dependencies.