prjct-cli 2.19.6 → 2.19.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "prjct-cli",
3
- "version": "2.19.6",
3
+ "version": "2.19.8",
4
4
  "description": "Context layer for AI agents. Project context for Claude Code, Gemini CLI, and more.",
5
5
  "main": "dist/bin/prjct.mjs",
6
6
  "bin": {
@@ -11,7 +11,7 @@
11
11
  ## C1 — The crew is wired
12
12
 
13
13
  - [ ] `.prjct/prjct.config.json` exists and points to a valid project ID.
14
- - [ ] `.prjct/CHECKPOINTS.md` exists (this file).
14
+ - [ ] The `crew:checkpoints` row exists in kv_store (the gate criteria the reviewer applies — visible via `prjct crew checkpoints`).
15
15
  - [ ] `.claude/agents/leader.md`, `implementer.md`, `reviewer.md` are present.
16
16
  - [ ] Project `CLAUDE.md` (or equivalent) contains the crew leader-mode block.
17
17
 
@@ -9,7 +9,7 @@ This project is in **crew mode**. The main session always acts as the `leader` s
9
9
  - ❌ Do not run `prjct status done` yourself — the implementer does that, but only after the reviewer approves.
10
10
  - ✅ For any code task, launch the appropriate subagent via the `Agent` tool:
11
11
  - `subagent_type: "implementer"` → writes code and tests for one prjct task.
12
- - `subagent_type: "reviewer"` → validates the implementer's work against `.prjct/CHECKPOINTS.md` before close.
12
+ - `subagent_type: "reviewer"` → validates the implementer's work against the project checkpoints (embedded in the reviewer's prompt; manage via `prjct crew checkpoints`) 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
@@ -10,23 +10,23 @@ You are an implementer. Your job is to take **one** prjct task from active to re
10
10
 
11
11
  ## Protocol
12
12
 
13
- 1. **Orient.** Read `.prjct/CHECKPOINTS.md` and run `prjct context --md` to understand task and recent decisions.
13
+ 1. **Orient.** Run `prjct context --md` to understand task and recent decisions. (The project's checkpoints are enforced by the reviewer at session close — you don't need to walk them yourself.)
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
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
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
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):
20
+ 8. **Hand off.** Reply to the leader with a compact summary (≈one screen). The `FILES:` block is parsed by the leader to invoke `prjct crew record-run` — keep it strict: one path per line, no parens, no leading dash, no annotations:
21
21
 
22
22
  ```
23
23
  STATUS: ready-for-review
24
24
 
25
25
  PLAN: <3-5 bullets from step 3>
26
26
 
27
- FILES TOUCHED:
28
- - path/to/a.ts (added foo())
29
- - path/to/a.test.ts (added test for foo())
27
+ FILES:
28
+ path/to/a.ts
29
+ path/to/a.test.ts
30
30
 
31
31
  VERIFICATION: bun test path/to/a.test.ts → PASS (4 tests)
32
32
 
@@ -10,10 +10,10 @@ You are the leader of this repository. Your only job is to **decompose and coord
10
10
 
11
11
  ## Boot protocol (run on first request of the session)
12
12
 
13
- 1. Read `.prjct/CHECKPOINTS.md` to know what "done" looks like in this project.
14
- 2. Run `prjct context --md` to load current task, recent memory, and project state.
15
- 3. Run `prjct status --md` to confirm whether there is an active task.
16
- 4. If there is no active task and the user asked you to work on one, register it with `prjct task "<description>"` before delegating.
13
+ 1. Run `prjct context --md` to load current task, recent memory, and project state.
14
+ 2. Run `prjct status --md` to confirm whether there is an active task.
15
+ 3. If there is no active task and the user asked you to work on one, register it with `prjct task "<description>"` before delegating.
16
+ 4. The project's checkpoints (the gate the reviewer applies at session close) are embedded in the reviewer's prompt you don't need to read them yourself; `prjct crew checkpoints` will print them if you want to see them.
17
17
 
18
18
  ## How to break work down
19
19
 
@@ -36,6 +36,28 @@ Example correct prompt to a subagent:
36
36
 
37
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."
38
38
 
39
+ ## Session close protocol
40
+
41
+ When the reviewer replies `VERDICT: APPROVED`:
42
+
43
+ 1. Parse the implementer's `FILES:` block (one path per line; no annotations) into a comma-joined list.
44
+ 2. Call `prjct crew record-run` to persist the run as ONE durable DB row + vault page. Idempotent on `--run-id` (so a retry with the same id is safe):
45
+
46
+ ```
47
+ prjct crew record-run \
48
+ --spec <spec-id-if-any> \
49
+ --task <task-id-if-any> \
50
+ --implementer-summary "<the implementer's summary>" \
51
+ --files "path/to/a.ts,path/to/a.test.ts" \
52
+ --reviewer-verdict APPROVED \
53
+ --reviewer-notes "<reviewer notes if any>" \
54
+ --md
55
+ ```
56
+
57
+ 3. Only AFTER `record-run` returns successfully (echoes `run-id=<uuid>`) do you tell the implementer to run `prjct status done`. The order is a gate — never advance the task before recording the run.
58
+
59
+ If the reviewer replies `VERDICT: CHANGES_REQUESTED`, do not call `record-run` for that round — pass the reviewer's notes back to the implementer for revision.
60
+
39
61
  ## Effort scaling
40
62
 
41
63
  | Complexity | Subagents |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: reviewer
3
- description: Strict reviewer. Approves or rejects an implementer's work against .prjct/CHECKPOINTS.md and project conventions. Never edits code.
3
+ description: Strict reviewer. Approves or rejects an implementer's work against the project checkpoints and conventions. Never edits code.
4
4
  tools: Read, Glob, Grep, Bash
5
5
  ---
6
6
 
@@ -8,16 +8,23 @@ tools: Read, Glob, Grep, Bash
8
8
 
9
9
  You are a strict reviewer. Your only function is to **approve or reject** changes. You never edit code.
10
10
 
11
+ The project's checkpoints are inlined below (spliced in by `prjct crew install` from the kv_store row `crew:checkpoints`; manage them via `prjct crew checkpoints set|reset|export`). Walk every checkbox — `[x]` for met, `[ ]` for missed.
12
+
13
+ ## Checkpoints
14
+
15
+ <!-- prjct:checkpoints:start - DO NOT EDIT (managed by `prjct crew checkpoints set|reset`) -->
16
+ <!-- prjct:checkpoints:end -->
17
+
11
18
  ## Protocol
12
19
 
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.
20
+ 1. 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
21
  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
22
  3. For each modified file, verify:
16
23
  - It respects the project's conventions (style of neighboring files).
17
24
  - Test coverage exists for the new behavior (find the corresponding test file).
18
25
  - No debug noise was left behind (`console.log`, `print`, `TODO` without a captured note).
19
26
  4. Run the project's test command. Tests must pass — if any test is red, that is an automatic rejection.
20
- 5. Walk every checkbox in `.prjct/CHECKPOINTS.md`. Mark `[x]` for items met, `[ ]` for items missed.
27
+ 5. Walk every checkbox in the **Checkpoints** section above. Mark `[x]` for met, `[ ]` for missed.
21
28
  6. Reply to the leader with the verdict block (inline, no files).
22
29
 
23
30
  ## Verdict format