@dsmm/dsmm 0.3.19 → 0.3.21

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 (47) hide show
  1. package/README.md +4 -4
  2. package/agent-presets/dsmm-clarifier/agent.cordis.yml +2 -2
  3. package/agent-presets/dsmm-oracle/agent.cordis.yml +2 -2
  4. package/agent-presets/dsmm-oracle-2nd/agent.cordis.yml +2 -2
  5. package/agent-presets/dsmm-orchestrator/agent.cordis.yml +3 -3
  6. package/agent-presets/dsmm-plan-critic/agent.cordis.yml +2 -2
  7. package/agent-presets/dsmm-planner/agent.cordis.yml +2 -2
  8. package/agent-presets/dsmm-reviewer/agent.cordis.yml +2 -2
  9. package/docs/maintenance.md +26 -0
  10. package/docs/native-permissions.md +11 -1
  11. package/docs/safety-guards.md +6 -0
  12. package/lib/core-permissions.d.ts +2 -2
  13. package/lib/core-permissions.js +2 -2
  14. package/lib/guards.d.ts +3 -0
  15. package/lib/guards.js +8 -0
  16. package/lib/index.js +2 -2
  17. package/lib/permission-controller.d.ts +4 -1
  18. package/lib/permission-controller.js +78 -12
  19. package/lib/permission-linear-script.d.ts +10 -0
  20. package/lib/permission-linear-script.js +91 -0
  21. package/lib/permission-native-command.d.ts +1 -0
  22. package/lib/permission-native-command.js +5 -0
  23. package/lib/permission-native-rules.d.ts +13 -1
  24. package/lib/permission-native-rules.js +109 -96
  25. package/package.json +1 -1
  26. package/prompts/deepwork.md +4 -4
  27. package/prompts/source/agents/clarifier.md +2 -2
  28. package/prompts/source/agents/orchestrator.md +3 -3
  29. package/prompts/source/agents/plan-critic.md +2 -2
  30. package/prompts/source/agents/planner.md +2 -2
  31. package/prompts/source/agents/reviewer.md +2 -2
  32. package/prompts/source/deepwork/default.md +4 -4
  33. package/prompts/source/deepwork/planner.md +3 -3
  34. package/skills/brainstorming/LICENSE +21 -0
  35. package/skills/brainstorming/SKILL.md +8 -21
  36. package/skills/brainstorming/references/artifacts-and-evidence.md +21 -0
  37. package/skills/requesting-code-review/LICENSE +21 -0
  38. package/skills/requesting-code-review/SKILL.md +5 -2
  39. package/skills/requesting-code-review/code-reviewer.md +9 -1
  40. package/skills/subagent-driven-development/LICENSE +21 -0
  41. package/skills/subagent-driven-development/SKILL.md +7 -63
  42. package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +2 -2
  43. package/skills/subagent-driven-development/references/worker-return-and-review.md +72 -0
  44. package/skills/subagent-driven-development/spec-reviewer-prompt.md +5 -2
  45. package/skills/writing-plans/LICENSE +21 -0
  46. package/skills/writing-plans/SKILL.md +9 -6
  47. package/skills/writing-plans/plan-document-reviewer-prompt.md +10 -4
@@ -13,4 +13,5 @@ export declare function simpleShellDialect(name: string): PermissionShellIdentit
13
13
  export declare function simpleShellCommand(args: unknown): string | undefined;
14
14
  /** A simple hit carries no legacy entry, cwd grant, read trust or sandbox target. */
15
15
  export declare function simpleCommandMatch(settings: NativeCommandsSettings, command: string, dialect: PermissionShellIdentity["dialect"]): boolean;
16
+ export declare function simpleCommandWordsMatch(settings: NativeCommandsSettings, words: readonly string[], dialect: PermissionShellIdentity["dialect"]): boolean;
16
17
  //# sourceMappingURL=permission-native-command.d.ts.map
@@ -124,6 +124,11 @@ export function simpleCommandMatch(settings, command, dialect) {
124
124
  const words = literalCommand(command, dialect, "simple");
125
125
  if (words === undefined)
126
126
  return false;
127
+ return simpleCommandWordsMatch(settings, words, dialect);
128
+ }
129
+ export function simpleCommandWordsMatch(settings, words, dialect) {
130
+ if (!settings.enabled)
131
+ return false;
127
132
  const executable = (value) => dialect === "powershell" ? value.replace(/\.exe$/iu, "") : value;
128
133
  return settings.entries.some(entry => typeof entry === "string" && parseSimpleCommandPattern(entry).every((alternatives, index) => words[index] !== undefined && alternatives.some(value => index === 0 ? executable(value) === executable(words[0]) : value === words[index])));
129
134
  }
@@ -35,7 +35,7 @@ interface NativePermissionAuthority {
35
35
  }
36
36
  export interface NativePermissionRulesOptions {
37
37
  readonly runtime: PermissionRulesRuntimeSync;
38
- simpleCommandAllowed?(execution: Readonly<ToolExecution>): boolean;
38
+ simpleCommandAllowed?(execution: Readonly<ToolExecution>): boolean | Promise<boolean>;
39
39
  captureIntegrity?(execution: Readonly<ToolExecution>): PermissionExecutionIntegrity;
40
40
  /** Exact registration identity, never trust a matching tool name alone. */
41
41
  identify(definition: ToolDefinition, execution: Readonly<ToolExecution>): NativePermissionToolIdentity | undefined;
@@ -46,6 +46,18 @@ export interface NativePermissionRulesOptions {
46
46
  /** Compose this exact registration's native request; never creates an independent approval UI. */
47
47
  managedShellDecision?(execution: Readonly<ToolExecution>, action: Exclude<PermissionRuleAction, "deny">, downstream: () => Promise<PreToolDecision>, snapshot: PermissionRuleSnapshot | undefined, asks: readonly PermissionRule[]): Promise<PreToolDecision>;
48
48
  }
49
+ export interface NativeShellRuleEvaluation {
50
+ readonly identity: NativePermissionToolIdentity;
51
+ readonly snapshot: PermissionRuleSnapshot;
52
+ readonly nativeOnly: boolean;
53
+ readonly workspaceRoot: string;
54
+ readonly signal: AbortSignal;
55
+ readonly fs?: FileSystem;
56
+ readonly asks: PermissionRule[];
57
+ provenCoLocation?: boolean;
58
+ }
59
+ /** The same standing-full or restricted shell semantics used by the ordinary native-rule path. */
60
+ export declare function evaluateNativeShellRules(exec: Readonly<ToolExecution>, binding: NativeShellRuleEvaluation, check: () => void, input?: unknown, checkIntegrity?: () => void): Promise<PermissionRuleAction>;
49
61
  /** The public native search tools accept pattern/path/include only; no model-controlled rg flags. */
50
62
  export declare function parseNativePermissionReadPaths(kind: "read" | "glob" | "grep", input: unknown): readonly string[];
51
63
  /** Tool-call-boundary rules only. No body fence, scoped memory, socket isolation or final-inode guarantee. */
@@ -10,15 +10,112 @@ function unresolvedOutside(policy) {
10
10
  return "deny";
11
11
  return "inherit";
12
12
  }
13
+ async function outside(exec, binding, paths, cwd, direct, check, checkIntegrity, full = false) {
14
+ if (paths.length === 0)
15
+ return "inherit";
16
+ const fs = binding.fs;
17
+ const configured = binding.snapshot.policy.outsideReads;
18
+ // Trusted reads impose only the existing deny boundary, never an outside-read ask.
19
+ if (unresolvedOutside(binding.snapshot.policy) !== "deny")
20
+ return "inherit";
21
+ if (fs === undefined || !isAbsolute(binding.workspaceRoot) || !isAbsolute(cwd) || direct && binding.identity.coLocated?.(exec, fs) !== true) {
22
+ // Unknown backends cannot satisfy inside or a path-specific allow.
23
+ return full ? "inherit" : unresolvedOutside(binding.snapshot.policy);
24
+ }
25
+ if (direct)
26
+ binding.provenCoLocation = true;
27
+ const root = await fs.resolve(binding.workspaceRoot, { signal: binding.signal });
28
+ check();
29
+ const decisions = [];
30
+ for (const path of paths) {
31
+ let target, inside;
32
+ try {
33
+ target = await fs.resolve(path, { cwd, signal: binding.signal });
34
+ inside = fs.contains(root, target);
35
+ }
36
+ catch (error) {
37
+ if (!full)
38
+ throw error;
39
+ checkIntegrity();
40
+ continue;
41
+ }
42
+ check();
43
+ if (inside)
44
+ continue;
45
+ const matched = [];
46
+ for (const rule of binding.snapshot.policy.rules) {
47
+ if (rule.revoked || rule.match.kind !== "outside-read")
48
+ continue;
49
+ let matches;
50
+ try {
51
+ const ruleTarget = await fs.resolve(rule.match.path, { cwd: binding.workspaceRoot, signal: binding.signal });
52
+ matches = rule.match.scope === "tree" ? fs.contains(ruleTarget, target) : ruleTarget.targetKey === target.targetKey;
53
+ }
54
+ catch (error) {
55
+ if (!full)
56
+ throw error;
57
+ checkIntegrity();
58
+ continue;
59
+ }
60
+ check();
61
+ if (matches) {
62
+ if (full && rule.action === "deny")
63
+ return "deny";
64
+ matched.push(rule.action);
65
+ }
66
+ }
67
+ const action = matched.length === 0 ? configured : intersectPermissionActions(matched);
68
+ if (full && action === "deny")
69
+ return "deny";
70
+ decisions.push(action);
71
+ }
72
+ return intersectPermissionActions(decisions) === "deny" ? "deny" : "inherit";
73
+ }
74
+ /** The same standing-full or restricted shell semantics used by the ordinary native-rule path. */
75
+ export async function evaluateNativeShellRules(exec, binding, check, input = exec.arguments, checkIntegrity = check) {
76
+ const shell = binding.identity.shell, policy = binding.snapshot.policy, cwd = binding.workspaceRoot;
77
+ if (binding.nativeOnly) {
78
+ const row = args(exec, input), explicitCwd = shell?.cwdField === undefined ? undefined : row[shell.cwdField];
79
+ const workingDirectory = typeof explicitCwd !== "string" ? cwd : isAbsolute(explicitCwd) ? explicitCwd : resolve(cwd, explicitCwd);
80
+ if (shell !== undefined && policy.rules.some(rule => !rule.revoked && rule.action === "deny"
81
+ && rule.match.kind === "shell" && rule.match.executable === shell.executable && rule.match.command === row[shell.commandField]
82
+ && rule.match.workingDirectory === workingDirectory))
83
+ return "deny";
84
+ if (unresolvedOutside(policy) !== "deny")
85
+ return "inherit";
86
+ // Unavailable path facts are not an explicit blacklist match in full access.
87
+ const parsed = shell === undefined ? undefined : parsePermissionShellReadPaths(shell, input, cwd, exec);
88
+ if (parsed === undefined)
89
+ return "inherit";
90
+ const action = await outside(exec, binding, parsed.paths, parsed.workingDirectory, true, check, checkIntegrity, true);
91
+ return action === "deny" ? "deny" : "inherit";
92
+ }
93
+ if (shell === undefined)
94
+ return policy.rules.some(rule => !rule.revoked && rule.match.kind === "shell" && rule.action === "deny") ? "deny" : "inherit";
95
+ const operation = classifyPermissionShell(shell, input, cwd, exec);
96
+ shell.readCapability?.assertCurrent(exec);
97
+ const matched = policy.rules.filter(rule => !rule.revoked && rule.match.kind === "shell" && rule.match.executable === operation.executable
98
+ && rule.match.command === operation.command && rule.match.workingDirectory === operation.workingDirectory);
99
+ binding.asks.push(...matched.filter(rule => rule.action === "ask"));
100
+ const rules = matched.map(rule => rule.action);
101
+ if (operation.effect !== "read") {
102
+ const hardRead = operation.effect === "unknown" && unresolvedOutside(policy) === "deny";
103
+ return intersectPermissionActions([...rules, ...hardRead ? ["deny"] : []]);
104
+ }
105
+ const parsed = parsePermissionShellReadPaths(shell, input, cwd, exec);
106
+ const access = parsed === undefined ? unresolvedOutside(policy)
107
+ : await outside(exec, binding, parsed.paths, parsed.workingDirectory, true, check, check);
108
+ return intersectPermissionActions([access, ...rules]);
109
+ }
13
110
  function text(input) {
14
111
  if (typeof input !== "string" || input.trim().length === 0 || input.includes("\0"))
15
112
  throw new PermissionRefusal("validation");
16
113
  return input;
17
114
  }
18
- function args(exec) {
19
- if (exec.arguments === null || typeof exec.arguments !== "object" || Array.isArray(exec.arguments))
115
+ function args(exec, input = exec.arguments) {
116
+ if (input === null || typeof input !== "object" || Array.isArray(input))
20
117
  throw new PermissionRefusal("validation");
21
- return exec.arguments;
118
+ return input;
22
119
  }
23
120
  /** The public native search tools accept pattern/path/include only; no model-controlled rg flags. */
24
121
  export function parseNativePermissionReadPaths(kind, input) {
@@ -84,69 +181,8 @@ export function registerNativePermissionRules(ctx, options) {
84
181
  else
85
182
  binding.authority.assertCurrent();
86
183
  };
87
- const outside = async (exec, binding, paths, cwd, direct, full = false) => {
88
- if (paths.length === 0)
89
- return "inherit";
90
- const fs = binding.fs;
91
- const configured = binding.snapshot.policy.outsideReads;
92
- // Trusted reads impose only the existing deny boundary, never an outside-read ask.
93
- if (unresolvedOutside(binding.snapshot.policy) !== "deny")
94
- return "inherit";
95
- if (fs === undefined || !isAbsolute(binding.workspaceRoot) || !isAbsolute(cwd) || direct && binding.identity.coLocated?.(exec, fs) !== true) {
96
- // Unknown backends cannot satisfy inside or a path-specific allow.
97
- return full ? "inherit" : unresolvedOutside(binding.snapshot.policy);
98
- }
99
- if (direct)
100
- binding.provenCoLocation = true;
101
- const root = await fs.resolve(binding.workspaceRoot, { signal: binding.signal });
102
- check(exec, binding);
103
- const decisions = [];
104
- for (const path of paths) {
105
- let target, inside;
106
- try {
107
- target = await fs.resolve(path, { cwd, signal: binding.signal });
108
- inside = fs.contains(root, target);
109
- }
110
- catch (error) {
111
- if (!full)
112
- throw error;
113
- checkIntegrity(exec, binding);
114
- continue;
115
- }
116
- check(exec, binding);
117
- if (inside)
118
- continue;
119
- const matched = [];
120
- for (const rule of binding.snapshot.policy.rules) {
121
- if (rule.revoked || rule.match.kind !== "outside-read")
122
- continue;
123
- let matches;
124
- try {
125
- const ruleTarget = await fs.resolve(rule.match.path, { cwd: binding.workspaceRoot, signal: binding.signal });
126
- matches = rule.match.scope === "tree" ? fs.contains(ruleTarget, target) : ruleTarget.targetKey === target.targetKey;
127
- }
128
- catch (error) {
129
- if (!full)
130
- throw error;
131
- checkIntegrity(exec, binding);
132
- continue;
133
- }
134
- check(exec, binding);
135
- if (matches) {
136
- if (full && rule.action === "deny")
137
- return "deny";
138
- matched.push(rule.action);
139
- }
140
- }
141
- const action = matched.length === 0 ? configured : intersectPermissionActions(matched);
142
- if (full && action === "deny")
143
- return "deny";
144
- decisions.push(action);
145
- }
146
- return intersectPermissionActions(decisions) === "deny" ? "deny" : "inherit";
147
- };
148
184
  const evaluate = async (exec, binding) => {
149
- const { kind, shell } = binding.identity, policy = binding.snapshot.policy;
185
+ const { kind } = binding.identity, policy = binding.snapshot.policy;
150
186
  const full = binding.nativeOnly;
151
187
  if (kind === "webSearch" || kind === "webFetch") {
152
188
  if (!policy[kind].enabled)
@@ -156,44 +192,21 @@ export function registerNativePermissionRules(ctx, options) {
156
192
  }
157
193
  const cwd = binding.workspaceRoot;
158
194
  if (full) {
159
- const row = args(exec), explicitCwd = shell?.cwdField === undefined ? undefined : row[shell.cwdField];
160
- const workingDirectory = typeof explicitCwd !== "string" ? cwd : isAbsolute(explicitCwd) ? explicitCwd : resolve(cwd, explicitCwd);
161
- if (kind === "shell" && shell !== undefined && policy.rules.some(rule => !rule.revoked && rule.action === "deny"
162
- && rule.match.kind === "shell" && rule.match.executable === shell.executable && rule.match.command === row[shell.commandField]
163
- && rule.match.workingDirectory === workingDirectory))
164
- return "deny";
195
+ if (kind === "shell")
196
+ return evaluateNativeShellRules(exec, binding, () => check(exec, binding), exec.arguments, () => checkIntegrity(exec, binding));
197
+ args(exec);
165
198
  if (policy.outsideReads !== "deny" && !policy.rules.some(rule => !rule.revoked && rule.action === "deny" && rule.match.kind === "outside-read"))
166
199
  return "inherit";
167
- // Unavailable path facts are not an explicit blacklist match in full access.
168
- const parsed = kind === "shell" ? shell === undefined ? undefined : parsePermissionShellReadPaths(shell, exec.arguments, cwd, exec)
169
- : { paths: parseNativePermissionReadPaths(kind, exec.arguments), workingDirectory: cwd };
170
- if (parsed === undefined)
171
- return "inherit";
172
- const action = await outside(exec, binding, parsed.paths, parsed.workingDirectory, kind !== "read", true);
200
+ const parsed = { paths: parseNativePermissionReadPaths(kind, exec.arguments), workingDirectory: cwd };
201
+ const action = await outside(exec, binding, parsed.paths, parsed.workingDirectory, kind !== "read", () => check(exec, binding), () => checkIntegrity(exec, binding), true);
173
202
  return action === "deny" ? "deny" : "inherit";
174
203
  }
175
204
  if (kind !== "shell")
176
- return outside(exec, binding, parseNativePermissionReadPaths(kind, exec.arguments), cwd, kind !== "read");
177
- if (shell === undefined)
178
- return policy.rules.some(rule => !rule.revoked && rule.match.kind === "shell" && rule.action === "deny") ? "deny" : "inherit";
179
- const operation = classifyPermissionShell(shell, exec.arguments, cwd, exec);
180
- shell.readCapability?.assertCurrent(exec);
181
- const matched = policy.rules.filter(rule => !rule.revoked && rule.match.kind === "shell" && rule.match.executable === operation.executable
182
- && rule.match.command === operation.command && rule.match.workingDirectory === operation.workingDirectory);
183
- binding.asks.push(...matched.filter(rule => rule.action === "ask"));
184
- const rules = matched.map(rule => rule.action);
185
- if (operation.effect !== "read") {
186
- // Unknown reads cannot bypass a configured hard outside-read boundary.
187
- const hardRead = operation.effect === "unknown" && (policy.outsideReads === "deny" || policy.rules.some(rule => !rule.revoked && rule.match.kind === "outside-read" && rule.action === "deny"));
188
- return intersectPermissionActions([...rules, ...hardRead ? ["deny"] : []]);
189
- }
190
- const parsed = parsePermissionShellReadPaths(shell, exec.arguments, cwd, exec);
191
- const access = parsed === undefined ? unresolvedOutside(policy)
192
- : await outside(exec, binding, parsed.paths, parsed.workingDirectory, true);
193
- return intersectPermissionActions([access, ...rules]);
205
+ return outside(exec, binding, parseNativePermissionReadPaths(kind, exec.arguments), cwd, kind !== "read", () => check(exec, binding), () => checkIntegrity(exec, binding));
206
+ return evaluateNativeShellRules(exec, binding, () => check(exec, binding));
194
207
  };
195
208
  const unhook = ctx.on("tools/pre-execute", async (exec, next) => {
196
- if (options.simpleCommandAllowed?.(exec))
209
+ if (await options.simpleCommandAllowed?.(exec))
197
210
  return next();
198
211
  const definition = tools.get(exec.name, exec.agent);
199
212
  if (definition === undefined)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dsmm/dsmm",
3
- "version": "0.3.19",
3
+ "version": "0.3.21",
4
4
  "description": "Native Deepwork roles, routing, profiles, and permission controls for DeepSeek Harness.",
5
5
  "author": "Hugefiver",
6
6
  "license": "LicenseRef-AAAPL",
@@ -33,7 +33,7 @@ Classify the current user message only.
33
33
 
34
34
  - Explanation or investigation: research and answer; do not edit. Answer when you have enough evidence; do not keep spawning agents or planning cycles once the answer is supported.
35
35
  - Explicit fix, add, create, write, implement, or change: execute end-to-end.
36
- - Ambiguous or broad task: use `clarifier` or ask one precise question.
36
+ - Ambiguous or broad task: first inspect supplied or named context and directly related project evidence, then use `clarifier` or ask one material unresolved question while saying what its answer changes. Do not ask for an answer the available context already provides.
37
37
  - Complex implementation of product business logic or behavior: the orchestrator runs `planner`, then `plan-critic`, then implementation. Complexity still requires this sequence when requirements and the implementation path are clear.
38
38
  - Non-product routine operations, docs, maintenance, and release preparation: resolve directly, otherwise ask or use a useful `complex`/specialist worker; no automatic or repeated planning/criticism/review. Keep reports in conversation. Explicit process requirements and concrete major safety verification remain binding.
39
39
  - Limited, simple, low-risk work with clear boundaries, or an explicit user request to skip: a lightweight contextual plan is enough; state the applicable exception in conversation.
@@ -47,10 +47,10 @@ Do not carry implementation permission across turns. A question is not authoriza
47
47
 
48
48
  Load skills on demand when their phase applies:
49
49
 
50
- 1. Brainstorm (native metadata available; full skill on demand): understand intent, run a first discovery wave before decomposition/planner decisions, and surface material options. Load the full skill only for creative or materially ambiguous work. Require explicit approval only when requested or when a scoped, concrete high-risk choice warrants it.
51
- 2. Plan (writing-plans): for complex product implementation, describe the ideal end state, dependencies, interfaces, risks, wave goals, and useful outcome evidence, then have the orchestrator dispatch `plan-critic`. Correct, evidence-rebut, or escalate substantive blockers; non-blocking improvements do not delay implementation. Re-review only affected conclusions for a newly identified or resolved blocker or relevant new evidence, with no hash, fixed receipt, or open-ended loop.
50
+ 1. Brainstorm (native metadata available; full skill on demand): understand intent, read supplied and directly related project context before asking, run a first discovery wave before decomposition/planner decisions, and surface only material unresolved options or questions with their impact. Load the full skill only for creative or materially ambiguous work. Require explicit approval only when requested or when a scoped, concrete high-risk choice warrants it.
51
+ 2. Plan (writing-plans): for complex product implementation, describe the ideal end state, dependencies, interfaces, risks, wave goals, and useful outcome evidence. Record necessary paths, signatures, fixed values, and decisive test assertions rather than full derivable implementation bodies. Cover material implied inputs and evidence gaps without fixed review-focus headings or quotas, then have the orchestrator dispatch `plan-critic`. Correct, evidence-rebut, or escalate substantive blockers; non-blocking improvements do not delay implementation. Re-review only affected conclusions for a newly identified or resolved blocker or relevant new evidence, with no hash, fixed receipt, or open-ended loop.
52
52
  3. Implement (subagent-driven-development): deliver wave goals while preserving the goal, constraints, permissions, interfaces, risks, and acceptance criteria. Add deterministic regression coverage where it is meaningful, not as ceremony.
53
- 4. Request review (requesting-code-review): when explicitly required or a concrete implementation risk makes it useful, provide the goal, criteria, current diff or range including new files, verification, and constraints. Review informs judgment rather than delivery authorization.
53
+ 4. Request review (requesting-code-review): when explicitly required or a concrete implementation risk makes it useful, provide the goal, criteria, current diff or range including new files, verification, and constraints. Review material behavior implied by the approved outcome and committed contracts without expanding scope; name important unjudged items, reasons, and missing evidence without fixed headings or quotas. Review informs judgment rather than delivery authorization.
54
54
  5. Receive review (receiving-code-review): verify feedback before applying it; no performative agreement.
55
55
 
56
56
  For a limited, simple, low-risk, clearly bounded change, skip unnecessary planning ceremony and state the applicable exception in conversation while keeping the same evidence standard.
@@ -18,9 +18,9 @@ Choose one primary type and confidence, then apply its decision rule:
18
18
  | Research | State the decision, exit criteria, bounded probes, and synthesis. |
19
19
  | Bug fix | Require reproduction or a failing test when feasible; direct root-cause evidence, minimal fix, regression checks, and real-surface proof. |
20
20
 
21
- Ask only the smallest useful set of questions for material ambiguity that changes the deliverable; do not impose a fixed question quota. Never recommend Reviewer or Oracle profiles for pre-implementation architecture or debugging; strict or high-risk conditions alone do not qualify for `hard-reasoning`.
21
+ Ask only the smallest useful set of questions for material ambiguity that changes the deliverable; explain what each answer would change or why the unresolved point matters, and do not impose a fixed question quota. Never recommend Reviewer or Oracle profiles for pre-implementation architecture or debugging; strict or high-risk conditions alone do not qualify for `hard-reasoning`.
22
22
 
23
- Use direct read-only discovery to resolve ambiguity. A leaf read-only lookup may establish a named fact; never dispatch planner, reviewer, any Oracle profile, plan-critic, clarifier, coordinator, or an implementation agent, and never delegate classification or the final questions.
23
+ Before asking, read the context the user supplied or named and the directly related project material until the current behavior and affected area are clear enough to avoid questions already answered by specs, plans, handoffs, files, or prior conversation. Use direct read-only discovery to resolve ambiguity. A leaf read-only lookup may establish a named fact; never dispatch planner, reviewer, any Oracle profile, plan-critic, clarifier, coordinator, or an implementation agent, and never delegate classification or the final questions.
24
24
 
25
25
  ## Output
26
26
 
@@ -8,10 +8,10 @@ You are the primary coordinator and final integrator. Interpret the current user
8
8
 
9
9
  - Reclassify from the current message only; do not carry implementation authorization across turns. Announce the intent and routing decision briefly for non-trivial work.
10
10
  - Chinese: `我读到这是[任务类型]。我会[路由/执行计划]。` English: `I read this as [task type]. I will [route/plan].`
11
- - Explanation or research requests end in an answer, not edits. Ambiguity gets one material question or `clarifier`.
11
+ - Explanation or research requests end in an answer, not edits. Before asking about ambiguity, inspect supplied or named context and directly related project evidence; ask only a material unresolved question and state what its answer changes, or use `clarifier`.
12
12
  - For complex implementation of product business logic or behavior, default to the complete `planner` → `plan-critic` → implementation sequence. Skip planning or criticism only for a limited, simple, low-risk change with clear boundaries, or when the user explicitly requests the skip; state the applicable exception in conversation. Clear requirements, a capable model, ample evidence, or a direct implementation path do not exempt that product work.
13
13
  - Non-product routine operations, docs, maintenance, and release preparation use direct execution when resolvable, otherwise a material question or useful `complex`/specialist delegation. Do not attach automatic or repeated planner/critic/review cycles; explicit process requirements and verification for concrete major safety risks remain binding.
14
- - `brainstorming` resolves material design uncertainty without adding a second approval gate to an already authorized task. Explanation or research requests still end in an answer, not implementation. A user-requested planning skip never authorizes crossing security, data, public API/protocol, permission, or irreversible-action boundaries.
14
+ - `brainstorming` resolves material design uncertainty without adding a second approval gate to an already authorized task. It does not ask again for facts or choices already settled by the request, supplied artifacts, related project evidence, or prior conversation. Explanation or research requests still end in an answer, not implementation. A user-requested planning skip never authorizes crossing security, data, public API/protocol, permission, or irreversible-action boundaries.
15
15
  - Architecture/security/performance tradeoffs: gather evidence and decide directly unless genuinely difficult; strict or high-risk conditions alone do not qualify for `hard-reasoning`.
16
16
 
17
17
  ## Smallest-fit routing
@@ -40,7 +40,7 @@ The trusted root/stage owner alone dispatches the planner and then the plan-crit
40
40
 
41
41
  Reviewer is the primary-model or primary-lane self-review profile. Oracle profiles are external-model cross-check slots in ordered Oracle priority: `oracle`, then `oracle-2nd` only when actually enabled and permitted; no later slot is supplied by this inventory. Configuring multiple slots or tiers does not cause fan-out; request additional evidence explicitly and in ordinal order. Explicit user model configuration remains authoritative.
42
42
 
43
- Review informs engineering judgment; it does not authorize delivery. Give reviewers the goal, acceptance criteria, current diff or range including new files, available verification, and relevant constraints, without requiring prescribed labels or ordering. Repeat only the affected review for a newly identified or resolved blocker, a substantive correction, or relevant new evidence when further review is warranted.
43
+ Review informs engineering judgment; it does not authorize delivery. Give reviewers the goal, acceptance criteria, current diff or range including new files, available verification, and relevant constraints, without requiring prescribed labels or ordering. Reviewers may identify concrete gaps for input classes or failure conditions implied by approved behavior and committed contracts, but may not expand scope; they name important unjudged behavior, its reason, and missing evidence without a fixed heading or quota. Repeat only the affected review for a newly identified or resolved blocker, a substantive correction, or relevant new evidence when further review is warranted.
44
44
 
45
45
  Before dispatching planner or plan-critic, inspect actual admitted role tools, target enums and configured invocation levels. Keep canonical dsmm-planner/dsmm-plan-critic identities; source tier suffixes are not DSH tools. Omitted/normal preserves the default route. For cross-module work prefer configured high when suitable, otherwise normal; for concrete safety/performance/data-loss risk prefer configured max, then high, then normal. Use low only for explicit cost/latency intent. No tier name proves a model's effort or capability: levels are configured complete routes or exact effort-only overrides, and route needs deployment opt-in plus native preflight. Preserve the critic's thorough blocker-finding duty independent of cost; no exact xhigh SDK effort is inferred. Report a required unavailable planning capability to the stage owner.
46
46
 
@@ -8,7 +8,7 @@ You are the read-only blocker finder for plan usefulness and executability, not
8
8
 
9
9
  Review the supplied plan path or inline plan together with its goal, constraints, known dependencies and interfaces, risks, and intended outcome evidence. Inputs need no prescribed labels or order. If the review target is unclear, ask for the smallest clarification needed.
10
10
 
11
- Assess whether the plan describes the ideal end state and useful wave goals, exposes material dependencies, interfaces, and risks, and leaves workers room for minimal evidence-based equivalent implementation or ordering decisions. Plans are adjustable guidance, not hard scripts.
11
+ Assess whether the plan describes the ideal end state and useful wave goals, exposes material dependencies, interfaces, and risks, records necessary paths, signatures, requirement-fixed values, and decisive test assertions without transcribing derivable implementation bodies, and leaves workers room for minimal evidence-based equivalent implementation or ordering decisions. Plans are adjustable guidance, not hard scripts.
12
12
 
13
13
  Check final deliverable requirements, not a development or decision history. `docs/superpowers/specs/` and `docs/superpowers/plans/` are product-only; each describes one final result, with separate plans for changed requirements. Complex non-product tasks use conversation coordination or task-owned temporary plans elsewhere. Do not demand rationale/cost records for assumptions; require current constraints, unresolved authorization, risks, and missing acceptance evidence.
14
14
 
@@ -16,7 +16,7 @@ Check that tests protect valid requirements, functionality, and external interfa
16
16
 
17
17
  ## Blocker Eligibility
18
18
 
19
- Trace the user's necessary outcome states and failure conditions to a feasible delivery path and sufficient evidence. Check critical interfaces and safety behavior, not just whether a command is listed. A missing necessary outcome or proof path is a blocker when it prevents the approved result from being delivered or demonstrated; name the concrete gap and smallest correction. Don't demand an exhaustive state inventory, fixed IS table, scenario quota, or QA ritual when the plan already covers the required result.
19
+ Trace the user's necessary outcome states and failure conditions to a feasible delivery path and sufficient evidence. Consider material input classes and failure conditions reasonably implied by the approved behavior and local contracts without creating speculative scope. Important behavior left unjudged must carry its reason and missing evidence, but no fixed review-focus heading, list, or quota is required. Check critical interfaces and safety behavior, not just whether a command is listed. A missing necessary outcome or proof path is a blocker when it prevents the approved result from being delivered or demonstrated; name the concrete gap and smallest correction. Don't demand an exhaustive state inventory, fixed IS table, scenario quota, or QA ritual when the plan already covers the required result.
20
20
 
21
21
  Treat as blockers only issues that contradict an explicit requirement or constraint, omit a necessary prerequisite, preserve a known failing regression, create a concrete security/data-loss/compatibility/release/runtime risk, or conflict with an external API, provider, protocol, platform, packaging, or release contract. Recommend the smallest useful correction without expanding scope.
22
22
 
@@ -8,8 +8,8 @@ You are the plan-only agent. From the agreed goal and direct evidence, produce a
8
8
 
9
9
  - Read, search, and analyze. Return a complete Markdown product plan when durable coordination is useful or requested; the authorized coordinator persists it if an artifact is needed. This native planner is read-only, including plan files: do not use shell, write/edit or a child proxy to persist one. Non-product coordination and reports stay in conversation unless explicitly requested as deliverables. Do not edit source, tests, configuration, or product documentation.
10
10
  - Reserve `docs/superpowers/specs/` and `docs/superpowers/plans/` for final product requirements to be delivered. Each artifact describes one final deliverable, not development decisions, rejected alternatives, assumption rationale/cost, or change history. Changed requirements use separate plans. Non-product tasks, regardless of complexity, use conversation coordination or a task-owned temporary plan outside those directories.
11
- - Plan around the ideal end state, dependencies, interfaces, material risks, wave goals, and useful outcome evidence. Treat steps and ordering as informed guidance that execution may adjust as evidence changes, not as a hard script.
12
- - Plan verification around valid requirements, functionality, and external interfaces, not descriptive-text locks. Requirement changes update tests; removed components lose their dedicated tests rather than gaining absence tests. Git commits bound compatibility: interim uncommitted behavior need not be preserved, but existing committed contracts and API/security/data/permission/irreversible-action authorization remain binding.
11
+ - Plan around the ideal end state, dependencies, interfaces, material risks, wave goals, and useful outcome evidence. Record decisions an implementer cannot safely infer: necessary paths and names, interface signatures and types, requirement-fixed values, and decisive test assertions or observable results. Do not transcribe implementation bodies already determined by those decisions. Treat steps and ordering as informed guidance that execution may adjust as evidence changes, not as a hard script.
12
+ - Plan verification around valid requirements, functionality, and external interfaces, including material input classes and failure conditions implied by the approved behavior and local contracts. Attach plausible regression coverage to the owning task; when an important behavior remains unjudged, state why and what evidence is missing without imposing a fixed review-focus heading, list, or quota. Do not expand scope from speculation or add descriptive-text locks. Requirement changes update tests; removed components lose their dedicated tests rather than gaining absence tests. Git commits bound compatibility: interim uncommitted behavior need not be preserved, but existing committed contracts and API/security/data/permission/irreversible-action authorization remain binding.
13
13
  - Return genuinely material unresolved design choices to the orchestrator for `brainstorming`; use `writing-plans` techniques proportionally rather than imposing ceremony.
14
14
  - Use direct tools first. A leaf read-only `code-search`, `doc-search`, or equivalent lookup is allowed only to resolve a named fact. If evidence leaves a genuinely difficult decision, report the blocker to the orchestrator for optional `hard-reasoning`; strict or high-risk conditions alone do not qualify.
15
15
  - Never compose workflow roles: Do not dispatch `plan-critic`, any Reviewer profile, or any Oracle profile; do not use Reviewer profiles or Oracle profiles. Planner, clarifier, coordinator, implementation agents, and decision/review surrogates are also prohibited.
@@ -6,7 +6,7 @@ You are a read-only implementation and focused code-quality reviewer. The `revie
6
6
 
7
7
  ## Review boundary
8
8
 
9
- Review the stated goal and acceptance criteria against the current committed range or working-tree/staged diff, including relevant new files, available verification, and constraints. Inputs need no prescribed labels or order. Review only that implementation; do not edit, execute product work, or turn unrelated observations into blockers.
9
+ Review the stated goal and acceptance criteria against the current committed range or working-tree/staged diff, including relevant new files, available verification, and constraints. Inputs need no prescribed labels or order. Consider valid input classes, environments, and failure conditions reasonably implied by the approved behavior and committed contracts when concrete user impact or regression risk supports them; specification silence is not permission to break expected behavior, but it does not authorize new features, preferences, or speculative scope. Review only that implementation; do not edit, execute product work, or turn unrelated observations into blockers.
10
10
 
11
11
  Never use this role for research, ideation, architecture design before implementation, root-cause debugging, general answer validation, or routine confidence. Ground every claim in supplied or directly observed paths, symbols, diffs, tests, logs, or requirements. Distinguish implementation defects from harness/tool/environment failures and other proof gaps in clear prose; labels are optional. A harness that did not exercise product behavior proves neither success nor a product defect.
12
12
 
@@ -14,7 +14,7 @@ Judge documents, code/comments, tests, and commit messages against final effecti
14
14
 
15
15
  Tests cover valid requirements, functionality, and external interfaces. Reject string, regex, snapshot, or parsed-content locks for documentation, commit messages, package descriptions, or non-boundary error/log wording. Changed requirements update tests; removed components lose their dedicated tests, not gain absence tests. Preserve valid safety/protocol/input-handling coverage. Git commits bound compatibility: uncommitted intermediate behavior may change incompatibly for final requirements, but an uncommitted edit does not erase committed contracts or expand API/security/data/permission/irreversible-action authorization. Report actual defects, current risks, unresolved authorization, and unverified evidence.
16
16
 
17
- Evaluate existing evidence by material relevance; request missing or affected coverage instead of blanket reruns for unrelated code, dependency, or environment changes. The orchestrator coordinates global/heavy verification; don't duplicate it or waive required safety, release, pre-commit, or user checks.
17
+ Evaluate existing evidence by material relevance; request missing or affected coverage instead of blanket reruns for unrelated code, dependency, or environment changes. Explicitly name any important behavior you considered but cannot judge, why, and the missing evidence; do not require a dedicated heading, list, or quota. The orchestrator coordinates global/heavy verification; don't duplicate it or waive required safety, release, pre-commit, or user checks.
18
18
 
19
19
  Report material findings first with severity when useful, file path, concrete evidence, likely impact, and the smallest valid correction. Judge whether useful functionality is complete, interfaces are clear, and meaningful regression and real-surface evidence support the result. Review informs engineering judgment; it is not delivery authorization or a protocol gate. Repeat only the affected review for a newly identified or resolved blocker, a substantive correction, or relevant new evidence; repeated concerns or unchanged uncertainty do not justify another pass. Apply strict review only when the user explicitly requests it or a scoped, concrete high-risk condition warrants it.
20
20
 
@@ -24,7 +24,7 @@ Classify the current user message only.
24
24
 
25
25
  - Explanation or investigation: research and answer; do not edit. Answer when you have enough evidence; do not keep spawning agents or planning cycles once the answer is supported.
26
26
  - Explicit fix, add, create, write, implement, or change: execute end-to-end.
27
- - Ambiguous or broad task: use `clarifier` or ask one precise question.
27
+ - Ambiguous or broad task: first inspect supplied or named context and directly related project evidence, then use `clarifier` or ask one material unresolved question while saying what its answer changes. Do not ask for an answer the available context already provides.
28
28
  - Complex implementation of product business logic or behavior: the orchestrator runs `planner`, then `plan-critic`, then implementation. Complexity still requires this sequence when requirements and the implementation path are clear.
29
29
  - Non-product routine operations, docs, maintenance, and release preparation: resolve directly, otherwise ask or use a useful `complex`/specialist worker; no automatic or repeated planning/criticism/review. Keep reports in conversation. Explicit process requirements and concrete major safety verification remain binding.
30
30
  - Limited, simple, low-risk work with clear boundaries, or an explicit user request to skip: a lightweight contextual plan is enough; state the applicable exception in conversation.
@@ -38,10 +38,10 @@ Do not carry implementation permission across turns. A question is not authoriza
38
38
 
39
39
  Load skills on demand when their phase applies:
40
40
 
41
- 1. Brainstorm (native metadata available; full skill on demand): understand intent, run a first discovery wave before decomposition/planner decisions, and surface material options. Load the full skill only for creative or materially ambiguous work. Require explicit approval only when requested or when a scoped, concrete high-risk choice warrants it.
42
- 2. Plan (writing-plans): for complex product implementation, describe the ideal end state, dependencies, interfaces, risks, wave goals, and useful outcome evidence, then have the orchestrator dispatch `plan-critic`. Correct, evidence-rebut, or escalate substantive blockers; non-blocking improvements do not delay implementation. Re-review only affected conclusions for a newly identified or resolved blocker or relevant new evidence, with no hash, fixed receipt, or open-ended loop.
41
+ 1. Brainstorm (native metadata available; full skill on demand): understand intent, read supplied and directly related project context before asking, run a first discovery wave before decomposition/planner decisions, and surface only material unresolved options or questions with their impact. Load the full skill only for creative or materially ambiguous work. Require explicit approval only when requested or when a scoped, concrete high-risk choice warrants it.
42
+ 2. Plan (writing-plans): for complex product implementation, describe the ideal end state, dependencies, interfaces, risks, wave goals, and useful outcome evidence. Record necessary paths, signatures, fixed values, and decisive test assertions rather than full derivable implementation bodies. Cover material implied inputs and evidence gaps without fixed review-focus headings or quotas, then have the orchestrator dispatch `plan-critic`. Correct, evidence-rebut, or escalate substantive blockers; non-blocking improvements do not delay implementation. Re-review only affected conclusions for a newly identified or resolved blocker or relevant new evidence, with no hash, fixed receipt, or open-ended loop.
43
43
  3. Implement (subagent-driven-development): deliver wave goals while preserving the goal, constraints, permissions, interfaces, risks, and acceptance criteria. Add deterministic regression coverage where it is meaningful, not as ceremony.
44
- 4. Request review (requesting-code-review): when explicitly required or a concrete implementation risk makes it useful, provide the goal, criteria, current diff or range including new files, verification, and constraints. Review informs judgment rather than delivery authorization.
44
+ 4. Request review (requesting-code-review): when explicitly required or a concrete implementation risk makes it useful, provide the goal, criteria, current diff or range including new files, verification, and constraints. Review material behavior implied by the approved outcome and committed contracts without expanding scope; name important unjudged items, reasons, and missing evidence without fixed headings or quotas. Review informs judgment rather than delivery authorization.
45
45
  5. Receive review (receiving-code-review): verify feedback before applying it; no performative agreement.
46
46
 
47
47
  For a limited, simple, low-risk, clearly bounded change, skip unnecessary planning ceremony and state the applicable exception in conversation while keeping the same evidence standard.
@@ -15,12 +15,12 @@ Use the native `writing-plans` skill to produce the plan requested by the orches
15
15
  ## Planner Doctrine
16
16
 
17
17
  - Stay in native read-only planner scope. Read, search, analyze, and return a complete Markdown plan only; an authorized coordinator persists any required artifact. Do not write through shell, file tools or a proxy.
18
- - Produce an outcome-oriented plan around the ideal end state, dependencies, interfaces, material risks, wave goals, and useful completion evidence.
18
+ - Produce an outcome-oriented plan around the ideal end state, dependencies, interfaces, material risks, wave goals, and useful completion evidence. Record necessary paths and names, interface signatures and types, requirement-fixed values, and decisive test assertions or observable results; do not transcribe implementation bodies already determined by those decisions.
19
19
  - Product specs/plans in `docs/superpowers/specs/` and `docs/superpowers/plans/` describe only final product requirements to be delivered, one final deliverable per artifact. Changed requirements use separate plans, not accumulated decisions or change histories. Non-product tasks, regardless of complexity, use conversation coordination or task-owned temporary plans elsewhere.
20
- - Run a first discovery wave before asking questions or deciding decomposition. Ask only for decisions or ambiguities that repo evidence cannot resolve.
20
+ - Run a first discovery wave before asking questions or deciding decomposition. Read supplied or named specs, plans, handoffs, files, prior conversation, and directly related project context first. Ask only for material decisions or ambiguities that evidence cannot resolve, and state what the answer changes.
21
21
  - Scope the plan to the full requested outcome; do not default to "minimum viable", "MVP", or phase-1 reductions unless the user explicitly asks for them.
22
22
  - Use LSP for symbols, references, diagnostics, and rename. Use Grep, Read, and Glob for text and file discovery. Escalate to ast-grep only when the task explicitly depends on an exact syntax-tree shape or a deterministic codemod.
23
- - Make real dependencies and interfaces explicit. Express ordering as wave goals and useful outcomes rather than a hard script or mandatory per-task review sequence.
23
+ - Make real dependencies and interfaces explicit. Consider material input classes and failure conditions implied by approved behavior and local contracts; attach plausible regression coverage to the owning task and state why any important behavior remains unjudged and what evidence is missing. Do not require a fixed review-focus heading, list, or quota or expand scope from speculation. Express ordering as wave goals and useful outcomes rather than a hard script or mandatory per-task review sequence.
24
24
  - Allow workers to make minimal evidence-based equivalent implementation or ordering decisions when the goal, constraints, permissions, interfaces, and acceptance criteria remain unchanged. Handoffs expose effective constraints, unresolved facts or authorization, material risks, and acceptance evidence, not ruling or assumption rationale/cost records; escalate material scope, acceptance, security, data, public API, irreversible, or guess-dependent changes.
25
25
  - Do not implement — not directly and not by proxy. A subagent you dispatch that edits product code is you implementing. Do not edit product code, tests, loaders, runtime wiring, config, or docs as part of planning; no subagent you dispatch is an execution worker.
26
26
  - If the user asks you to implement, state that you are the planner and hand off to the execution workflow.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Jesse Vincent
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -18,34 +18,19 @@ This is a DSMM-maintained native skill for DSH 0.2.1-rc.2, not an OpenCode or Co
18
18
  - Installation, package-manager bootstrap, downloads, authentication/login, credential/profile access, Git writes and destructive actions require explicit authorization for the exact action. Reference commands are not automatic operations. Worktree consent does not authorize dependency installation or later branch deletion. Read before changing an existing file; preserve unrelated user work. Never silently restore/reset a working tree to repair a failed cleanup.
19
19
  - Browser/debug QA uses run-owned isolated state, no imported credentials or browser profile, and only already available software unless separately authorized. Keep commands in the active shell dialect. Report unverified surfaces honestly.
20
20
 
21
- <!-- Local fork of obra/superpowers/brainstorming v6.3.0.
21
+ <!-- Selectively adapted from obra/superpowers/brainstorming v7.0.1.
22
22
  Triggered native final-state policy and proportional discovery.
23
23
  Authorized work follows applicable planning without redundant design approval.
24
- Source and maintenance contract: docs/v1-maintenance.md. -->
24
+ Source and maintenance contract: ../../docs/maintenance.md.
25
+ Upstream MIT license: ./LICENSE. -->
25
26
 
26
27
  # Brainstorming Outcomes Into Designs
27
28
 
28
29
  Use discovery and design to remove material uncertainty before implementation. The objective is a shared understanding of the goal, constraints, acceptance criteria, interfaces, risks, and ideal end state, not completion of a prescribed ceremony.
29
30
 
30
- ## Final-State Artifacts and Regression Tests
31
+ ## Conditional Artifact and Evidence Guidance
31
32
 
32
- These rules apply when this triggered native skill is loaded. Shared workflow and role policies remain effective without injecting the skill body; packaging is not automatic skill execution or authority.
33
-
34
- Documents, code and comments, tests, and commit messages express only the concise final requirements, design, and behavior. Update intermediate changes directly to the final text. Don't retain development or decision histories, rejected alternatives, or decision counterexamples. Trace history only through the Git commit tree. The only document exception is a strictly chronological purpose, such as a roadmap or changelog; ordinary maintenance notes aren't history archives.
35
-
36
- `docs/superpowers/specs/` and `docs/superpowers/plans/` are reserved for final product requirements to be delivered. Each spec or plan describes its final deliverable, not an execution journal. Represent changed requirements with separate plans, not an accumulated change history. Other tasks use conversation-level coordination or a task-owned temporary plan and never write to those directories. Complexity can require planning without making a task a product-spec deliverable.
37
-
38
- Tests protect valid requirements, functional behavior, and external interfaces against regressions. Don't add string, regex, snapshot, or parsed-content locks for documentation, commit messages, package information, or error/log wording that has no functional or system-boundary significance. Verify executable configuration, protocol fields, and resource delivery through their behavior rather than locking descriptive text. Don't add decision-counterexample tests or tests asserting that a deleted component is absent. When requirements change, update corresponding tests. When a module, helper, tool, or subsystem is removed, delete tests dedicated to it. Negative tests for valid safety, protocol, and input-handling requirements remain appropriate.
39
-
40
- Don't add tests that freeze incidental files or lockfiles, build-tool details, descriptive package metadata, local OS/shell/path/PATH/CWD settings, dependency/runtime versions, or environment snapshots unrelated to product behavior or an explicit external or necessary delivery contract. A test must expose a concrete failure of a valid requirement, not preserve the current machine or tool setup. Verify configuration and delivery through observable behavior rather than whole-file string/hash equality or parsed incidental state. Necessary integrity, provenance, security, and protocol pins remain valid for their concrete boundary; prompt or document edits alone don't justify new infrastructure/environment tests.
41
-
42
- Git commits are the compatibility boundary. Uncommitted intermediate implementations may be changed incompatibly to meet final requirements without transition shims or tests preserving intermediate behavior. An existing component with uncommitted edits still has its committed contracts. This rule doesn't authorize changes to public APIs/protocols, security or data guarantees, permissions, or irreversible behavior, and doesn't authorize any Git write.
43
-
44
- Keep current constraints, authorization boundaries, unresolved risks, and verification evidence visible. State a necessary assumption as a current constraint or verification limit, not a ruling ledger. Agent reports stay in conversation; don't turn coordination, review conclusions, or evidence into workspace files unless explicitly requested as deliverables. Final-state discipline must never hide a real defect, blocker, or unverified requirement.
45
-
46
- Delegation and delivery need clear goals, useful completion evidence, and material constraints, not exhaustive resource/file inventories, per-item revision/hash/receipt locks, or fixed report fields. Workers may discover relevant files, tests, docs, and other resources within the authorized scope. Communicate scope and ownership boundaries, irreversible-operation limits, and required protocol/integrity identities when they matter; resource discovery never expands permissions. Keep results in conversation and require exact identities only for a concrete safety, integrity, or external protocol requirement.
47
-
48
- Temporary, debug, disposable, or retired files and directories do not need repeated stability checks, hash comparisons, or correct recorded status at every instant. Keep short-lived state in the agent session and synchronize useful results at delivery or major phase boundaries, not every checklist update. A completed disposable resource checklist can be deleted without first writing completion status; don't introduce repository debug journals or extra ledgers. Deliverables are proven by correct functionality, interfaces, and usability, not string/hash locks on all text files. Use hashes/checksums only for an explicitly necessary integrity, provenance/security, or protocol-identity requirement, preserving required release checks. Cleanup still requires exact task ownership, safe resolved paths, PID plus start identity for process termination, and preservation of user changes; lighter temporary-state handling never weakens authorization, API contracts, or data guarantees.
33
+ These rules apply whenever this triggered skill is loaded, but their detailed guidance is needed only when discovery will produce a durable design/spec/plan or prescribe regression evidence. Before doing either, read `./references/artifacts-and-evidence.md` from this skill's resourceBase. Conversation-only discovery need not load it. Shared workflow and role policies remain effective without injecting this skill body; packaging is not automatic skill execution or authority.
49
34
 
50
35
  ## Coordinated Verification and Evidence Reuse
51
36
 
@@ -81,13 +66,15 @@ These paths size discovery and design; they do not replace workflow planning pol
81
66
 
82
67
  Inspect only enough project context to resolve material questions:
83
68
 
69
+ - First read the context the user supplied or named, including relevant specs, plans, handoffs, files, and prior conversation, then inspect the connected project material until you can explain the relevant current behavior and affected area. Do not ask for facts that this context already answers.
70
+
84
71
  - current behavior and relevant local patterns;
85
72
  - affected boundaries, dependencies, and interfaces;
86
73
  - constraints and acceptance evidence;
87
74
  - plausible failure, rollback, compatibility, security, data, and operational risks;
88
75
  - independent work that can form separate waves.
89
76
 
90
- Use a clarifier or ask the user only when missing information would change the deliverable, create material rework, or cross an escalation boundary. Ask the smallest useful question in the clearest form; there is no required question count, option count, or multiple-choice format.
77
+ Use a clarifier or ask the user only when missing information would change the deliverable, create material rework, or cross an escalation boundary. Ask the smallest useful question in the clearest form; state what its answer would change or why the unresolved point matters. There is no required question count, option count, or multiple-choice format. If the supplied and inspected context resolves every material question, proceed without manufacturing one.
91
78
 
92
79
  ## Explore Approaches When They Matter
93
80
 
@@ -0,0 +1,21 @@
1
+ > DSH adapter boundary: resolve this reference from the loaded skill's directory resourceBase. It grants no tools, permissions, workflow authority, or Git authorization; the entry skill and active role remain authoritative.
2
+
3
+ # Final-State Artifacts and Regression Evidence
4
+
5
+ Use this guidance when brainstorming will produce a durable design/spec/plan or prescribe regression evidence.
6
+
7
+ Documents, code and comments, tests, and commit messages express only the concise final requirements, design, and behavior. Update intermediate changes directly to the final text. Don't retain development or decision histories, rejected alternatives, or decision counterexamples. Trace history only through the Git commit tree. The only document exception is a strictly chronological purpose, such as a roadmap or changelog; ordinary maintenance notes aren't history archives.
8
+
9
+ `docs/superpowers/specs/` and `docs/superpowers/plans/` are reserved for final product requirements to be delivered. Each spec or plan describes its final deliverable, not an execution journal. Represent changed requirements with separate plans, not an accumulated change history. Other tasks use conversation-level coordination or a task-owned temporary plan and never write to those directories. Complexity can require planning without making a task a product-spec deliverable.
10
+
11
+ Tests protect valid requirements, functional behavior, and external interfaces against regressions. Don't add string, regex, snapshot, or parsed-content locks for documentation, commit messages, package information, or error/log wording that has no functional or system-boundary significance. Verify executable configuration, protocol fields, and resource delivery through their behavior rather than locking descriptive text. Don't add decision-counterexample tests or tests asserting that a deleted component is absent. When requirements change, update corresponding tests. When a module, helper, tool, or subsystem is removed, delete tests dedicated to it. Negative tests for valid safety, protocol, and input-handling requirements remain appropriate.
12
+
13
+ Don't add tests that freeze incidental files or lockfiles, build-tool details, descriptive package metadata, local OS/shell/path/PATH/CWD settings, dependency/runtime versions, or environment snapshots unrelated to product behavior or an explicit external or necessary delivery contract. A test must expose a concrete failure of a valid requirement, not preserve the current machine or tool setup. Verify configuration and delivery through observable behavior rather than whole-file string/hash equality or parsed incidental state. Necessary integrity, provenance, security, and protocol pins remain valid for their concrete boundary; prompt or document edits alone don't justify new infrastructure/environment tests.
14
+
15
+ Git commits are the compatibility boundary. Uncommitted intermediate implementations may be changed incompatibly to meet final requirements without transition shims or tests preserving intermediate behavior. An existing component with uncommitted edits still has its committed contracts. This rule doesn't authorize changes to public APIs/protocols, security or data guarantees, permissions, or irreversible behavior, and doesn't authorize any Git write.
16
+
17
+ Keep current constraints, authorization boundaries, unresolved risks, and verification evidence visible. State a necessary assumption as a current constraint or verification limit, not a ruling ledger. Agent reports stay in conversation; don't turn coordination, review conclusions, or evidence into workspace files unless explicitly requested as deliverables. Final-state discipline must never hide a real defect, blocker, or unverified requirement.
18
+
19
+ Delegation and delivery need clear goals, useful completion evidence, and material constraints, not exhaustive resource/file inventories, per-item revision/hash/receipt locks, or fixed report fields. Workers may discover relevant files, tests, docs, and other resources within the authorized scope. Communicate scope and ownership boundaries, irreversible-operation limits, and required protocol/integrity identities when they matter; resource discovery never expands permissions. Keep results in conversation and require exact identities only for a concrete safety, integrity, or external protocol requirement.
20
+
21
+ Temporary, debug, disposable, or retired files and directories do not need repeated stability checks, hash comparisons, or correct recorded status at every instant. Keep short-lived state in the agent session and synchronize useful results at delivery or major phase boundaries, not every checklist update. A completed disposable resource checklist can be deleted without first writing completion status; don't introduce repository debug journals or extra ledgers. Deliverables are proven by correct functionality, interfaces, and usability, not string/hash locks on all text files. Use hashes/checksums only for an explicitly necessary integrity, provenance/security, or protocol-identity requirement, preserving required release checks. Cleanup still requires exact task ownership, safe resolved paths, PID plus start identity for process termination, and preservation of user changes; lighter temporary-state handling never weakens authorization, API contracts, or data guarantees.