@chankov/agent-skills 0.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/.claude/commands/build.md +18 -0
- package/.claude/commands/code-simplify.md +22 -0
- package/.claude/commands/design-agent.md +14 -0
- package/.claude/commands/doctor.md +13 -0
- package/.claude/commands/plan.md +16 -0
- package/.claude/commands/prime.md +22 -0
- package/.claude/commands/review.md +16 -0
- package/.claude/commands/setup.md +19 -0
- package/.claude/commands/ship.md +17 -0
- package/.claude/commands/spec.md +15 -0
- package/.claude/commands/test.md +19 -0
- package/.opencode/commands/as-build.md +17 -0
- package/.opencode/commands/as-code-simplify.md +16 -0
- package/.opencode/commands/as-design-agent.md +15 -0
- package/.opencode/commands/as-doctor.md +11 -0
- package/.opencode/commands/as-plan.md +16 -0
- package/.opencode/commands/as-prime.md +22 -0
- package/.opencode/commands/as-review.md +15 -0
- package/.opencode/commands/as-setup.md +11 -0
- package/.opencode/commands/as-ship.md +16 -0
- package/.opencode/commands/as-spec.md +16 -0
- package/.opencode/commands/as-test.md +21 -0
- package/.pi/agents/agent-chain.yaml +49 -0
- package/.pi/agents/bowser.md +19 -0
- package/.pi/agents/pi-pi/agent-expert.md +98 -0
- package/.pi/agents/pi-pi/cli-expert.md +41 -0
- package/.pi/agents/pi-pi/config-expert.md +63 -0
- package/.pi/agents/pi-pi/ext-expert.md +43 -0
- package/.pi/agents/pi-pi/keybinding-expert.md +134 -0
- package/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
- package/.pi/agents/pi-pi/prompt-expert.md +70 -0
- package/.pi/agents/pi-pi/skill-expert.md +42 -0
- package/.pi/agents/pi-pi/theme-expert.md +40 -0
- package/.pi/agents/pi-pi/tui-expert.md +85 -0
- package/.pi/agents/teams.yaml +31 -0
- package/.pi/damage-control-rules.yaml +278 -0
- package/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
- package/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
- package/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.pi/extensions/package-lock.json +1143 -0
- package/.pi/extensions/package.json +9 -0
- package/.pi/harnesses/agent-chain/README.md +37 -0
- package/.pi/harnesses/agent-chain/index.ts +795 -0
- package/.pi/harnesses/agent-chain/package.json +6 -0
- package/.pi/harnesses/agent-team/README.md +38 -0
- package/.pi/harnesses/agent-team/index.ts +732 -0
- package/.pi/harnesses/agent-team/package.json +6 -0
- package/.pi/harnesses/coms/README.md +36 -0
- package/.pi/harnesses/coms/index.ts +1595 -0
- package/.pi/harnesses/coms/package.json +6 -0
- package/.pi/harnesses/coms-net/README.md +46 -0
- package/.pi/harnesses/coms-net/index.ts +1637 -0
- package/.pi/harnesses/coms-net/package.json +6 -0
- package/.pi/harnesses/damage-control/README.md +38 -0
- package/.pi/harnesses/damage-control/index.ts +207 -0
- package/.pi/harnesses/damage-control/package.json +6 -0
- package/.pi/harnesses/damage-control-continue/README.md +37 -0
- package/.pi/harnesses/damage-control-continue/index.ts +234 -0
- package/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.pi/harnesses/minimal/README.md +27 -0
- package/.pi/harnesses/minimal/index.ts +32 -0
- package/.pi/harnesses/minimal/package.json +6 -0
- package/.pi/harnesses/package-lock.json +35 -0
- package/.pi/harnesses/package.json +9 -0
- package/.pi/harnesses/pi-pi/README.md +39 -0
- package/.pi/harnesses/pi-pi/index.ts +631 -0
- package/.pi/harnesses/pi-pi/package.json +6 -0
- package/.pi/harnesses/purpose-gate/README.md +27 -0
- package/.pi/harnesses/purpose-gate/index.ts +82 -0
- package/.pi/harnesses/purpose-gate/package.json +6 -0
- package/.pi/harnesses/session-replay/README.md +28 -0
- package/.pi/harnesses/session-replay/index.ts +214 -0
- package/.pi/harnesses/session-replay/package.json +6 -0
- package/.pi/harnesses/subagent-widget/README.md +36 -0
- package/.pi/harnesses/subagent-widget/index.ts +479 -0
- package/.pi/harnesses/subagent-widget/package.json +6 -0
- package/.pi/harnesses/system-select/README.md +39 -0
- package/.pi/harnesses/system-select/index.ts +165 -0
- package/.pi/harnesses/system-select/package.json +6 -0
- package/.pi/harnesses/tilldone/README.md +35 -0
- package/.pi/harnesses/tilldone/index.ts +724 -0
- package/.pi/harnesses/tilldone/package.json +6 -0
- package/.pi/harnesses/tool-counter/README.md +31 -0
- package/.pi/harnesses/tool-counter/index.ts +100 -0
- package/.pi/harnesses/tool-counter/package.json +6 -0
- package/.pi/harnesses/tool-counter-widget/README.md +27 -0
- package/.pi/harnesses/tool-counter-widget/index.ts +66 -0
- package/.pi/harnesses/tool-counter-widget/package.json +6 -0
- package/.pi/prompts/build.md +24 -0
- package/.pi/prompts/code-simplify.md +22 -0
- package/.pi/prompts/doctor.md +13 -0
- package/.pi/prompts/plan.md +16 -0
- package/.pi/prompts/review.md +16 -0
- package/.pi/prompts/setup.md +19 -0
- package/.pi/prompts/ship.md +17 -0
- package/.pi/prompts/spec.md +15 -0
- package/.pi/prompts/test.md +19 -0
- package/.pi/skills/bowser/SKILL.md +114 -0
- package/.versions/0.1.0/.claude/commands/build.md +18 -0
- package/.versions/0.1.0/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.1.0/.claude/commands/design-agent.md +14 -0
- package/.versions/0.1.0/.claude/commands/doctor.md +13 -0
- package/.versions/0.1.0/.claude/commands/plan.md +16 -0
- package/.versions/0.1.0/.claude/commands/prime.md +22 -0
- package/.versions/0.1.0/.claude/commands/review.md +16 -0
- package/.versions/0.1.0/.claude/commands/setup.md +19 -0
- package/.versions/0.1.0/.claude/commands/ship.md +17 -0
- package/.versions/0.1.0/.claude/commands/spec.md +15 -0
- package/.versions/0.1.0/.claude/commands/test.md +19 -0
- package/.versions/0.1.0/.opencode/commands/as-build.md +17 -0
- package/.versions/0.1.0/.opencode/commands/as-code-simplify.md +16 -0
- package/.versions/0.1.0/.opencode/commands/as-design-agent.md +15 -0
- package/.versions/0.1.0/.opencode/commands/as-doctor.md +11 -0
- package/.versions/0.1.0/.opencode/commands/as-plan.md +16 -0
- package/.versions/0.1.0/.opencode/commands/as-prime.md +22 -0
- package/.versions/0.1.0/.opencode/commands/as-review.md +15 -0
- package/.versions/0.1.0/.opencode/commands/as-setup.md +11 -0
- package/.versions/0.1.0/.opencode/commands/as-ship.md +16 -0
- package/.versions/0.1.0/.opencode/commands/as-spec.md +16 -0
- package/.versions/0.1.0/.opencode/commands/as-test.md +21 -0
- package/.versions/0.1.0/.pi/agents/agent-chain.yaml +49 -0
- package/.versions/0.1.0/.pi/agents/bowser.md +19 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/agent-expert.md +98 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/cli-expert.md +41 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/config-expert.md +63 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/ext-expert.md +43 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/keybinding-expert.md +134 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/prompt-expert.md +70 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/skill-expert.md +42 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/theme-expert.md +40 -0
- package/.versions/0.1.0/.pi/agents/pi-pi/tui-expert.md +85 -0
- package/.versions/0.1.0/.pi/agents/teams.yaml +31 -0
- package/.versions/0.1.0/.pi/damage-control-rules.yaml +278 -0
- package/.versions/0.1.0/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
- package/.versions/0.1.0/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
- package/.versions/0.1.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.1.0/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.1.0/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.1.0/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.1.0/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.1.0/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.1.0/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.1.0/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.1.0/.pi/extensions/package.json +9 -0
- package/.versions/0.1.0/.pi/harnesses/agent-chain/README.md +37 -0
- package/.versions/0.1.0/.pi/harnesses/agent-chain/index.ts +795 -0
- package/.versions/0.1.0/.pi/harnesses/agent-chain/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/agent-team/README.md +38 -0
- package/.versions/0.1.0/.pi/harnesses/agent-team/index.ts +732 -0
- package/.versions/0.1.0/.pi/harnesses/agent-team/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/coms/README.md +36 -0
- package/.versions/0.1.0/.pi/harnesses/coms/index.ts +1595 -0
- package/.versions/0.1.0/.pi/harnesses/coms/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/coms-net/README.md +46 -0
- package/.versions/0.1.0/.pi/harnesses/coms-net/index.ts +1637 -0
- package/.versions/0.1.0/.pi/harnesses/coms-net/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/damage-control/README.md +38 -0
- package/.versions/0.1.0/.pi/harnesses/damage-control/index.ts +207 -0
- package/.versions/0.1.0/.pi/harnesses/damage-control/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/damage-control-continue/README.md +37 -0
- package/.versions/0.1.0/.pi/harnesses/damage-control-continue/index.ts +234 -0
- package/.versions/0.1.0/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/minimal/README.md +27 -0
- package/.versions/0.1.0/.pi/harnesses/minimal/index.ts +32 -0
- package/.versions/0.1.0/.pi/harnesses/minimal/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.1.0/.pi/harnesses/package.json +9 -0
- package/.versions/0.1.0/.pi/harnesses/pi-pi/README.md +39 -0
- package/.versions/0.1.0/.pi/harnesses/pi-pi/index.ts +631 -0
- package/.versions/0.1.0/.pi/harnesses/pi-pi/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/purpose-gate/README.md +27 -0
- package/.versions/0.1.0/.pi/harnesses/purpose-gate/index.ts +82 -0
- package/.versions/0.1.0/.pi/harnesses/purpose-gate/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/session-replay/README.md +28 -0
- package/.versions/0.1.0/.pi/harnesses/session-replay/index.ts +214 -0
- package/.versions/0.1.0/.pi/harnesses/session-replay/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/subagent-widget/README.md +36 -0
- package/.versions/0.1.0/.pi/harnesses/subagent-widget/index.ts +479 -0
- package/.versions/0.1.0/.pi/harnesses/subagent-widget/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/system-select/README.md +39 -0
- package/.versions/0.1.0/.pi/harnesses/system-select/index.ts +165 -0
- package/.versions/0.1.0/.pi/harnesses/system-select/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/tilldone/README.md +35 -0
- package/.versions/0.1.0/.pi/harnesses/tilldone/index.ts +724 -0
- package/.versions/0.1.0/.pi/harnesses/tilldone/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/tool-counter/README.md +31 -0
- package/.versions/0.1.0/.pi/harnesses/tool-counter/index.ts +100 -0
- package/.versions/0.1.0/.pi/harnesses/tool-counter/package.json +6 -0
- package/.versions/0.1.0/.pi/harnesses/tool-counter-widget/README.md +27 -0
- package/.versions/0.1.0/.pi/harnesses/tool-counter-widget/index.ts +66 -0
- package/.versions/0.1.0/.pi/harnesses/tool-counter-widget/package.json +6 -0
- package/.versions/0.1.0/.pi/prompts/build.md +24 -0
- package/.versions/0.1.0/.pi/prompts/code-simplify.md +22 -0
- package/.versions/0.1.0/.pi/prompts/doctor.md +13 -0
- package/.versions/0.1.0/.pi/prompts/plan.md +16 -0
- package/.versions/0.1.0/.pi/prompts/review.md +16 -0
- package/.versions/0.1.0/.pi/prompts/setup.md +19 -0
- package/.versions/0.1.0/.pi/prompts/ship.md +17 -0
- package/.versions/0.1.0/.pi/prompts/spec.md +15 -0
- package/.versions/0.1.0/.pi/prompts/test.md +19 -0
- package/.versions/0.1.0/.pi/skills/bowser/SKILL.md +114 -0
- package/.versions/0.1.0/.version +1 -0
- package/.versions/0.1.0/agents/builder.md +6 -0
- package/.versions/0.1.0/agents/code-reviewer.md +93 -0
- package/.versions/0.1.0/agents/documenter.md +6 -0
- package/.versions/0.1.0/agents/plan-reviewer.md +22 -0
- package/.versions/0.1.0/agents/planner.md +6 -0
- package/.versions/0.1.0/agents/scout.md +6 -0
- package/.versions/0.1.0/agents/security-auditor.md +97 -0
- package/.versions/0.1.0/agents/test-engineer.md +89 -0
- package/.versions/0.1.0/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.1.0/hooks/hooks.json +14 -0
- package/.versions/0.1.0/hooks/session-start.sh +20 -0
- package/.versions/0.1.0/hooks/simplify-ignore-test.sh +247 -0
- package/.versions/0.1.0/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.1.0/references/accessibility-checklist.md +159 -0
- package/.versions/0.1.0/references/performance-checklist.md +121 -0
- package/.versions/0.1.0/references/prompting-patterns.md +380 -0
- package/.versions/0.1.0/references/security-checklist.md +134 -0
- package/.versions/0.1.0/references/testing-patterns.md +236 -0
- package/.versions/0.1.0/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.1.0/skills/browser-testing-with-devtools/SKILL.md +335 -0
- package/.versions/0.1.0/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.1.0/skills/code-review-and-quality/SKILL.md +347 -0
- package/.versions/0.1.0/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.1.0/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.1.0/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.1.0/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.1.0/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.1.0/skills/designing-agents/pi-harness-authoring.md +213 -0
- package/.versions/0.1.0/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.1.0/skills/frontend-ui-engineering/SKILL.md +322 -0
- package/.versions/0.1.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.1.0/skills/guided-workspace-setup/SKILL.md +293 -0
- package/.versions/0.1.0/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.1.0/skills/idea-refine/examples.md +238 -0
- package/.versions/0.1.0/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.1.0/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.1.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.1.0/skills/incremental-implementation/SKILL.md +279 -0
- package/.versions/0.1.0/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.1.0/skills/planning-and-task-breakdown/SKILL.md +237 -0
- package/.versions/0.1.0/skills/security-and-hardening/SKILL.md +349 -0
- package/.versions/0.1.0/skills/shipping-and-launch/SKILL.md +309 -0
- package/.versions/0.1.0/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.1.0/skills/spec-driven-development/SKILL.md +237 -0
- package/.versions/0.1.0/skills/test-driven-development/SKILL.md +379 -0
- package/.versions/0.1.0/skills/using-agent-skills/SKILL.md +176 -0
- package/CHANGELOG.md +14 -0
- package/LICENSE +21 -0
- package/README.md +359 -0
- package/agents/builder.md +6 -0
- package/agents/code-reviewer.md +93 -0
- package/agents/documenter.md +6 -0
- package/agents/plan-reviewer.md +22 -0
- package/agents/planner.md +6 -0
- package/agents/scout.md +6 -0
- package/agents/security-auditor.md +97 -0
- package/agents/test-engineer.md +89 -0
- package/bin/cli.js +375 -0
- package/bin/lib/detect-agent.js +37 -0
- package/bin/lib/doctor.js +209 -0
- package/bin/snapshot-version.js +71 -0
- package/docs/agent-skills-setup.md +187 -0
- package/docs/copilot-setup.md +94 -0
- package/docs/cursor-setup.md +67 -0
- package/docs/gemini-cli-setup.md +113 -0
- package/docs/getting-started.md +162 -0
- package/docs/npm-install.md +169 -0
- package/docs/opencode-setup.md +241 -0
- package/docs/pi-extensions.md +163 -0
- package/docs/pi-setup.md +416 -0
- package/docs/skill-anatomy.md +129 -0
- package/docs/windsurf-setup.md +48 -0
- package/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/hooks/hooks.json +14 -0
- package/hooks/session-start.sh +20 -0
- package/hooks/simplify-ignore-test.sh +247 -0
- package/hooks/simplify-ignore.sh +302 -0
- package/package.json +86 -0
- package/references/accessibility-checklist.md +159 -0
- package/references/performance-checklist.md +121 -0
- package/references/prompting-patterns.md +380 -0
- package/references/security-checklist.md +134 -0
- package/references/testing-patterns.md +236 -0
- package/skills/api-and-interface-design/SKILL.md +294 -0
- package/skills/browser-testing-with-devtools/SKILL.md +335 -0
- package/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/skills/code-review-and-quality/SKILL.md +347 -0
- package/skills/code-simplification/SKILL.md +331 -0
- package/skills/context-engineering/SKILL.md +291 -0
- package/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/skills/deprecation-and-migration/SKILL.md +206 -0
- package/skills/designing-agents/SKILL.md +394 -0
- package/skills/designing-agents/pi-harness-authoring.md +213 -0
- package/skills/documentation-and-adrs/SKILL.md +278 -0
- package/skills/frontend-ui-engineering/SKILL.md +322 -0
- package/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/skills/guided-workspace-setup/SKILL.md +293 -0
- package/skills/idea-refine/SKILL.md +178 -0
- package/skills/idea-refine/examples.md +238 -0
- package/skills/idea-refine/frameworks.md +99 -0
- package/skills/idea-refine/refinement-criteria.md +113 -0
- package/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/skills/incremental-implementation/SKILL.md +279 -0
- package/skills/performance-optimization/SKILL.md +350 -0
- package/skills/planning-and-task-breakdown/SKILL.md +237 -0
- package/skills/security-and-hardening/SKILL.md +349 -0
- package/skills/shipping-and-launch/SKILL.md +309 -0
- package/skills/source-driven-development/SKILL.md +194 -0
- package/skills/spec-driven-development/SKILL.md +237 -0
- package/skills/test-driven-development/SKILL.md +379 -0
- package/skills/using-agent-skills/SKILL.md +176 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
// Doctor scan — deterministic preflight extracted from
|
|
2
|
+
// guided-workspace-setup Step 5. Both `agent-skills doctor` (CLI) and the
|
|
3
|
+
// `/doctor` slash command call into this so behaviour cannot drift.
|
|
4
|
+
//
|
|
5
|
+
// Two classes of findings:
|
|
6
|
+
// 1. Broken symlinks — links whose source has been moved, renamed, or deleted
|
|
7
|
+
// 2. Stale persona refs — YAML configs (teams.yaml, agent-chain.yaml) that
|
|
8
|
+
// still name a persona which no longer exists in the source tree
|
|
9
|
+
//
|
|
10
|
+
// For each broken link we look up a canonical replacement in the source
|
|
11
|
+
// `agents/` or `skills/` tree (many breakages are stale names from the
|
|
12
|
+
// pre-merge layout, e.g. `reviewer` → `code-reviewer`).
|
|
13
|
+
|
|
14
|
+
import { readdirSync, readlinkSync, existsSync, lstatSync, statSync, unlinkSync, symlinkSync, readFileSync, writeFileSync } from "node:fs";
|
|
15
|
+
import { join, resolve, dirname, basename, relative, isAbsolute } from "node:path";
|
|
16
|
+
|
|
17
|
+
// Known canonical replacements for personas renamed during the merge.
|
|
18
|
+
const PERSONA_RENAMES = {
|
|
19
|
+
"reviewer": "code-reviewer",
|
|
20
|
+
"red-team": "security-auditor",
|
|
21
|
+
"tester": "test-engineer",
|
|
22
|
+
"qa": "test-engineer",
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
// Install-target directories the scanner walks, when present.
|
|
26
|
+
const TARGET_DIRS = [
|
|
27
|
+
// Personas
|
|
28
|
+
"agents",
|
|
29
|
+
".claude/agents",
|
|
30
|
+
".opencode/agents",
|
|
31
|
+
".codex/agents",
|
|
32
|
+
".gemini/agents",
|
|
33
|
+
".github/agents",
|
|
34
|
+
".pi/agents",
|
|
35
|
+
".pi/agents/pi-pi",
|
|
36
|
+
// Skills
|
|
37
|
+
".claude/skills",
|
|
38
|
+
".opencode/skills",
|
|
39
|
+
".pi/skills",
|
|
40
|
+
".agents/skills",
|
|
41
|
+
// Commands / prompts
|
|
42
|
+
".claude/commands",
|
|
43
|
+
".opencode/commands",
|
|
44
|
+
".pi/prompts",
|
|
45
|
+
// References + hooks
|
|
46
|
+
".claude/references",
|
|
47
|
+
".claude/hooks",
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
// YAML configs that may reference persona names.
|
|
51
|
+
const YAML_REFS = [
|
|
52
|
+
".pi/agents/teams.yaml",
|
|
53
|
+
".pi/agents/agent-chain.yaml",
|
|
54
|
+
];
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Run the doctor scan.
|
|
58
|
+
*
|
|
59
|
+
* @param {object} opts
|
|
60
|
+
* @param {string} opts.workspace Workspace root (absolute path)
|
|
61
|
+
* @param {string} opts.sourceRoot agent-skills source root (absolute path)
|
|
62
|
+
* @param {boolean} [opts.apply] If true, apply suggested fixes; otherwise just report
|
|
63
|
+
* @returns {Array|object} Findings array (apply=false) or {repaired,deleted,skipped} (apply=true)
|
|
64
|
+
*/
|
|
65
|
+
export async function runDoctor({ workspace, sourceRoot, apply = false }) {
|
|
66
|
+
const findings = [];
|
|
67
|
+
|
|
68
|
+
// 1. Broken symlinks in install-target directories.
|
|
69
|
+
for (const rel of TARGET_DIRS) {
|
|
70
|
+
const dir = join(workspace, rel);
|
|
71
|
+
if (!existsSync(dir)) continue;
|
|
72
|
+
let entries;
|
|
73
|
+
try { entries = readdirSync(dir, { withFileTypes: true }); }
|
|
74
|
+
catch { continue; }
|
|
75
|
+
|
|
76
|
+
for (const entry of entries) {
|
|
77
|
+
const fullPath = join(dir, entry.name);
|
|
78
|
+
let lst;
|
|
79
|
+
try { lst = lstatSync(fullPath); } catch { continue; }
|
|
80
|
+
if (!lst.isSymbolicLink()) continue;
|
|
81
|
+
|
|
82
|
+
// Resolve where the link points.
|
|
83
|
+
const linkTarget = readlinkSync(fullPath);
|
|
84
|
+
const absTarget = isAbsolute(linkTarget)
|
|
85
|
+
? linkTarget
|
|
86
|
+
: resolve(dirname(fullPath), linkTarget);
|
|
87
|
+
|
|
88
|
+
if (existsSync(absTarget)) continue; // healthy link
|
|
89
|
+
|
|
90
|
+
const replacement = findReplacement({
|
|
91
|
+
brokenName: entry.name,
|
|
92
|
+
kind: inferKind(rel),
|
|
93
|
+
sourceRoot,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
findings.push({
|
|
97
|
+
type: "broken-symlink",
|
|
98
|
+
path: relative(workspace, fullPath),
|
|
99
|
+
issue: `broken symlink → missing ${relative(workspace, absTarget)}`,
|
|
100
|
+
fix: replacement
|
|
101
|
+
? `repoint to ${relative(workspace, join(sourceRoot, replacement))}`
|
|
102
|
+
: "delete",
|
|
103
|
+
replacement,
|
|
104
|
+
absPath: fullPath,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// 2. Stale persona refs in YAML configs.
|
|
110
|
+
for (const rel of YAML_REFS) {
|
|
111
|
+
const file = join(workspace, rel);
|
|
112
|
+
if (!existsSync(file)) continue;
|
|
113
|
+
const text = readFileSync(file, "utf8");
|
|
114
|
+
for (const [stale, canonical] of Object.entries(PERSONA_RENAMES)) {
|
|
115
|
+
// Match the persona name as a *standalone token* — bounded by
|
|
116
|
+
// start-of-line, whitespace, quotes, or a YAML separator (:, [, ], ,).
|
|
117
|
+
// Crucially, "-" must NOT count as a boundary, or we'd match
|
|
118
|
+
// "reviewer" inside "code-reviewer".
|
|
119
|
+
const re = new RegExp(
|
|
120
|
+
`(^|[\\s'"\\[\\],:])${escapeRe(stale)}(?=[\\s'"\\[\\],:]|$)`,
|
|
121
|
+
"gm",
|
|
122
|
+
);
|
|
123
|
+
if (re.test(text)) {
|
|
124
|
+
findings.push({
|
|
125
|
+
type: "stale-yaml-ref",
|
|
126
|
+
path: relative(workspace, file),
|
|
127
|
+
issue: `references "${stale}"`,
|
|
128
|
+
fix: `rename to "${canonical}"`,
|
|
129
|
+
stale,
|
|
130
|
+
canonical,
|
|
131
|
+
absPath: file,
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (!apply) return findings;
|
|
138
|
+
|
|
139
|
+
// ── Apply ──────────────────────────────────────────────────────────────
|
|
140
|
+
let repaired = 0, deleted = 0, skipped = 0;
|
|
141
|
+
|
|
142
|
+
for (const f of findings) {
|
|
143
|
+
try {
|
|
144
|
+
if (f.type === "broken-symlink") {
|
|
145
|
+
if (f.replacement) {
|
|
146
|
+
const newTarget = join(sourceRoot, f.replacement);
|
|
147
|
+
unlinkSync(f.absPath);
|
|
148
|
+
symlinkSync(newTarget, f.absPath);
|
|
149
|
+
repaired++;
|
|
150
|
+
} else {
|
|
151
|
+
unlinkSync(f.absPath);
|
|
152
|
+
deleted++;
|
|
153
|
+
}
|
|
154
|
+
} else if (f.type === "stale-yaml-ref") {
|
|
155
|
+
const text = readFileSync(f.absPath, "utf8");
|
|
156
|
+
const re = new RegExp(
|
|
157
|
+
`(^|[\\s'"\\[\\],:])${escapeRe(f.stale)}(?=[\\s'"\\[\\],:]|$)`,
|
|
158
|
+
"gm",
|
|
159
|
+
);
|
|
160
|
+
writeFileSync(f.absPath, text.replace(re, `$1${f.canonical}`));
|
|
161
|
+
repaired++;
|
|
162
|
+
}
|
|
163
|
+
} catch (err) {
|
|
164
|
+
skipped++;
|
|
165
|
+
console.error(` ⚠ skipped ${f.path}: ${err.message}`);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return { repaired, deleted, skipped, findings };
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function escapeRe(s) {
|
|
173
|
+
return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function inferKind(targetDir) {
|
|
177
|
+
if (targetDir.includes("agents")) return "agents";
|
|
178
|
+
if (targetDir.includes("skills")) return "skills";
|
|
179
|
+
if (targetDir.includes("commands") || targetDir.includes("prompts")) return "commands";
|
|
180
|
+
if (targetDir.includes("references")) return "references";
|
|
181
|
+
if (targetDir.includes("hooks")) return "hooks";
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
function findReplacement({ brokenName, kind, sourceRoot }) {
|
|
186
|
+
// Strip .md if present so we can compare bare names.
|
|
187
|
+
const bare = brokenName.replace(/\.md$/, "");
|
|
188
|
+
|
|
189
|
+
// First check the known-renames map.
|
|
190
|
+
const renamed = PERSONA_RENAMES[bare];
|
|
191
|
+
if (renamed) {
|
|
192
|
+
const candidate = kind === "skills"
|
|
193
|
+
? join("skills", renamed, "SKILL.md")
|
|
194
|
+
: join("agents", `${renamed}.md`);
|
|
195
|
+
if (existsSync(join(sourceRoot, candidate))) return candidate;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Fall back: same name in the canonical source tree.
|
|
199
|
+
if (kind === "agents") {
|
|
200
|
+
const candidate = join("agents", `${bare}.md`);
|
|
201
|
+
if (existsSync(join(sourceRoot, candidate))) return candidate;
|
|
202
|
+
}
|
|
203
|
+
if (kind === "skills") {
|
|
204
|
+
const candidate = join("skills", bare, "SKILL.md");
|
|
205
|
+
if (existsSync(join(sourceRoot, candidate))) return candidate;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return null;
|
|
209
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// snapshot-version.js
|
|
3
|
+
//
|
|
4
|
+
// Copy every shipped artifact into .versions/<x.y.z>/ so a later install can
|
|
5
|
+
// run a three-way diff between:
|
|
6
|
+
// - source @ recorded version ←─ this snapshot, read from the installed copy
|
|
7
|
+
// - installed copy in target ←─ what the user has on disk
|
|
8
|
+
// - source @ current version ←─ the active tree in this package
|
|
9
|
+
//
|
|
10
|
+
// Run by the release workflow right before `changeset publish`. Also runnable
|
|
11
|
+
// by hand if you need to rebuild a snapshot.
|
|
12
|
+
|
|
13
|
+
import { readFileSync, mkdirSync, cpSync, existsSync, rmSync } from "node:fs";
|
|
14
|
+
import { fileURLToPath } from "node:url";
|
|
15
|
+
import { dirname, join, resolve } from "node:path";
|
|
16
|
+
|
|
17
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
18
|
+
const root = resolve(__dirname, "..");
|
|
19
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
20
|
+
const version = pkg.version;
|
|
21
|
+
const snapDir = join(root, ".versions", version);
|
|
22
|
+
|
|
23
|
+
// Paths that travel into the snapshot — matches package.json `files` for the
|
|
24
|
+
// installable artifacts. We deliberately skip the meta files (README, LICENSE,
|
|
25
|
+
// CHANGELOG, package.json) — the diff only cares about the artifacts.
|
|
26
|
+
const ARTIFACT_PATHS = [
|
|
27
|
+
"skills",
|
|
28
|
+
"agents",
|
|
29
|
+
".claude/commands",
|
|
30
|
+
".opencode/commands",
|
|
31
|
+
".pi/prompts",
|
|
32
|
+
".pi/extensions",
|
|
33
|
+
".pi/harnesses",
|
|
34
|
+
".pi/skills",
|
|
35
|
+
".pi/agents",
|
|
36
|
+
".pi/damage-control-rules.yaml",
|
|
37
|
+
"references",
|
|
38
|
+
"hooks",
|
|
39
|
+
];
|
|
40
|
+
|
|
41
|
+
if (existsSync(snapDir)) {
|
|
42
|
+
console.log(`snapshot: .versions/${version}/ already exists — rebuilding`);
|
|
43
|
+
rmSync(snapDir, { recursive: true, force: true });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
mkdirSync(snapDir, { recursive: true });
|
|
47
|
+
|
|
48
|
+
// Skip nested node_modules and build artifacts — they bloat the tarball and
|
|
49
|
+
// the user reinstalls them after init.
|
|
50
|
+
const SKIP_NAMES = new Set(["node_modules", ".DS_Store", "dist", "build"]);
|
|
51
|
+
|
|
52
|
+
for (const rel of ARTIFACT_PATHS) {
|
|
53
|
+
const src = join(root, rel);
|
|
54
|
+
if (!existsSync(src)) continue;
|
|
55
|
+
const dest = join(snapDir, rel);
|
|
56
|
+
mkdirSync(dirname(dest), { recursive: true });
|
|
57
|
+
cpSync(src, dest, {
|
|
58
|
+
recursive: true,
|
|
59
|
+
filter: (srcPath) => {
|
|
60
|
+
const base = srcPath.split("/").pop();
|
|
61
|
+
return !SKIP_NAMES.has(base);
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Stamp the snapshot with its version so the skill can verify it loaded the right one.
|
|
67
|
+
const stampPath = join(snapDir, ".version");
|
|
68
|
+
const fs = await import("node:fs/promises");
|
|
69
|
+
await fs.writeFile(stampPath, `${version}\n`, "utf8");
|
|
70
|
+
|
|
71
|
+
console.log(`snapshot: wrote .versions/${version}/`);
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# Agent Skills — Project Files
|
|
2
|
+
|
|
3
|
+
agent-skills keeps up to two small files in a project's `.ai/` directory. They
|
|
4
|
+
have different readers and different lifetimes, so they are kept separate.
|
|
5
|
+
|
|
6
|
+
| File | Read by | When |
|
|
7
|
+
|------|---------|------|
|
|
8
|
+
| `.ai/agent-skills-overrides.md` | `spec-driven-development`, `planning-and-task-breakdown`, `browser-testing-with-devtools`, `git-workflow-and-versioning` | Every run of those skills |
|
|
9
|
+
| `.ai/agent-skills-setup.md` | `guided-workspace-setup` | Only when setup is run or re-run |
|
|
10
|
+
|
|
11
|
+
Keep them split: the overrides file is loaded into context constantly, so it
|
|
12
|
+
must stay minimal; the install record is consulted rarely, so it can be large.
|
|
13
|
+
|
|
14
|
+
## The overrides file — `.ai/agent-skills-overrides.md`
|
|
15
|
+
|
|
16
|
+
Some skills produce files or need facts specific to each project — where specs
|
|
17
|
+
and plans are saved, how to start a dev server, whether the agent may create
|
|
18
|
+
branches. Each ships a sensible **default**; a project that needs something
|
|
19
|
+
different declares it here, and the skill picks it up.
|
|
20
|
+
|
|
21
|
+
- **Location:** `.ai/agent-skills-overrides.md` at the project root.
|
|
22
|
+
- **Format:** Markdown. One `## <skill-name>` section per skill, with terse
|
|
23
|
+
`key: value` lines. Block values use the `key: |` multi-line form. No prose
|
|
24
|
+
and no install detail — skills parse it by key and load it on every run.
|
|
25
|
+
- **Commit it.** Shared project configuration belongs in version control. Make
|
|
26
|
+
sure no `.gitignore` rule (for example a broad `.env*` pattern) excludes it.
|
|
27
|
+
- **No secrets.** For anything sensitive (test-account credentials), reference
|
|
28
|
+
the **name** of an environment variable; the real value lives in a gitignored
|
|
29
|
+
`.env`.
|
|
30
|
+
- If the file is absent, or a skill has no section in it, the skill uses its
|
|
31
|
+
built-in default.
|
|
32
|
+
|
|
33
|
+
### `spec-driven-development`
|
|
34
|
+
|
|
35
|
+
| Key | Default | Meaning |
|
|
36
|
+
|-----|---------|---------|
|
|
37
|
+
| `spec-dir` | `docs/prds/{area}` | Directory specs are written to |
|
|
38
|
+
| `naming` | `PRD{n}-{topic}` | File name pattern; `{n}` = next free PRD number, `{topic}` = kebab-case slug |
|
|
39
|
+
|
|
40
|
+
Default output: `docs/prds/{area}/PRD{n}-{topic}.md`.
|
|
41
|
+
|
|
42
|
+
### `planning-and-task-breakdown`
|
|
43
|
+
|
|
44
|
+
| Key | Default | Meaning |
|
|
45
|
+
|-----|---------|---------|
|
|
46
|
+
| `plan-dir` | `docs/plans/{area}` | Directory plans are written to |
|
|
47
|
+
| `naming` | `PLAN-{prd-name}-{phase}` | File name pattern; `{phase}` suffix only when a plan spans multiple files |
|
|
48
|
+
| `todo` | `embedded` | `embedded` keeps the task list inside the plan; `separate` writes a standalone `todo.md` |
|
|
49
|
+
|
|
50
|
+
Default output: `docs/plans/{area}/PLAN-{prd-name}-{phase}.md`, task list embedded.
|
|
51
|
+
|
|
52
|
+
### `browser-testing-with-devtools`
|
|
53
|
+
|
|
54
|
+
This skill has **no default** — the section is required for browser testing,
|
|
55
|
+
because dev-server commands and login flows cannot be guessed.
|
|
56
|
+
|
|
57
|
+
| Key | Meaning |
|
|
58
|
+
|-----|---------|
|
|
59
|
+
| `dev-server` | Command to start the local dev server |
|
|
60
|
+
| `ready-check` | How to confirm the server is up |
|
|
61
|
+
| `base-url` | Root URL for navigation |
|
|
62
|
+
| `auth-flow` | Steps to log in (multi-line `|` block) |
|
|
63
|
+
| `roles` | Test account per privilege level, referenced by env-var name |
|
|
64
|
+
| `notes` | Anything else the agent should know (certs, seed data, ...) |
|
|
65
|
+
|
|
66
|
+
### `git-workflow-and-versioning`
|
|
67
|
+
|
|
68
|
+
| Key | Default | Meaning |
|
|
69
|
+
|-----|---------|---------|
|
|
70
|
+
| `branching` | `never` | `never` = agent works in the current branch and never creates or switches branches; `allow` = agent may create feature branches |
|
|
71
|
+
|
|
72
|
+
## The setup file — `.ai/agent-skills-setup.md`
|
|
73
|
+
|
|
74
|
+
The `guided-workspace-setup` skill writes this file to record what it installed
|
|
75
|
+
into the project — which skills, commands, personas, and extensions, by what
|
|
76
|
+
method, and when. It reads the file on a re-run to add, update, or remove
|
|
77
|
+
artifacts without reinstalling everything. No other skill loads it.
|
|
78
|
+
|
|
79
|
+
| Section | Meaning |
|
|
80
|
+
|---------|---------|
|
|
81
|
+
| `workspace-summary` | Workspace path, coding agent, **agent-skills version**, project shape, checks discovered |
|
|
82
|
+
| `install-status` | Installed artifacts, their targets, and the method (`copy` or `symlink`) |
|
|
83
|
+
| `doctor-runs` | One line per doctor pass (preflight / postflight, repaired / deleted / skipped counts) |
|
|
84
|
+
| `verification` | Checks confirming the install |
|
|
85
|
+
|
|
86
|
+
### The `version:` line
|
|
87
|
+
|
|
88
|
+
`workspace-summary` carries a `version:` line set to the package version that
|
|
89
|
+
performed the install (e.g. `version: 1.4.2`). It drives the version-aware
|
|
90
|
+
update flow — on every re-run, `guided-workspace-setup` compares this against
|
|
91
|
+
the current package version and:
|
|
92
|
+
|
|
93
|
+
1. Reads `CHANGELOG.md` between the two versions.
|
|
94
|
+
2. For each installed artifact, runs a three-way diff between
|
|
95
|
+
*source@recorded*, the installed copy on disk, and *source@current*.
|
|
96
|
+
3. Surfaces the result in the install menu using these `Status` values:
|
|
97
|
+
|
|
98
|
+
| Status | Meaning |
|
|
99
|
+
|---|---|
|
|
100
|
+
| `installed · upgrade available` | Source changed upstream; user copy still matches the old source → clean refresh |
|
|
101
|
+
| `installed · conflicting upgrade` | Source changed upstream AND user modified the copy → menu shows the three-way diff before overwriting |
|
|
102
|
+
| `installed · removed upstream` | Artifact gone in the new version → menu proposes deletion (subject to the removal-scope rule) |
|
|
103
|
+
| `not installed · new in this version` | New artifact added in the new version → menu offers it, marked `★` if recommended |
|
|
104
|
+
|
|
105
|
+
The diff sources at *source@recorded* are read from the package's
|
|
106
|
+
`.versions/<x.y.z>/` snapshot tree, which the release pipeline writes for every
|
|
107
|
+
published version. If the snapshot is missing (e.g. an unpublished local
|
|
108
|
+
build), the skill falls back to "treat installed copy as canonical" and
|
|
109
|
+
prompts for an explicit baseline.
|
|
110
|
+
|
|
111
|
+
### Pre-versioning workspaces
|
|
112
|
+
|
|
113
|
+
A workspace whose `agent-skills-setup.md` predates the `version:` line is
|
|
114
|
+
treated as "pre-versioning". On first re-run, `guided-workspace-setup` prompts
|
|
115
|
+
for a clean baseline: either accept the installed artifacts as matching the
|
|
116
|
+
current source (stamp the current version), or re-run the install from scratch.
|
|
117
|
+
|
|
118
|
+
Commit this file if the team should share install state — keep paths relative
|
|
119
|
+
so it stays portable. A self-referencing checkout (agent-skills itself) may
|
|
120
|
+
instead `.gitignore` it, since its recorded paths are local to one machine.
|
|
121
|
+
|
|
122
|
+
## Templates
|
|
123
|
+
|
|
124
|
+
### `.ai/agent-skills-overrides.md`
|
|
125
|
+
|
|
126
|
+
Copy this in and delete the sections you don't need — anything absent falls
|
|
127
|
+
back to the skill default.
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
# Agent Skills — Project Overrides
|
|
131
|
+
#
|
|
132
|
+
# Each section is applied ON TOP of the skill's built-in defaults.
|
|
133
|
+
# Keys not listed keep the default. Absent file/section → pure defaults.
|
|
134
|
+
|
|
135
|
+
## spec-driven-development
|
|
136
|
+
spec-dir: docs/prds/{area}
|
|
137
|
+
naming: PRD{n}-{topic}
|
|
138
|
+
|
|
139
|
+
## planning-and-task-breakdown
|
|
140
|
+
plan-dir: docs/plans/{area}
|
|
141
|
+
naming: PLAN-{prd-name}-{phase}
|
|
142
|
+
todo: embedded
|
|
143
|
+
|
|
144
|
+
## browser-testing-with-devtools
|
|
145
|
+
dev-server: <command to start the local dev server>
|
|
146
|
+
ready-check: <url or check that confirms the server is up>
|
|
147
|
+
base-url: <root url>
|
|
148
|
+
auth-flow: |
|
|
149
|
+
1. Navigate to <login url>
|
|
150
|
+
2. Submit credentials for the role needed by the screen under test
|
|
151
|
+
roles:
|
|
152
|
+
admin: env APP_TEST_ADMIN_USER / APP_TEST_ADMIN_PASS
|
|
153
|
+
player: env APP_TEST_PLAYER_USER / APP_TEST_PLAYER_PASS
|
|
154
|
+
notes: |
|
|
155
|
+
<anything else: self-signed certs, required seed data, ...>
|
|
156
|
+
|
|
157
|
+
## git-workflow-and-versioning
|
|
158
|
+
branching: never
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### `.ai/agent-skills-setup.md`
|
|
162
|
+
|
|
163
|
+
Written and maintained by `guided-workspace-setup`; shown here for reference.
|
|
164
|
+
|
|
165
|
+
```markdown
|
|
166
|
+
# Agent Skills — Workspace Setup
|
|
167
|
+
#
|
|
168
|
+
# Maintained by the guided-workspace-setup skill.
|
|
169
|
+
|
|
170
|
+
## workspace-summary
|
|
171
|
+
agent: claude-code
|
|
172
|
+
method: copy
|
|
173
|
+
version: 1.4.2
|
|
174
|
+
shape: <one line on the project shape>
|
|
175
|
+
|
|
176
|
+
## install-status
|
|
177
|
+
skills: [spec-driven-development, test-driven-development, code-review-and-quality]
|
|
178
|
+
commands: [spec, plan, build]
|
|
179
|
+
personas: [code-reviewer]
|
|
180
|
+
extensions: []
|
|
181
|
+
harnesses: []
|
|
182
|
+
updated: 2026-05-22
|
|
183
|
+
|
|
184
|
+
## verification
|
|
185
|
+
- Every recorded artifact exists at its target path.
|
|
186
|
+
- No secrets are stored in this file.
|
|
187
|
+
```
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Using agent-skills with GitHub Copilot
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
### Copilot Instructions
|
|
6
|
+
|
|
7
|
+
Copilot supports creating agent skills using a `.github/skills`, `.claude/skills`, or `.agents/skills` directory in your repository.
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
mkdir -p .github
|
|
11
|
+
|
|
12
|
+
# Create files for essential skills
|
|
13
|
+
cat /path/to/agent-skills/skills/test-driven-development/SKILL.md > .github/skills/test-driven-development/SKILL.md
|
|
14
|
+
cat /path/to/agent-skills/skills/code-review-and-quality/SKILL.md > .github/skills/code-review-and-quality/SKILL.md
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
For more details, refer [Creating agent skills for GitHub Copilot](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/create-skills).
|
|
18
|
+
|
|
19
|
+
### Agent Personas (agents.md)
|
|
20
|
+
|
|
21
|
+
Copilot supports specialized agent personas. Use the agent-skills agents:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
# Copy agent definitions — review specialists
|
|
25
|
+
cp /path/to/agent-skills/agents/code-reviewer.md .github/agents/code-reviewer.md
|
|
26
|
+
cp /path/to/agent-skills/agents/test-engineer.md .github/agents/test-engineer.md
|
|
27
|
+
cp /path/to/agent-skills/agents/security-auditor.md .github/agents/security-auditor.md
|
|
28
|
+
|
|
29
|
+
# Lifecycle specialists
|
|
30
|
+
cp /path/to/agent-skills/agents/planner.md .github/agents/planner.md
|
|
31
|
+
cp /path/to/agent-skills/agents/plan-reviewer.md .github/agents/plan-reviewer.md
|
|
32
|
+
cp /path/to/agent-skills/agents/builder.md .github/agents/builder.md
|
|
33
|
+
cp /path/to/agent-skills/agents/scout.md .github/agents/scout.md
|
|
34
|
+
cp /path/to/agent-skills/agents/documenter.md .github/agents/documenter.md
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Invoke agents in Copilot Chat:
|
|
38
|
+
- `@scout Locate where auth is enforced`
|
|
39
|
+
- `@planner Draft a plan for migrating users to OAuth`
|
|
40
|
+
- `@plan-reviewer Critique the migration plan`
|
|
41
|
+
- `@builder Implement the approved plan`
|
|
42
|
+
- `@code-reviewer Review this PR`
|
|
43
|
+
- `@test-engineer Analyze test coverage for this module`
|
|
44
|
+
- `@security-auditor Check this endpoint for vulnerabilities`
|
|
45
|
+
- `@documenter Update the README for the new endpoint`
|
|
46
|
+
|
|
47
|
+
### Custom Instructions (User Level)
|
|
48
|
+
|
|
49
|
+
For skills you want across all repositories:
|
|
50
|
+
|
|
51
|
+
1. Open VS Code → Settings → GitHub Copilot → Custom Instructions
|
|
52
|
+
2. Add your most-used skill summaries
|
|
53
|
+
|
|
54
|
+
## Recommended Configuration
|
|
55
|
+
|
|
56
|
+
### .github/copilot-instructions.md
|
|
57
|
+
|
|
58
|
+
GitHub Copilot supports project-level instructions via `.github/copilot-instructions.md`.
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
# Project Coding Standards
|
|
62
|
+
|
|
63
|
+
## Testing
|
|
64
|
+
- Write tests before code (TDD)
|
|
65
|
+
- For bugs: write a failing test first, then fix (Prove-It pattern)
|
|
66
|
+
- Test hierarchy: unit > integration > e2e (use the lowest level that captures the behavior)
|
|
67
|
+
- Run `npm test` after every change
|
|
68
|
+
|
|
69
|
+
## Code Quality
|
|
70
|
+
- Review across five axes: correctness, readability, architecture, security, performance
|
|
71
|
+
- Every PR must pass: lint, type check, tests, build
|
|
72
|
+
- No secrets in code or version control
|
|
73
|
+
|
|
74
|
+
## Implementation
|
|
75
|
+
- Build in small, verifiable increments
|
|
76
|
+
- Each increment: implement → test → verify → commit
|
|
77
|
+
- Never mix formatting changes with behavior changes
|
|
78
|
+
|
|
79
|
+
## Boundaries
|
|
80
|
+
- Always: Run tests before commits, validate user input
|
|
81
|
+
- Ask first: Database schema changes, new dependencies
|
|
82
|
+
- Never: Commit secrets, remove failing tests, skip verification
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Specialized Agents
|
|
86
|
+
|
|
87
|
+
Use the agents for targeted review workflows in Copilot Chat.
|
|
88
|
+
|
|
89
|
+
## Usage Tips
|
|
90
|
+
|
|
91
|
+
1. **Keep instructions concise** — Copilot instructions work best when focused. Summarize the key rules rather than including full skill files.
|
|
92
|
+
2. **Use agents for review** — The code-reviewer, test-engineer, and security-auditor agents are designed for Copilot's agent model.
|
|
93
|
+
3. **Reference in chat** — When working on a specific phase, paste the relevant skill content into Copilot Chat for context.
|
|
94
|
+
4. **Combine with PR reviews** — Set up Copilot to review PRs using the code-reviewer agent persona.
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Using agent-skills with Cursor
|
|
2
|
+
|
|
3
|
+
## Setup
|
|
4
|
+
|
|
5
|
+
### Option 1: Rules Directory (Recommended)
|
|
6
|
+
|
|
7
|
+
Cursor supports a `.cursor/rules/` directory for project-specific rules:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Create the rules directory
|
|
11
|
+
mkdir -p .cursor/rules
|
|
12
|
+
|
|
13
|
+
# Copy skills you want as rules
|
|
14
|
+
cp /path/to/agent-skills/skills/test-driven-development/SKILL.md .cursor/rules/test-driven-development.md
|
|
15
|
+
cp /path/to/agent-skills/skills/code-review-and-quality/SKILL.md .cursor/rules/code-review-and-quality.md
|
|
16
|
+
cp /path/to/agent-skills/skills/incremental-implementation/SKILL.md .cursor/rules/incremental-implementation.md
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Rules in this directory are automatically loaded into Cursor's context.
|
|
20
|
+
|
|
21
|
+
### Option 2: .cursorrules File
|
|
22
|
+
|
|
23
|
+
Create a `.cursorrules` file in your project root with the essential skills inlined:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Generate a combined rules file
|
|
27
|
+
cat /path/to/agent-skills/skills/test-driven-development/SKILL.md > .cursorrules
|
|
28
|
+
echo "\n---\n" >> .cursorrules
|
|
29
|
+
cat /path/to/agent-skills/skills/code-review-and-quality/SKILL.md >> .cursorrules
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Option 3: Notepads
|
|
33
|
+
|
|
34
|
+
Cursor's Notepads feature lets you store reusable context. Create a notepad for each skill you use frequently:
|
|
35
|
+
|
|
36
|
+
1. Open Cursor → Settings → Notepads
|
|
37
|
+
2. Create a new notepad named "swe: Test-Driven Development"
|
|
38
|
+
3. Paste the content of `skills/test-driven-development/SKILL.md`
|
|
39
|
+
4. Reference it in chat with `@notepad swe: Test-Driven Development`
|
|
40
|
+
|
|
41
|
+
## Recommended Configuration
|
|
42
|
+
|
|
43
|
+
### Essential Skills (Always Load)
|
|
44
|
+
|
|
45
|
+
Add these to `.cursor/rules/`:
|
|
46
|
+
|
|
47
|
+
1. `test-driven-development.md` — TDD workflow and Prove-It pattern
|
|
48
|
+
2. `code-review-and-quality.md` — Five-axis review
|
|
49
|
+
3. `incremental-implementation.md` — Build in small verifiable slices
|
|
50
|
+
|
|
51
|
+
### Phase-Specific Skills (Load as Notepads)
|
|
52
|
+
|
|
53
|
+
Create notepads for skills you use contextually:
|
|
54
|
+
|
|
55
|
+
- "swe: Spec Development" → `spec-driven-development/SKILL.md`
|
|
56
|
+
- "swe: Frontend UI" → `frontend-ui-engineering/SKILL.md`
|
|
57
|
+
- "swe: Security" → `security-and-hardening/SKILL.md`
|
|
58
|
+
- "swe: Performance" → `performance-optimization/SKILL.md`
|
|
59
|
+
|
|
60
|
+
Reference them with `@notepad` when working on relevant tasks.
|
|
61
|
+
|
|
62
|
+
## Usage Tips
|
|
63
|
+
|
|
64
|
+
1. **Don't load all skills at once** — Cursor has context limits. Load 2-3 skills as rules and keep others as notepads.
|
|
65
|
+
2. **Reference skills explicitly** — Tell Cursor "Follow the test-driven-development rules for this change" to ensure it reads the loaded rules.
|
|
66
|
+
3. **Use agents for review** — Copy `agents/code-reviewer.md` content and tell Cursor to "review this diff using this code review framework." The full set under `agents/` (`code-reviewer`, `test-engineer`, `security-auditor`, `planner`, `plan-reviewer`, `builder`, `scout`, `documenter`) can be loaded the same way — the read-only ones (`code-reviewer`, `security-auditor`, `planner`, `plan-reviewer`, `scout`) declare `tools: read,bash,grep,find,ls` and explicitly will not modify files.
|
|
67
|
+
4. **Load references on demand** — When working on performance, reference `@notepad performance-checklist` or paste the checklist content.
|