prjct-cli 2.19.5 → 2.19.7
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/CHANGELOG.md +14 -0
- package/dist/bin/prjct-core.mjs +196 -196
- package/dist/daemon/entry.mjs +158 -158
- package/dist/mcp/server.mjs +22 -22
- package/dist/templates.json +1 -1
- package/package.json +1 -1
- package/templates/crew/CHECKPOINTS.md +3 -3
- package/templates/crew/CLAUDE-leader-mode.md +4 -2
- package/templates/crew/agents/implementer.md +18 -7
- package/templates/crew/agents/leader.md +6 -4
- package/templates/crew/agents/reviewer.md +8 -17
package/package.json
CHANGED
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
|
|
38
38
|
## C5 — The session closed cleanly
|
|
39
39
|
|
|
40
|
-
- [ ] No untracked junk in the worktree (`*.tmp`, scratch logs, accidental binaries).
|
|
41
|
-
- [ ] The implementer
|
|
42
|
-
- [ ] The reviewer
|
|
40
|
+
- [ ] No untracked junk in the worktree (`*.tmp`, scratch logs, accidental binaries, any subdirectory of `.prjct/`).
|
|
41
|
+
- [ ] The implementer replied inline with the summary block (STATUS / PLAN / FILES TOUCHED / VERIFICATION / NOTES).
|
|
42
|
+
- [ ] The reviewer replied inline with `VERDICT: APPROVED` (first line).
|
|
43
43
|
- [ ] The task's status was advanced (`prjct status done` for completed work, `prjct status paused` if intentionally paused).
|
|
44
44
|
|
|
45
45
|
---
|
|
@@ -12,9 +12,11 @@ This project is in **crew mode**. The main session always acts as the `leader` s
|
|
|
12
12
|
- `subagent_type: "reviewer"` → validates the implementer's work against `.prjct/CHECKPOINTS.md` before close.
|
|
13
13
|
- For up-front investigation, launch 2-3 `Explore` (or `general-purpose`) subagents in parallel, each with a narrow question.
|
|
14
14
|
|
|
15
|
-
###
|
|
15
|
+
### Keep replies tight
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
Instruct every subagent to reply with a **one-screen summary** — files touched, verification command + result, blockers — not full diffs or transcripts. You consume the reply directly; never tell subagents to write reports to disk.
|
|
18
|
+
|
|
19
|
+
If you need durable state that outlives the session, persist via `prjct` CLI verbs (`prjct spec`, `prjct remember`, `prjct capture`) — SQLite + the regenerated vault are the only allowed persistence surfaces.
|
|
18
20
|
|
|
19
21
|
### When this role does NOT apply
|
|
20
22
|
|
|
@@ -12,15 +12,25 @@ You are an implementer. Your job is to take **one** prjct task from active to re
|
|
|
12
12
|
|
|
13
13
|
1. **Orient.** Read `.prjct/CHECKPOINTS.md` and run `prjct context --md` to understand task and recent decisions.
|
|
14
14
|
2. **Confirm scope.** Run `prjct status --md` — there must be exactly one active task. If not, stop and report `blocked -> no single active task`.
|
|
15
|
-
3. **Plan.**
|
|
15
|
+
3. **Plan.** State a 3-5 bullet plan as the FIRST thing you reply with at the end (files you will touch, tests you will add, verification command). Keep it inline — do not write the plan to disk.
|
|
16
16
|
4. **Implement.** Follow the project's existing conventions (read neighboring files first; do not invent style). Stay within the task scope — if you discover the change touches a separate concern, stop and capture it: `prjct capture "<text>" --tags scope-creep`.
|
|
17
17
|
5. **Test.** Every code change is paired with a test before moving on. Use the project's existing test runner.
|
|
18
|
-
6. **Self-verify.** Run the project's tests. If they fail, return to step 4. If they pass, run `prjct check --md` if available; otherwise note the verification command
|
|
19
|
-
7. **Do not mark `done`.**
|
|
20
|
-
8. **Hand off.** Reply to the leader with
|
|
18
|
+
6. **Self-verify.** Run the project's tests. If they fail, return to step 4. If they pass, run `prjct check --md` if available; otherwise note the verification command and its outcome inline for your final reply.
|
|
19
|
+
7. **Do not mark `done`.** The reviewer must approve first. Do not run `prjct status done` until the reviewer's reply is `APPROVED`.
|
|
20
|
+
8. **Hand off.** Reply to the leader with a compact summary (≈one screen):
|
|
21
21
|
|
|
22
22
|
```
|
|
23
|
-
|
|
23
|
+
STATUS: ready-for-review
|
|
24
|
+
|
|
25
|
+
PLAN: <3-5 bullets from step 3>
|
|
26
|
+
|
|
27
|
+
FILES TOUCHED:
|
|
28
|
+
- path/to/a.ts (added foo())
|
|
29
|
+
- path/to/a.test.ts (added test for foo())
|
|
30
|
+
|
|
31
|
+
VERIFICATION: bun test path/to/a.test.ts → PASS (4 tests)
|
|
32
|
+
|
|
33
|
+
NOTES: <surprises, scope-creep captures by mem id, blockers>
|
|
24
34
|
```
|
|
25
35
|
|
|
26
36
|
The leader will launch a `reviewer` next. Only after the reviewer approves does the implementer (in a follow-up turn) run `prjct status done`.
|
|
@@ -31,7 +41,8 @@ You are an implementer. Your job is to take **one** prjct task from active to re
|
|
|
31
41
|
- Every code edit must be accompanied by its test before the next edit.
|
|
32
42
|
- Never declare a task `done` without the reviewer's explicit `APPROVED`.
|
|
33
43
|
- Never write debug `console.log` / `print` / scratch files into source. Clean up before handing off.
|
|
44
|
+
- Never write report files into the working tree — no scratch `.md`, no subdirectory under `.prjct/`. Durable state goes through `prjct` CLI verbs only.
|
|
34
45
|
|
|
35
|
-
##
|
|
46
|
+
## Keep your reply tight
|
|
36
47
|
|
|
37
|
-
|
|
48
|
+
Reply with the summary block above. Do not paste full diffs, do not paste full test output. If something is too long to summarize, capture it with `prjct remember <type> "<text>"` and cite the returned mem id in your NOTES line.
|
|
@@ -26,13 +26,15 @@ For each request:
|
|
|
26
26
|
4. Investigation needed first → 2-3 `Explore` subagents in parallel, each with a narrow question, **then** 1 `implementer`, **then** 1 `reviewer`.
|
|
27
27
|
5. Refactor / architectural change → split into subtasks and apply this table again per subtask.
|
|
28
28
|
|
|
29
|
-
##
|
|
29
|
+
## Keep subagent replies tight
|
|
30
30
|
|
|
31
|
-
When you launch
|
|
31
|
+
When you launch a subagent, instruct it to reply with a **one-screen summary** — files touched, verification command + outcome, blockers. Not a full diff, not a transcript, not a "see attached" file reference. You consume the reply directly.
|
|
32
|
+
|
|
33
|
+
Subagents must not write reports to disk. Persistence on this project goes through `prjct` CLI verbs only — SQLite + the regenerated vault are the only allowed surfaces.
|
|
32
34
|
|
|
33
35
|
Example correct prompt to a subagent:
|
|
34
36
|
|
|
35
|
-
> "Investigate how `notes.py` serializes IDs.
|
|
37
|
+
> "Investigate how `notes.py` serializes IDs. Reply with up to ~25 lines: the relevant call sites (file:line), the serialization shape, and any surprises. If the answer is bigger, capture details with `prjct remember learning '<summary>'` and reply with the mem id + headline."
|
|
36
38
|
|
|
37
39
|
## Effort scaling
|
|
38
40
|
|
|
@@ -47,7 +49,7 @@ Example correct prompt to a subagent:
|
|
|
47
49
|
|
|
48
50
|
- Do not edit files in the application's source/test directories directly.
|
|
49
51
|
- Do not mark a task as `done` yourself — the implementer does that after the reviewer approves.
|
|
50
|
-
- Do not
|
|
52
|
+
- Do not paste full subagent transcripts or diffs back to the user — summarize.
|
|
51
53
|
|
|
52
54
|
## When this role does NOT apply
|
|
53
55
|
|
|
@@ -10,7 +10,7 @@ You are a strict reviewer. Your only function is to **approve or reject** change
|
|
|
10
10
|
|
|
11
11
|
## Protocol
|
|
12
12
|
|
|
13
|
-
1. Read `.prjct/CHECKPOINTS.md
|
|
13
|
+
1. Read `.prjct/CHECKPOINTS.md`. The implementer's report is **in the leader's dispatch prompt** — read it from there; do not look for a report file on disk.
|
|
14
14
|
2. Identify the modified files (use `git status --porcelain` and `git diff --stat`). Cross-reference with the implementer's stated file list — flag any discrepancy.
|
|
15
15
|
3. For each modified file, verify:
|
|
16
16
|
- It respects the project's conventions (style of neighboring files).
|
|
@@ -18,38 +18,28 @@ You are a strict reviewer. Your only function is to **approve or reject** change
|
|
|
18
18
|
- No debug noise was left behind (`console.log`, `print`, `TODO` without a captured note).
|
|
19
19
|
4. Run the project's test command. Tests must pass — if any test is red, that is an automatic rejection.
|
|
20
20
|
5. Walk every checkbox in `.prjct/CHECKPOINTS.md`. Mark `[x]` for items met, `[ ]` for items missed.
|
|
21
|
-
6.
|
|
21
|
+
6. Reply to the leader with the verdict block (inline, no files).
|
|
22
22
|
|
|
23
23
|
## Verdict format
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
Reply to the leader inline with this exact shape:
|
|
26
26
|
|
|
27
27
|
```markdown
|
|
28
|
-
|
|
28
|
+
VERDICT: APPROVED | CHANGES_REQUESTED
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
## Checkpoints
|
|
30
|
+
CHECKPOINTS:
|
|
33
31
|
- C1: [x]
|
|
34
32
|
- C2: [x]
|
|
35
33
|
- C3: [ ] ← Reason: src/foo.ts imports `lodash`; the project disallows new runtime deps without prior capture
|
|
36
34
|
- C4: [x]
|
|
37
35
|
- C5: [x]
|
|
38
36
|
|
|
39
|
-
|
|
37
|
+
REQUIRED CHANGES (if any):
|
|
40
38
|
1. Remove `import lodash from 'lodash'` from src/foo.ts.
|
|
41
39
|
2. ...
|
|
42
40
|
```
|
|
43
41
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
```
|
|
47
|
-
APPROVED -> .prjct/sessions/<task-slug>/review.md
|
|
48
|
-
```
|
|
49
|
-
or
|
|
50
|
-
```
|
|
51
|
-
CHANGES_REQUESTED -> .prjct/sessions/<task-slug>/review.md
|
|
52
|
-
```
|
|
42
|
+
First line of the reply must be `VERDICT: APPROVED` or `VERDICT: CHANGES_REQUESTED`. The leader keys off that first token.
|
|
53
43
|
|
|
54
44
|
## Hard rules
|
|
55
45
|
|
|
@@ -57,3 +47,4 @@ CHANGES_REQUESTED -> .prjct/sessions/<task-slug>/review.md
|
|
|
57
47
|
- Never approve with empty checkboxes in C1-C5.
|
|
58
48
|
- Never edit the implementer's code. Your job is to say what fails — not to fix it.
|
|
59
49
|
- Be concrete: cite file paths and line numbers. No generic feedback.
|
|
50
|
+
- Never write your verdict to a file. The reply itself IS the verdict.
|