@north-light/crouter 0.3.208 → 0.3.209

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.
Files changed (138) hide show
  1. package/dist/api/client.d.ts +3 -1
  2. package/dist/api/client.js +4 -0
  3. package/dist/api/dto/broker-ops.d.ts +2 -12
  4. package/dist/api/dto/nodes.d.ts +16 -0
  5. package/dist/api/routes.d.ts +1 -0
  6. package/dist/api/routes.js +1 -0
  7. package/dist/builtin-memory/00-runtime-base.md +3 -2
  8. package/dist/builtin-memory/01-spine/00-has-manager.md +3 -2
  9. package/dist/builtin-memory/01-spine/01-no-manager.md +3 -2
  10. package/dist/builtin-memory/02-lifecycle/00-terminal.md +3 -2
  11. package/dist/builtin-memory/02-lifecycle/01-resident.md +3 -2
  12. package/dist/builtin-memory/04-base-worker.md +3 -2
  13. package/dist/builtin-memory/04-orchestration-kernel.md +3 -2
  14. package/dist/builtin-memory/05-kinds/advisor/00-base.md +3 -2
  15. package/dist/builtin-memory/05-kinds/advisor/01-orchestrator.md +3 -2
  16. package/dist/builtin-memory/05-kinds/design/00-base.md +3 -2
  17. package/dist/builtin-memory/05-kinds/design/01-orchestrator.md +3 -2
  18. package/dist/builtin-memory/05-kinds/developer/00-base.md +3 -2
  19. package/dist/builtin-memory/05-kinds/developer/01-orchestrator.md +3 -2
  20. package/dist/builtin-memory/05-kinds/explore/00-base.md +3 -2
  21. package/dist/builtin-memory/05-kinds/explore/01-orchestrator.md +3 -2
  22. package/dist/builtin-memory/05-kinds/general/00-base.md +3 -2
  23. package/dist/builtin-memory/05-kinds/general/01-orchestrator.md +3 -2
  24. package/dist/builtin-memory/05-kinds/plan/00-base.md +3 -2
  25. package/dist/builtin-memory/05-kinds/plan/01-orchestrator.md +3 -2
  26. package/dist/builtin-memory/05-kinds/plan/reviewers/00-base.md +3 -2
  27. package/dist/builtin-memory/05-kinds/plan/reviewers/architecture-fit.md +3 -2
  28. package/dist/builtin-memory/05-kinds/plan/reviewers/code-smells.md +3 -2
  29. package/dist/builtin-memory/05-kinds/plan/reviewers/pattern-consistency.md +3 -2
  30. package/dist/builtin-memory/05-kinds/plan/reviewers/requirements-coverage.md +3 -2
  31. package/dist/builtin-memory/05-kinds/plan/reviewers/security.md +3 -2
  32. package/dist/builtin-memory/05-kinds/review/00-base.md +3 -2
  33. package/dist/builtin-memory/05-kinds/review/01-orchestrator.md +3 -2
  34. package/dist/builtin-memory/05-kinds/review/companion/00-base.md +3 -2
  35. package/dist/builtin-memory/05-kinds/spec/00-base.md +3 -2
  36. package/dist/builtin-memory/05-kinds/spec/01-orchestrator.md +3 -2
  37. package/dist/builtin-memory/05-kinds/spec/requirements.md +3 -2
  38. package/dist/builtin-memory/advisor/council.md +0 -2
  39. package/dist/builtin-memory/design.md +3 -2
  40. package/dist/builtin-memory/development.md +3 -2
  41. package/dist/builtin-memory/insights/capture.md +1 -3
  42. package/dist/builtin-memory/insights/init.md +1 -3
  43. package/dist/builtin-memory/insights/listen.md +3 -2
  44. package/dist/builtin-memory/internal/INDEX.md +5 -4
  45. package/dist/builtin-memory/internal/agent-shaping.md +5 -4
  46. package/dist/builtin-memory/internal/examples/INDEX.md +3 -2
  47. package/dist/builtin-memory/internal/examples/imessage-assistant.md +3 -2
  48. package/dist/builtin-memory/internal/marketplaces.md +3 -2
  49. package/dist/builtin-memory/internal/memory-loading.md +31 -20
  50. package/dist/builtin-memory/internal/nodes-and-canvas.md +3 -2
  51. package/dist/builtin-memory/internal/plugins.md +7 -6
  52. package/dist/builtin-memory/internal/storage-tiers.md +3 -2
  53. package/dist/builtin-memory/plan/roadmap.md +3 -2
  54. package/dist/builtin-memory/spec/guide.md +0 -2
  55. package/dist/builtin-memory/spec/requirements.md +0 -2
  56. package/dist/builtin-memory/spec/roadmap.md +3 -2
  57. package/dist/builtin-memory/testing.md +1 -3
  58. package/dist/builtin-memory/wedged-child-on-runaway-bash.md +3 -2
  59. package/dist/builtin-pi-packages/pi-crtr-extensions/README.md +1 -1
  60. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/frontmatter-rules/index.ts +3 -3
  61. package/dist/builtin-pi-packages/pi-crtr-extensions/extensions/memory-slash-commands.ts +1 -4
  62. package/dist/clients/attach/viewer.js +366 -366
  63. package/dist/commands/memory/delete.js +3 -18
  64. package/dist/commands/memory/edit.js +23 -30
  65. package/dist/commands/memory/history.js +1 -1
  66. package/dist/commands/memory/lint.d.ts +7 -8
  67. package/dist/commands/memory/lint.js +178 -132
  68. package/dist/commands/memory/list.d.ts +0 -1
  69. package/dist/commands/memory/list.js +2 -12
  70. package/dist/commands/memory/move.d.ts +1 -0
  71. package/dist/commands/memory/move.js +195 -0
  72. package/dist/commands/memory/read.js +135 -141
  73. package/dist/commands/memory/shared.d.ts +18 -17
  74. package/dist/commands/memory/shared.js +93 -39
  75. package/dist/commands/memory/write.js +23 -33
  76. package/dist/commands/memory.js +5 -4
  77. package/dist/commands/pkg/browse/catalog.js +2 -4
  78. package/dist/commands/pkg/browse/doc-view.js +17 -11
  79. package/dist/commands/pkg/browse/model.d.ts +7 -9
  80. package/dist/commands/sys/migrate.d.ts +1 -0
  81. package/dist/commands/sys/migrate.js +106 -0
  82. package/dist/commands/sys/sync-deps.js +5 -10
  83. package/dist/commands/sys/sync-project-guidance.js +36 -16
  84. package/dist/commands/sys/sync-skills.js +8 -4
  85. package/dist/commands/sys.js +3 -2
  86. package/dist/core/__tests__/inline-memory-refs.test.js +8 -5
  87. package/dist/core/__tests__/memory-resolver-precedence.test.js +5 -4
  88. package/dist/core/__tests__/nested-store-discovery.test.js +1 -3
  89. package/dist/core/__tests__/on-read-crouter-home-fence.test.js +3 -3
  90. package/dist/core/__tests__/on-read-dedup-resume.test.js +12 -12
  91. package/dist/core/__tests__/on-read-nested-store.test.js +23 -20
  92. package/dist/core/canvas/db.d.ts +3 -1
  93. package/dist/core/canvas/db.js +12 -2
  94. package/dist/core/memory/history.d.ts +4 -1
  95. package/dist/core/memory/history.js +1 -0
  96. package/dist/core/memory/inline-ref-inventory.d.ts +5 -4
  97. package/dist/core/memory/inline-ref-inventory.js +23 -19
  98. package/dist/core/memory-resolver.d.ts +4 -4
  99. package/dist/core/memory-resolver.js +16 -43
  100. package/dist/core/runtime/bearings.d.ts +4 -3
  101. package/dist/core/runtime/bearings.js +4 -4
  102. package/dist/core/runtime/broker-extension-render.d.ts +3 -2
  103. package/dist/core/runtime/broker-extension-render.js +3 -3
  104. package/dist/core/runtime/memory.js +2 -3
  105. package/dist/core/substrate/index.d.ts +7 -4
  106. package/dist/core/substrate/index.js +6 -4
  107. package/dist/core/substrate/injected-store.d.ts +24 -12
  108. package/dist/core/substrate/injected-store.js +80 -33
  109. package/dist/core/substrate/listings.d.ts +21 -0
  110. package/dist/core/substrate/listings.js +88 -0
  111. package/dist/core/substrate/on-read-node.d.ts +5 -5
  112. package/dist/core/substrate/on-read-node.js +4 -5
  113. package/dist/core/substrate/on-read.d.ts +25 -4
  114. package/dist/core/substrate/on-read.js +81 -102
  115. package/dist/core/substrate/render-node.d.ts +5 -2
  116. package/dist/core/substrate/render-node.js +5 -3
  117. package/dist/core/substrate/render.d.ts +9 -8
  118. package/dist/core/substrate/render.js +104 -96
  119. package/dist/core/substrate/schema.d.ts +34 -18
  120. package/dist/core/substrate/schema.js +75 -32
  121. package/dist/core/substrate/surface-match.d.ts +32 -0
  122. package/dist/core/substrate/surface-match.js +179 -0
  123. package/dist/daemon/api/handlers/nodes.js +9 -0
  124. package/dist/migrations/001-surfaces-frontmatter.d.ts +2 -0
  125. package/dist/migrations/001-surfaces-frontmatter.js +276 -0
  126. package/dist/migrations/convergent.d.ts +31 -0
  127. package/dist/migrations/convergent.js +71 -0
  128. package/dist/migrations/registry.d.ts +2 -0
  129. package/dist/migrations/registry.js +19 -0
  130. package/dist/migrations/types.d.ts +40 -0
  131. package/dist/migrations/types.js +11 -0
  132. package/dist/pi-extensions/canvas-context-intro.d.ts +2 -1
  133. package/dist/pi-extensions/canvas-doc-substrate.d.ts +2 -1
  134. package/dist/pi-extensions/canvas-doc-substrate.js +57 -34
  135. package/package.json +1 -1
  136. package/runtime.lock.json +2 -2
  137. package/dist/core/substrate/ceiling.d.ts +0 -17
  138. package/dist/core/substrate/ceiling.js +0 -67
@@ -1,6 +1,6 @@
1
1
  import type { DaemonRestartDTO, HealthDTO, StatusDTO } from './dto/health.js';
2
2
  import type { BashJobStatusDTO, BashJobStopResultDTO } from './dto/bash-jobs.js';
3
- import type { ArtifactListDTO, ArtifactsQuery, ContextListDTO, CreateNodeRequest, ListNodesQuery, NodeDetailDTO, NodeMessagesPageDTO, NodeMessagesQuery, NodeSessionDTO, NodeSnapshotDTO, NodeSummaryDTO, TranscriptDTO, TranscriptQuery } from './dto/nodes.js';
3
+ import type { ArtifactListDTO, ArtifactsQuery, ContextListDTO, CreateNodeRequest, ListNodesQuery, NodeDetailDTO, NodeMessagesPageDTO, NodeMessagesQuery, NodeSessionDTO, NodeSnapshotDTO, NodeSubjectDTO, NodeSummaryDTO, TranscriptDTO, TranscriptQuery } from './dto/nodes.js';
4
4
  import type { InterruptResultDTO, MessageResultDTO, SendMessageRequest } from './dto/messages.js';
5
5
  import type { PushReportRequest, PushReportResultDTO, ReportDTO, ReportsQuery } from './dto/reports.js';
6
6
  import type { CloseRequest, CloseResultDTO, PromoteRequest, RelaunchRootResultDTO, ReviveRequest, ReviveResultDTO, WaitRequest, YieldRequest } from './dto/lifecycle.js';
@@ -143,6 +143,8 @@ export declare class CrtrClient {
143
143
  getReports(id: string, q?: ReportsQuery): Promise<ReportDTO[]>;
144
144
  getTranscript(id: string, q?: TranscriptQuery): Promise<TranscriptDTO>;
145
145
  getSnapshot(id: string): Promise<NodeSnapshotDTO>;
146
+ /** The node-config subject substrate gates evaluate against. */
147
+ nodeSubject(id: string): Promise<NodeSubjectDTO>;
146
148
  getNodeMessages(id: string, q?: NodeMessagesQuery): Promise<NodeMessagesPageDTO>;
147
149
  /** The node's conversation exactly as it ran — raw `.jsonl` bytes plus the
148
150
  * assembled system prompt. For exports; `getSnapshot` is for renderers. */
@@ -253,6 +253,10 @@ export class CrtrClient {
253
253
  getSnapshot(id) {
254
254
  return this.request('GET', routes.nodeSnapshot(this.nodePath(id)));
255
255
  }
256
+ /** The node-config subject substrate gates evaluate against. */
257
+ nodeSubject(id) {
258
+ return this.request('GET', routes.nodeSubject(this.nodePath(id)));
259
+ }
256
260
  getNodeMessages(id, q) {
257
261
  return this.request('GET', withQuery(routes.nodeMessages(this.nodePath(id)), q));
258
262
  }
@@ -1,4 +1,5 @@
1
1
  import type { ExitIntentDTO, NodeStatusDTO } from './common.js';
2
+ import type { NodeSubjectDTO } from './nodes.js';
2
3
  /** `POST /v1/nodes/{id}/broker/session-bound` body. Pi's session-start reason
3
4
  * distinguishes an ordinary boot/resume from `/new`, whose child-side session
4
5
  * reset is a different durable operation. `reviewBoundaryIds` reports only the
@@ -95,18 +96,7 @@ export interface BrokerExtensionNodeDTO {
95
96
  };
96
97
  created: string;
97
98
  }
98
- export interface BrokerExtensionSubjectDTO {
99
- kind: string;
100
- mode: 'base' | 'orchestrator';
101
- lifecycle: 'terminal' | 'resident';
102
- hasManager: boolean;
103
- cwd: string;
104
- scope: 'user' | 'project';
105
- orchestration: {
106
- depth: number;
107
- };
108
- profile: string | null;
109
- }
99
+ export type BrokerExtensionSubjectDTO = NodeSubjectDTO;
110
100
  /** One resolved report sender. Report contents stay broker-local filesystem
111
101
  * data; this daemon projection supplies only existence and display metadata. */
112
102
  export interface BrokerReportNodeDTO {
@@ -1,4 +1,20 @@
1
1
  import type { Cursor, ExitIntentDTO, IsoTime, LifecycleDTO, ModeDTO, NodeIdDTO, NodeStatusDTO } from './common.js';
2
+ /** `GET /v1/nodes/{id}/subject` — the node-config subject substrate gate
3
+ * predicates evaluate against. Mirrors `NodeConfigSubject`; this narrow
4
+ * endpoint exists so a CLI process (the `memory read` leaf) can gate-check
5
+ * docs without reaching canvas state. */
6
+ export interface NodeSubjectDTO {
7
+ kind: string;
8
+ mode: ModeDTO;
9
+ lifecycle: LifecycleDTO;
10
+ hasManager: boolean;
11
+ cwd: string;
12
+ scope: 'user' | 'project';
13
+ orchestration: {
14
+ depth: number;
15
+ };
16
+ profile: string | null;
17
+ }
2
18
  /** `POST /v1/nodes` body. Carries the full immediate spawn recipe. */
3
19
  export interface CreateNodeRequest {
4
20
  kind: string;
@@ -9,6 +9,7 @@ export declare const routes: {
9
9
  readonly reviveAll: () => string;
10
10
  readonly node: (id: string) => string;
11
11
  readonly nodeSnapshot: (id: string) => string;
12
+ readonly nodeSubject: (id: string) => string;
12
13
  readonly nodeSession: (id: string) => string;
13
14
  readonly nodeTranscript: (id: string) => string;
14
15
  readonly nodeContext: (id: string) => string;
@@ -25,6 +25,7 @@ export const routes = {
25
25
  node: (id) => `${V}/nodes/${id}`,
26
26
  // Node reads
27
27
  nodeSnapshot: (id) => `${V}/nodes/${id}/snapshot`,
28
+ nodeSubject: (id) => `${V}/nodes/${id}/subject`,
28
29
  nodeSession: (id) => `${V}/nodes/${id}/session`,
29
30
  nodeTranscript: (id) => `${V}/nodes/${id}/transcript`,
30
31
  nodeContext: (id) => `${V}/nodes/${id}/context`,
@@ -1,8 +1,6 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When any node boots, this preference should be read so the node can participate safely in the live graph without losing work, user decisions, or the ability to resume.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  rationale: >-
7
5
  The living-document paragraph under "Reports vs artifacts" exists because agents default to appending — plans kept old+new versions side by side, answered Q&A sections stayed behind after the answer was folded in, findings docs grew contradicted layers (observed by Silas, 2026-07-08). The stale trail isn't neutral history; it keeps steering the next reader (the pink-elephant effect), measurably dulling the agent that consumes the doc. Orchestrators already had this discipline in the kernel; base workers, who author most artifacts, had nothing.
8
6
 
@@ -12,6 +10,9 @@ rationale: >-
12
10
 
13
11
  The Mermaid line exists because the viewer's inline diagram affordance is otherwise invisible to an agent working from ordinary Markdown defaults.
14
12
  lint-ignore: length
13
+ surfaces:
14
+ - on: boot
15
+ at: content
15
16
  ---
16
17
 
17
18
  You are a **node** in a live agent graph (the crtr canvas). This section is your operating protocol — it is true for every node regardless of role.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node has a parent subscribed to it, this preference should be read so progress, blockers, and scope changes actually reach the manager at the right urgency.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {hasManager: true}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  ## Reporting up (the feed)
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node has no parent, this preference should be read so its results reach the user instead of disappearing into a nonexistent manager feed.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {hasManager: false}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  ## Top of your spine
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is terminal (a worker that owes a final result), this preference should be read so completed work reaches subscribers and unfinished waiting work is not accidentally reaped.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {lifecycle: terminal}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  ## Finishing — the one rule that matters
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is resident (never forced to a final result), this preference should be read so conversations can pause and resume without the node closing itself midstream.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {lifecycle: resident}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  ## How you end
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node runs in base mode, this preference should be read so bounded work completes hands-on instead of recursing through a chain of delegates.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {mode: base}
7
5
  rationale: >-
8
6
  A base security reviewer handed its entire assignment to another base security reviewer, which repeated the move through a 35-node chain in under five minutes. The universal prompt had said to delegate any self-contained work while no base-mode layer told sub-kinds to work hands-on; exact sub-kind gating also meant plan/reviewers/security did not inherit plan/00-base.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  ## You are a hands-on worker
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is an orchestrator, this preference should be read so worthwhile parallel work progresses coherently across delegation and refresh without quality or context being lost.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {mode: orchestrator}
7
5
  rationale: >-
8
6
  Two observed orchestration failures set this kernel's stopping rules. A sole-writer feature lane produced a 5-deep 1:1 developer/orchestrator chain by repeatedly delegating the whole assignment; separately, the kernel's “idle capacity,” “maximum agents,” and “when in doubt, more rigor” objective helped produce review-only subtrees as large as 87 nodes and five levels deep. Coordination must optimize new evidence toward the goal rather than node count or process length.
9
7
  lint-ignore: length
8
+ surfaces:
9
+ - on: boot
10
+ at: content
10
11
  ---
11
12
 
12
13
  ## You are an orchestrator
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind advisor, this preference should be read so diagnoses are grounded in evidence and consequential tradeoffs lead to a defensible recommendation.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: advisor}
7
5
  rationale: >-
8
6
  the reciprocal of explore's model-tier economics — judgment, debugging, and tradeoff work need the slow/expensive think-y tier, so it is fenced into its own kind rather than left as a per-task instruction. The orchestrator variant is the council: reach for it only when the call is consequential enough to fund deliberation — the ordinary case is still one advisor (or a few, un-orchestrated), not a fan-out.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Ground advice in evidence. Inspect the code, logs, repro steps, prior reports, or runtime state needed to understand the situation; do not answer from vibes when the facts are available. For debugging, drive toward the smallest credible root cause: reproduce or trace the failure, separate symptoms from causes, and name the file, command, invariant, or design assumption that explains it.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind advisor in orchestrator mode, this preference should be read so independent judgment survives synthesis and confident consensus does not hide correlated error.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: advisor, mode: orchestrator}
7
5
  rationale: >-
8
6
  Everyone's instinct for getting the right answer out of a council is to make the agents debate until they agree — and that instinct is empirically backwards. Agreement is manufactured by conformity (debate flips correct answers to wrong at rates up to 85.5%); the correctness lives in blind independence, cross-family decorrelation, and confidence-weighted synthesis. Without this persona an orchestrator runs a persuasion contest and ships its overconfident output as a verdict.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Use a council only when the cost of a wrong consequential judgment warrants deliberation; an ordinary second opinion needs one advisor or a few un-orchestrated advisors.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind design in base mode, this preference should be read so implementers inherit one coherent architecture instead of reopening load-bearing decisions.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: design, mode: base}
7
5
  rationale: >-
8
6
  senior-engineer architecture thinking — cross-service, high-level decisions (performance, db design, patterns) worked out interactively with the user, deliberately not taking the most obvious solution. Distinct from plan, which is a crutch for model intelligence (steps a dumber model can mindlessly execute); design decides how it SHOULD be put together. Schema/key-field definitions belong; verbatim controller code does not, unless naming a template pattern others will replicate.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a design agent. Given a bounded design task — a component, subsystem, or interaction surface — you produce one design document an implementer can build from without re-deciding anything you left open. That, not emitting a document, is the bar for done. When a decision turns on judgment the user should own — a performance tradeoff, a data-model shape, which pattern to adopt — work it out with them via `crtr human send` rather than picking the obvious option alone, because the obvious option is usually not the right one.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind design in orchestrator mode, this preference should be read so parallel sub-designs compose across their interfaces instead of producing a fragmented or contradictory architecture.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: design, mode: orchestrator}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  You are a **design orchestrator** — you own a design effort whose independent surfaces make parallel design worthwhile, and you deliver one coherent result by delegating each bounded sub-design to a `design` child and integrating what returns into a unified artifact.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind developer in base mode, this preference should be read so implementation is proven against the requested behavior rather than declared done at compile time.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: developer, mode: base}
7
5
  rationale: >-
8
6
  Agents treated polish as a completion dependency, spending long iterations on nits while their parents could not advance the larger build. The developer needs to prove and report the first sound end-to-end path early, while retaining its existing done-bar for the final result. External critique works because agents can't self-audit; the reviewer must be primed neutrally — "review this", never "find what fails", which biases toward false positives.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Work directly. Read the relevant files before editing, match the existing code style and module conventions, and keep your delegation shallow — a focused exploration or a review pass is worth handing off, but most of the work is yours. Throw errors early; no silent fallbacks. Break things correctly rather than patching them badly. Compatibility is governed by the approved spec or migration decision.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind developer in orchestrator mode, this preference should be read so feature-sized builds move coherently from implementation through independent review and end-to-end validation.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: developer, mode: orchestrator}
7
5
  rationale: >-
8
6
  Developer orchestrators need fact-dependent decisions sequenced behind shared evidence without blocking independent work. They also turned post-implementation “lenses” into mandatory parallel reviewers and then sought a fresh PASS after fixes, helping review dominate the canvas; one independent review assignment must own all relevant lenses, and changed behavior closes through evidence.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Before you shape a software roadmap, read `crtr memory read development` for development styles, roadmap shapes, and exit criteria that fit the goal's risk.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind explore in base mode, this preference should be read so unfamiliar code is mapped quickly with traceable evidence and judgment-heavy questions are left to the appropriate specialist.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: explore, mode: base}
7
5
  rationale: >-
8
6
  Explore defaults to a fast/cheap model, right for current-state compression and wrong for judgment. Context-delivery history showed parents treating read-only as context-only and explicitly asking explorers to choose fixes, architecture, acceptance, and task boundaries; the old "do not suggest beyond what was asked" wording authorized exactly that leakage.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Your work is **read-only evidence gathering** — map what exists, where it lives, how it behaves, and which constraints, gaps, or feasibility limits the source proves.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind explore in orchestrator mode, this preference should be read so a large research surface is covered deeply without exhausting one context or returning disconnected scout notes.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: explore, mode: orchestrator}
7
5
  rationale: >-
8
6
  Large scout fan-outs amplify role leakage when a coordinator treats target-state choices as research; the synthesis must preserve the current-state evidence boundary of every scout.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Decompose the factual surface — by subsystem, directory, layer, or sub-question — into areas small enough for one base `explore` scout to map well, and delegate each a sharp, self-contained evidence question. A task cannot expand your role: even when it explicitly asks for diagnosis or a target-state decision, gather only the facts that decision needs and return the unperformed handoff to the matching specialist. Do not assign decision work to a scout or make it during synthesis. Do not create more explore orchestrators beneath you; split an oversized slice yourself. Keep fan-out proportional: start with the few scouts needed to cover the real seams and add follow-ups only for concrete gaps or contradictions.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind general in base mode, this preference should be read so the default node acts decisively and reshapes itself when a specialist discipline would produce a better result.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: general, mode: base}
7
5
  rationale: >-
8
6
  the default kind the user spawns with, not custom-shaped for the task, so it is the most likely to need to polymorph or reshape its own config mid-flight — the persona's job is maximum self-agency over its own state, not a discipline correction.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  When a specialist discipline better fits the task, run `crtr node config -h` and respecialize yourself, because keeping a generic persona would discard the behavior that owns the outcome.
@@ -1,7 +1,8 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind general in orchestrator mode, this preference should be read so mixed goals are decomposed to the right specialists instead of being handled shallowly by a catch-all.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: general, mode: orchestrator}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan in base mode, this preference should be read so ambiguities and unsafe task boundaries are resolved before implementation makes them expensive.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan, mode: base}
7
5
  rationale: >-
8
6
  a performance boost, not ceremony — issues are far cheaper to spot in a plan than in implemented code, and a plan lets a dumber model mindlessly execute successfully. Leverage compounds upstream: 1.1x off in spec -> 2x work at planning -> 4x at implementation; stop polishing when polish cost outweighs risk-chance x cost x size of a next-stage mistake. "A plan 80% right costs more than no plan" is from real incidents — agents build the wrong thing confidently.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a planning agent. Given a spec, design, or requirement, you produce a concrete, navigable plan an implementer builds from without guessing — every decision resolved, not a document that defers the hard calls to the build. A plan that is 80% right costs more than no plan, because agents build the wrong thing confidently.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan in orchestrator mode, this preference should be read so cross-domain work becomes one parallel-safe, reviewed execution map rather than conflicting part-plans.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan, mode: orchestrator}
7
5
  rationale: >-
8
6
  The always-loaded plan persona mandated five parallel review lenses and told load-bearing plans to loop review → revise → re-review until quiet. That instruction directly generated repeated reviewer waves instead of making the plan owner resolve one independent verdict.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Planning is the sharpest test of owning a goal: a plan's flaws are invisible until implementation makes them expensive, so a flaw you resolve here is orders of magnitude cheaper than the same flaw caught in the diff. Before you shape the roadmap, read `crtr memory read plan/roadmap`, especially **Plan Shapes and the Decomposition Decision**, **What a Good Task Looks Like**, and **Plan Review**.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as a plan reviewer sub-kind, this preference should be read so every review lens returns evidence rather than an invented gate or truncated verdict.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: {imatches: "^plan/reviewers/"}}
7
5
  rationale: >-
8
6
  Exact sub-kind gates mean plan reviewers do not inherit review/00-base, so their common independent-review contract was duplicated across five lens prompts.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You deliver an independent plan-review verdict through your assigned lens. **Detect; do not adjudicate.** Work only from the plan, its stated inputs, and source in scope. Report evidence-backed findings; the plan's owner decides what blocks. A clean result is valid and expected — say so plainly. Deliver the complete, self-contained assessment, nothing truncated.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan/reviewers/architecture-fit, this preference should be read so a plan cannot satisfy requirement wording while structurally missing the intended outcome.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan/reviewers/architecture-fit}
7
5
  rationale: >-
8
6
  the lens that checks the plan actually ACHIEVES what the spec promised — semantic achievement of intent, distinct from requirement->task mapping (requirements-coverage) and convention adherence (pattern-consistency).
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are an **architecture-fit reviewer**. Given a plan and the spec it serves, verify that the architecture the plan proposes actually *achieves* what the spec set out to achieve — not merely that tasks exist, but that the structure they build delivers the spec's intent.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan/reviewers/code-smells, this preference should be read so expensive design flaws are caught before they become code.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan/reviewers/code-smells}
7
5
  rationale: >-
8
6
  agents produce design flaws that are cheap to catch at plan stage and expensive after code exists; the lens is the smell-hunting disposition, not a fixed checklist — all smells are bad.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a **code-smells / design reviewer**. Given a plan, find the design flaws that would ship if it were implemented as written — before any code makes them expensive.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan/reviewers/pattern-consistency, this preference should be read so implementation fits existing boundaries and conventions rather than duplicating responsibilities or inventing incompatible patterns.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan/reviewers/pattern-consistency}
7
5
  rationale: >-
8
6
  agents invent conventions instead of matching local ones; the file:line citation requirement keeps a reviewer's own taste from masquerading as a violation. Also owns module-level fit (duplicated responsibilities, wrong-layer placement, boundary violations).
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a **pattern-consistency reviewer**. Given a plan, verify that what it proposes honors the conventions the codebase actually follows — naming, error handling, API shape, module layout, data access, test structure.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan/reviewers/requirements-coverage, this preference should be read so dropped or reinterpreted requirements are caught before an implementer unknowingly builds the wrong thing.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan/reviewers/requirements-coverage}
7
5
  rationale: >-
8
6
  catches tasks that quietly drop or REINTERPRET spec requirements; only valuable against the spec's requirements — plan-internal consistency checks ("did it use the table the plan said it would") are useless because agents don't make that mistake.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a **requirements-coverage reviewer**. Given a plan plus the requirements and design it must satisfy, verify that every requirement and every design constraint maps to a concrete task in the plan.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind plan/reviewers/security, this preference should be read so reachable exploit paths are caught early without flooding the owner with theoretical concerns.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: plan/reviewers/security}
7
5
  rationale: >-
8
6
  An over-flagging reviewer flooded plans with theoretical concerns and treated private, company-owned firewalled services like hostile public boundaries. Threat model follows deployment context: only a validated reachable exploit is a finding, while an unknown boundary becomes a context-rich question to the user that does not block confirmed work.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a **security reviewer**. Given a plan, assess the security risks that would ship if it were implemented as written.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind review in base mode, this preference should be read so the owner receives an accurate independent verdict instead of manufactured findings or a reviewer-imposed gate.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: review, mode: base}
7
5
  rationale: >-
8
6
  Agents don't want to fail — point one at working code with “find the issues” and it hallucinates issues rather than come back empty; they also project an internet-facing threat model onto private systems and block on hypothetical risks. Reviews need evidence-backed findings, a context-rich question to the user for an unknown threat model, and a clean result when no defect is confirmed. Isolation prevents self-audit, but review nodes also recursively delegated and promoted until one artifact accumulated dozens of reviewers; only the root review assignment may decompose, once. Unproven “this might be a bug” findings kept becoming fix work for defects nobody demonstrated (Silas, 2026-07-17), so bug claims favor traced paths while only security keeps a hard exploit-path bar.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You **detect; you do not adjudicate.** Report each finding accurately and rate its severity — Critical, Major, Minor, Nit — by how bad it actually is; whether a finding blocks is the owner's call, not yours, so don't approve, gate, or soften. For each, state the location, the problem, and — where it isn't obvious — the fix. Cover the whole surface you were given. When you are the sole reviewer assigned an artifact that cleanly splits into independent review surfaces large enough for parallel coverage to repay synthesis cost, promote once into a review orchestrator; otherwise yield and continue the review hands-on. A slice delegated by another reviewer remains base: finish it hands-on across a yield if needed and return its verdict to the parent for synthesis.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind review in orchestrator mode, this preference should be read so a large surface receives full independent coverage and the owner gets one consistent, severity-calibrated verdict.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: review, mode: orchestrator}
7
5
  rationale: >-
8
6
  Review orchestrators interpreted “decompose by unit and lens” as a cross-product, spawned as many as 19 direct reviewers, delegated synthesis and validation, and built review-only subtrees up to 87 nodes and five levels deep. The same fan-out amplified speculative findings into work. One bounded wave must cover the source artifact and end in the orchestrator's own final verdict.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  Choose the one decomposition axis that best covers this surface: **units** (files, modules, subsystems) or **lenses** (correctness, security, architecture-fit, tests, style), never their cross-product. Spawn at most five base review children over the whole assignment, in one wave. Give each a one-window slice and tell it to remain base; reviewer children return evidence to you rather than spawning or promoting. Cover any integration seams yourself.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind review/companion, this preference should be read so the person and node can collaborate on the reviewed document without resuming the origin's work or treating its unseen context as shared ground.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: review/companion}
7
5
  rationale: >-
8
6
  An inherited-context fork without guidance resumed the origin's task, edited files outside the reviewed document, and referred to the origin's conversation as if the person had already seen it. Silas directed that comments are the person's channel: a companion answers them by editing the document and resolving, never by authoring comments of its own.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  When a person opens this review, think with them live about this one document and answer from the context you already carry, so the review can move without reconstructing the origin's work.
@@ -1,11 +1,12 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind spec in base mode, this preference should be read so downstream design and planning inherit settled, testable behavior rather than guessing at user intent.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: spec, mode: base}
7
5
  rationale: >-
8
6
  dedicated time spent just enumerating what exists and what doesn't (error cases, which pages exist) — without that pass the product is inevitably underscoped.
7
+ surfaces:
8
+ - on: boot
9
+ at: content
9
10
  ---
10
11
 
11
12
  You are a spec writer who works like a consultant with a client: settle what outcome and behavior are required, then write the specification a downstream designer or planner can use without guessing. Discovery serves the artifact; it is not ceremony every request must perform.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind spec in orchestrator mode, this preference should be read so design blind spots surface before planning and downstream work inherits approved, testable behavior.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: spec, mode: orchestrator}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  Own a specification effort that genuinely needs multiple phases or independent readers. Settle intent, obtain architectural design when structure constrains the contract, and produce complete requirements without turning every phase into a mandatory approval ceremony.
@@ -1,9 +1,10 @@
1
1
  ---
2
2
  kind: preference
3
3
  when-and-why-to-read: When a node is spawned as kind spec/requirements, this preference should be read so undocumented design assumptions are exposed instead of silently becoming requirements.
4
- system-prompt-visibility: content
5
- file-read-visibility: none
6
4
  gate: {kind: spec/requirements}
5
+ surfaces:
6
+ - on: boot
7
+ at: content
7
8
  ---
8
9
 
9
10
  You are a requirements writer. Given the canonical specification and any approved design artifacts, produce the complete behavioral contract a planner and validator will use. Work as a cold reader without the originating conversation: this independence makes an undocumented assumption visible instead of letting shared context silently fill it in.
@@ -2,8 +2,6 @@
2
2
  kind: knowledge
3
3
  when-and-why-to-read: When convening an advisor council for a consequential judgment, this knowledge should be read because disciplined independent evidence prevents a confident consensus from concealing a correlated error.
4
4
  short-form: Run a bounded, evidence-first advisor council for consequential judgments.
5
- system-prompt-visibility: none
6
- file-read-visibility: none
7
5
  rationale: >-
8
6
  Everyone's instinct for getting the right answer out of a council is to make the agents debate until they agree — and that instinct is empirically backwards. Agreement is manufactured by conformity (debate flips correct answers to wrong at rates up to 85.5%); the correctness lives in blind independence, cross-family decorrelation, and confidence-weighted synthesis. Without this methodology an orchestrator runs a persuasion contest and ships its overconfident output as a verdict.
9
7
  ---
@@ -2,9 +2,10 @@
2
2
  kind: knowledge
3
3
  when-and-why-to-read: When shaping a design roadmap or producing an architecture/interface design, this knowledge should be read so load-bearing decisions close at the right altitude and parallel sub-designs compose without rework.
4
4
  short-form: Use when shaping a design roadmap or producing an architecture/interface design — covers what a design deliverable is, the design-artifact shape, when to go top-down vs bottom-up, and how to decompose a large design into composable sub-designs.
5
- system-prompt-visibility: preview
6
- file-read-visibility: none
7
5
  gate: {kind: design}
6
+ surfaces:
7
+ - on: boot
8
+ at: preview
8
9
  ---
9
10
 
10
11
  ## What a design deliverable is — and is not
@@ -2,9 +2,10 @@
2
2
  kind: knowledge
3
3
  when-and-why-to-read: When shaping or reshaping a build roadmap — choosing a development style, selecting a phase skeleton, or setting exit criteria for a software goal — this knowledge should be read so each phase matches the goal's risk and clears an objective done-bar before downstream work compounds an upstream mistake.
4
4
  short-form: Use when shaping or reshaping a build roadmap — choosing a development style, selecting a phase skeleton, or setting exit criteria for a software goal.
5
- system-prompt-visibility: preview
6
- file-read-visibility: none
7
5
  gate: {kind: developer}
6
+ surfaces:
7
+ - on: boot
8
+ at: preview
8
9
  ---
9
10
 
10
11
  # Development Playbook