@flitzrrr/agent-skills 1.0.3 → 1.1.0
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/.cursorrules +2 -2
- package/.github/copilot-instructions.md +59 -0
- package/.lovable +1 -1
- package/AGENTS.md +2 -2
- package/CHEATSHEET.md +84 -86
- package/CLAUDE.md +2 -2
- package/LICENSE +27 -0
- package/README.md +147 -100
- package/bin/build-catalog.js +208 -0
- package/bin/cli.js +7 -3
- package/bin/sync-docs.js +147 -0
- package/bin/sync-skills.sh +17 -0
- package/bin/test-cli.js +115 -0
- package/bin/update-wiki.js +102 -0
- package/package.json +9 -2
- package/skills/dispatch-parallel-agents/skill.md +95 -0
- package/skills/execute-work-package/SKILL.md +279 -0
- package/skills/execute-work-package/tpl-execution-blueprint.md +39 -0
- package/skills/execute-work-package/tpl-execution-digest.md +24 -0
- package/skills/execute-work-package/tpl-implementer-execute-prompt.md +57 -0
- package/skills/execute-work-package/tpl-implementer-preflight-prompt.md +66 -0
- package/skills/product-description-seo/CROSS-SELL.md +31 -0
- package/skills/product-description-seo/KEYWORDS.md +35 -0
- package/skills/product-description-seo/SKILL.md +361 -0
- package/skills/product-description-seo/scripts/analyze_catalog.py +136 -0
- package/skills/product-description-seo/scripts/check_quality.py +204 -0
- package/skills/product-description-seo/scripts/extract_category.py +88 -0
- package/skills/product-description-seo/scripts/track_progress.py +140 -0
- package/skills/product-description-seo/scripts/update_catalog.py +80 -0
- package/skills/product-description-seo/scripts/validate_json.py +87 -0
- package/skills/systematic-debugging/skill.md +87 -0
- package/skills/tob-gh-cli/SKILL.md +71 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Sync DDM (DasDigitaleMomentum) skills from agent-skills repo to agy
|
|
3
|
+
# Run after: git pull in agent-skills repo
|
|
4
|
+
SKILLS_DIR="/Users/Martin/.gemini/antigravity/skills"
|
|
5
|
+
SOURCE="/Users/Martin/git/agent-skills/vendor/opencode-processing-skills/skills"
|
|
6
|
+
|
|
7
|
+
# execute-work-package is excluded: local copy has transport extensions (Options A/B/C)
|
|
8
|
+
# that are not yet upstreamed to DasDigitaleMomentum/opencode-processing-skills.
|
|
9
|
+
DDM_SKILLS="archive-legacy-docs author-and-verify-implementation-plan create-plan generate-docs generate-handover resume-plan update-docs update-plan"
|
|
10
|
+
|
|
11
|
+
for skill in $DDM_SKILLS; do
|
|
12
|
+
rm -rf "${SKILLS_DIR:?}/${skill:?}"
|
|
13
|
+
cp -R "$SOURCE/$skill" "$SKILLS_DIR/$skill"
|
|
14
|
+
echo "Synced: $skill"
|
|
15
|
+
done
|
|
16
|
+
|
|
17
|
+
echo "Done. Total SKILL.md: $(find $SKILLS_DIR -maxdepth 2 -name SKILL.md | wc -l | tr -d ' ')"
|
package/bin/test-cli.js
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Tests for bin/cli.js
|
|
5
|
+
* Run: node bin/test-cli.js
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
const { execSync } = require("child_process");
|
|
9
|
+
const fs = require("fs");
|
|
10
|
+
const path = require("path");
|
|
11
|
+
const assert = require("assert");
|
|
12
|
+
|
|
13
|
+
const CLI = path.join(__dirname, "cli.js");
|
|
14
|
+
let passed = 0;
|
|
15
|
+
let failed = 0;
|
|
16
|
+
|
|
17
|
+
function test(name, fn) {
|
|
18
|
+
try {
|
|
19
|
+
fn();
|
|
20
|
+
console.log(` PASS ${name}`);
|
|
21
|
+
passed++;
|
|
22
|
+
} catch (err) {
|
|
23
|
+
console.log(` FAIL ${name}: ${err.message}`);
|
|
24
|
+
failed++;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function run(args) {
|
|
29
|
+
return execSync(`node "${CLI}" ${args}`, {
|
|
30
|
+
encoding: "utf8",
|
|
31
|
+
timeout: 10000,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
console.log("CLI Tests\n");
|
|
36
|
+
|
|
37
|
+
// Test: no args shows usage
|
|
38
|
+
test("no args shows usage", () => {
|
|
39
|
+
const out = run("");
|
|
40
|
+
assert(out.includes("Usage"), "Should show usage");
|
|
41
|
+
assert(out.includes("install"), "Should mention install command");
|
|
42
|
+
assert(out.includes("update"), "Should mention update command");
|
|
43
|
+
assert(out.includes("list"), "Should mention list command");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// Test: unknown platform errors
|
|
47
|
+
test("install unknown platform exits with error", () => {
|
|
48
|
+
try {
|
|
49
|
+
run("install nonexistent-platform");
|
|
50
|
+
assert.fail("Should have thrown");
|
|
51
|
+
} catch (err) {
|
|
52
|
+
const output = (err.stdout || "") + (err.stderr || "");
|
|
53
|
+
assert(output.includes("Unknown platform"), "Should say unknown platform");
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
// Test: list shows skills
|
|
58
|
+
test("list command works", () => {
|
|
59
|
+
try {
|
|
60
|
+
const out = run("list");
|
|
61
|
+
assert(out.includes("Available Skills"), "Should show available skills header");
|
|
62
|
+
} catch {
|
|
63
|
+
// Skills may not be installed in test env, that's ok
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Test: cli.js is valid Node
|
|
68
|
+
test("cli.js parses without syntax errors", () => {
|
|
69
|
+
execSync(`node -c "${CLI}"`, { encoding: "utf8" });
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
// Test: vscode platform is registered
|
|
73
|
+
test("vscode platform is listed", () => {
|
|
74
|
+
const out = run("");
|
|
75
|
+
assert(out.includes("vscode"), "Should list vscode as available platform");
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
// Test: copilot-instructions.md exists
|
|
79
|
+
test("copilot-instructions.md exists", () => {
|
|
80
|
+
const copilotPath = path.join(__dirname, "..", ".github", "copilot-instructions.md");
|
|
81
|
+
assert(
|
|
82
|
+
fs.existsSync(copilotPath),
|
|
83
|
+
"Should have .github/copilot-instructions.md"
|
|
84
|
+
);
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
// Test: copilot-instructions.md has required content
|
|
88
|
+
test("copilot-instructions.md has skill references", () => {
|
|
89
|
+
const copilotPath = path.join(__dirname, "..", ".github", "copilot-instructions.md");
|
|
90
|
+
const content = fs.readFileSync(copilotPath, "utf8");
|
|
91
|
+
assert(content.includes("skills/"), "Should reference skills/ directory");
|
|
92
|
+
assert(content.includes("SKILL.md"), "Should mention SKILL.md");
|
|
93
|
+
assert(content.includes("CHEATSHEET.md"), "Should reference CHEATSHEET.md");
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
// Test: sync-docs.js is valid Node
|
|
97
|
+
test("sync-docs.js parses without syntax errors", () => {
|
|
98
|
+
const syncDocs = path.join(__dirname, "sync-docs.js");
|
|
99
|
+
execSync(`node -c "${syncDocs}"`, { encoding: "utf8" });
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
// Test: sync-docs.js updates counts correctly
|
|
103
|
+
test("sync-docs.js produces correct counts", () => {
|
|
104
|
+
const out = execSync(`node "${path.join(__dirname, "sync-docs.js")}"`, {
|
|
105
|
+
encoding: "utf8",
|
|
106
|
+
cwd: path.join(__dirname, ".."),
|
|
107
|
+
});
|
|
108
|
+
assert(out.includes("Found"), "Should report found skills");
|
|
109
|
+
assert(out.includes("Updated README.md"), "Should update README");
|
|
110
|
+
assert(out.includes("copilot-instructions"), "Should update copilot-instructions.md");
|
|
111
|
+
assert(out.includes("Done"), "Should finish successfully");
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
console.log(`\n${passed} passed, ${failed} failed\n`);
|
|
115
|
+
process.exit(failed > 0 ? 1 : 0);
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Update the GitHub Wiki with current catalog data.
|
|
5
|
+
* Clones the wiki repo, regenerates the Skills-Catalog page, and pushes.
|
|
6
|
+
*
|
|
7
|
+
* Run: node bin/update-wiki.js
|
|
8
|
+
* Requires: git, SSH access to the wiki repo
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const fs = require("fs");
|
|
12
|
+
const path = require("path");
|
|
13
|
+
const { execSync } = require("child_process");
|
|
14
|
+
|
|
15
|
+
const ROOT = path.join(__dirname, "..");
|
|
16
|
+
const CATALOG = path.join(ROOT, "docs", "catalog.json");
|
|
17
|
+
const WIKI_DIR = "/tmp/agent-skills-wiki";
|
|
18
|
+
const WIKI_REPO = "git@github.com:flitzrrr/agent-skills.wiki.git";
|
|
19
|
+
|
|
20
|
+
function run(cmd, opts) {
|
|
21
|
+
return execSync(cmd, { encoding: "utf8", ...opts }).trim();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
function groupBy(arr, key) {
|
|
25
|
+
const map = {};
|
|
26
|
+
for (const item of arr) {
|
|
27
|
+
const k = item[key];
|
|
28
|
+
(map[k] = map[k] || []).push(item);
|
|
29
|
+
}
|
|
30
|
+
return map;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function main() {
|
|
34
|
+
if (!fs.existsSync(CATALOG)) {
|
|
35
|
+
console.error("catalog.json not found. Run build-catalog.js first.");
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const catalog = JSON.parse(fs.readFileSync(CATALOG, "utf8"));
|
|
40
|
+
const grouped = groupBy(catalog.skills, "source");
|
|
41
|
+
const sourceEntries = Object.entries(grouped).sort((a, b) => b[1].length - a[1].length);
|
|
42
|
+
|
|
43
|
+
// Clone wiki
|
|
44
|
+
try {
|
|
45
|
+
if (fs.existsSync(WIKI_DIR)) {
|
|
46
|
+
run(`rm -rf ${WIKI_DIR}`);
|
|
47
|
+
}
|
|
48
|
+
run(`git clone ${WIKI_REPO} ${WIKI_DIR}`);
|
|
49
|
+
} catch (e) {
|
|
50
|
+
console.error("Failed to clone wiki repo:", e.message);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Generate Skills-Catalog.md
|
|
55
|
+
let md = `# Skills Catalog\n\n`;
|
|
56
|
+
md += `> Last updated: ${catalog.generated.split("T")[0]} | **${catalog.total} skills** across **${sourceEntries.length} sources**\n\n`;
|
|
57
|
+
md += `The full searchable catalog with copy-to-clipboard is on the [GitHub Pages site](https://flitzrrr.github.io/agent-skills/#catalog).\n\n`;
|
|
58
|
+
md += `## Skills by Source\n\n`;
|
|
59
|
+
|
|
60
|
+
for (const [source, skills] of sourceEntries) {
|
|
61
|
+
md += `### ${source} (${skills.length} skills)\n\n`;
|
|
62
|
+
md += `| Skill | Description |\n`;
|
|
63
|
+
md += `|-------|-------------|\n`;
|
|
64
|
+
for (const s of skills) {
|
|
65
|
+
const desc = s.description || "--";
|
|
66
|
+
md += `| \`${s.name}\` | ${desc} |\n`;
|
|
67
|
+
}
|
|
68
|
+
md += `\n`;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
fs.writeFileSync(path.join(WIKI_DIR, "Skills-Catalog.md"), md);
|
|
72
|
+
|
|
73
|
+
// Update Home page stats
|
|
74
|
+
const homePath = path.join(WIKI_DIR, "Home.md");
|
|
75
|
+
if (fs.existsSync(homePath)) {
|
|
76
|
+
let home = fs.readFileSync(homePath, "utf8");
|
|
77
|
+
// Update skill count references
|
|
78
|
+
home = home.replace(/\b\d{2,4}\+?\s+skills\b/gi, `${catalog.total}+ skills`);
|
|
79
|
+
fs.writeFileSync(homePath, home);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// Commit and push
|
|
83
|
+
try {
|
|
84
|
+
run("git add -A", { cwd: WIKI_DIR });
|
|
85
|
+
const diff = run("git diff --cached --stat", { cwd: WIKI_DIR });
|
|
86
|
+
if (!diff) {
|
|
87
|
+
console.log("Wiki is already up to date.");
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
run(`git config user.name "github-actions[bot]"`, { cwd: WIKI_DIR });
|
|
92
|
+
run(`git config user.email "github-actions[bot]@users.noreply.github.com"`, { cwd: WIKI_DIR });
|
|
93
|
+
run(`git commit -m "docs: update skill catalog [${catalog.generated.split("T")[0]}]"`, { cwd: WIKI_DIR });
|
|
94
|
+
run("git push origin master", { cwd: WIKI_DIR });
|
|
95
|
+
console.log("Wiki updated and pushed.");
|
|
96
|
+
} catch (e) {
|
|
97
|
+
console.error("Failed to push wiki:", e.message);
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
main();
|
package/package.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flitzrrr/agent-skills",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "504 AI agent skills from 19 sources — multiplatform-ready for VS Code (GitHub Copilot), Claude Code, Codex, Cursor, Antigravity, OpenCode, Lovable, and more.",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "node bin/test-cli.js"
|
|
7
|
+
},
|
|
5
8
|
"bin": {
|
|
6
9
|
"agent-skills": "bin/cli.js"
|
|
7
10
|
},
|
|
@@ -9,6 +12,9 @@
|
|
|
9
12
|
"ai",
|
|
10
13
|
"agent",
|
|
11
14
|
"skills",
|
|
15
|
+
"vscode",
|
|
16
|
+
"github-copilot",
|
|
17
|
+
"copilot",
|
|
12
18
|
"claude",
|
|
13
19
|
"codex",
|
|
14
20
|
"cursor",
|
|
@@ -32,6 +38,7 @@
|
|
|
32
38
|
"CHEATSHEET.md",
|
|
33
39
|
".cursorrules",
|
|
34
40
|
".lovable",
|
|
41
|
+
".github/copilot-instructions.md",
|
|
35
42
|
"README.md"
|
|
36
43
|
]
|
|
37
44
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: dispatch-parallel-agents
|
|
3
|
+
description: Dispatch independent tasks to parallel subagents when 2+ problems can be solved without shared state or sequential dependencies.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility:
|
|
6
|
+
opencode: ">=0.1"
|
|
7
|
+
metadata:
|
|
8
|
+
category: execution
|
|
9
|
+
phase: implementation
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Skill: Dispatch Parallel Agents
|
|
13
|
+
|
|
14
|
+
This skill parallelizes independent work across multiple subagents. Each agent gets a focused scope, isolated context, and a clear deliverable.
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## When to Use
|
|
19
|
+
|
|
20
|
+
Use when:
|
|
21
|
+
|
|
22
|
+
- 2+ independent tasks exist that do not share state
|
|
23
|
+
- Each task can be understood and completed without context from the others
|
|
24
|
+
- Tasks do not edit the same files
|
|
25
|
+
|
|
26
|
+
Do **not** use when:
|
|
27
|
+
|
|
28
|
+
- Failures are related (fixing one might fix others -- investigate together first)
|
|
29
|
+
- Tasks require understanding the full system state
|
|
30
|
+
- Agents would interfere with each other (editing the same files, using the same resources)
|
|
31
|
+
- You are in exploratory mode and do not yet know what is broken
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Execution Model
|
|
36
|
+
|
|
37
|
+
### Roles
|
|
38
|
+
|
|
39
|
+
- **Primary (coordinator)**
|
|
40
|
+
- Identifies independent problem domains
|
|
41
|
+
- Crafts focused prompts for each agent
|
|
42
|
+
- Reviews results and integrates changes
|
|
43
|
+
- Resolves conflicts if agents touched overlapping code
|
|
44
|
+
|
|
45
|
+
- **Subagents (workers)**
|
|
46
|
+
- Each receives a scoped task with all necessary context
|
|
47
|
+
- Works independently without knowledge of other agents
|
|
48
|
+
- Returns a summary of findings and changes
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Workflow
|
|
53
|
+
|
|
54
|
+
### Step 1: Identify Independent Domains
|
|
55
|
+
|
|
56
|
+
Group tasks by what they affect. Each domain must be independent -- fixing one must not affect the others.
|
|
57
|
+
|
|
58
|
+
Example:
|
|
59
|
+
- Domain A: Fix stats page header styling
|
|
60
|
+
- Domain B: Update billing page layout
|
|
61
|
+
- Domain C: Add admin role detection
|
|
62
|
+
|
|
63
|
+
These are independent because they touch different files and different logic.
|
|
64
|
+
|
|
65
|
+
### Step 2: Craft Agent Prompts
|
|
66
|
+
|
|
67
|
+
Each agent prompt must be:
|
|
68
|
+
|
|
69
|
+
- **Focused** -- one clear problem domain, not "fix everything"
|
|
70
|
+
- **Self-contained** -- all context needed to understand the problem (file paths, error messages, expected behavior)
|
|
71
|
+
- **Constrained** -- explicit boundaries on what the agent should and should not change
|
|
72
|
+
- **Output-specific** -- what the agent should return (summary, file list, verification result)
|
|
73
|
+
|
|
74
|
+
### Step 3: Dispatch
|
|
75
|
+
|
|
76
|
+
Launch all agents in a single message with multiple Agent tool calls. This ensures true parallel execution.
|
|
77
|
+
|
|
78
|
+
### Step 4: Review and Integrate
|
|
79
|
+
|
|
80
|
+
When agents return:
|
|
81
|
+
|
|
82
|
+
1. Read each agent's summary
|
|
83
|
+
2. Check for conflicts (did agents edit the same code?)
|
|
84
|
+
3. Verify changes work together (run build, run tests)
|
|
85
|
+
4. Integrate all changes
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Rules
|
|
90
|
+
|
|
91
|
+
1. **Independence is mandatory**: If tasks share state or files, do not parallelize. Process sequentially instead.
|
|
92
|
+
2. **Focused prompts**: Each agent gets exactly what it needs. Do not dump full session context into agent prompts.
|
|
93
|
+
3. **Verify after integration**: Always run the build and relevant tests after merging all agent outputs. Agents cannot verify cross-agent interactions.
|
|
94
|
+
4. **Do not over-parallelize**: 2-3 agents is typical. More than 5 agents indicates the tasks should be structured differently (e.g., as a plan with phases).
|
|
95
|
+
5. **Conflicts require manual resolution**: If two agents edited the same file, the primary resolves the conflict -- do not blindly apply both changes.
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: execute-work-package
|
|
3
|
+
description: Execute a significant implementation unit (phase or major slice) using a gated subagent loop (blueprint -> gate -> execute -> digest) without creating new persistent artifacts.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility:
|
|
6
|
+
opencode: ">=0.1"
|
|
7
|
+
claude-code: ">=1.0"
|
|
8
|
+
cursor: ">=0.40"
|
|
9
|
+
copilot: ">=1.0"
|
|
10
|
+
codex: ">=0.1"
|
|
11
|
+
windsurf: ">=1.0"
|
|
12
|
+
metadata:
|
|
13
|
+
category: execution
|
|
14
|
+
phase: implementation
|
|
15
|
+
transport_options: [mcp, stateful, fresh]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Skill: Execute Work Packet
|
|
19
|
+
|
|
20
|
+
This skill standardizes **execution/implementation** once planning is gated.
|
|
21
|
+
|
|
22
|
+
It is a small, repeatable protocol:
|
|
23
|
+
|
|
24
|
+
1) **BLUEPRINT**: Subagent returns an **Execution Blueprint** (step list)
|
|
25
|
+
2) **GATE**: Primary approves (primary-internal)
|
|
26
|
+
3) **EXECUTE**: Fresh subagent implements and verifies
|
|
27
|
+
4) **DIGEST**: Subagent returns a compact digest (no raw logs/diffs)
|
|
28
|
+
|
|
29
|
+
This skill deliberately **does not** create new persistent artifacts in `docs/` or `plans/`.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## When to Use
|
|
34
|
+
|
|
35
|
+
Use this skill when:
|
|
36
|
+
|
|
37
|
+
- A plan/phase (or a major slice of a phase) already has a clear **DoD** and **verification** approach.
|
|
38
|
+
- You want to offload implementation to a subagent without causing primary context bloat.
|
|
39
|
+
- You want predictable, reviewable execution with a single explicit gate.
|
|
40
|
+
|
|
41
|
+
If your phase implementation plan is still vague or unverified against the repo, run `author-and-verify-implementation-plan` first.
|
|
42
|
+
|
|
43
|
+
Do **not** use this skill to:
|
|
44
|
+
|
|
45
|
+
- (Re-)do planning (scope, risks, alternatives) — that is **Primary** work.
|
|
46
|
+
- Generate documentation/planning artifacts — use `generate-docs`, `create-plan`, `update-plan`, `update-docs`.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Execution Model
|
|
51
|
+
|
|
52
|
+
### Roles
|
|
53
|
+
|
|
54
|
+
- **Primary (maintainer)**
|
|
55
|
+
- Owns scope/DoD/risk decisions and gating.
|
|
56
|
+
- Chooses the work packet (phase or significant phase slice).
|
|
57
|
+
- Owns Git operations (stage/commit/PR) unless explicitly delegated.
|
|
58
|
+
- Updates plan/todo via `update-plan` as needed.
|
|
59
|
+
|
|
60
|
+
- **Subagent (implementer)**
|
|
61
|
+
- Does execution only.
|
|
62
|
+
- First returns a **step list**.
|
|
63
|
+
- After approval, executes those steps and returns a **digest**.
|
|
64
|
+
- Does not do Git operations.
|
|
65
|
+
|
|
66
|
+
## Routing Matrix (Who does what)
|
|
67
|
+
|
|
68
|
+
- **Writes**: code files in the target repository (working tree changes) and runs verification commands.
|
|
69
|
+
- **Does NOT write**: `plans/**` or `docs/**` artifacts.
|
|
70
|
+
- **Primary**: owns gating/approval, Git operations, and any updates to `plans/**` (typically via `update-plan`).
|
|
71
|
+
- **implementer**: execution only (blueprint → execute → digest), no Git.
|
|
72
|
+
- **doc-explorer**: not used for this skill (unless you explicitly want docs/plan artifacts, in which case use the appropriate planning/doc skills).
|
|
73
|
+
|
|
74
|
+
### Why `docs/` and `plans/` matter here
|
|
75
|
+
|
|
76
|
+
- `plans/` provides the gated intent/DoD and references for what to implement.
|
|
77
|
+
- `docs/` (if present) provides curated inventories (modules/features/symbols) so the subagent does not rediscover everything.
|
|
78
|
+
|
|
79
|
+
### Transport
|
|
80
|
+
|
|
81
|
+
This skill supports three transport mechanisms. **If l4l MCP tools are available** (check: do you have `precheck_new`, `approve_blueprint`, `execute` tools?), **always use Option A.** Only fall back to B/C if MCP is not configured.
|
|
82
|
+
|
|
83
|
+
#### Option A: MCP via l4l (Default)
|
|
84
|
+
|
|
85
|
+
Use the l4l Sub-Agent MCP server. The primary calls MCP tools directly — no Agent spawning needed:
|
|
86
|
+
|
|
87
|
+
1. `precheck_new(intent, scope_paths, output_format="skill")` → returns Execution Blueprint
|
|
88
|
+
2. `approve_blueprint(handle_id)` → explicit gate
|
|
89
|
+
3. `execute(handle_id, output_format="skill")` → returns Execution Digest
|
|
90
|
+
|
|
91
|
+
Benefits: state persistence across restarts, model decoupling (cheap Sub-LLM), scope enforcement, iterative blueprint refinement.
|
|
92
|
+
|
|
93
|
+
Setup: See l4l's `docs/CLAUDE_CODE_SETUP.md`.
|
|
94
|
+
|
|
95
|
+
#### Option B: Stateful Subagent (OpenCode)
|
|
96
|
+
|
|
97
|
+
Original design using `resumeSessionId` to maintain subagent state between BLUEPRINT and EXECUTE:
|
|
98
|
+
|
|
99
|
+
- BLUEPRINT and EXECUTE use the **same** session (resumed via `resumeSessionId`)
|
|
100
|
+
- The subagent retains context from the BLUEPRINT phase
|
|
101
|
+
|
|
102
|
+
This is the native OpenCode pattern.
|
|
103
|
+
|
|
104
|
+
#### Option C: Fresh Agent (Claude Code / Cursor / Copilot)
|
|
105
|
+
|
|
106
|
+
BLUEPRINT and EXECUTE use **separate** Agent invocations (not SendMessage to resume):
|
|
107
|
+
|
|
108
|
+
- **BLUEPRINT Agent**: spawned with `mode: auto`, returns the step list, then terminates.
|
|
109
|
+
- **EXECUTE Agent**: spawned as a **new** Agent with the approved step list baked into the prompt. This avoids unreliable SendMessage-based resumption of idle agents.
|
|
110
|
+
|
|
111
|
+
The EXECUTE prompt must include the full approved step list and all references — the agent has no memory of the BLUEPRINT agent's context.
|
|
112
|
+
|
|
113
|
+
#### Platform Decision Table
|
|
114
|
+
|
|
115
|
+
| Platform | Recommended | Fallback |
|
|
116
|
+
|----------|------------|----------|
|
|
117
|
+
| Claude Code | Option A (MCP) | Option C (Fresh Agent) |
|
|
118
|
+
| Cursor | Option A (MCP) | Option C (Fresh Agent) |
|
|
119
|
+
| Copilot | Option A (MCP) | Option C (Fresh Agent) |
|
|
120
|
+
| Codex | Option C (Fresh Agent) | — |
|
|
121
|
+
| Windsurf | Option A (MCP) | Option C (Fresh Agent) |
|
|
122
|
+
| OpenCode | Option B (Stateful) | Option A (MCP) |
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## Protocol
|
|
127
|
+
|
|
128
|
+
### 0) Primary inputs (for any work packet)
|
|
129
|
+
|
|
130
|
+
Before delegating:
|
|
131
|
+
|
|
132
|
+
- Ensure the work packet is already gated (scope/DoD decided).
|
|
133
|
+
- Provide an explicit **task statement** plus **references** to the relevant planning artifacts.
|
|
134
|
+
The subagent should read these references itself (the primary does not need to paste content).
|
|
135
|
+
Recommended references:
|
|
136
|
+
- `plans/<plan>/plan.md`
|
|
137
|
+
- `plans/<plan>/phases/phase-N.md`
|
|
138
|
+
- `plans/<plan>/implementation/phase-N-impl.md`
|
|
139
|
+
- `plans/<plan>/todo.md` (optional)
|
|
140
|
+
- If project documentation exists, also provide references to it so the subagent can use the curated inventories
|
|
141
|
+
(symbols, modules, features) instead of rediscovering everything from scratch:
|
|
142
|
+
- `docs/overview.md` (optional)
|
|
143
|
+
- `docs/modules/*.md` (optional)
|
|
144
|
+
- `docs/features/*.md` (optional)
|
|
145
|
+
- Provide a **Verify Command** if one is already decided.
|
|
146
|
+
If not, the subagent proposes exactly **one** verify command in the BLUEPRINT (to be gated by the primary).
|
|
147
|
+
|
|
148
|
+
### 1) MODE: BLUEPRINT (Execution Blueprint)
|
|
149
|
+
|
|
150
|
+
> **Option A (MCP):** Call `precheck_new(intent=..., scope_paths=..., output_format="skill")`. The blueprint is returned directly — no Agent spawn needed.
|
|
151
|
+
|
|
152
|
+
Primary delegates to `implementer` with a prompt based on `tpl-implementer-preflight-prompt.md`.
|
|
153
|
+
|
|
154
|
+
**Gate:** Primary reviews the step list and either:
|
|
155
|
+
|
|
156
|
+
- Approves (GO)
|
|
157
|
+
- Requests revision (feedback)
|
|
158
|
+
- Aborts and replans
|
|
159
|
+
|
|
160
|
+
#### Invariant: explicit approval token
|
|
161
|
+
|
|
162
|
+
Primary provides an explicit approval token before execution (primary-internal gate). Example:
|
|
163
|
+
|
|
164
|
+
- `APPROVE-WP1`
|
|
165
|
+
|
|
166
|
+
If the user requests changes, the step list must be revised and re-approved with a new approval token.
|
|
167
|
+
|
|
168
|
+
### 2) Execute (new Agent)
|
|
169
|
+
|
|
170
|
+
> **Option A (MCP):** Call `approve_blueprint(handle_id)` then `execute(handle_id, output_format="skill")`. The digest is returned directly — no Agent spawn needed.
|
|
171
|
+
|
|
172
|
+
Primary spawns a **new** `implementer` Agent with a prompt based on `tpl-implementer-execute-prompt.md`. The prompt includes the full approved step list, all references, and the verify command. Do NOT use SendMessage to resume the BLUEPRINT agent — spawn a fresh Agent instead.
|
|
173
|
+
|
|
174
|
+
#### Invariant: MODE lock
|
|
175
|
+
|
|
176
|
+
The execute prompt MUST start with a clear mode indicator:
|
|
177
|
+
|
|
178
|
+
- `MODE: EXECUTE`
|
|
179
|
+
|
|
180
|
+
and MUST include the approval token.
|
|
181
|
+
|
|
182
|
+
> **Option A (MCP):** Skip Steps 2–3 above. The `execute` MCP tool returns the digest directly.
|
|
183
|
+
|
|
184
|
+
### 3) Digest back to Primary
|
|
185
|
+
|
|
186
|
+
Subagent responds with a compact digest:
|
|
187
|
+
|
|
188
|
+
- Outcome (succeeded/failed)
|
|
189
|
+
- Files changed (paths)
|
|
190
|
+
- Verification result (command + exit)
|
|
191
|
+
- If failure: only a small, relevant excerpt (no full logs)
|
|
192
|
+
|
|
193
|
+
### 4) Primary post-processing
|
|
194
|
+
|
|
195
|
+
Read the digest carefully. The subagent's verification result determines next steps:
|
|
196
|
+
|
|
197
|
+
- **Verification passed:** Spot-check with `git diff --stat` to confirm expected changes. Do not re-run the full test suite yourself – the subagent already did.
|
|
198
|
+
- **Verification failed or incomplete:** If additional testing is needed, spawn a new subagent with specific test instructions and relevant references. Do not run large test suites in the primary session.
|
|
199
|
+
- **BLOCKED / no verification ran:** Decide whether to provide missing input and re-delegate, or run a targeted check yourself.
|
|
200
|
+
|
|
201
|
+
Then:
|
|
202
|
+
|
|
203
|
+
- Updates `plans/<plan>/todo.md` and phase status via `update-plan`
|
|
204
|
+
- Commits / creates PR **only** when explicitly requested by the user
|
|
205
|
+
|
|
206
|
+
Optional but recommended (Primary):
|
|
207
|
+
|
|
208
|
+
- Before execute: capture baseline via `git status` / `git diff --name-only`
|
|
209
|
+
- After execute: confirm changes exist via `git diff --stat`
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Output Contracts
|
|
214
|
+
|
|
215
|
+
### Step List Contract (Subagent -> Primary)
|
|
216
|
+
|
|
217
|
+
Subagent returns an **Execution Blueprint** in the format of `tpl-execution-blueprint.md`.
|
|
218
|
+
|
|
219
|
+
The blueprint is expected to be **concrete** (file paths and/or symbol/component targets), not a restatement of plan text.
|
|
220
|
+
|
|
221
|
+
#### Mode: BLUEPRINT
|
|
222
|
+
|
|
223
|
+
In BLUEPRINT mode, the subagent must NOT:
|
|
224
|
+
|
|
225
|
+
- apply patches
|
|
226
|
+
- run commands
|
|
227
|
+
- claim that code was changed
|
|
228
|
+
|
|
229
|
+
### Digest Contract (Subagent -> Primary)
|
|
230
|
+
|
|
231
|
+
Subagent MUST return only:
|
|
232
|
+
|
|
233
|
+
- **Outcome**: succeeded | failed
|
|
234
|
+
- **Edits**: list of files changed + 1-line note each
|
|
235
|
+
- **Verify**: command + exit code + (if failed) small excerpt
|
|
236
|
+
- **Next**: 1–3 bullets (or “ready for Primary Git/commit”)
|
|
237
|
+
|
|
238
|
+
#### Mode: EXECUTE
|
|
239
|
+
|
|
240
|
+
In EXECUTE mode, the subagent must:
|
|
241
|
+
|
|
242
|
+
- implement changes (typically via patch/apply_patch)
|
|
243
|
+
- run the verify command (via bash)
|
|
244
|
+
- if neither happened: return **BLOCKED** with a concrete reason
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## Rules
|
|
249
|
+
|
|
250
|
+
- Subagent must not run Git operations (commit, rebase, push).
|
|
251
|
+
- Skill-first: when this skill is invoked, follow its MODE + output contracts before doing anything else.
|
|
252
|
+
- Keep verification minimal: **one** explicit verify command unless the work packet DoD requires more. The verify command must **exercise the changed behavior** (e.g., run relevant tests, hit the affected endpoint, trigger the modified flow) — not just compile, lint, or type-check.
|
|
253
|
+
- No raw diffs or long logs in responses.
|
|
254
|
+
- If verify fails: apply **minimal, targeted fixes** (no refactors) and re-run verify. If still failing or a larger change is required, stop and report a digest with a minimal relevant excerpt.
|
|
255
|
+
- If the step list must change during execution: stop and ask Primary for a new gate.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Coding Standards
|
|
260
|
+
|
|
261
|
+
These apply to all code written during execution – by the implementer subagent or the primary.
|
|
262
|
+
|
|
263
|
+
1. **No hardcoded defaults.** Use configuration files or environment variables for values that may change across environments.
|
|
264
|
+
2. **Analyze root cause.** Don't patch symptoms. Understand why something is broken before changing code.
|
|
265
|
+
3. **Minimal changes.** Only touch what the work packet requires. Don't refactor adjacent code you weren't asked to change.
|
|
266
|
+
4. **Preserve existing patterns.** Match the conventions already established in the codebase (naming, structure, error handling).
|
|
267
|
+
5. **No silent failures.** Don't swallow errors or add fallbacks that hide problems. If something fails, it should be visible.
|
|
268
|
+
6. **Respect the dependency boundary.** Don't introduce new dependencies without explicit approval from the primary/user.
|
|
269
|
+
|
|
270
|
+
If `docs/coding-standards.md` exists in the target repo, read and follow it as well – project-specific standards take precedence.
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## Templates
|
|
275
|
+
|
|
276
|
+
- `tpl-implementer-preflight-prompt.md` — Primary -> Subagent (MODE: BLUEPRINT) prompt
|
|
277
|
+
- `tpl-implementer-execute-prompt.md` — Primary -> Subagent (MODE: EXECUTE) prompt (same `task_id`)
|
|
278
|
+
- `tpl-execution-blueprint.md` — canonical blueprint format (step list)
|
|
279
|
+
- `tpl-execution-digest.md` — canonical digest format
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: execution
|
|
3
|
+
entity: blueprint
|
|
4
|
+
skill: execute-work-package
|
|
5
|
+
created: "{{date}}"
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Execution Blueprint (Step List)
|
|
9
|
+
|
|
10
|
+
## Work Packet
|
|
11
|
+
|
|
12
|
+
- intent: {{intent}}
|
|
13
|
+
- scope_paths: {{scope_paths}}
|
|
14
|
+
|
|
15
|
+
## References
|
|
16
|
+
|
|
17
|
+
### Plans
|
|
18
|
+
- plan: {{plan_ref}}
|
|
19
|
+
- phase: {{phase_ref}}
|
|
20
|
+
- implementation_plan: {{implementation_plan_ref}}
|
|
21
|
+
- todo (optional): {{todo_ref}}
|
|
22
|
+
|
|
23
|
+
### Docs (optional)
|
|
24
|
+
- overview: {{docs_overview_ref}}
|
|
25
|
+
- modules: {{docs_modules_ref}}
|
|
26
|
+
- features: {{docs_features_ref}}
|
|
27
|
+
|
|
28
|
+
## Steps
|
|
29
|
+
|
|
30
|
+
1. <concrete step; include file path and/or symbol/component>
|
|
31
|
+
2. ...
|
|
32
|
+
|
|
33
|
+
## Touched Files
|
|
34
|
+
|
|
35
|
+
- path/to/file
|
|
36
|
+
|
|
37
|
+
## Verify
|
|
38
|
+
|
|
39
|
+
`<single command>`
|