@fro.bot/systematic 3.35.1 → 3.35.3

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/dist/index.js CHANGED
@@ -1867,7 +1867,20 @@ function restorePart(store, sessionID, part) {
1867
1867
  const full = store.peek(sessionID, part.id);
1868
1868
  if (full === undefined)
1869
1869
  return;
1870
- part.result = { type: "content", value: [{ type: "text", text: full }] };
1870
+ part.result = restoredResult(part.result, full);
1871
+ }
1872
+ function restoredResult(result, full) {
1873
+ if (!isRecord(result))
1874
+ return result;
1875
+ if (result.type === "text") {
1876
+ return result.value === full ? result : { type: "text", value: full };
1877
+ }
1878
+ if (result.type !== "content" || !Array.isArray(result.value))
1879
+ return result;
1880
+ const [only, ...more] = result.value;
1881
+ if (more.length === 0 && isRecord(only) && only.type === "text" && only.text === full)
1882
+ return result;
1883
+ return { ...result, value: [{ type: "text", text: full }] };
1871
1884
  }
1872
1885
  function createToolDefinition(ctx, descriptor, store, guard) {
1873
1886
  return {
@@ -67,10 +67,11 @@ export declare function readBundledSkills(bundledSkillsDir: string, enabledSkill
67
67
  */
68
68
  export declare function addBundledSkill(editor: V2SkillEditor, skill: V2SkillRecord, reported: Set<string>, report: (message: string) => void): void;
69
69
  /**
70
- * Put the full text back into the tool results of a model request. Matching is
71
- * by session, tool name and call id. Nothing depends on the host's marker
72
- * text. The store is read, not emptied: the host builds each request from
73
- * history, so the same result is restored on every later request.
70
+ * Put the full text back into the tool results of a model request where the
71
+ * host cut it. Matching is by session, tool name and call id. Nothing depends
72
+ * on the host's marker text. The store is read, not emptied: the host builds
73
+ * each request from history, so the same result is restored on every later
74
+ * request.
74
75
  */
75
76
  export declare function restoreSkillResults(store: SkillOutputStore, event: unknown): void;
76
77
  export declare const installSkills: V2Installer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fro.bot/systematic",
3
- "version": "3.35.1",
3
+ "version": "3.35.3",
4
4
  "description": "Compound-engineering loops for OpenCode, Pi, and Claude Code",
5
5
  "type": "module",
6
6
  "homepage": "https://fro.bot/systematic",
@@ -118,7 +118,7 @@
118
118
  }
119
119
  },
120
120
  "devDependencies": {
121
- "@biomejs/biome": "2.6.7",
121
+ "@biomejs/biome": "2.6.8",
122
122
  "@earendil-works/pi-coding-agent": "1.5.2",
123
123
  "@opencode-ai/plugin": "1.19.5",
124
124
  "@opencode-ai/sdk": "1.19.5",
@@ -319,7 +319,7 @@ Use subagents for context isolation when investigating multiple artifacts — no
319
319
  | **Parallel subagents** | 3+ truly independent artifacts with low overlap |
320
320
  | **Batched subagents** | Broad sweeps — narrow scope first, then investigate in batches |
321
321
 
322
- **When spawning any subagent**, omit the `mode` parameter so the user's configured permission settings apply. Include this instruction in its task prompt:
322
+ **When spawning any subagent**, dispatch without a permission-mode override so the user's configured permission settings apply. Include this instruction in its task prompt:
323
323
 
324
324
  > Use dedicated file search and read tools (Glob, Grep, Read) for all investigation. Do NOT use shell commands (ls, find, cat, grep, test, bash) for file operations. This avoids permission prompts and is more reliable.
325
325
  >
@@ -141,7 +141,7 @@ Do **not** do external research in v1.
141
141
 
142
142
  Generate the full candidate list before critiquing any idea.
143
143
 
144
- Dispatch 3-4 parallel ideation sub-agents on the inherited model (do not tier down -- creative ideation needs the orchestrator's reasoning level). Omit the `mode` parameter so the user's configured permission settings apply. Each targets ~8-10 ideas (yielding ~30 raw ideas, ~20-25 after dedupe). Adjust per-agent targets when volume overrides apply (e.g., "100 ideas" raises it, "top 3" may lower the survivor count instead).
144
+ Dispatch 3-4 parallel ideation sub-agents on the inherited model (do not tier down -- creative ideation needs the orchestrator's reasoning level). Dispatch without a permission-mode override so the user's configured permission settings apply. Each targets ~8-10 ideas (yielding ~30 raw ideas, ~20-25 after dedupe). Adjust per-agent targets when volume overrides apply (e.g., "100 ideas" raises it, "top 3" may lower the survivor count instead).
145
145
 
146
146
  Give each sub-agent: the grounding summary, the focus hint, the per-agent volume target, and an instruction to generate raw candidates only (not critique). Each agent's first few ideas tend to be obvious -- push past them. Ground every idea in the Phase 1 scan.
147
147
 
@@ -177,7 +177,7 @@ Refer to the echoed absolute path as `<scratch-dir>` throughout the rest of this
177
177
 
178
178
  ## 5.3.6 Run Targeted Research
179
179
 
180
- Launch the selected agents in parallel using the execution mode chosen above. If the current platform does not support parallel dispatch, run them sequentially instead. An agent has returned only when its final report arrives (see the active harness profile's *Dispatch results and continuation* section): wait for every report before synthesizing, and do not dispatch the same research again while one is owed. Omit the `mode` parameter when dispatching so the user's configured permission settings apply.
180
+ Launch the selected agents in parallel using the execution mode chosen above. If the current platform does not support parallel dispatch, run them sequentially instead. An agent has returned only when its final report arrives (see the active harness profile's *Dispatch results and continuation* section): wait for every report before synthesizing, and do not dispatch the same research again while one is owed. Dispatch without a permission-mode override so the user's configured permission settings apply.
181
181
 
182
182
  Prefer local repo and institutional evidence first. Use external research only when the gap cannot be closed responsibly from repo context or already-cited sources.
183
183
 
@@ -502,15 +502,15 @@ Capture the actual invoking harness once in the parent (`opencode`, `pi`, or `cl
502
502
 
503
503
  #### Spawning
504
504
 
505
- Omit the `mode` parameter when dispatching sub-agents so the user's configured permission settings apply. Do not pass `mode: "auto"`.
505
+ Dispatch sub-agents without a permission-mode override so the user's configured permission settings apply.
506
506
 
507
507
  Spawn each selected persona reviewer as a parallel sub-agent using the subagent template included below. Each persona sub-agent receives:
508
508
 
509
509
  1. Their persona file content (identity, failure modes, calibration, suppress conditions)
510
- 2. Shared diff-scope rules from the diff-scope reference included below, which say how to read one path of the pinned scope
510
+ 2. Shared diff-scope rules from the diff-scope reference included below, which say how to read one path of the pinned scope. Paste them verbatim into the `<scope-rules>` slot; never summarize or paraphrase them
511
511
  3. The JSON output contract from the reviewer return schema included below, with its populated example
512
512
  4. PR metadata: title, body, and URL when reviewing a PR (empty string otherwise). Passed in a `<pr-context>` block so reviewers can verify code against stated intent
513
- 5. Review context: intent summary and the pinned scope (checkout path, base SHA, head, and manifest). The parent passes no inline diff, so a reviewer reads one path's diff from git against those values and never recomputes the scope
513
+ 5. Review context: intent summary and the pinned scope (checkout path, base SHA, head, and manifest). The parent passes no inline diff, so a reviewer reads one path's diff from git against those values and never recomputes the scope. Fill the `{path_diff_command}` slot with the exact one-path diff command for the pinned head, leaving only `<path>` open
514
514
  6. Reviewer name for the returned `reviewer` field
515
515
  7. **Selected structured conditionals only:** the `selection_reason` and non-empty `selection_surface` from Stage 3, passed into the review context. Core personas receive empty values for both
516
516
  8. **For `project-standards` only:** the standards file path list from Stage 3b, wrapped in a `<standards-paths>` block appended to the review context
@@ -553,9 +553,9 @@ Each persona sub-agent returns one full JSON payload (all schema fields) to the
553
553
 
554
554
  Returning the detail tier inline increases parent context per persona. The previous compact/detail split kept synthesis context lean, so this is an intentional cost of deleting the sub-agent write path. Verify it against a real multi-persona run. If it materially degrades synthesis, use a second targeted request per persona and keep the write parent-side; never restore sub-agent disk access.
555
555
 
556
- **CE conditional agents** (agent-native-reviewer, learnings-researcher) are dispatched as standard Agent calls when their Stage 3 triggers apply, in parallel with the persona agents. Give them the same review context bundle the personas receive (entry mode, any PR metadata gathered in Stage 1, intent summary, review base branch name when known, the pinned checkout path, base SHA, head, and manifest, and `UNTRACKED:` scope notes, with no inline diff) plus the selection reason and triggering surface. Do not invoke them with a generic "review this" prompt. Their output is unstructured and synthesized separately in Stage 6; they never receive a raw-return dispatch record.
556
+ **CE conditional agents** (agent-native-reviewer, learnings-researcher) are dispatched as standard Agent calls when their Stage 3 triggers apply, in parallel with the persona agents. Give them the same review context bundle the personas receive (entry mode, any PR metadata gathered in Stage 1, intent summary, review base branch name when known, the pinned checkout path, base SHA, head, and manifest, and `UNTRACKED:` scope notes, with no inline diff) plus the selection reason and triggering surface. The bundle also carries the one-path rule and the exact command: read one path's diff per call with the filled-in path diff command, never run a diff or log with no path, `git diff --stat`, `git diff --name-only`, or several paths in one call, and treat the manifest as the complete file list. Do not invoke them with a generic "review this" prompt. Their output is unstructured and synthesized separately in Stage 6; they never receive a raw-return dispatch record.
557
557
 
558
- **CE conditional agents** (deployment-verification-agent) are also dispatched as standard Agent calls when applicable. Pass the same review context bundle plus the selection reason and triggering surface (for example, which migration files triggered the agent). Their output is unstructured and must be preserved for Stage 6 synthesis just like the other CE conditional agents.
558
+ **CE conditional agents** (deployment-verification-agent) are also dispatched as standard Agent calls when applicable. Pass the same review context bundle, including the one-path diff rule and command, plus the selection reason and triggering surface (for example, which migration files triggered the agent). Their output is unstructured and must be preserved for Stage 6 synthesis just like the other CE conditional agents.
559
559
 
560
560
  **CE agent gate boundary.** Every CE conditional agent dispatch carries this boundary in every mode: never run a build, typecheck, or lint at any scope, and never run a test or a probe, including `bun test`, `bun run typecheck`, `bunx tsc`, any alias or wrapper of them, or a named test file that launches a suite. Use non-mutating inspection only. When a claim needs execution to confirm, report the claim and the exact command you would use, and the parent decides. See [Verification gates](#verification-gates).
561
561
 
@@ -18,7 +18,7 @@ You are a specialist code reviewer.
18
18
  </scope-rules>
19
19
 
20
20
  <bounded-investigation>
21
- The per-path diff of the pinned scope is the primary source of truth. Read one path's diff at a time from the pinned checkout, base SHA, and head given in the review context. Do not recompute the supplied review scope: never run a diff or log across the whole range to rebuild or widen it. Use the supplied paths and line numbers, and read each unresolved surrounding range or symbol once. Re-read only when a concrete ambiguity remains or the file changed since the prior read. Stop and return a finding or verdict once the evidence is sufficient. If evidence cannot be obtained within this bounded pass, return an explicit blocker or residual risk instead of broadening the investigation indefinitely.
21
+ The per-path diff of the pinned scope is the primary source of truth. Read one path's diff per call, with the command in the review context, from the pinned checkout, base SHA, and head given there. Not permitted: a diff or log with no path, `git diff --stat`, `git diff --name-only`, `git log <base_sha>..`, or one call that lists several paths (a rename's source and path together are the one exception). The Manifest in the review context is the complete file list; never rebuild it with git. Do not recompute the supplied review scope: never run a diff or log across the whole range to rebuild or widen it. Use the supplied paths and line numbers, and read each unresolved surrounding range or symbol once. Re-read only when a concrete ambiguity remains or the file changed since the prior read. Stop and return a finding or verdict once the evidence is sufficient. If evidence cannot be obtained within this bounded pass, return an explicit blocker or residual risk instead of broadening the investigation indefinitely.
22
22
  </bounded-investigation>
23
23
 
24
24
  <output-contract>
@@ -119,6 +119,12 @@ Selection surface: {selection_surface}
119
119
 
120
120
  Pinned review scope. Do not recompute the supplied review scope, and do not widen it. No diff is inlined here: read one path's diff from git as the scope rules describe.
121
121
 
122
+ The Manifest below is the complete file list; never rebuild it with git.
123
+
124
+ Read one path's diff with this command, replacing `<path>` with one Manifest path: {path_diff_command}
125
+
126
+ Read old source, including a deleted file, with: git -C {checkout_path} show {base_sha}:<path>
127
+
122
128
  Checkout: {checkout_path}
123
129
 
124
130
  Base SHA: {base_sha}
@@ -142,6 +148,7 @@ Manifest (path, status, rename source, added lines, deleted lines):
142
148
  | `{checkout_path}` | Stage 1 pinned scope | The absolute path of the authoritative checkout. Every git command targets it |
143
149
  | `{base_sha}` | Stage 1 pinned scope | The full base SHA. Old source comes from this commit |
144
150
  | `{head}` | Stage 1 pinned scope | The checked-out commit SHA, or `working tree` when the checkout was dirty. It selects how a path's diff is read |
151
+ | `{path_diff_command}` | Stage 1 pinned scope | The one-path diff command with the checkout path, base SHA, and head filled in, and `<path>` left for the reviewer. When the head is a commit: `git -C <checkout_path> diff -U10 <base_sha> <head> -- <path>`. When the head is "working tree": `git -C <checkout_path> diff -U10 <base_sha> -- <path>` |
145
152
  | `{manifest}` | Stage 1 pinned scope | One entry per changed path: path, status (`A`, `M`, `D`, `R`, or `T`), rename source, and added and deleted line counts |
146
153
  | `{reviewer_name}` | Stage 3 output | Persona name used in the returned `reviewer` field |
147
154
  | `{selection_reason}` | Stage 3 output | One-line reason this conditional persona was selected. Empty for core personas, which have no selection condition |
@@ -51,6 +51,8 @@ Set `outcome: "false"` when any question is NO, and state which question failed
51
51
  <pinned-scope>
52
52
  You receive the same pinned scope as the reviewers: the checkout path, base SHA, head, and manifest in the review context. Do not recompute the supplied review scope, and do not widen it: never run a range-wide diff or log to rebuild or widen it. Run every git command against the pinned checkout.
53
53
 
54
+ Read one path's diff per call. Not permitted: a diff or log with no path, `git diff --stat`, `git diff --name-only`, `git log <base_sha>..`, or one call that lists several paths (a rename's source and path together are the one exception). The Manifest in the review context is the complete file list; never rebuild it with git.
55
+
54
56
  - Diff of the cited path, when the head is a commit: `git -C <checkout_path> diff -U10 <base_sha> <head> -- <path>`.
55
57
  - Diff of the cited path, when the head is "working tree": `git -C <checkout_path> diff -U10 <base_sha> -- <path>`.
56
58
  - A renamed path (status `R`): pass the rename source and the path together in the same diff.
@@ -164,7 +164,7 @@ Determine how to proceed based on what was provided in `<input_document>`.
164
164
  - Instruct each subagent: "Do not stage files (`git add`), create commits, or run the project test suite. The orchestrator handles testing, staging, and committing after all parallel units complete."
165
165
  - These constraints prevent git index contention and test interference between concurrent subagents
166
166
 
167
- **Permission mode:** Omit the `mode` parameter when dispatching subagents so the user's configured permission settings apply. Do not pass `mode: "auto"` — it overrides user-level settings like `bypassPermissions`.
167
+ **Permission mode:** Dispatch subagents without a permission-mode override so the user's configured permission settings apply. The active harness profile names any harness-specific rule.
168
168
 
169
169
  **Collecting results:** a subagent has completed only when its final report arrives; a launch handle is not a result. The active harness profile's *Dispatch results and continuation* section defines the final report and the continuation call. Record each subagent's id at dispatch, wait for its report without dispatching the same unit again, and continue a subagent through the profile-named call rather than starting a replacement.
170
170
 
@@ -117,7 +117,7 @@ Add activated conditional personas:
117
117
 
118
118
  ### Dispatch
119
119
 
120
- Dispatch all agents in **parallel** using the platform's task/agent tool (e.g., Agent tool in OpenCode, spawn in Codex). Omit the `mode` parameter so the user's configured permission settings apply. Each agent receives the prompt built from the subagent template included below with these variables filled:
120
+ Dispatch all agents in **parallel** using the platform's task/agent tool (e.g., Agent tool in OpenCode, spawn in Codex). Dispatch without a permission-mode override so the user's configured permission settings apply. Each agent receives the prompt built from the subagent template included below with these variables filled:
121
121
 
122
122
  | Variable | Value |
123
123
  |----------|-------|
@@ -18,6 +18,8 @@ Behavioral enforcement on Claude Code rides a plugin output style (force-for-plu
18
18
  Use the systematic-implementer subagent to implement the auth module and return the changed files.
19
19
  ```
20
20
 
21
+ Omit the `mode` parameter when dispatching subagents so the user's configured permission settings apply. Do not pass `mode: "auto"`: it overrides user-level settings like `bypassPermissions`.
22
+
21
23
  ### Dispatch results and continuation
22
24
 
23
25
  Each subagent call starts a new instance, and the agent id comes with the dispatch result. Record it at dispatch, against the task it was given. Continue that subagent with `SendMessage` with `to` set to that agent id and the follow-up as the message: a finished subagent resumes in the background, and its reply arrives later as a report. The built-in Explore and Plan agents are one-shot and return no agent id, so they cannot be continued. Dispatching the same subagent by name again starts a new one, not a continuation.
@@ -41,11 +41,6 @@ uses the canonical `systematic:<category>:<name>` form instead, which the
41
41
  content-integrity gate validates against real agent files. Leave `model` unset
42
42
  unless the user names a model.
43
43
 
44
- Both forms are enforced. Examples in bundled content must name agents this
45
- package actually ships, so they work for every reader. A host may provide
46
- additional agents through the user's own configuration; those are available at
47
- runtime but must not appear in bundled examples.
48
-
49
44
  ### Dispatch results and continuation
50
45
 
51
46
  From 2.3.0, `subagent` returns immediately with a handle, not the child's answer: a `sessionID` and `status: "running"`. Record the `sessionID` at dispatch, against the task it was given. The answer arrives later as a `<subagent sessionID="…" state="…">` message that starts a new parent turn, and the message body is the child's answer. Do not poll, sleep or dispatch the same work again while the child runs.