superpowers-mcp 6.4.5 → 6.4.7

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.
@@ -334,7 +334,10 @@ function isFullDocument(html) {
334
334
  }
335
335
 
336
336
  function wrapInFrame(content) {
337
- return renderBranding(frameTemplate).replace('<!-- CONTENT -->', content);
337
+ // Replacer function, not a string: agent-authored HTML routinely contains
338
+ // `$&`, `$'`, `$`` or `$$`, which String.replace expands as substitution
339
+ // tokens, mangling or truncating the rendered screen.
340
+ return renderBranding(frameTemplate).replace('<!-- CONTENT -->', () => content);
338
341
  }
339
342
 
340
343
  function ensurePrivateDirectory(directory) {
@@ -679,7 +682,9 @@ function handleRequest(req, res) {
679
682
  const injection = helperInjection(nonce);
680
683
 
681
684
  if (html.includes('</body>')) {
682
- html = html.replace('</body>', injection + '\n</body>');
685
+ // Function replacer for the same reason as wrapInFrame: the injected
686
+ // helper script is substitution-token safe only by convention.
687
+ html = html.replace('</body>', () => injection + '\n</body>');
683
688
  } else {
684
689
  html += injection;
685
690
  }
@@ -5,11 +5,12 @@ Use this template when dispatching an implementer subagent.
5
5
  ```
6
6
  Subagent (general-purpose):
7
7
  description: "Implement Task N: [task name]"
8
- model: [MODEL — REQUIRED: when the brief carries a Tier line, set from it:
9
- mechanical → the cheapest model the subagent tool offers; judgment →
10
- a standard mid-tier model. Otherwise choose per SKILL.md Model
11
- Selection. An omitted model silently inherits the session's most
12
- expensive one]
8
+ model: [MODEL]
9
+ # Model selection: when the brief carries a Tier line, set from it —
10
+ # mechanical → the cheapest model the subagent tool offers; judgment →
11
+ # a standard mid-tier model. Otherwise choose per SKILL.md Model
12
+ # Selection. An omitted model silently inherits the session's most
13
+ # expensive one.
13
14
  prompt: |
14
15
  You are implementing Task N: [task name]
15
16
 
@@ -10,8 +10,9 @@ that the fix itself broke nothing.
10
10
  ```
11
11
  Subagent (general-purpose):
12
12
  description: "Re-review Task N fix round R"
13
- model: [MODEL — REQUIRED: choose per SKILL.md Model Selection; an omitted
14
- model silently inherits the session's most expensive one]
13
+ model: [MODEL]
14
+ # Model selection: choose per SKILL.md Model Selection; an omitted model
15
+ # silently inherits the session's most expensive one.
15
16
  prompt: |
16
17
  You are re-reviewing one task's fix round. A previous review produced
17
18
  findings; an implementer has attempted to fix them. Your job is to
@@ -10,8 +10,9 @@ more, nothing less) and is well-built (clean, tested, maintainable)
10
10
  ```
11
11
  Subagent (general-purpose):
12
12
  description: "Review Task N (spec + quality)"
13
- model: [MODEL — REQUIRED: choose per SKILL.md Model Selection; an omitted
14
- model silently inherits the session's most expensive one]
13
+ model: [MODEL]
14
+ # Model selection: choose per SKILL.md Model Selection; an omitted model
15
+ # silently inherits the session's most expensive one.
15
16
  prompt: |
16
17
  You are reviewing one task's implementation: first whether it matches its
17
18
  requirements, then whether it is well-built. This is a task-scoped gate,