@wrongstack/core 0.289.0 → 0.291.1
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/boot.d.ts.map +1 -1
- package/dist/chronicle/domain-adapter.d.ts.map +1 -1
- package/dist/chronicle/index.d.ts +1 -1
- package/dist/chronicle/index.d.ts.map +1 -1
- package/dist/chronicle/index.js +964 -245
- package/dist/chronicle/index.js.map +3 -3
- package/dist/chronicle/journal.d.ts +35 -3
- package/dist/chronicle/journal.d.ts.map +1 -1
- package/dist/chronicle/query.d.ts +8 -5
- package/dist/chronicle/query.d.ts.map +1 -1
- package/dist/chronicle/tool-adapter.d.ts.map +1 -1
- package/dist/coordination/agent-subagent-runner.d.ts +6 -0
- package/dist/coordination/agent-subagent-runner.d.ts.map +1 -1
- package/dist/coordination/agents/phase6-domain.d.ts.map +1 -1
- package/dist/coordination/brain.d.ts +2 -1
- package/dist/coordination/brain.d.ts.map +1 -1
- package/dist/coordination/collab-debug.d.ts +0 -9
- package/dist/coordination/collab-debug.d.ts.map +1 -1
- package/dist/coordination/coordinator/error-classifier.d.ts.map +1 -1
- package/dist/coordination/dep-watcher.d.ts +2 -1
- package/dist/coordination/dep-watcher.d.ts.map +1 -1
- package/dist/coordination/director/director-collab.d.ts +1 -1
- package/dist/coordination/director/director-collab.d.ts.map +1 -1
- package/dist/coordination/director-tools.d.ts.map +1 -1
- package/dist/coordination/director.d.ts +19 -1
- package/dist/coordination/director.d.ts.map +1 -1
- package/dist/coordination/fleet-event-validation.d.ts +0 -7
- package/dist/coordination/fleet-event-validation.d.ts.map +1 -1
- package/dist/coordination/fleet-spawn.d.ts.map +1 -1
- package/dist/coordination/fleet-supervisor.d.ts +1 -1
- package/dist/coordination/fleet-supervisor.d.ts.map +1 -1
- package/dist/coordination/fleet.d.ts +0 -44
- package/dist/coordination/fleet.d.ts.map +1 -1
- package/dist/coordination/index.d.ts +2 -2
- package/dist/coordination/index.d.ts.map +1 -1
- package/dist/coordination/index.js +733 -111
- package/dist/coordination/index.js.map +4 -4
- package/dist/coordination/knowledge-graph.d.ts +2 -1
- package/dist/coordination/knowledge-graph.d.ts.map +1 -1
- package/dist/coordination/large-answer-store.d.ts +0 -6
- package/dist/coordination/large-answer-store.d.ts.map +1 -1
- package/dist/coordination/mail-tools.d.ts.map +1 -1
- package/dist/coordination/mailbox-http-router.d.ts.map +1 -1
- package/dist/coordination/mailbox-message-codec.d.ts +35 -0
- package/dist/coordination/mailbox-message-codec.d.ts.map +1 -1
- package/dist/coordination/mailbox-tool.d.ts +1 -1
- package/dist/coordination/mailbox-tool.d.ts.map +1 -1
- package/dist/coordination/mailbox-types.d.ts +151 -0
- package/dist/coordination/mailbox-types.d.ts.map +1 -1
- package/dist/coordination/provider-status-tracker.d.ts +27 -2
- package/dist/coordination/provider-status-tracker.d.ts.map +1 -1
- package/dist/coordination/subagent-budget.d.ts +2 -1
- package/dist/coordination/subagent-budget.d.ts.map +1 -1
- package/dist/core/agent-response.d.ts +2 -1
- package/dist/core/agent-response.d.ts.map +1 -1
- package/dist/core/agent-tools.d.ts.map +1 -1
- package/dist/core/context.d.ts +51 -0
- package/dist/core/context.d.ts.map +1 -1
- package/dist/core/fallback-model.d.ts +1 -1
- package/dist/core/fallback-model.d.ts.map +1 -1
- package/dist/core/fallback-profile-manager.d.ts +1 -1
- package/dist/core/fallback-profile-manager.d.ts.map +1 -1
- package/dist/core/fleet-pulse.d.ts +2 -1
- package/dist/core/fleet-pulse.d.ts.map +1 -1
- package/dist/core/iteration-limit.d.ts +2 -1
- package/dist/core/iteration-limit.d.ts.map +1 -1
- package/dist/core/mailbox-loop.d.ts +11 -1
- package/dist/core/mailbox-loop.d.ts.map +1 -1
- package/dist/core/model-availability-calendar.d.ts +27 -0
- package/dist/core/model-availability-calendar.d.ts.map +1 -0
- package/dist/core/system-prompt-builder.d.ts +2 -1
- package/dist/core/system-prompt-builder.d.ts.map +1 -1
- package/dist/defaults/index.js +1459 -560
- package/dist/defaults/index.js.map +4 -4
- package/dist/execution/auto-compaction-middleware.d.ts +3 -2
- package/dist/execution/auto-compaction-middleware.d.ts.map +1 -1
- package/dist/execution/enhance-recovery.d.ts +8 -0
- package/dist/execution/enhance-recovery.d.ts.map +1 -1
- package/dist/execution/error-handler.d.ts +2 -2
- package/dist/execution/error-handler.d.ts.map +1 -1
- package/dist/execution/index.js +643 -134
- package/dist/execution/index.js.map +4 -4
- package/dist/execution/intelligent-compactor.d.ts +0 -16
- package/dist/execution/intelligent-compactor.d.ts.map +1 -1
- package/dist/execution/one-shot-llm.d.ts.map +1 -1
- package/dist/execution/retry-policy.d.ts +0 -13
- package/dist/execution/retry-policy.d.ts.map +1 -1
- package/dist/execution/skill-loader.d.ts.map +1 -1
- package/dist/execution/tool-executor.d.ts.map +1 -1
- package/dist/hq/auth-store.d.ts.map +1 -1
- package/dist/hq/index.js +39 -1
- package/dist/hq/index.js.map +3 -3
- package/dist/index.d.ts +32 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22263 -19999
- package/dist/index.js.map +4 -4
- package/dist/infrastructure/index.js +59 -5
- package/dist/infrastructure/index.js.map +2 -2
- package/dist/kernel/events/agent-events.d.ts +2 -0
- package/dist/kernel/events/agent-events.d.ts.map +1 -1
- package/dist/kernel/events/file-events.d.ts +46 -0
- package/dist/kernel/events/file-events.d.ts.map +1 -1
- package/dist/kernel/events/memory-events.d.ts +9 -0
- package/dist/kernel/events/memory-events.d.ts.map +1 -1
- package/dist/kernel/events/provider-events.d.ts +2 -1
- package/dist/kernel/events/provider-events.d.ts.map +1 -1
- package/dist/kernel/events/tool-events.d.ts +25 -0
- package/dist/kernel/events/tool-events.d.ts.map +1 -1
- package/dist/mailbox-attach.d.ts.map +1 -1
- package/dist/plugins/auto-review-plugin.d.ts +10 -0
- package/dist/plugins/auto-review-plugin.d.ts.map +1 -1
- package/dist/plugins/chimera-plugin.d.ts +5 -0
- package/dist/plugins/chimera-plugin.d.ts.map +1 -1
- package/dist/security/index.d.ts +1 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +317 -9
- package/dist/security/index.js.map +4 -4
- package/dist/security/kanban-boundary.d.ts +10 -0
- package/dist/security/kanban-boundary.d.ts.map +1 -0
- package/dist/security/permission-policy.d.ts +8 -1
- package/dist/security/permission-policy.d.ts.map +1 -1
- package/dist/storage/config-loader.d.ts +15 -0
- package/dist/storage/config-loader.d.ts.map +1 -1
- package/dist/storage/index.d.ts +2 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +627 -428
- package/dist/storage/index.js.map +4 -4
- package/dist/storage/memory-consolidator.d.ts +49 -4
- package/dist/storage/memory-consolidator.d.ts.map +1 -1
- package/dist/storage/memory-graph-backend.d.ts +11 -0
- package/dist/storage/memory-graph-backend.d.ts.map +1 -1
- package/dist/storage/provider-config-watcher.d.ts +17 -0
- package/dist/storage/provider-config-watcher.d.ts.map +1 -1
- package/dist/storage/session-event-bridge.d.ts +2 -2
- package/dist/storage/session-event-bridge.d.ts.map +1 -1
- package/dist/tools/fallback-manage-tools.d.ts.map +1 -1
- package/dist/tools/index.js +166 -26
- package/dist/tools/index.js.map +3 -3
- package/dist/types/config.d.ts +12 -4
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/file-event-record.d.ts +68 -0
- package/dist/types/file-event-record.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +13 -8
- package/dist/types/index.js.map +3 -3
- package/dist/types/permission.d.ts +38 -0
- package/dist/types/permission.d.ts.map +1 -1
- package/dist/types/provider.d.ts +1 -1
- package/dist/types/provider.d.ts.map +1 -1
- package/dist/types/session.d.ts +27 -0
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/tool-executor.d.ts +2 -0
- package/dist/types/tool-executor.d.ts.map +1 -1
- package/dist/utils/config-backup.d.ts +20 -0
- package/dist/utils/config-backup.d.ts.map +1 -0
- package/dist/utils/index.d.ts +12 -11
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +436 -290
- package/dist/utils/index.js.map +4 -4
- package/dist/utils/message-invariants.d.ts +12 -0
- package/dist/utils/message-invariants.d.ts.map +1 -1
- package/dist/utils/safe-json.d.ts +1 -1
- package/dist/utils/safe-json.d.ts.map +1 -1
- package/dist/utils/term.d.ts +6 -0
- package/dist/utils/term.d.ts.map +1 -1
- package/dist/utils/tool-wire-compact.d.ts +9 -0
- package/dist/utils/tool-wire-compact.d.ts.map +1 -1
- package/dist/utils/wstack-paths.d.ts +21 -1
- package/dist/utils/wstack-paths.d.ts.map +1 -1
- package/instructions/agents/ios.md +113 -0
- package/instructions/llm/memory-consolidator.md +4 -12
- package/instructions/system.md +4 -1
- package/package.json +3 -3
- package/skills/auto-review/SKILL.md +176 -0
- package/skills/mnemosyne/SKILL.md +156 -0
- package/skills/mnemosyne/instructions/agent-prompt.md +200 -0
|
@@ -19,4 +19,16 @@ export interface MessageRepairResult {
|
|
|
19
19
|
* preserving surrounding text/images/thinking blocks where possible.
|
|
20
20
|
*/
|
|
21
21
|
export declare function repairToolUseAdjacency(messages: Message[]): MessageRepairResult;
|
|
22
|
+
/**
|
|
23
|
+
* True when a message content payload carries meaningful information for
|
|
24
|
+
* the provider: non-whitespace text, a tool call/result, thinking with
|
|
25
|
+
* text or a signature, or any other block type.
|
|
26
|
+
*
|
|
27
|
+
* False for empty strings/arrays and for arrays whose only blocks are
|
|
28
|
+
* empty or whitespace-only text — the shape persisted when a stream is
|
|
29
|
+
* interrupted before the first meaningful delta (issue #271). Strict
|
|
30
|
+
* providers reject such assistant turns, so repair and replay paths must
|
|
31
|
+
* treat them as empty.
|
|
32
|
+
*/
|
|
33
|
+
export declare function hasMeaningfulContent(content: Message['content']): boolean;
|
|
22
34
|
//# sourceMappingURL=message-invariants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"message-invariants.d.ts","sourceRoot":"","sources":["../../src/utils/message-invariants.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"message-invariants.d.ts","sourceRoot":"","sources":["../../src/utils/message-invariants.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;IAC7B,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,mBAAmB,CAyD/E;AAyCD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAiBzE"}
|
|
@@ -7,7 +7,7 @@ export declare function safeParse<T = unknown>(input: string, maxBytes?: number)
|
|
|
7
7
|
export declare function safeStringify(value: unknown, pretty?: boolean): string;
|
|
8
8
|
/**
|
|
9
9
|
* Attempt to parse JSON5-style input and return a valid JSON string.
|
|
10
|
-
* Handles trailing commas,
|
|
10
|
+
* Handles trailing commas, line/block comments, and unquoted keys
|
|
11
11
|
* that are common in provider output.
|
|
12
12
|
*
|
|
13
13
|
* Returns the sanitized string if it parses successfully as JSON,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"safe-json.d.ts","sourceRoot":"","sources":["../../src/utils/safe-json.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAY9F;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,UAAQ,GAAG,MAAM,CAoBpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"safe-json.d.ts","sourceRoot":"","sources":["../../src/utils/safe-json.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,wBAAgB,SAAS,CAAC,CAAC,GAAG,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,SAAY,GAAG,eAAe,CAAC,CAAC,CAAC,CAY9F;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,UAAQ,GAAG,MAAM,CAoBpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAuB3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAYxD"}
|
package/dist/utils/term.d.ts
CHANGED
|
@@ -262,6 +262,12 @@ export declare class TerminalLifecycle {
|
|
|
262
262
|
* raw mode. Null when `acquire()` has never been called.
|
|
263
263
|
*/
|
|
264
264
|
private _wasRaw;
|
|
265
|
+
/**
|
|
266
|
+
* Whether stdin was paused before the TUI took ownership. Readline closes
|
|
267
|
+
* its interface by pausing the shared process stream, so raw mode alone is
|
|
268
|
+
* not enough to make Ink receive bytes during the boot-prompt -> TUI handoff.
|
|
269
|
+
*/
|
|
270
|
+
private _wasPaused;
|
|
265
271
|
/**
|
|
266
272
|
* Request the process to exit. Set the flag, trigger any registered
|
|
267
273
|
* `onRequestExit` callback (typically Ink's `unmount()`), and arm a
|
package/dist/utils/term.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"term.d.ts","sourceRoot":"","sources":["../../src/utils/term.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAKH,8EAA8E;AAC9E,wBAAgB,WAAW,IAAI,OAAO,CAErC;AAED,6EAA6E;AAC7E,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED,+EAA+E;AAC/E,wBAAgB,WAAW,IAAI;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAM5D;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,EAAE,EAAE,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,KAAK,IAAI,EAClD,MAAM,GAAE,MAAM,CAAC,WAA4B,GAC1C,MAAM,IAAI,CAYZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,OAAO,GAAG,OAAO,CAK3E;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,qEAAqE;IACrE,OAAO,IAAI,IAAI,CAAC;IAChB,oEAAoE;IACpE,MAAM,IAAI,IAAI,CAAC;CAChB;AAID;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,eAAe,GAAG,IAAI,GAAG,IAAI,CAEtE;AAsCD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,QAAQ,CACtB,CAAC,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AK,EAAE,MAAM,EACb,UAAU,GAAE,MAA8B,GACzC,cAAc,CAKhB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,cAAc,CAEnE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CACtB,KAAK,EAAE,MAAM,EACb,MAAM,GAAE,MAAM,CAAC,WAA4B,GAC1C,OAAO,CAET"}
|
|
@@ -23,6 +23,15 @@ export interface CompactWireToolDefinition {
|
|
|
23
23
|
* largest repeated cost in provider tool declarations.
|
|
24
24
|
*/
|
|
25
25
|
export declare function compactToolDefinitionForWire(tool: ToolWireDefinitionLike, opts?: CompactToolDefinitionForWireOptions): CompactWireToolDefinition;
|
|
26
|
+
/**
|
|
27
|
+
* Tool inputs are always JSON objects, but dynamically supplied MCP/plugin
|
|
28
|
+
* schemas sometimes express that object as a top-level oneOf/anyOf/allOf.
|
|
29
|
+
* Anthropic-family endpoints reject those combinators at the input_schema
|
|
30
|
+
* root (including when reached through an OpenAI-compatible gateway such as
|
|
31
|
+
* OmniRoute). Keep nested combinators intact and flatten only the root.
|
|
32
|
+
* Runtime validation still uses the tool's original schema.
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalizeTopLevelToolSchema(schema: Record<string, unknown>): Record<string, unknown>;
|
|
26
35
|
export declare function compactSchemaDescriptions(schema: unknown, maxDescriptionChars?: number): Record<string, unknown>;
|
|
27
36
|
export declare function compactDescription(text: string, maxChars: number): string;
|
|
28
37
|
export declare function findSemanticBoundary(text: string, limit: number): number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-wire-compact.d.ts","sourceRoot":"","sources":["../../src/utils/tool-wire-compact.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,W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AAgB,yBAAyB,CACvC,MAAM,EAAE,OAAO,EACf,mBAAmB,SAA+B,GACjD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAGzB;AAmBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CASzE;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAaxE"}
|
|
@@ -21,8 +21,26 @@ export interface WstackPaths {
|
|
|
21
21
|
* without rewriting callers.
|
|
22
22
|
*/
|
|
23
23
|
configDir: string;
|
|
24
|
-
/** ~/.wrongstack/config.json */
|
|
24
|
+
/** ~/.wrongstack/config.json — bootstrap config (activeProfile + version). */
|
|
25
25
|
globalConfig: string;
|
|
26
|
+
/**
|
|
27
|
+
* ~/.wrongstack/profiles — directory containing per-profile configs.
|
|
28
|
+
* Each profile has its own subdirectory with a config.json.
|
|
29
|
+
*/
|
|
30
|
+
profilesDir: string;
|
|
31
|
+
/**
|
|
32
|
+
* Resolve the config path for a named profile.
|
|
33
|
+
* Returns ~/.wrongstack/profiles/<name>/config.json.
|
|
34
|
+
*/
|
|
35
|
+
profileConfig: (name: string) => string;
|
|
36
|
+
/** Resolve ~/.wrongstack/profiles/<name>/statusline.json */
|
|
37
|
+
profileStatuslineConfig: (name: string) => string;
|
|
38
|
+
/** Resolve ~/.wrongstack/profiles/<name>/mode.json */
|
|
39
|
+
profileModeConfig: (name: string) => string;
|
|
40
|
+
/** Resolve ~/.wrongstack/profiles/<name>/provider-status.json */
|
|
41
|
+
profileProviderStatus: (name: string) => string;
|
|
42
|
+
/** Resolve ~/.wrongstack/profiles/<name>/update-cache.json */
|
|
43
|
+
profileUpdateCache: (name: string) => string;
|
|
26
44
|
/** ~/.wrongstack/.key — 32 random bytes, mode 0600, AES-GCM key for the secret vault. */
|
|
27
45
|
secretsKey: string;
|
|
28
46
|
/** ~/.wrongstack/memory.md — user-global memory. */
|
|
@@ -106,6 +124,8 @@ export interface WstackPaths {
|
|
|
106
124
|
projectSddBoards: string;
|
|
107
125
|
/** ~/.wrongstack/sync.json — CloudSync configuration */
|
|
108
126
|
syncConfig: string;
|
|
127
|
+
/** ~/.wrongstack/config-history — timestamped backups on every config write */
|
|
128
|
+
configHistoryDir: string;
|
|
109
129
|
/** Function to get the status.json path for a project given its hash. */
|
|
110
130
|
projectStatus: (projectHash: string) => string;
|
|
111
131
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wstack-paths.d.ts","sourceRoot":"","sources":["../../src/utils/wstack-paths.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,
|
|
1
|
+
{"version":3,"file":"wstack-paths.d.ts","sourceRoot":"","sources":["../../src/utils/wstack-paths.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AAEH,MAAM,WAAW,WAAW;IAC1B,mCAAmC;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,OAAO,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,8EAA8E;IAC9E,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACxC,4DAA4D;IAC5D,uBAAuB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAClD,sDAAsD;IACtD,iBAAiB,EAAE,CAAC,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M,CAAC;IACpB,qFAAqF;IACrF,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAIzC;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,WAAW,CAkFvE"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
You are the iOS assistant. Your job is Apple-platform app development:
|
|
2
|
+
design and ship Swift code that compiles against the latest Apple SDKs,
|
|
3
|
+
runs correctly on iOS/iPadOS/tvOS/watchOS/visionOS/macOS, and meets
|
|
4
|
+
App Store and privacy requirements.
|
|
5
|
+
|
|
6
|
+
Anchor toolchain (baseline, verified against Apple's Xcode 26 release
|
|
7
|
+
notes — consult your installed Xcode for exact patch versions such as
|
|
8
|
+
26.6 / Swift 6.3 / 26.5 SDKs):
|
|
9
|
+
- Xcode 26 with Swift 6.2 and the iOS 26, iPadOS 26, tvOS 26, watchOS 26,
|
|
10
|
+
macOS Tahoe 26, and visionOS 26 SDKs as the major line this persona
|
|
11
|
+
is written against.
|
|
12
|
+
- Requires a Mac running macOS Sequoia 15.6 or later.
|
|
13
|
+
- Swift 6.2's "Approachable Concurrency" changes default isolation
|
|
14
|
+
rather than weakening safety: top-level code runs on the main actor
|
|
15
|
+
by default, `async` functions inherit the caller's isolation unless
|
|
16
|
+
explicitly marked `@concurrent`, and most `Sendable` annotations can
|
|
17
|
+
be inferred. Compile-time data-race safety is preserved. Use it when
|
|
18
|
+
the new defaults fit your design; don't assume it in code that must
|
|
19
|
+
build with Swift 6.0/6.1 toolchains.
|
|
20
|
+
|
|
21
|
+
Talking to Xcode (use the current major-line versions of these tools;
|
|
22
|
+
consult `xcodebuild -version` and `xcrun --find` to confirm what's
|
|
23
|
+
installed before pinning specific CLI flags):
|
|
24
|
+
- `xcodebuild` for build / test / archive / clean / `-showBuildSettings`
|
|
25
|
+
/ `-list` / scheme + destination selection; prefer `-resultBundlePath`
|
|
26
|
+
for machine-readable results and pair with `xcrun xcresulttool get ...
|
|
27
|
+
--legacy` or the modern JSON API for CI parsing
|
|
28
|
+
- `xcrun simctl` for the Simulator: `list`, `boot`, `shutdown`, `install`,
|
|
29
|
+
`launch`, `terminate`, `io`, `screenshot`, `log`, `privacy`, `push`,
|
|
30
|
+
`erase`; run on every supported OS for the project's deployment target
|
|
31
|
+
- `xcrun devicectl` for physical-device management (modern replacement
|
|
32
|
+
for `ios-deploy`): `list devices`, `device process launch`, `device
|
|
33
|
+
process terminate`, log streaming, and on-device debugging attach
|
|
34
|
+
- `xcrun xctrace` / `xcrun instruments` for profiling (Time Profiler,
|
|
35
|
+
Allocations, Leaks, SwiftUI template, Animation Hitches); prefer
|
|
36
|
+
`xctrace record --template ...` for CI-friendly `.trace` bundles
|
|
37
|
+
- `xcrun preview` and Xcode Previews for SwiftUI iteration; treat
|
|
38
|
+
previews as a development tool, not a substitute for unit/UI tests
|
|
39
|
+
- `xcrun notarytool` and `xcrun stapler` for `Developer ID` /
|
|
40
|
+
`notary-service` workflows when distributing outside the App Store
|
|
41
|
+
- Swift Package Manager (`swift build`, `swift test`, `swift package`)
|
|
42
|
+
for packages and mixed Xcode+SPM projects; keep `Package.swift` tools
|
|
43
|
+
version aligned with the project's Swift compiler version
|
|
44
|
+
- Readability wrappers (`xcbeautify`, `xcpretty`) when you need
|
|
45
|
+
human-friendly CI logs; never let them hide build failures — always
|
|
46
|
+
inspect the underlying `xcodebuild` exit code
|
|
47
|
+
- Pin a single source of truth for toolchain versions: a `.xcode-version`
|
|
48
|
+
file (Xcode 26+) or `bundler`-style lockfile; document the minimum
|
|
49
|
+
Xcode and macOS required to build in the README, not in prose that
|
|
50
|
+
can drift out of sync with the toolchain
|
|
51
|
+
|
|
52
|
+
Scope:
|
|
53
|
+
- Build Swift features across UIKit, SwiftUI, AppKit, and platform
|
|
54
|
+
frameworks (Foundation, SwiftData, Core Data, Combine, AVFoundation,
|
|
55
|
+
CoreLocation, MapKit, WidgetKit, ActivityKit, StoreKit, etc.)
|
|
56
|
+
- Wire persistence, networking, concurrency, and platform integrations
|
|
57
|
+
(push, Sign in with Apple, in-app purchase, App Intents, Share/Activity)
|
|
58
|
+
- Implement accessibility, localization, and privacy-correct behaviors
|
|
59
|
+
by default — not as a later polish pass
|
|
60
|
+
- Handle deployment targets, capability entitlements, and App Store /
|
|
61
|
+
TestFlight submission requirements
|
|
62
|
+
|
|
63
|
+
Input format you accept:
|
|
64
|
+
{ "task": "view | feature | persistence | integration | build | ship",
|
|
65
|
+
"platform": "ios | ipados | tvos | watchos | visionos | macos",
|
|
66
|
+
"minDeploymentTarget": "<e.g. iOS 17.0>",
|
|
67
|
+
"framework": "swiftui | uikit | appkit | mixed",
|
|
68
|
+
"feature": "<what to build or change>" }
|
|
69
|
+
|
|
70
|
+
Output: Markdown iOS report:
|
|
71
|
+
- ## Implementation (types/Views/ViewModels + responsibilities)
|
|
72
|
+
- ## Platform/SDK notes (deployment target, entitlements, capabilities)
|
|
73
|
+
- ## Concurrency/State (isolation, actor boundaries, observation model)
|
|
74
|
+
- ## Privacy/Accessibility (purpose strings, ATT, VoiceOver, Dynamic Type)
|
|
75
|
+
- ## Verification (build with Xcode 26, tests run on simulator/device)
|
|
76
|
+
|
|
77
|
+
Working rules:
|
|
78
|
+
- Default to Swift 6 language mode with strict concurrency; isolate
|
|
79
|
+
mutable shared state in actors, never in globals
|
|
80
|
+
- Use `async`/`await` and structured concurrency (TaskGroup,
|
|
81
|
+
AsyncSequence); cancel long-running work and propagate cancellation
|
|
82
|
+
- Prefer SwiftUI's `@Observable` macro on focused reference-type view
|
|
83
|
+
models; reach for plain structs only when observation and identity
|
|
84
|
+
are not needed, and fall back to `ObservableObject` only when
|
|
85
|
+
targeting pre-iOS-17 deployment
|
|
86
|
+
- Keep View bodies pure and side-effect-free; do I/O in the model layer
|
|
87
|
+
or in explicit `.task` / `.onChange` modifiers
|
|
88
|
+
- Match the deployment target honestly — don't call iOS 26 APIs on an
|
|
89
|
+
iOS 17 target; use `if #available(iOS 26, *)` or `@available`
|
|
90
|
+
attributes for newer features
|
|
91
|
+
- Use SwiftData for new persistence unless the project is on Core Data;
|
|
92
|
+
`@Model` types are reference-type classes — design them for controlled
|
|
93
|
+
mutation, stable identity, and explicit relationship semantics, and
|
|
94
|
+
isolate the `ModelContainer`/`ModelContext` per actor or per scene
|
|
95
|
+
- Write tests with Swift Testing (`@Test`, parameterized tests, traits)
|
|
96
|
+
alongside existing XCTest; do not mix assertion styles in one file
|
|
97
|
+
- Accessibility is not optional: provide VoiceOver labels, support
|
|
98
|
+
Dynamic Type (avoid fixed font sizes), honor Reduce Motion and
|
|
99
|
+
Increase Contrast, and verify focus order on real devices
|
|
100
|
+
- Privacy: declare Info.plist purpose strings for every sensitive API,
|
|
101
|
+
respect App Tracking Transparency, ship a Privacy Manifest
|
|
102
|
+
(`PrivacyInfo.xcprivacy`), and minimize on-device data collection
|
|
103
|
+
- For App Intents, App Shortcuts, and widgets, follow the
|
|
104
|
+
process-isolated extension model and avoid sharing state via globals
|
|
105
|
+
- Don't disable concurrency warnings to make code compile — fix the
|
|
106
|
+
isolation. Under Swift 6.2's Approachable Concurrency, prefer the
|
|
107
|
+
inferred defaults (main-actor top-level code, caller-context `async`)
|
|
108
|
+
and reach for explicit `@concurrent` only for work that genuinely
|
|
109
|
+
needs to run off the current isolation. Safety checks stay on;
|
|
110
|
+
"Approachable" means less annotation, not looser guarantees
|
|
111
|
+
- Build with Xcode 26 and run the test suite on a real simulator
|
|
112
|
+
before claiming a change is done; a green `xcodebuild` is the
|
|
113
|
+
minimum bar, not the goal
|
|
@@ -5,8 +5,8 @@ Session summary ({{iterations}} iterations):
|
|
|
5
5
|
|
|
6
6
|
Return a JSON object with an "operations" array. Each operation must have an "action" field:
|
|
7
7
|
- "add": create a new memory entry. Include "text", and optionally "type", "tags", "priority".
|
|
8
|
-
|
|
9
|
-
-
|
|
8
|
+
|
|
9
|
+
This consolidator is strictly add-only. It cannot edit or delete existing entries — corrections and removals are handled by separate, explicitly reviewed flows, never here. If an existing entry already covers a fact (even with different wording), skip it instead of adding a duplicate. "edit" or "delete" operations will be ignored.
|
|
10
10
|
|
|
11
11
|
Memory types:
|
|
12
12
|
- "fact": Objective truth about the project (e.g. "uses pnpm workspaces")
|
|
@@ -25,7 +25,7 @@ Priority levels:
|
|
|
25
25
|
Rules:
|
|
26
26
|
- Only persist facts likely useful across multiple future sessions.
|
|
27
27
|
- Do NOT persist task progress, temporary state, or one-off observations.
|
|
28
|
-
-
|
|
28
|
+
- Do NOT add a fact that an existing entry already covers.
|
|
29
29
|
- Assign a type and priority to every "add" operation.
|
|
30
30
|
- Use 1-3 hashtag tags for each entry (e.g. #typescript #build).
|
|
31
31
|
- Be concise — each memory entry should be one clear sentence.
|
|
@@ -39,14 +39,6 @@ Return ONLY valid JSON, no markdown, no explanation:
|
|
|
39
39
|
"type": "convention",
|
|
40
40
|
"priority": "high",
|
|
41
41
|
"tags": ["pnpm", "typescript", "build"]
|
|
42
|
-
}
|
|
43
|
-
{
|
|
44
|
-
"action": "edit",
|
|
45
|
-
"query": "pnpm",
|
|
46
|
-
"text": "Project uses pnpm v9+ with ESM-only modules",
|
|
47
|
-
"type": "fact",
|
|
48
|
-
"priority": "medium"
|
|
49
|
-
},
|
|
50
|
-
{ "action": "delete", "query": "outdated convention" }
|
|
42
|
+
}
|
|
51
43
|
]
|
|
52
44
|
}
|
package/instructions/system.md
CHANGED
|
@@ -339,7 +339,10 @@ When you call `remember` from a subagent, your role and mode are auto-detected a
|
|
|
339
339
|
|
|
340
340
|
- Relevant memories are injected for you each turn — you do not need to search before every step. Use `memory_search` explicitly before substantial work in an unfamiliar area to avoid rediscovery.
|
|
341
341
|
- Record a convention, decision, root cause, or preference only after evidence confirms it.
|
|
342
|
-
- Correct or retire outdated memories with `memory_update` (edit text/tags/kind, or set `status`)
|
|
342
|
+
- Correct or retire outdated memories with `memory_update` (edit text/tags/kind, or set `status`). The full deletion contract:
|
|
343
|
+
- **`memory_delete`** — the guarded path. Requires `{ force: true }` for ALL deletions; the store-layer guard prevents autonomous removal. Permanent memories refuse even with force.
|
|
344
|
+
- **`memory_update({ status: 'deleted' })`** and **`forget`** — lower-level escape hatches for non-permanent memories. These bypass the force guard intentionally; use them only when you have explicit user authorization or need surgical removal that the propose/resolve flow can't express.
|
|
345
|
+
- **`memory_candidates({ action: 'propose' })`** — the preferred non-destructive review flow. Files a proposal in the ReviewQueue; the user resolves via `memory_candidates({ action: 'resolve', decision: 'delete' })`. This is the only path autonomous agents (Mnemosyne, consolidator) should use.
|
|
343
346
|
- Memory results are context, not proof. Verify them against current files before mutating code.
|
|
344
347
|
|
|
345
348
|
### Finding memories
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wrongstack/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.291.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "WrongStack core: kernel, types, defaults, and shared utilities for the WrongStack CLI agent.",
|
|
6
6
|
"repository": {
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
],
|
|
92
92
|
"wrongstackApiVersion": "0.1.10",
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@wrongstack/kanban": "0.
|
|
94
|
+
"@wrongstack/kanban": "0.291.1"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@types/node": "^26.
|
|
97
|
+
"@types/node": "^26.1.1",
|
|
98
98
|
"typescript": "^7.0.2"
|
|
99
99
|
},
|
|
100
100
|
"publishConfig": {
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: auto-review
|
|
3
|
+
description: |
|
|
4
|
+
Use this skill to configure and understand the built-in auto-review plugin
|
|
5
|
+
(wstack-auto-review) that fires automated code review subagents on every
|
|
6
|
+
code change during a session.
|
|
7
|
+
Triggers: user says "auto review", "otomatik review", "auto code review",
|
|
8
|
+
"her değişiklikte review", "/auto-review".
|
|
9
|
+
version: 2.0.0
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Auto Review — Built-in Plugin
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
The **`wstack-auto-review`** plugin (built into `@wrongstack/core`) detects
|
|
17
|
+
every git-tracked file change during a session and automatically dispatches
|
|
18
|
+
a review subagent. It extends the Chimera review pipeline but fires
|
|
19
|
+
**mid-session** on every change, not just at session end.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
iteration.completed → git diff → debounce → chimera.review_needed event
|
|
23
|
+
↓
|
|
24
|
+
Director spawns review subagent
|
|
25
|
+
(provider/model from config)
|
|
26
|
+
↓
|
|
27
|
+
Severity-ranked report → session + mailbox
|
|
28
|
+
↓
|
|
29
|
+
chimera.review_complete event
|
|
30
|
+
↓
|
|
31
|
+
parseReviewSeverity → shouldCascade
|
|
32
|
+
↓ (if threshold crossed)
|
|
33
|
+
chimera.cascade_needed event
|
|
34
|
+
↓
|
|
35
|
+
Director spawns follow-up agents
|
|
36
|
+
(security-scanner, bug-hunter)
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Status
|
|
40
|
+
|
|
41
|
+
**This is a built-in plugin** (`packages/core/src/plugins/auto-review-plugin.ts`),
|
|
42
|
+
NOT a skill-based watcher. It is loaded automatically but **disabled by default**.
|
|
43
|
+
Enable it in your config:
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"extensions": {
|
|
48
|
+
"wstack-auto-review": {
|
|
49
|
+
"enabled": true,
|
|
50
|
+
"provider": "deepseek",
|
|
51
|
+
"model": "deepseek-chat",
|
|
52
|
+
"fallbackProfile": "reliable",
|
|
53
|
+
"debounceMs": 5000,
|
|
54
|
+
"maxFilesPerBatch": 15,
|
|
55
|
+
"cascadeOn": "high",
|
|
56
|
+
"maxCascadeDepth": 2
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Requirements
|
|
63
|
+
|
|
64
|
+
- **`--director` flag** (Director mode) — the subagent spawning pipeline
|
|
65
|
+
(execution.ts) requires the Director to be active. Without it, review
|
|
66
|
+
events are silently skipped.
|
|
67
|
+
- **`git`** available in the session working directory.
|
|
68
|
+
|
|
69
|
+
## Configuration
|
|
70
|
+
|
|
71
|
+
| Key | Type | Default | Description |
|
|
72
|
+
|-----|------|---------|-------------|
|
|
73
|
+
| `enabled` | boolean | false | Master switch |
|
|
74
|
+
| `provider` | string | session provider | LLM provider for review agents |
|
|
75
|
+
| `model` | string | session model | LLM model for review agents |
|
|
76
|
+
| `fallbackProfile` | string | effective fallback profile | Named profile from `fallbackProfiles`; its first valid entry supplies the primary provider/model when those are omitted |
|
|
77
|
+
| `debounceMs` | number | 5000 | Min gap between review triggers |
|
|
78
|
+
| `maxFilesPerBatch` | number | 15 | Files per review call |
|
|
79
|
+
| `maxConcurrentReviews` | number | 2 | Parallel review subagent cap |
|
|
80
|
+
| `cascadeOn` | "off"|"critical"|"high" | "off" | Follow-up agent threshold — spawns security-scanner/bug-hunter when findings cross this severity |
|
|
81
|
+
| `maxCascadeDepth` | number | 2 | Max fix→re-review cycles (0 = open-loop, no re-review) |
|
|
82
|
+
|
|
83
|
+
## Slash commands
|
|
84
|
+
|
|
85
|
+
| Command | Action |
|
|
86
|
+
|---------|--------|
|
|
87
|
+
| `/auto-review` | Show status + current config |
|
|
88
|
+
| `/auto-review on` | Enable (via config update) |
|
|
89
|
+
| `/auto-review off` | Disable |
|
|
90
|
+
|
|
91
|
+
## What is reviewed
|
|
92
|
+
|
|
93
|
+
- **Only git-tracked files** with staged or unstaged changes; untracked (`??`) files are never read or reviewed
|
|
94
|
+
- **Content-aware** — later edits to an already-modified file trigger again when its content fingerprint changes
|
|
95
|
+
- **Debounced without loss** — rapid edits are retained in a pending queue, with the latest content reviewed on the next eligible iteration
|
|
96
|
+
- **Capped** at `maxFilesPerBatch` files per call; overflow stays pending
|
|
97
|
+
- **Skipped** — `.wrongstack/` files
|
|
98
|
+
- **Deleted files** are silently omitted
|
|
99
|
+
|
|
100
|
+
## Cascade (self-correcting follow-up agents)
|
|
101
|
+
|
|
102
|
+
When `cascadeOn` is `"high"` or `"critical"`, a review finding at or above that
|
|
103
|
+
threshold triggers follow-up agents that **investigate and apply fixes**
|
|
104
|
+
automatically. The cascade chain works as follows:
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
chimera.review_complete (carries report text + original bundle)
|
|
108
|
+
│
|
|
109
|
+
▼
|
|
110
|
+
auto-review plugin: parseReviewSeverity() extracts Critical/High/Medium counts
|
|
111
|
+
│
|
|
112
|
+
▼ shouldCascade() gates on bundle.cascadeOn
|
|
113
|
+
│
|
|
114
|
+
chimera.cascade_needed (carries severities + selected agents)
|
|
115
|
+
│
|
|
116
|
+
▼
|
|
117
|
+
execution.ts: spawns fix subagents via Director
|
|
118
|
+
• security-scanner — when a Critical/High finding mentions a security
|
|
119
|
+
keyword (injection, XSS, secret, shell, deserialization, etc.)
|
|
120
|
+
• bug-hunter — for any High+ finding (correctness concerns)
|
|
121
|
+
│
|
|
122
|
+
▼ agents apply fixes (edit tool + typecheck/lint)
|
|
123
|
+
│
|
|
124
|
+
re-read modified files → re-emit chimera.review_needed (depth N+1)
|
|
125
|
+
│
|
|
126
|
+
▼ bounded by maxCascadeDepth — stops at limit or when clean
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Both agents may spawn in parallel when a finding is both severe and
|
|
130
|
+
security-related. The follow-up agents receive the review report (capped at
|
|
131
|
+
12K chars) and the changed file list, read the flagged files, confirm or refute
|
|
132
|
+
each finding, **apply fixes using the edit tool**, and run typecheck/lint to
|
|
133
|
+
verify.
|
|
134
|
+
|
|
135
|
+
### Closed self-correcting loop
|
|
136
|
+
|
|
137
|
+
After fix agents apply their changes, the system re-reads the modified files
|
|
138
|
+
and re-emits `chimera.review_needed` to trigger a fresh review of the post-fix
|
|
139
|
+
state. If that review still finds High+ findings, the cycle repeats up to
|
|
140
|
+
`maxCascadeDepth` iterations. When the depth limit is reached, a session message
|
|
141
|
+
informs the user the loop stopped intentionally.
|
|
142
|
+
|
|
143
|
+
| `maxCascadeDepth` | Behavior |
|
|
144
|
+
|-------------------|----------|
|
|
145
|
+
| `0` | Fix agents run once, no re-review (open-loop) |
|
|
146
|
+
| `1` | Fix + one re-review to verify |
|
|
147
|
+
| `2` (default) | Up to 2 re-review cycles |
|
|
148
|
+
| `N` | Up to N re-review cycles |
|
|
149
|
+
|
|
150
|
+
### Severity thresholds
|
|
151
|
+
|
|
152
|
+
| `cascadeOn` | Fires when |
|
|
153
|
+
|-------------|-----------|
|
|
154
|
+
| `"off"` | Never (default) |
|
|
155
|
+
| `"high"` | Any High OR Critical finding |
|
|
156
|
+
| `"critical"` | Only Critical findings |
|
|
157
|
+
|
|
158
|
+
### Agent selection
|
|
159
|
+
|
|
160
|
+
`decideCascadeAgents()` scans only the Critical and High report sections for
|
|
161
|
+
security keywords. A Medium-only security finding does **not** trigger the
|
|
162
|
+
cascade — it doesn't cross the threshold. The 20 security keywords include:
|
|
163
|
+
injection, xss, csrf, ssrf, sql, secret, credential, password, api key,
|
|
164
|
+
token, auth, shell injection, command injection, innerhtml, deserialization,
|
|
165
|
+
path traversal, hardcoded, privilege, owasp.
|
|
166
|
+
|
|
167
|
+
## Skills in scope
|
|
168
|
+
|
|
169
|
+
- `chimera` — for the review output format and severity rules
|
|
170
|
+
- `shadow-agent` — for cron-based background monitoring pattern
|
|
171
|
+
- `node-modern` — for understanding the TypeScript plugin code
|
|
172
|
+
- `git-flow` — for git diff detection patterns
|
|
173
|
+
- `multi-agent` — for subagent delegation and fleet management
|
|
174
|
+
- `security-scanner` — for security vulnerability patterns
|
|
175
|
+
- `bug-hunter` — for systematic bug detection
|
|
176
|
+
|