multi-agents-cli 1.1.32 → 1.1.34
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/core/templates/CLAUDE.md +20 -14
- package/core/workflow/agent.js +1 -1
- package/core/workflow/run.js +2 -0
- package/init.js +2 -0
- package/package.json +1 -1
package/core/templates/CLAUDE.md
CHANGED
|
@@ -140,13 +140,18 @@ This section fires at the start of every new Claude Code session.
|
|
|
140
140
|
Regardless of what the user types first - even a single word or greeting -
|
|
141
141
|
the agent must:
|
|
142
142
|
|
|
143
|
-
1.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
1. Resolve the project root (OS-agnostic, works on Mac/Linux/Windows):
|
|
144
|
+
```bash
|
|
145
|
+
git rev-parse --show-toplevel
|
|
146
|
+
```
|
|
147
|
+
Store this as PROJECT_ROOT. All subsequent paths (`.scaffold/`, `BUILD_STATE.md`, `CONTRACTS.md`, etc.) resolve from PROJECT_ROOT, never from the worktree directory.
|
|
148
|
+
2. Read `BUILD_STATE.md` at PROJECT_ROOT - understand what has been built
|
|
149
|
+
3. Check if `TASK.md` exists in the current directory
|
|
150
|
+
4. If yes - read it and verify dependencies are met against BUILD_STATE.md
|
|
151
|
+
5. If dependencies not met - surface what is missing and propose options
|
|
152
|
+
6. If dependencies met - begin executing the task defined in TASK.md
|
|
153
|
+
7. If no TASK.md - inform the user to run `npm run agent`
|
|
154
|
+
8. Re-read `TASK.md` at every turn before acting - it is the single source of truth for the current task
|
|
150
155
|
|
|
151
156
|
Do not wait for explicit instructions.
|
|
152
157
|
The presence of `TASK.md` in the worktree is the instruction.
|
|
@@ -204,7 +209,7 @@ When executing a task from `TASK.md`, operate in fully autonomous mode:
|
|
|
204
209
|
**These workflow files are ALWAYS updated without confirmation:**
|
|
205
210
|
- `TASK.md` — mark `[x] COMPLETED` when your task is done
|
|
206
211
|
- `CONTRACTS.md`
|
|
207
|
-
-
|
|
212
|
+
- `PROJECT_ROOT/.scaffold/.tracking.json`
|
|
208
213
|
|
|
209
214
|
**NEVER update `BUILD_STATE.md` directly.**
|
|
210
215
|
`complete.js` owns all BUILD_STATE.md updates after merge.
|
|
@@ -329,7 +334,7 @@ If verification fails:
|
|
|
329
334
|
|
|
330
335
|
## Tracking Protocol
|
|
331
336
|
|
|
332
|
-
Every agent reads
|
|
337
|
+
Every agent reads `PROJECT_ROOT/.scaffold/.tracking.json` at session start.
|
|
333
338
|
This file records the current state of every agent slot.
|
|
334
339
|
|
|
335
340
|
**Slot schema:**
|
|
@@ -356,7 +361,7 @@ This file records the current state of every agent slot.
|
|
|
356
361
|
|
|
357
362
|
## Paths Protocol
|
|
358
363
|
|
|
359
|
-
|
|
364
|
+
`PROJECT_ROOT/.scaffold/.paths.json` maps expected and actual framework paths for the project.
|
|
360
365
|
Written at init time with `status: pending`. Updated by agents after scaffolding.
|
|
361
366
|
|
|
362
367
|
**Schema:**
|
|
@@ -385,7 +390,7 @@ Written at init time with `status: pending`. Updated by agents after scaffolding
|
|
|
385
390
|
- `diverged` — actual path differs from expected (update `current` with real path)
|
|
386
391
|
|
|
387
392
|
**Agent rules:**
|
|
388
|
-
- After scaffolding your framework, read
|
|
393
|
+
- After scaffolding your framework, read `PROJECT_ROOT/.scaffold/.paths.json`
|
|
389
394
|
- Verify each path in your scope exists on disk
|
|
390
395
|
- Update `current` with the actual path and set `status: verified` or `diverged`
|
|
391
396
|
- If `diverged` — use the `current` path going forward, not `expected`
|
|
@@ -397,8 +402,9 @@ Written at init time with `status: pending`. Updated by agents after scaffolding
|
|
|
397
402
|
to a remote. The template origin is removed during init and moved to
|
|
398
403
|
`upstream`. The project has no remote until one is configured.
|
|
399
404
|
|
|
400
|
-
If
|
|
401
|
-
be resolved before any task work begins.
|
|
405
|
+
If `PROJECT_ROOT/.scaffold/.remote-setup-needed` exists at session start, this MUST
|
|
406
|
+
be resolved before any task work begins.
|
|
407
|
+
(PROJECT_ROOT resolved in step 1 of Session Start — always use absolute path here.) The deployment chain
|
|
402
408
|
(`npm run complete → git push origin main`) will fail without it.
|
|
403
409
|
|
|
404
410
|
**Step 1 — Check if already configured:**
|
|
@@ -553,7 +559,7 @@ git ls-remote https://github.com/{username}/{projectName}
|
|
|
553
559
|
**Step 5 — Cleanup on success:**
|
|
554
560
|
```bash
|
|
555
561
|
git push -u origin main
|
|
556
|
-
rm
|
|
562
|
+
rm "$PROJECT_ROOT/.scaffold/.remote-setup-needed"
|
|
557
563
|
```
|
|
558
564
|
Log completion in TASK.md checklist.
|
|
559
565
|
Confirm: "Remote configured — proceeding with task."
|
package/core/workflow/agent.js
CHANGED
|
@@ -14,7 +14,7 @@ const path = require('path');
|
|
|
14
14
|
const { execSync } = require('child_process');
|
|
15
15
|
const guards = require('./guards');
|
|
16
16
|
const tasksHistory = require('./tasks_history');
|
|
17
|
-
const { AGENTS, AGENT_DESCRIPTIONS, AGENT_TASK_SUFFIX, SCAFFOLD_REQUIRED, CONTRACTS_REQUIRED, AGENT_PREREQUISITES, DOD_ITEMS, AGENT_QUESTIONS } = require('
|
|
17
|
+
const { AGENTS, AGENT_DESCRIPTIONS, AGENT_TASK_SUFFIX, SCAFFOLD_REQUIRED, CONTRACTS_REQUIRED, AGENT_PREREQUISITES, DOD_ITEMS, AGENT_QUESTIONS } = require('./agent-config');
|
|
18
18
|
|
|
19
19
|
// ── Prompts (arrow-key navigation) ───────────────────────────────────────────
|
|
20
20
|
|
package/core/workflow/run.js
CHANGED
|
@@ -52,6 +52,8 @@ const copyWorkflow = (cliRoot) => {
|
|
|
52
52
|
for (const file of fs.readdirSync(src)) {
|
|
53
53
|
fs.copyFileSync(path.join(src, file), path.join(dest, file));
|
|
54
54
|
}
|
|
55
|
+
const agentConfigSrc = path.join(cliRoot, 'lib', 'agent-config.js');
|
|
56
|
+
if (fs.existsSync(agentConfigSrc)) fs.copyFileSync(agentConfigSrc, path.join(dest, 'agent-config.js'));
|
|
55
57
|
return true;
|
|
56
58
|
};
|
|
57
59
|
|
package/init.js
CHANGED
|
@@ -416,6 +416,8 @@ const main = async () => {
|
|
|
416
416
|
const WORKFLOW_DEST = path.join(ROOT, '.workflow');
|
|
417
417
|
fs.mkdirSync(WORKFLOW_DEST, { recursive: true });
|
|
418
418
|
copyDir(WORKFLOW_SRC, WORKFLOW_DEST);
|
|
419
|
+
const agentConfigSrc = path.join(CORE_DIR, '..', 'lib', 'agent-config.js');
|
|
420
|
+
if (fs.existsSync(agentConfigSrc)) fs.copyFileSync(agentConfigSrc, path.join(WORKFLOW_DEST, 'agent-config.js'));
|
|
419
421
|
console.log(` ${green('✓')} Workflow scripts copied (.workflow/)`);
|
|
420
422
|
try {
|
|
421
423
|
const cliPkg = require('./package.json');
|
package/package.json
CHANGED