@leing2021/super-pi 0.18.0 → 0.18.2
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/README.md +8 -1
- package/extensions/ce-core/index.ts +18 -3
- package/package.json +1 -1
- package/skills/10-rules/SKILL.md +7 -2
package/README.md
CHANGED
|
@@ -267,7 +267,14 @@ No rules are loaded when you brainstorm, check status, or do non-code tasks. Zer
|
|
|
267
267
|
|
|
268
268
|
#### Customizing rules for your project
|
|
269
269
|
|
|
270
|
-
|
|
270
|
+
Two rule sources exist, with project-level taking priority:
|
|
271
|
+
|
|
272
|
+
| Source | Location | Survives `pi update`? |
|
|
273
|
+
|--------|----------|----------------------|
|
|
274
|
+
| **Project-level** | `{your-project-root}/rules/` | ✅ Yes |
|
|
275
|
+
| Package-level | Inside `node_modules/@leing2021/super-pi/rules/` | ❌ No |
|
|
276
|
+
|
|
277
|
+
To customize, create a `rules/` directory in your project root. `10-rules` checks it first — if a file exists there, it overrides the package default for that topic.
|
|
271
278
|
|
|
272
279
|
**Add a language** — create a new directory with the 5 standard topics:
|
|
273
280
|
|
|
@@ -124,7 +124,10 @@ const parallelSubagentTaskSchema = Type.Object({
|
|
|
124
124
|
})
|
|
125
125
|
|
|
126
126
|
const parallelSubagentParams = Type.Object({
|
|
127
|
-
tasks: Type.
|
|
127
|
+
tasks: Type.Union([
|
|
128
|
+
Type.Array(parallelSubagentTaskSchema),
|
|
129
|
+
Type.String({ description: "JSON stringified array of tasks" }),
|
|
130
|
+
], { description: "Array of independent tasks to run concurrently (can be a JSON string)" }),
|
|
128
131
|
inheritSkills: Type.Optional(Type.Boolean({ description: "Whether subagents should inherit skills. Default: false" })),
|
|
129
132
|
})
|
|
130
133
|
|
|
@@ -396,12 +399,24 @@ export default function ceCoreExtension(pi: ExtensionAPI) {
|
|
|
396
399
|
pi.registerTool({
|
|
397
400
|
name: parallelSubagent.name,
|
|
398
401
|
label: "Parallel Subagent",
|
|
399
|
-
description: "Run multiple skill-based subagent tasks concurrently.",
|
|
402
|
+
description: "Run multiple skill-based subagent tasks concurrently. IMPORTANT: Provide 'tasks' as a clean JSON array object. If the environment forces a string, provide a valid JSON array string.",
|
|
400
403
|
parameters: parallelSubagentParams,
|
|
401
404
|
async execute(_toolCallId, params, signal) {
|
|
405
|
+
let tasks: any[]
|
|
406
|
+
if (typeof params.tasks === "string") {
|
|
407
|
+
try {
|
|
408
|
+
const cleaned = params.tasks.replace(/^```json\s*|```$/g, "").trim()
|
|
409
|
+
tasks = JSON.parse(cleaned)
|
|
410
|
+
} catch (e) {
|
|
411
|
+
throw new Error(`Failed to parse tasks string as JSON: ${e instanceof Error ? e.message : String(e)}`)
|
|
412
|
+
}
|
|
413
|
+
} else {
|
|
414
|
+
tasks = params.tasks
|
|
415
|
+
}
|
|
416
|
+
|
|
402
417
|
const result = await parallelSubagent.execute(
|
|
403
418
|
{
|
|
404
|
-
tasks
|
|
419
|
+
tasks,
|
|
405
420
|
inheritSkills: params.inheritSkills,
|
|
406
421
|
},
|
|
407
422
|
createSubagentRunner(pi, signal),
|
package/package.json
CHANGED
package/skills/10-rules/SKILL.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: 10-rules
|
|
3
|
-
description: "Progressively load project coding rules on demand. Auto-triggered by plan, work, and review skills."
|
|
3
|
+
description: "Progressively load project coding rules on demand. Auto-triggered by plan, work, and review skills, or run manually with /skill:10-rules."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Rules
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Rules are loaded from two locations with clear priority:
|
|
9
|
+
|
|
10
|
+
1. **Project-level** `{repo-root}/rules/` — if it exists, takes priority. Users maintain this themselves; survives `pi update`.
|
|
11
|
+
2. **Package-level** `rules/` in the super-pi package — built-in defaults, used when no project-level override exists.
|
|
12
|
+
|
|
13
|
+
Detection: check `{repo-root}/rules/` first. If a file exists at the project level for the topic being loaded, use it. Otherwise fall back to the package-level copy.
|
|
9
14
|
|
|
10
15
|
## Core rule
|
|
11
16
|
|