@hanzlaa/rcode 4.7.0 → 4.7.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.
- package/package.json +1 -1
- package/rcode/bin/rcode-tools.cjs +1 -0
- package/rcode/references/agent-shared-rules.md +6 -0
- package/rcode/references/executor-playbook.md +1 -1
- package/rcode/references/planner-playbook.md +1 -0
- package/rcode/workflows/init.md +13 -0
- package/rcode/workflows/new-project-create-roadmap.md +18 -28
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzlaa/rcode",
|
|
3
|
-
"version": "4.7.
|
|
3
|
+
"version": "4.7.1",
|
|
4
4
|
"description": "rcode — the AI team that never forgets. Persistent memory, specialist agents, and slash commands for AI IDEs. Works in Claude Code, Cursor, Gemini, VS Code, and Antigravity.",
|
|
5
5
|
"main": "cli/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -4589,6 +4589,7 @@ This file is loaded by Claude Code, Codex, and compatible AI coding tools at the
|
|
|
4589
4589
|
- No "while I'm here" improvements
|
|
4590
4590
|
- No speculative abstractions
|
|
4591
4591
|
- No new files unless necessary
|
|
4592
|
+
- **No freehand status/handoff docs** (\`HANDOFF.md\`, \`AGENT_X_DONE.md\`, anything at the project root summarizing "what I did"). That record is \`<N>-SUMMARY.md\` under \`.planning/phases/\` — even mid-task or in a parallel multi-agent run, write there, not a new root-level file.
|
|
4592
4593
|
|
|
4593
4594
|
---
|
|
4594
4595
|
|
|
@@ -48,6 +48,12 @@
|
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
51
|
+
## File placement discipline
|
|
52
|
+
|
|
53
|
+
**Completion notes go in the sprint file, never a freehand root-level doc.** When work finishes, the record is `.planning/phases/{phase}/{sprint}-SUMMARY.md` (written by `/rcode-execute`) or a note in the existing `SPRINT.md`/`REVIEW.md` — never a new `SOMETHING_DONE.md`, `HANDOFF.md`, or `AGENT_X_DONE.md` at the project root or anywhere outside `.planning/`/`.rcode/`. If you're in a parallel multi-agent run and were asked for a "handoff doc," that handoff still belongs inside the sprint's own files — a sibling agent reads the next `SPRINT.md`/`CONTEXT.md`, not a scavenger hunt through the repo root for status files with inconsistent names.
|
|
54
|
+
|
|
55
|
+
**Never invent a new top-level artifact type.** `PROJECT.md`, `ROADMAP.md`, `REQUIREMENTS.md`, `CONTEXT.md`, `RESEARCH.md`, `SPRINT.md`, `SUMMARY.md`, `REVIEW.md` — this is the closed set. If a task genuinely needs a new kind of record, that's a call for the user, not something to freehand mid-task.
|
|
56
|
+
|
|
51
57
|
## Framework discipline
|
|
52
58
|
|
|
53
59
|
**Cite the heuristic by name.** When refusing or recommending, name the rule that drove the call. *"Per the Reversibility test, this is a one-way door — ADR required."* Traceable reasoning beats opinion.
|
|
@@ -26,7 +26,7 @@ If you commit a file under `.planning/` and `git status` afterwards still shows
|
|
|
26
26
|
2. **Load sprint** — Parse SPRINT.md frontmatter (phase, sprint, type, autonomous, wave, depends_on). Honor CONTEXT.md if referenced.
|
|
27
27
|
3. **Determine pattern** — Pattern A (no checkpoints → execute all), B (has checkpoints → stop at first), C (continuation → resume).
|
|
28
28
|
4. **Execute stories** — For each story: if `type="auto"`, execute and commit. If `type="checkpoint:*"`, STOP and return checkpoint. Update story status via `rcode-tools.cjs state story move --id NN.S.TT --status done`.
|
|
29
|
-
5. **Create SUMMARY** — After all auto stories complete, write `.planning/phases/XX-name/{phase}-{sprint}-SUMMARY.md`.
|
|
29
|
+
5. **Create SUMMARY** — After all auto stories complete, write `.planning/phases/XX-name/{phase}-{sprint}-SUMMARY.md`. This is the *only* completion artefact. Never write a parallel status/handoff doc (`AGENT_X_DONE.md`, `HANDOFF.md`, a root-level `*_DONE.md`) — if the run involves multiple parallel executors, each still records its own SUMMARY.md under its own sprint; there is no separate hand-off format.
|
|
30
30
|
6. **Update state** — Run state tools to record metrics, mark stories complete, advance sprint.
|
|
31
31
|
7. **Final commit** — Commit SUMMARY.md, STATE.md, ROADMAP.md with docs message.
|
|
32
32
|
|
|
@@ -12,6 +12,7 @@ hierarchical ID format, and output routing.
|
|
|
12
12
|
|
|
13
13
|
### Context Fidelity
|
|
14
14
|
- **Locked Decisions** (CONTEXT.md): MUST implement exactly. Reference decision ID (D-01, D-02) in task actions.
|
|
15
|
+
- **Reference, don't restate.** A decision ID is a pointer, not a license to re-paste the rationale. `<action>` explains WHAT to do and cites the ID for WHY (`"per D-02's flattening rule"`) — it does not re-explain the decision's reasoning, alternatives, or findings inline. The full "why" already lives in CONTEXT.md/RESEARCH.md; the executor opens those if they need it. A task whose `<action>` reads like a design doc (multi-paragraph rationale, full alternatives-considered writeups) is a sign the planner copied instead of pointed — cut it down to the instruction + the ID.
|
|
15
16
|
- **Deferred Ideas**: MUST NOT appear in plans.
|
|
16
17
|
- **Agent's Discretion**: Use judgment, document choices.
|
|
17
18
|
|
package/rcode/workflows/init.md
CHANGED
|
@@ -285,6 +285,18 @@ After writing both files, refresh the memory bank fingerprint so staleness check
|
|
|
285
285
|
node .rcode/bin/rcode-tools.cjs context refresh >/dev/null 2>&1 || true
|
|
286
286
|
```
|
|
287
287
|
|
|
288
|
+
## Step 4c — Scaffold CLAUDE.md / AGENTS.md if missing
|
|
289
|
+
|
|
290
|
+
`generate-claude-md` (the command routing rule + project rules block every agent needs at session start) previously only ran via the `/rcode-new-project` roadmap flow — a project set up with `/rcode-init` alone (the common "add rcode to an existing codebase" path) never got it, so agents had no ambient instruction to check `do.md` before acting ad-hoc. Close that gap here, unconditionally (not just on `fresh`):
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
if [ ! -f CLAUDE.md ]; then
|
|
294
|
+
node .rcode/bin/rcode-tools.cjs generate-claude-md
|
|
295
|
+
fi
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Never pass `--force` here — an existing `CLAUDE.md` is the user's own file (or was already generated by a prior init/new-project run) and must not be overwritten. Silent no-op when `CLAUDE.md` already exists.
|
|
299
|
+
|
|
288
300
|
## Step 5 — Suggest the next step
|
|
289
301
|
|
|
290
302
|
Print a contextual recommendation, **one line of copy-paste per suggestion** (per `.rcode/references/command-redirect-format.md`):
|
|
@@ -339,6 +351,7 @@ Silent if state tools fail.
|
|
|
339
351
|
- [ ] `.rcode/JOURNEY.md` written (unless `--skip-scan` or no code)
|
|
340
352
|
- [ ] `.rcode/context/active.md` populated with project state (not the placeholder stub)
|
|
341
353
|
- [ ] `.rcode/context/project-brief.md` populated with project overview (not the placeholder stub)
|
|
354
|
+
- [ ] `CLAUDE.md` exists (generated if it didn't already)
|
|
342
355
|
- [ ] State detected correctly (fresh / existing-new-rcode / returning)
|
|
343
356
|
- [ ] Contextual next-step suggestion printed as single-line copy-paste
|
|
344
357
|
|
|
@@ -161,42 +161,32 @@ Use AskUserQuestion:
|
|
|
161
161
|
|
|
162
162
|
**Generate or refresh project instruction file before final commit:**
|
|
163
163
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
```markdown
|
|
167
|
-
# {INSTRUCTION_FILE} — project instructions
|
|
168
|
-
|
|
169
|
-
This project uses rcode for planning and execution. See `.planning/PROJECT.md` for context and `.planning/ROADMAP.md` for phases.
|
|
170
|
-
|
|
171
|
-
Common commands:
|
|
172
|
-
- /rcode-progress — check status and next action
|
|
173
|
-
- /rcode-discuss-phase N — gather context before planning phase N
|
|
174
|
-
- /rcode-plan N — create a SPRINT.md for phase N
|
|
175
|
-
- /rcode-execute N — execute a SPRINT.md
|
|
176
|
-
- /rcode-verify-work — conversational UAT
|
|
177
|
-
- /rcode-complete-milestone — archive milestone and reset
|
|
178
|
-
|
|
179
|
-
Rules:
|
|
180
|
-
- Never run `git push` without explicit user authorization.
|
|
181
|
-
- No Claude/AI attribution in commits.
|
|
182
|
-
- Prefer editing existing files over creating new ones.
|
|
164
|
+
```bash
|
|
165
|
+
node .rcode/bin/rcode-tools.cjs generate-claude-md
|
|
183
166
|
```
|
|
184
167
|
|
|
185
|
-
|
|
168
|
+
Writes `CLAUDE.md` and `AGENTS.md` from rcode's own template (commit rules,
|
|
169
|
+
push rules, phase workflow rules, scope discipline, and the command-routing
|
|
170
|
+
rule pointing at `do.md`). Refuses to touch an existing `CLAUDE.md` — if it
|
|
171
|
+
already exists, this is a silent no-op (respects user-customized content).
|
|
172
|
+
`AGENTS.md` is written only when absent, so an install-appended `## rcode
|
|
173
|
+
Agents (installed)` roster section is never clobbered.
|
|
186
174
|
|
|
187
175
|
**Commit roadmap (guarded):**
|
|
188
176
|
|
|
189
177
|
```bash
|
|
190
|
-
git add
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
178
|
+
# git add fails its whole invocation on any missing pathspec, so only pass
|
|
179
|
+
# paths that actually exist (CLAUDE.md/AGENTS.md are conditional — see above).
|
|
180
|
+
ADD_PATHS=(.planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md)
|
|
181
|
+
for f in CLAUDE.md AGENTS.md; do [ -f "$f" ] && ADD_PATHS+=("$f"); done
|
|
182
|
+
|
|
183
|
+
git add "${ADD_PATHS[@]}" 2>/dev/null \
|
|
195
184
|
&& git commit -m "docs: create roadmap ([N] phases)" 2>/dev/null \
|
|
196
|
-
|| echo "ℹ .planning/ gitignored — roadmap written, not committed (instruction
|
|
185
|
+
|| echo "ℹ .planning/ gitignored — roadmap written, not committed (instruction files committed separately)"
|
|
197
186
|
|
|
198
|
-
# Fallback: also try committing just the instruction
|
|
199
|
-
|
|
187
|
+
# Fallback: also try committing just the instruction files if .planning was ignored
|
|
188
|
+
IFILES=(); for f in CLAUDE.md AGENTS.md; do [ -f "$f" ] && IFILES+=("$f"); done
|
|
189
|
+
[ ${#IFILES[@]} -gt 0 ] && git add "${IFILES[@]}" 2>/dev/null && git commit -m "docs: add project instruction files" 2>/dev/null || true
|
|
200
190
|
|
|
201
191
|
# Sync all roadmapper-created phases into state.json.
|
|
202
192
|
# rcode-roadmapper writes ROADMAP.md as text — it never calls `phase add` — so
|