@chankov/agent-skills 0.2.0 → 0.3.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/.claude/commands/{doctor.md → doctor-agent-skills.md} +1 -1
- package/.pi/extensions/agent-skills-update-check/README.md +4 -4
- package/.pi/prompts/{doctor.md → doctor-agent-skills.md} +1 -1
- package/.versions/0.2.0/.claude/commands/{doctor.md → doctor-agent-skills.md} +1 -1
- package/.versions/0.2.0/.pi/extensions/agent-skills-update-check/README.md +4 -4
- package/.versions/0.2.0/.pi/prompts/{doctor.md → doctor-agent-skills.md} +1 -1
- package/.versions/0.2.0/skills/guided-workspace-setup/SKILL.md +40 -2
- package/.versions/0.3.0/.claude/commands/build.md +18 -0
- package/.versions/0.3.0/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.3.0/.claude/commands/design-agent.md +14 -0
- package/.versions/0.3.0/.claude/commands/doctor-agent-skills.md +13 -0
- package/.versions/0.3.0/.claude/commands/plan.md +16 -0
- package/.versions/0.3.0/.claude/commands/prime.md +22 -0
- package/.versions/0.3.0/.claude/commands/review.md +16 -0
- package/.versions/0.3.0/.claude/commands/setup-agent-skills.md +19 -0
- package/.versions/0.3.0/.claude/commands/ship.md +17 -0
- package/.versions/0.3.0/.claude/commands/spec.md +15 -0
- package/.versions/0.3.0/.claude/commands/test.md +19 -0
- package/.versions/0.3.0/.opencode/commands/as-build.md +17 -0
- package/.versions/0.3.0/.opencode/commands/as-code-simplify.md +16 -0
- package/.versions/0.3.0/.opencode/commands/as-design-agent.md +15 -0
- package/.versions/0.3.0/.opencode/commands/as-doctor-agent-skills.md +11 -0
- package/.versions/0.3.0/.opencode/commands/as-plan.md +16 -0
- package/.versions/0.3.0/.opencode/commands/as-prime.md +22 -0
- package/.versions/0.3.0/.opencode/commands/as-review.md +15 -0
- package/.versions/0.3.0/.opencode/commands/as-setup-agent-skills.md +11 -0
- package/.versions/0.3.0/.opencode/commands/as-ship.md +16 -0
- package/.versions/0.3.0/.opencode/commands/as-spec.md +16 -0
- package/.versions/0.3.0/.opencode/commands/as-test.md +21 -0
- package/.versions/0.3.0/.pi/agents/agent-chain.yaml +49 -0
- package/.versions/0.3.0/.pi/agents/bowser.md +19 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/agent-expert.md +98 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/cli-expert.md +41 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/config-expert.md +63 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/ext-expert.md +43 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/keybinding-expert.md +134 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/prompt-expert.md +70 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/skill-expert.md +42 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/theme-expert.md +40 -0
- package/.versions/0.3.0/.pi/agents/pi-pi/tui-expert.md +85 -0
- package/.versions/0.3.0/.pi/agents/teams.yaml +31 -0
- package/.versions/0.3.0/.pi/damage-control-rules.yaml +278 -0
- package/.versions/0.3.0/.pi/extensions/agent-skills-update-check/README.md +58 -0
- package/.versions/0.3.0/.pi/extensions/agent-skills-update-check/index.ts +161 -0
- package/.versions/0.3.0/.pi/extensions/agent-skills-update-check/package.json +6 -0
- package/.versions/0.3.0/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
- package/.versions/0.3.0/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
- package/.versions/0.3.0/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.3.0/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.3.0/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.3.0/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.3.0/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.3.0/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.3.0/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.3.0/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.3.0/.pi/extensions/package.json +9 -0
- package/.versions/0.3.0/.pi/harnesses/agent-chain/README.md +37 -0
- package/.versions/0.3.0/.pi/harnesses/agent-chain/index.ts +795 -0
- package/.versions/0.3.0/.pi/harnesses/agent-chain/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/agent-team/README.md +38 -0
- package/.versions/0.3.0/.pi/harnesses/agent-team/index.ts +732 -0
- package/.versions/0.3.0/.pi/harnesses/agent-team/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/coms/README.md +36 -0
- package/.versions/0.3.0/.pi/harnesses/coms/index.ts +1595 -0
- package/.versions/0.3.0/.pi/harnesses/coms/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/coms-net/README.md +46 -0
- package/.versions/0.3.0/.pi/harnesses/coms-net/index.ts +1637 -0
- package/.versions/0.3.0/.pi/harnesses/coms-net/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/damage-control/README.md +38 -0
- package/.versions/0.3.0/.pi/harnesses/damage-control/index.ts +207 -0
- package/.versions/0.3.0/.pi/harnesses/damage-control/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/damage-control-continue/README.md +37 -0
- package/.versions/0.3.0/.pi/harnesses/damage-control-continue/index.ts +234 -0
- package/.versions/0.3.0/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/minimal/README.md +27 -0
- package/.versions/0.3.0/.pi/harnesses/minimal/index.ts +32 -0
- package/.versions/0.3.0/.pi/harnesses/minimal/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.3.0/.pi/harnesses/package.json +9 -0
- package/.versions/0.3.0/.pi/harnesses/pi-pi/README.md +39 -0
- package/.versions/0.3.0/.pi/harnesses/pi-pi/index.ts +631 -0
- package/.versions/0.3.0/.pi/harnesses/pi-pi/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/purpose-gate/README.md +27 -0
- package/.versions/0.3.0/.pi/harnesses/purpose-gate/index.ts +82 -0
- package/.versions/0.3.0/.pi/harnesses/purpose-gate/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/session-replay/README.md +28 -0
- package/.versions/0.3.0/.pi/harnesses/session-replay/index.ts +214 -0
- package/.versions/0.3.0/.pi/harnesses/session-replay/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/subagent-widget/README.md +36 -0
- package/.versions/0.3.0/.pi/harnesses/subagent-widget/index.ts +479 -0
- package/.versions/0.3.0/.pi/harnesses/subagent-widget/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/system-select/README.md +39 -0
- package/.versions/0.3.0/.pi/harnesses/system-select/index.ts +165 -0
- package/.versions/0.3.0/.pi/harnesses/system-select/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/tilldone/README.md +35 -0
- package/.versions/0.3.0/.pi/harnesses/tilldone/index.ts +724 -0
- package/.versions/0.3.0/.pi/harnesses/tilldone/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/tool-counter/README.md +31 -0
- package/.versions/0.3.0/.pi/harnesses/tool-counter/index.ts +100 -0
- package/.versions/0.3.0/.pi/harnesses/tool-counter/package.json +6 -0
- package/.versions/0.3.0/.pi/harnesses/tool-counter-widget/README.md +27 -0
- package/.versions/0.3.0/.pi/harnesses/tool-counter-widget/index.ts +66 -0
- package/.versions/0.3.0/.pi/harnesses/tool-counter-widget/package.json +6 -0
- package/.versions/0.3.0/.pi/prompts/build.md +24 -0
- package/.versions/0.3.0/.pi/prompts/code-simplify.md +22 -0
- package/.versions/0.3.0/.pi/prompts/doctor-agent-skills.md +13 -0
- package/.versions/0.3.0/.pi/prompts/plan.md +16 -0
- package/.versions/0.3.0/.pi/prompts/review.md +16 -0
- package/.versions/0.3.0/.pi/prompts/setup-agent-skills.md +19 -0
- package/.versions/0.3.0/.pi/prompts/ship.md +17 -0
- package/.versions/0.3.0/.pi/prompts/spec.md +15 -0
- package/.versions/0.3.0/.pi/prompts/test.md +19 -0
- package/.versions/0.3.0/.pi/skills/bowser/SKILL.md +114 -0
- package/.versions/0.3.0/.version +1 -0
- package/.versions/0.3.0/agents/builder.md +6 -0
- package/.versions/0.3.0/agents/code-reviewer.md +93 -0
- package/.versions/0.3.0/agents/documenter.md +6 -0
- package/.versions/0.3.0/agents/plan-reviewer.md +22 -0
- package/.versions/0.3.0/agents/planner.md +6 -0
- package/.versions/0.3.0/agents/scout.md +6 -0
- package/.versions/0.3.0/agents/security-auditor.md +97 -0
- package/.versions/0.3.0/agents/test-engineer.md +89 -0
- package/.versions/0.3.0/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.3.0/hooks/hooks.json +14 -0
- package/.versions/0.3.0/hooks/session-start.sh +74 -0
- package/.versions/0.3.0/hooks/simplify-ignore-test.sh +247 -0
- package/.versions/0.3.0/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.3.0/references/accessibility-checklist.md +159 -0
- package/.versions/0.3.0/references/performance-checklist.md +121 -0
- package/.versions/0.3.0/references/prompting-patterns.md +380 -0
- package/.versions/0.3.0/references/security-checklist.md +134 -0
- package/.versions/0.3.0/references/testing-patterns.md +236 -0
- package/.versions/0.3.0/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.3.0/skills/browser-testing-with-devtools/SKILL.md +335 -0
- package/.versions/0.3.0/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.3.0/skills/code-review-and-quality/SKILL.md +347 -0
- package/.versions/0.3.0/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.3.0/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.3.0/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.3.0/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.3.0/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.3.0/skills/designing-agents/pi-harness-authoring.md +213 -0
- package/.versions/0.3.0/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.3.0/skills/frontend-ui-engineering/SKILL.md +322 -0
- package/.versions/0.3.0/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.3.0/skills/guided-workspace-setup/SKILL.md +331 -0
- package/.versions/0.3.0/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.3.0/skills/idea-refine/examples.md +238 -0
- package/.versions/0.3.0/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.3.0/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.3.0/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.3.0/skills/incremental-implementation/SKILL.md +279 -0
- package/.versions/0.3.0/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.3.0/skills/planning-and-task-breakdown/SKILL.md +237 -0
- package/.versions/0.3.0/skills/security-and-hardening/SKILL.md +349 -0
- package/.versions/0.3.0/skills/shipping-and-launch/SKILL.md +309 -0
- package/.versions/0.3.0/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.3.0/skills/spec-driven-development/SKILL.md +237 -0
- package/.versions/0.3.0/skills/test-driven-development/SKILL.md +379 -0
- package/.versions/0.3.0/skills/using-agent-skills/SKILL.md +176 -0
- package/.versions/0.3.2/.claude/commands/build.md +18 -0
- package/.versions/0.3.2/.claude/commands/code-simplify.md +22 -0
- package/.versions/0.3.2/.claude/commands/design-agent.md +14 -0
- package/.versions/0.3.2/.claude/commands/doctor-agent-skills.md +13 -0
- package/.versions/0.3.2/.claude/commands/plan.md +16 -0
- package/.versions/0.3.2/.claude/commands/prime.md +22 -0
- package/.versions/0.3.2/.claude/commands/review.md +16 -0
- package/.versions/0.3.2/.claude/commands/setup-agent-skills.md +19 -0
- package/.versions/0.3.2/.claude/commands/ship.md +17 -0
- package/.versions/0.3.2/.claude/commands/spec.md +15 -0
- package/.versions/0.3.2/.claude/commands/test.md +19 -0
- package/.versions/0.3.2/.opencode/commands/as-build.md +17 -0
- package/.versions/0.3.2/.opencode/commands/as-code-simplify.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-design-agent.md +15 -0
- package/.versions/0.3.2/.opencode/commands/as-doctor-agent-skills.md +11 -0
- package/.versions/0.3.2/.opencode/commands/as-plan.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-prime.md +22 -0
- package/.versions/0.3.2/.opencode/commands/as-review.md +15 -0
- package/.versions/0.3.2/.opencode/commands/as-setup-agent-skills.md +11 -0
- package/.versions/0.3.2/.opencode/commands/as-ship.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-spec.md +16 -0
- package/.versions/0.3.2/.opencode/commands/as-test.md +21 -0
- package/.versions/0.3.2/.pi/agents/agent-chain.yaml +49 -0
- package/.versions/0.3.2/.pi/agents/bowser.md +19 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/agent-expert.md +98 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/cli-expert.md +41 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/config-expert.md +63 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/ext-expert.md +43 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/keybinding-expert.md +134 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/pi-orchestrator.md +57 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/prompt-expert.md +70 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/skill-expert.md +42 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/theme-expert.md +40 -0
- package/.versions/0.3.2/.pi/agents/pi-pi/tui-expert.md +85 -0
- package/.versions/0.3.2/.pi/agents/teams.yaml +31 -0
- package/.versions/0.3.2/.pi/damage-control-rules.yaml +278 -0
- package/.versions/0.3.2/.pi/extensions/agent-skills-update-check/README.md +58 -0
- package/.versions/0.3.2/.pi/extensions/agent-skills-update-check/index.ts +161 -0
- package/.versions/0.3.2/.pi/extensions/agent-skills-update-check/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/chrome-devtools-mcp/README.md +39 -0
- package/.versions/0.3.2/.pi/extensions/chrome-devtools-mcp/index.ts +61 -0
- package/.versions/0.3.2/.pi/extensions/chrome-devtools-mcp/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/compact-and-continue/README.md +42 -0
- package/.versions/0.3.2/.pi/extensions/compact-and-continue/index.ts +120 -0
- package/.versions/0.3.2/.pi/extensions/compact-and-continue/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/mcp-bridge/README.md +46 -0
- package/.versions/0.3.2/.pi/extensions/mcp-bridge/index.ts +206 -0
- package/.versions/0.3.2/.pi/extensions/mcp-bridge/package.json +6 -0
- package/.versions/0.3.2/.pi/extensions/package-lock.json +1143 -0
- package/.versions/0.3.2/.pi/extensions/package.json +9 -0
- package/.versions/0.3.2/.pi/harnesses/agent-chain/README.md +37 -0
- package/.versions/0.3.2/.pi/harnesses/agent-chain/index.ts +795 -0
- package/.versions/0.3.2/.pi/harnesses/agent-chain/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/agent-team/README.md +38 -0
- package/.versions/0.3.2/.pi/harnesses/agent-team/index.ts +732 -0
- package/.versions/0.3.2/.pi/harnesses/agent-team/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/coms/README.md +36 -0
- package/.versions/0.3.2/.pi/harnesses/coms/index.ts +1595 -0
- package/.versions/0.3.2/.pi/harnesses/coms/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/coms-net/README.md +46 -0
- package/.versions/0.3.2/.pi/harnesses/coms-net/index.ts +1637 -0
- package/.versions/0.3.2/.pi/harnesses/coms-net/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control/README.md +38 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control/index.ts +207 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control-continue/README.md +37 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control-continue/index.ts +234 -0
- package/.versions/0.3.2/.pi/harnesses/damage-control-continue/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/minimal/README.md +27 -0
- package/.versions/0.3.2/.pi/harnesses/minimal/index.ts +32 -0
- package/.versions/0.3.2/.pi/harnesses/minimal/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/package-lock.json +35 -0
- package/.versions/0.3.2/.pi/harnesses/package.json +9 -0
- package/.versions/0.3.2/.pi/harnesses/pi-pi/README.md +39 -0
- package/.versions/0.3.2/.pi/harnesses/pi-pi/index.ts +631 -0
- package/.versions/0.3.2/.pi/harnesses/pi-pi/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/purpose-gate/README.md +27 -0
- package/.versions/0.3.2/.pi/harnesses/purpose-gate/index.ts +82 -0
- package/.versions/0.3.2/.pi/harnesses/purpose-gate/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/session-replay/README.md +28 -0
- package/.versions/0.3.2/.pi/harnesses/session-replay/index.ts +214 -0
- package/.versions/0.3.2/.pi/harnesses/session-replay/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/subagent-widget/README.md +36 -0
- package/.versions/0.3.2/.pi/harnesses/subagent-widget/index.ts +479 -0
- package/.versions/0.3.2/.pi/harnesses/subagent-widget/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/system-select/README.md +39 -0
- package/.versions/0.3.2/.pi/harnesses/system-select/index.ts +165 -0
- package/.versions/0.3.2/.pi/harnesses/system-select/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/tilldone/README.md +35 -0
- package/.versions/0.3.2/.pi/harnesses/tilldone/index.ts +724 -0
- package/.versions/0.3.2/.pi/harnesses/tilldone/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter/README.md +31 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter/index.ts +100 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter/package.json +6 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter-widget/README.md +27 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter-widget/index.ts +66 -0
- package/.versions/0.3.2/.pi/harnesses/tool-counter-widget/package.json +6 -0
- package/.versions/0.3.2/.pi/prompts/build.md +24 -0
- package/.versions/0.3.2/.pi/prompts/code-simplify.md +22 -0
- package/.versions/0.3.2/.pi/prompts/doctor-agent-skills.md +13 -0
- package/.versions/0.3.2/.pi/prompts/plan.md +16 -0
- package/.versions/0.3.2/.pi/prompts/review.md +16 -0
- package/.versions/0.3.2/.pi/prompts/setup-agent-skills.md +19 -0
- package/.versions/0.3.2/.pi/prompts/ship.md +17 -0
- package/.versions/0.3.2/.pi/prompts/spec.md +15 -0
- package/.versions/0.3.2/.pi/prompts/test.md +19 -0
- package/.versions/0.3.2/.pi/skills/bowser/SKILL.md +114 -0
- package/.versions/0.3.2/.version +1 -0
- package/.versions/0.3.2/agents/builder.md +6 -0
- package/.versions/0.3.2/agents/code-reviewer.md +93 -0
- package/.versions/0.3.2/agents/documenter.md +6 -0
- package/.versions/0.3.2/agents/plan-reviewer.md +22 -0
- package/.versions/0.3.2/agents/planner.md +6 -0
- package/.versions/0.3.2/agents/scout.md +6 -0
- package/.versions/0.3.2/agents/security-auditor.md +97 -0
- package/.versions/0.3.2/agents/test-engineer.md +89 -0
- package/.versions/0.3.2/hooks/SIMPLIFY-IGNORE.md +90 -0
- package/.versions/0.3.2/hooks/hooks.json +14 -0
- package/.versions/0.3.2/hooks/session-start.sh +74 -0
- package/.versions/0.3.2/hooks/simplify-ignore-test.sh +247 -0
- package/.versions/0.3.2/hooks/simplify-ignore.sh +302 -0
- package/.versions/0.3.2/references/accessibility-checklist.md +159 -0
- package/.versions/0.3.2/references/performance-checklist.md +121 -0
- package/.versions/0.3.2/references/prompting-patterns.md +380 -0
- package/.versions/0.3.2/references/security-checklist.md +134 -0
- package/.versions/0.3.2/references/testing-patterns.md +236 -0
- package/.versions/0.3.2/skills/api-and-interface-design/SKILL.md +294 -0
- package/.versions/0.3.2/skills/browser-testing-with-devtools/SKILL.md +335 -0
- package/.versions/0.3.2/skills/ci-cd-and-automation/SKILL.md +390 -0
- package/.versions/0.3.2/skills/code-review-and-quality/SKILL.md +347 -0
- package/.versions/0.3.2/skills/code-simplification/SKILL.md +331 -0
- package/.versions/0.3.2/skills/context-engineering/SKILL.md +291 -0
- package/.versions/0.3.2/skills/debugging-and-error-recovery/SKILL.md +300 -0
- package/.versions/0.3.2/skills/deprecation-and-migration/SKILL.md +206 -0
- package/.versions/0.3.2/skills/designing-agents/SKILL.md +394 -0
- package/.versions/0.3.2/skills/designing-agents/pi-harness-authoring.md +213 -0
- package/.versions/0.3.2/skills/documentation-and-adrs/SKILL.md +278 -0
- package/.versions/0.3.2/skills/frontend-ui-engineering/SKILL.md +322 -0
- package/.versions/0.3.2/skills/git-workflow-and-versioning/SKILL.md +316 -0
- package/.versions/0.3.2/skills/guided-workspace-setup/SKILL.md +345 -0
- package/.versions/0.3.2/skills/idea-refine/SKILL.md +178 -0
- package/.versions/0.3.2/skills/idea-refine/examples.md +238 -0
- package/.versions/0.3.2/skills/idea-refine/frameworks.md +99 -0
- package/.versions/0.3.2/skills/idea-refine/refinement-criteria.md +113 -0
- package/.versions/0.3.2/skills/idea-refine/scripts/idea-refine.sh +15 -0
- package/.versions/0.3.2/skills/incremental-implementation/SKILL.md +279 -0
- package/.versions/0.3.2/skills/performance-optimization/SKILL.md +350 -0
- package/.versions/0.3.2/skills/planning-and-task-breakdown/SKILL.md +237 -0
- package/.versions/0.3.2/skills/security-and-hardening/SKILL.md +349 -0
- package/.versions/0.3.2/skills/shipping-and-launch/SKILL.md +309 -0
- package/.versions/0.3.2/skills/source-driven-development/SKILL.md +194 -0
- package/.versions/0.3.2/skills/spec-driven-development/SKILL.md +237 -0
- package/.versions/0.3.2/skills/test-driven-development/SKILL.md +379 -0
- package/.versions/0.3.2/skills/using-agent-skills/SKILL.md +176 -0
- package/CHANGELOG.md +108 -0
- package/README.md +5 -5
- package/bin/cli.js +100 -24
- package/bin/lib/bootstrap.js +309 -0
- package/bin/lib/doctor.js +1 -1
- package/docs/getting-started.md +2 -2
- package/docs/npm-install.md +64 -11
- package/package.json +1 -1
- package/skills/guided-workspace-setup/SKILL.md +56 -4
- /package/.claude/commands/{setup.md → setup-agent-skills.md} +0 -0
- /package/.opencode/commands/{as-doctor.md → as-doctor-agent-skills.md} +0 -0
- /package/.opencode/commands/{as-setup.md → as-setup-agent-skills.md} +0 -0
- /package/.pi/prompts/{setup.md → setup-agent-skills.md} +0 -0
- /package/.versions/0.2.0/.claude/commands/{setup.md → setup-agent-skills.md} +0 -0
- /package/.versions/0.2.0/.opencode/commands/{as-doctor.md → as-doctor-agent-skills.md} +0 -0
- /package/.versions/0.2.0/.opencode/commands/{as-setup.md → as-setup-agent-skills.md} +0 -0
- /package/.versions/0.2.0/.pi/prompts/{setup.md → setup-agent-skills.md} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-reviewer
|
|
3
|
+
description: Plan critic — reviews, challenges, and validates implementation plans
|
|
4
|
+
tools: read,grep,find,ls
|
|
5
|
+
---
|
|
6
|
+
You are a plan reviewer agent. Your job is to critically evaluate implementation plans.
|
|
7
|
+
|
|
8
|
+
For each plan you review:
|
|
9
|
+
- Challenge assumptions — are they grounded in the actual codebase?
|
|
10
|
+
- Identify missing steps, edge cases, or dependencies the planner overlooked
|
|
11
|
+
- Flag risks: breaking changes, migration concerns, performance pitfalls
|
|
12
|
+
- Check feasibility — can each step actually be done with the tools and patterns available?
|
|
13
|
+
- Evaluate ordering — are steps in the right sequence? Are there hidden dependencies?
|
|
14
|
+
- Call out scope creep or over-engineering
|
|
15
|
+
|
|
16
|
+
Output a structured critique with:
|
|
17
|
+
1. **Strengths** — what the plan gets right
|
|
18
|
+
2. **Issues** — concrete problems ranked by severity
|
|
19
|
+
3. **Missing** — steps or considerations the plan omitted
|
|
20
|
+
4. **Recommendations** — specific, actionable changes to improve the plan
|
|
21
|
+
|
|
22
|
+
Be direct and specific. Reference actual files and patterns from the codebase when possible. Do NOT modify files.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
description: Architecture and implementation planning
|
|
4
|
+
tools: read,grep,find,ls
|
|
5
|
+
---
|
|
6
|
+
You are a planner agent. Analyze requirements and produce clear, actionable implementation plans. Identify files to change, dependencies, and risks. Output a numbered step-by-step plan. Do NOT modify files.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-auditor
|
|
3
|
+
description: Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations.
|
|
4
|
+
tools: read,bash,grep,find,ls
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Security Auditor
|
|
8
|
+
|
|
9
|
+
You are an experienced Security Engineer conducting a security review. Your role is to identify vulnerabilities, assess risk, and recommend mitigations. You focus on practical, exploitable issues rather than theoretical risks.
|
|
10
|
+
|
|
11
|
+
## Review Scope
|
|
12
|
+
|
|
13
|
+
### 1. Input Handling
|
|
14
|
+
- Is all user input validated at system boundaries?
|
|
15
|
+
- Are there injection vectors (SQL, NoSQL, OS command, LDAP)?
|
|
16
|
+
- Is HTML output encoded to prevent XSS?
|
|
17
|
+
- Are file uploads restricted by type, size, and content?
|
|
18
|
+
- Are URL redirects validated against an allowlist?
|
|
19
|
+
|
|
20
|
+
### 2. Authentication & Authorization
|
|
21
|
+
- Are passwords hashed with a strong algorithm (bcrypt, scrypt, argon2)?
|
|
22
|
+
- Are sessions managed securely (httpOnly, secure, sameSite cookies)?
|
|
23
|
+
- Is authorization checked on every protected endpoint?
|
|
24
|
+
- Can users access resources belonging to other users (IDOR)?
|
|
25
|
+
- Are password reset tokens time-limited and single-use?
|
|
26
|
+
- Is rate limiting applied to authentication endpoints?
|
|
27
|
+
|
|
28
|
+
### 3. Data Protection
|
|
29
|
+
- Are secrets in environment variables (not code)?
|
|
30
|
+
- Are sensitive fields excluded from API responses and logs?
|
|
31
|
+
- Is data encrypted in transit (HTTPS) and at rest (if required)?
|
|
32
|
+
- Is PII handled according to applicable regulations?
|
|
33
|
+
- Are database backups encrypted?
|
|
34
|
+
|
|
35
|
+
### 4. Infrastructure
|
|
36
|
+
- Are security headers configured (CSP, HSTS, X-Frame-Options)?
|
|
37
|
+
- Is CORS restricted to specific origins?
|
|
38
|
+
- Are dependencies audited for known vulnerabilities?
|
|
39
|
+
- Are error messages generic (no stack traces or internal details to users)?
|
|
40
|
+
- Is the principle of least privilege applied to service accounts?
|
|
41
|
+
|
|
42
|
+
### 5. Third-Party Integrations
|
|
43
|
+
- Are API keys and tokens stored securely?
|
|
44
|
+
- Are webhook payloads verified (signature validation)?
|
|
45
|
+
- Are third-party scripts loaded from trusted CDNs with integrity hashes?
|
|
46
|
+
- Are OAuth flows using PKCE and state parameters?
|
|
47
|
+
|
|
48
|
+
## Severity Classification
|
|
49
|
+
|
|
50
|
+
| Severity | Criteria | Action |
|
|
51
|
+
|----------|----------|--------|
|
|
52
|
+
| **Critical** | Exploitable remotely, leads to data breach or full compromise | Fix immediately, block release |
|
|
53
|
+
| **High** | Exploitable with some conditions, significant data exposure | Fix before release |
|
|
54
|
+
| **Medium** | Limited impact or requires authenticated access to exploit | Fix in current sprint |
|
|
55
|
+
| **Low** | Theoretical risk or defense-in-depth improvement | Schedule for next sprint |
|
|
56
|
+
| **Info** | Best practice recommendation, no current risk | Consider adopting |
|
|
57
|
+
|
|
58
|
+
## Output Format
|
|
59
|
+
|
|
60
|
+
```markdown
|
|
61
|
+
## Security Audit Report
|
|
62
|
+
|
|
63
|
+
### Summary
|
|
64
|
+
- Critical: [count]
|
|
65
|
+
- High: [count]
|
|
66
|
+
- Medium: [count]
|
|
67
|
+
- Low: [count]
|
|
68
|
+
|
|
69
|
+
### Findings
|
|
70
|
+
|
|
71
|
+
#### [CRITICAL] [Finding title]
|
|
72
|
+
- **Location:** [file:line]
|
|
73
|
+
- **Description:** [What the vulnerability is]
|
|
74
|
+
- **Impact:** [What an attacker could do]
|
|
75
|
+
- **Proof of concept:** [How to exploit it]
|
|
76
|
+
- **Recommendation:** [Specific fix with code example]
|
|
77
|
+
|
|
78
|
+
#### [HIGH] [Finding title]
|
|
79
|
+
...
|
|
80
|
+
|
|
81
|
+
### Positive Observations
|
|
82
|
+
- [Security practices done well]
|
|
83
|
+
|
|
84
|
+
### Recommendations
|
|
85
|
+
- [Proactive improvements to consider]
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Rules
|
|
89
|
+
|
|
90
|
+
1. Focus on exploitable vulnerabilities, not theoretical risks
|
|
91
|
+
2. Every finding must include a specific, actionable recommendation
|
|
92
|
+
3. Provide proof of concept or exploitation scenario for Critical/High findings
|
|
93
|
+
4. Acknowledge good security practices — positive reinforcement matters
|
|
94
|
+
5. Check the OWASP Top 10 as a minimum baseline
|
|
95
|
+
6. Review dependencies for known CVEs
|
|
96
|
+
7. Never suggest disabling security controls as a "fix"
|
|
97
|
+
8. Do NOT modify files — the auditor's output is the report, not patches. Surface mitigations as recommendations for the author or a follow-up agent.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: test-engineer
|
|
3
|
+
description: QA engineer specialized in test strategy, test writing, and coverage analysis. Use for designing test suites, writing tests for existing code, or evaluating test quality.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Test Engineer
|
|
7
|
+
|
|
8
|
+
You are an experienced QA Engineer focused on test strategy and quality assurance. Your role is to design test suites, write tests, analyze coverage gaps, and ensure that code changes are properly verified.
|
|
9
|
+
|
|
10
|
+
## Approach
|
|
11
|
+
|
|
12
|
+
### 1. Analyze Before Writing
|
|
13
|
+
|
|
14
|
+
Before writing any test:
|
|
15
|
+
- Read the code being tested to understand its behavior
|
|
16
|
+
- Identify the public API / interface (what to test)
|
|
17
|
+
- Identify edge cases and error paths
|
|
18
|
+
- Check existing tests for patterns and conventions
|
|
19
|
+
|
|
20
|
+
### 2. Test at the Right Level
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
Pure logic, no I/O → Unit test
|
|
24
|
+
Crosses a boundary → Integration test
|
|
25
|
+
Critical user flow → E2E test
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Test at the lowest level that captures the behavior. Don't write E2E tests for things unit tests can cover.
|
|
29
|
+
|
|
30
|
+
### 3. Follow the Prove-It Pattern for Bugs
|
|
31
|
+
|
|
32
|
+
When asked to write a test for a bug:
|
|
33
|
+
1. Write a test that demonstrates the bug (must FAIL with current code)
|
|
34
|
+
2. Confirm the test fails
|
|
35
|
+
3. Report the test is ready for the fix implementation
|
|
36
|
+
|
|
37
|
+
### 4. Write Descriptive Tests
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
describe('[Module/Function name]', () => {
|
|
41
|
+
it('[expected behavior in plain English]', () => {
|
|
42
|
+
// Arrange → Act → Assert
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 5. Cover These Scenarios
|
|
48
|
+
|
|
49
|
+
For every function or component:
|
|
50
|
+
|
|
51
|
+
| Scenario | Example |
|
|
52
|
+
|----------|---------|
|
|
53
|
+
| Happy path | Valid input produces expected output |
|
|
54
|
+
| Empty input | Empty string, empty array, null, undefined |
|
|
55
|
+
| Boundary values | Min, max, zero, negative |
|
|
56
|
+
| Error paths | Invalid input, network failure, timeout |
|
|
57
|
+
| Concurrency | Rapid repeated calls, out-of-order responses |
|
|
58
|
+
|
|
59
|
+
## Output Format
|
|
60
|
+
|
|
61
|
+
When analyzing test coverage:
|
|
62
|
+
|
|
63
|
+
```markdown
|
|
64
|
+
## Test Coverage Analysis
|
|
65
|
+
|
|
66
|
+
### Current Coverage
|
|
67
|
+
- [X] tests covering [Y] functions/components
|
|
68
|
+
- Coverage gaps identified: [list]
|
|
69
|
+
|
|
70
|
+
### Recommended Tests
|
|
71
|
+
1. **[Test name]** — [What it verifies, why it matters]
|
|
72
|
+
2. **[Test name]** — [What it verifies, why it matters]
|
|
73
|
+
|
|
74
|
+
### Priority
|
|
75
|
+
- Critical: [Tests that catch potential data loss or security issues]
|
|
76
|
+
- High: [Tests for core business logic]
|
|
77
|
+
- Medium: [Tests for edge cases and error handling]
|
|
78
|
+
- Low: [Tests for utility functions and formatting]
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
1. Test behavior, not implementation details
|
|
84
|
+
2. Each test should verify one concept
|
|
85
|
+
3. Tests should be independent — no shared mutable state between tests
|
|
86
|
+
4. Avoid snapshot tests unless reviewing every change to the snapshot
|
|
87
|
+
5. Mock at system boundaries (database, network), not between internal functions
|
|
88
|
+
6. Every test name should read like a specification
|
|
89
|
+
7. A test that never fails is as useless as a test that always fails
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# simplify-ignore hook
|
|
2
|
+
|
|
3
|
+
Block-level protection for `/code-simplify`. Mark code that should never be simplified — the model won't see it.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
1. Annotate blocks you want to protect:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
/* simplify-ignore-start: perf-critical */
|
|
11
|
+
// manually unrolled XOR — 3x faster than a loop
|
|
12
|
+
result[0] = buf[0] ^ key[0];
|
|
13
|
+
result[1] = buf[1] ^ key[1];
|
|
14
|
+
result[2] = buf[2] ^ key[2];
|
|
15
|
+
result[3] = buf[3] ^ key[3];
|
|
16
|
+
/* simplify-ignore-end */
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
2. Add hooks to `.claude/settings.json`:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"hooks": {
|
|
24
|
+
"PreToolUse": [
|
|
25
|
+
{
|
|
26
|
+
"matcher": "Read",
|
|
27
|
+
"hooks": [{ "type": "command", "command": "bash ${CLAUDE_PROJECT_DIR}/hooks/simplify-ignore.sh" }]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"PostToolUse": [
|
|
31
|
+
{
|
|
32
|
+
"matcher": "Edit|Write",
|
|
33
|
+
"hooks": [{ "type": "command", "command": "bash ${CLAUDE_PROJECT_DIR}/hooks/simplify-ignore.sh" }]
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"Stop": [
|
|
37
|
+
{
|
|
38
|
+
"hooks": [{ "type": "command", "command": "bash ${CLAUDE_PROJECT_DIR}/hooks/simplify-ignore.sh" }]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
3. Run `/code-simplify` — protected blocks become `/* BLOCK_de115a1d: perf-critical */` placeholders. The model reasons about surrounding code without seeing the protected implementation.
|
|
46
|
+
|
|
47
|
+
> **Note:** The hook stores temporary backups in `.claude/.simplify-ignore-cache/`. Make sure this path is in your `.gitignore`.
|
|
48
|
+
|
|
49
|
+
## How it works
|
|
50
|
+
|
|
51
|
+
One script, three hook events:
|
|
52
|
+
|
|
53
|
+
| Event | Action |
|
|
54
|
+
|---|---|
|
|
55
|
+
| `PreToolUse Read` | Backs up file, replaces blocks with `BLOCK_<hash>` placeholders in-place |
|
|
56
|
+
| `PostToolUse Edit\|Write` | Expands placeholders back to real code, saves model's changes, re-filters |
|
|
57
|
+
| `Stop` | Restores all files from backup when session ends |
|
|
58
|
+
|
|
59
|
+
Each block is content-hashed (8 hex chars via `shasum`/`sha1sum`) so the round-trip is unambiguous even if the model duplicates or reorders placeholders. Cache is project-scoped to prevent cross-session interference.
|
|
60
|
+
|
|
61
|
+
## Annotation syntax
|
|
62
|
+
|
|
63
|
+
```js
|
|
64
|
+
/* simplify-ignore-start */ // basic — hides the block
|
|
65
|
+
/* simplify-ignore-start: reason */ // with reason — appears in placeholder
|
|
66
|
+
/* simplify-ignore-end */
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Any comment style works (`//`, `/*`, `#`, `<!--`). Multiple blocks per file and single-line blocks supported. Placeholders preserve the original comment syntax (e.g. `# BLOCK_xxx` for Python, `<!-- BLOCK_xxx -->` for HTML).
|
|
70
|
+
|
|
71
|
+
## Crash recovery
|
|
72
|
+
|
|
73
|
+
If Claude Code crashes without triggering the Stop hook, files on disk may still have `BLOCK_<hash>` placeholders. To restore manually:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
echo '{}' | bash hooks/simplify-ignore.sh
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Backups are stored in `.claude/.simplify-ignore-cache/` within your project directory.
|
|
80
|
+
|
|
81
|
+
## Known limitations
|
|
82
|
+
|
|
83
|
+
- **Single-line blocks hide the entire line.** If `simplify-ignore-start` and `simplify-ignore-end` appear on the same line as other code, the whole line is hidden from the model, not just the annotated portion. Use dedicated lines for annotations.
|
|
84
|
+
- **Comment suffix detection covers `*/` and `-->` only.** Template engines with non-standard comment closers (ERB `%>`, Blade `--}}`) may produce unbalanced placeholders. Use `#` or `//` style comments instead.
|
|
85
|
+
- **Fallback expansion is progressive, not exact.** If the model alters a placeholder's formatting (e.g. changes the reason text), the hook tries progressively simpler matches: full placeholder → prefix+hash+suffix → hash-only. The hash-only fallback may leave cosmetic debris (e.g. stray `:` or reason text). A warning is printed to stderr when this happens.
|
|
86
|
+
- **File renaming leaves placeholders.** If the model renames or moves a file via a shell command, the new file will retain `BLOCK_<hash>` placeholders. The original code is saved as `<old-filename>.recovered` when the session stops. You must manually restore the recovered code into the new file.
|
|
87
|
+
|
|
88
|
+
## Requirements
|
|
89
|
+
|
|
90
|
+
- `jq`, `shasum` or `sha1sum` (auto-detected), Bash 3.2+
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# agent-skills session start hook (Claude Code).
|
|
3
|
+
#
|
|
4
|
+
# Two responsibilities:
|
|
5
|
+
# 1. Inject the using-agent-skills meta-skill into the session context so
|
|
6
|
+
# Claude can route tasks to the right skill.
|
|
7
|
+
# 2. Surface a one-line "update available" banner when the installed
|
|
8
|
+
# package is behind the published version on npm.
|
|
9
|
+
#
|
|
10
|
+
# Both are best-effort. Network errors, missing files, and missing tools
|
|
11
|
+
# never block session start — the hook always exits 0 and prints a valid
|
|
12
|
+
# JSON object on stdout.
|
|
13
|
+
|
|
14
|
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
|
15
|
+
PACKAGE_ROOT="$(dirname "$SCRIPT_DIR")"
|
|
16
|
+
SKILLS_DIR="$PACKAGE_ROOT/skills"
|
|
17
|
+
META_SKILL="$SKILLS_DIR/using-agent-skills/SKILL.md"
|
|
18
|
+
CHECK_SCRIPT="$PACKAGE_ROOT/bin/cli.js"
|
|
19
|
+
|
|
20
|
+
# ── 1. Meta-skill content ────────────────────────────────────────────────
|
|
21
|
+
if [ -f "$META_SKILL" ]; then
|
|
22
|
+
META_CONTENT=$(cat "$META_SKILL")
|
|
23
|
+
PRIORITY="IMPORTANT"
|
|
24
|
+
BASE_MESSAGE="agent-skills loaded. Use the skill discovery flowchart to find the right skill for your task."
|
|
25
|
+
else
|
|
26
|
+
META_CONTENT=""
|
|
27
|
+
PRIORITY="INFO"
|
|
28
|
+
BASE_MESSAGE="agent-skills: using-agent-skills meta-skill not found. Skills may still be available individually."
|
|
29
|
+
fi
|
|
30
|
+
|
|
31
|
+
# ── 2. Update banner (silent on any error) ───────────────────────────────
|
|
32
|
+
UPDATE_BANNER=""
|
|
33
|
+
if [ "$AGENT_SKILLS_NO_UPDATE_CHECK" != "1" ] \
|
|
34
|
+
&& [ "$NO_UPDATE_NOTIFIER" != "1" ] \
|
|
35
|
+
&& [ "$CI" != "true" ] \
|
|
36
|
+
&& command -v node >/dev/null 2>&1 \
|
|
37
|
+
&& [ -f "$CHECK_SCRIPT" ]; then
|
|
38
|
+
# Run with a 3-second wall-clock cap so a hung registry never stalls the
|
|
39
|
+
# session. The check-update subcommand emits the banner on stdout when an
|
|
40
|
+
# upgrade is available, nothing otherwise. Errors go to /dev/null.
|
|
41
|
+
if command -v timeout >/dev/null 2>&1; then
|
|
42
|
+
UPDATE_BANNER=$(timeout 3 node "$CHECK_SCRIPT" check-update 2>/dev/null || true)
|
|
43
|
+
else
|
|
44
|
+
UPDATE_BANNER=$(node "$CHECK_SCRIPT" check-update 2>/dev/null || true)
|
|
45
|
+
fi
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
# ── Compose the message ──────────────────────────────────────────────────
|
|
49
|
+
FULL_MESSAGE="$BASE_MESSAGE"
|
|
50
|
+
if [ -n "$UPDATE_BANNER" ]; then
|
|
51
|
+
FULL_MESSAGE=$(printf '%s\n\n%s' "$FULL_MESSAGE" "$UPDATE_BANNER")
|
|
52
|
+
fi
|
|
53
|
+
if [ -n "$META_CONTENT" ]; then
|
|
54
|
+
FULL_MESSAGE=$(printf '%s\n\n%s' "$FULL_MESSAGE" "$META_CONTENT")
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
# ── Emit JSON (node handles escaping correctly) ──────────────────────────
|
|
58
|
+
if command -v node >/dev/null 2>&1; then
|
|
59
|
+
printf '%s' "$FULL_MESSAGE" | node -e '
|
|
60
|
+
let msg = "";
|
|
61
|
+
process.stdin.setEncoding("utf8");
|
|
62
|
+
process.stdin.on("data", c => { msg += c; });
|
|
63
|
+
process.stdin.on("end", () => {
|
|
64
|
+
process.stdout.write(JSON.stringify({
|
|
65
|
+
priority: process.env.PRIORITY || "INFO",
|
|
66
|
+
message: msg,
|
|
67
|
+
}) + "\n");
|
|
68
|
+
});
|
|
69
|
+
'
|
|
70
|
+
else
|
|
71
|
+
# Fallback: ship just the base message with minimal escaping.
|
|
72
|
+
SAFE_MSG=$(printf '%s' "$BASE_MESSAGE" | sed 's/\\/\\\\/g; s/"/\\"/g')
|
|
73
|
+
printf '{"priority": "%s", "message": "%s"}\n' "$PRIORITY" "$SAFE_MSG"
|
|
74
|
+
fi
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# simplify-ignore-test.sh — Tests for the simplify-ignore hook
|
|
3
|
+
#
|
|
4
|
+
# Exercises filter_file by extracting function definitions from the hook.
|
|
5
|
+
# Run: bash hooks/simplify-ignore-test.sh
|
|
6
|
+
|
|
7
|
+
set -euo pipefail
|
|
8
|
+
|
|
9
|
+
PASS=0 FAIL=0
|
|
10
|
+
TMPDIR=$(mktemp -d)
|
|
11
|
+
trap 'rm -rf "$TMPDIR"' EXIT
|
|
12
|
+
|
|
13
|
+
export CACHE="$TMPDIR/cache"
|
|
14
|
+
mkdir -p "$CACHE"
|
|
15
|
+
|
|
16
|
+
# Extract function definitions we need
|
|
17
|
+
hash_cmd() {
|
|
18
|
+
if command -v shasum >/dev/null 2>&1; then shasum
|
|
19
|
+
elif command -v sha1sum >/dev/null 2>&1; then sha1sum
|
|
20
|
+
else printf '%s\n' "error: missing shasum or sha1sum" >&2; exit 1; fi
|
|
21
|
+
}
|
|
22
|
+
file_id() { printf '%s' "$1" | hash_cmd | cut -c1-16; }
|
|
23
|
+
block_hash() { printf '%s' "$1" | hash_cmd | cut -c1-8; }
|
|
24
|
+
escape_glob() {
|
|
25
|
+
local s="$1"
|
|
26
|
+
s="${s//\\/\\\\}"
|
|
27
|
+
s="${s//\*/\\*}"
|
|
28
|
+
s="${s//\?/\\?}"
|
|
29
|
+
s="${s//\[/\\[}"
|
|
30
|
+
printf '%s' "$s"
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# Extract filter_file from the hook script (line 59 "filter_file()" to line 142 closing brace)
|
|
34
|
+
eval "$(sed -n '/^filter_file()/,/^}/p' hooks/simplify-ignore.sh)"
|
|
35
|
+
|
|
36
|
+
assert_eq() {
|
|
37
|
+
local label="$1" expected="$2" actual="$3"
|
|
38
|
+
if [ "$expected" = "$actual" ]; then
|
|
39
|
+
PASS=$((PASS + 1))
|
|
40
|
+
printf ' PASS: %s\n' "$label"
|
|
41
|
+
else
|
|
42
|
+
FAIL=$((FAIL + 1))
|
|
43
|
+
printf ' FAIL: %s\n' "$label" >&2
|
|
44
|
+
printf ' expected: %s\n' "$(printf '%s' "$expected" | cat -v)" >&2
|
|
45
|
+
printf ' actual: %s\n' "$(printf '%s' "$actual" | cat -v)" >&2
|
|
46
|
+
fi
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
# ── Test 1: Single-line block produces exactly one placeholder ────────────
|
|
50
|
+
printf 'Test 1: Single-line block (start+end on same line)\n'
|
|
51
|
+
rm -f "$CACHE"/*
|
|
52
|
+
|
|
53
|
+
SRC="$TMPDIR/single-line.js"
|
|
54
|
+
DEST="$TMPDIR/single-line-filtered.js"
|
|
55
|
+
cat > "$SRC" <<'EOF'
|
|
56
|
+
const a = 1;
|
|
57
|
+
/* simplify-ignore-start */ const secret = 42; /* simplify-ignore-end */
|
|
58
|
+
const b = 2;
|
|
59
|
+
EOF
|
|
60
|
+
|
|
61
|
+
FID="test_single"
|
|
62
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
63
|
+
|
|
64
|
+
placeholder_count=$(grep -c 'BLOCK_' "$DEST")
|
|
65
|
+
assert_eq "exactly one placeholder line" "1" "$placeholder_count"
|
|
66
|
+
assert_eq "line before block preserved" "1" "$(grep -c 'const a = 1' "$DEST")"
|
|
67
|
+
assert_eq "line after block preserved" "1" "$(grep -c 'const b = 2' "$DEST")"
|
|
68
|
+
|
|
69
|
+
block_files=$(ls "$CACHE/${FID}".block.* 2>/dev/null | wc -l | tr -d ' ')
|
|
70
|
+
assert_eq "one block file in cache" "1" "$block_files"
|
|
71
|
+
|
|
72
|
+
block_content=$(cat "$CACHE/${FID}".block.*)
|
|
73
|
+
assert_eq "block content matches" \
|
|
74
|
+
"/* simplify-ignore-start */ const secret = 42; /* simplify-ignore-end */" \
|
|
75
|
+
"$block_content"
|
|
76
|
+
|
|
77
|
+
# ── Test 2: Multi-line block ─────────────────────────────────────────────
|
|
78
|
+
printf '\nTest 2: Multi-line block\n'
|
|
79
|
+
rm -f "$CACHE"/*
|
|
80
|
+
|
|
81
|
+
SRC="$TMPDIR/multi-line.js"
|
|
82
|
+
DEST="$TMPDIR/multi-line-filtered.js"
|
|
83
|
+
cat > "$SRC" <<'EOF'
|
|
84
|
+
const a = 1;
|
|
85
|
+
// simplify-ignore-start
|
|
86
|
+
const secret1 = 42;
|
|
87
|
+
const secret2 = 99;
|
|
88
|
+
// simplify-ignore-end
|
|
89
|
+
const b = 2;
|
|
90
|
+
EOF
|
|
91
|
+
|
|
92
|
+
FID="test_multi"
|
|
93
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
94
|
+
|
|
95
|
+
placeholder_count=$(grep -c 'BLOCK_' "$DEST")
|
|
96
|
+
assert_eq "exactly one placeholder for multi-line block" "1" "$placeholder_count"
|
|
97
|
+
|
|
98
|
+
output_lines=$(wc -l < "$DEST" | tr -d ' ')
|
|
99
|
+
assert_eq "output has 3 lines (before + placeholder + after)" "3" "$output_lines"
|
|
100
|
+
|
|
101
|
+
# ── Test 3: Multiple blocks in one file ──────────────────────────────────
|
|
102
|
+
printf '\nTest 3: Multiple blocks in one file\n'
|
|
103
|
+
rm -f "$CACHE"/*
|
|
104
|
+
|
|
105
|
+
SRC="$TMPDIR/multi-block.js"
|
|
106
|
+
DEST="$TMPDIR/multi-block-filtered.js"
|
|
107
|
+
cat > "$SRC" <<'EOF'
|
|
108
|
+
line1
|
|
109
|
+
// simplify-ignore-start
|
|
110
|
+
blockA
|
|
111
|
+
// simplify-ignore-end
|
|
112
|
+
line2
|
|
113
|
+
// simplify-ignore-start
|
|
114
|
+
blockB
|
|
115
|
+
// simplify-ignore-end
|
|
116
|
+
line3
|
|
117
|
+
EOF
|
|
118
|
+
|
|
119
|
+
FID="test_multiblock"
|
|
120
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
121
|
+
|
|
122
|
+
placeholder_count=$(grep -c 'BLOCK_' "$DEST")
|
|
123
|
+
assert_eq "two placeholders for two blocks" "2" "$placeholder_count"
|
|
124
|
+
|
|
125
|
+
block_files=$(ls "$CACHE/${FID}".block.* 2>/dev/null | wc -l | tr -d ' ')
|
|
126
|
+
assert_eq "two block files in cache" "2" "$block_files"
|
|
127
|
+
|
|
128
|
+
# ── Test 4: Reason string preserved ──────────────────────────────────────
|
|
129
|
+
printf '\nTest 4: Reason string in placeholder\n'
|
|
130
|
+
rm -f "$CACHE"/*
|
|
131
|
+
|
|
132
|
+
SRC="$TMPDIR/reason.js"
|
|
133
|
+
DEST="$TMPDIR/reason-filtered.js"
|
|
134
|
+
cat > "$SRC" <<'EOF'
|
|
135
|
+
// simplify-ignore-start: perf-critical
|
|
136
|
+
hot_loop();
|
|
137
|
+
// simplify-ignore-end
|
|
138
|
+
EOF
|
|
139
|
+
|
|
140
|
+
FID="test_reason"
|
|
141
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
142
|
+
|
|
143
|
+
assert_eq "placeholder includes reason" "1" "$(grep -c 'perf-critical' "$DEST")"
|
|
144
|
+
|
|
145
|
+
reason_files=$(ls "$CACHE/${FID}".reason.* 2>/dev/null | wc -l | tr -d ' ')
|
|
146
|
+
assert_eq "reason file saved" "1" "$reason_files"
|
|
147
|
+
assert_eq "reason content" "perf-critical" "$(cat "$CACHE/${FID}".reason.*)"
|
|
148
|
+
|
|
149
|
+
# ── Test 5: Trailing newline preservation ────────────────────────────────
|
|
150
|
+
printf '\nTest 5: Trailing newline preservation\n'
|
|
151
|
+
rm -f "$CACHE"/*
|
|
152
|
+
|
|
153
|
+
SRC="$TMPDIR/no-trailing-nl.js"
|
|
154
|
+
DEST="$TMPDIR/no-trailing-nl-filtered.js"
|
|
155
|
+
printf 'line1\n// simplify-ignore-start\nsecret\n// simplify-ignore-end' > "$SRC"
|
|
156
|
+
|
|
157
|
+
FID="test_trail"
|
|
158
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
159
|
+
|
|
160
|
+
# Source has no trailing newline; dest should also have no trailing newline
|
|
161
|
+
src_has_nl=$(tail -c 1 "$SRC" | wc -l | tr -d ' ')
|
|
162
|
+
dest_has_nl=$(tail -c 1 "$DEST" | wc -l | tr -d ' ')
|
|
163
|
+
assert_eq "dest preserves no-trailing-newline from source" "$src_has_nl" "$dest_has_nl"
|
|
164
|
+
|
|
165
|
+
# ── Test 6: No blocks → return 1 ────────────────────────────────────────
|
|
166
|
+
printf '\nTest 6: No blocks returns 1\n'
|
|
167
|
+
rm -f "$CACHE"/*
|
|
168
|
+
|
|
169
|
+
SRC="$TMPDIR/no-blocks.js"
|
|
170
|
+
DEST="$TMPDIR/no-blocks-filtered.js"
|
|
171
|
+
cat > "$SRC" <<'EOF'
|
|
172
|
+
const a = 1;
|
|
173
|
+
const b = 2;
|
|
174
|
+
EOF
|
|
175
|
+
|
|
176
|
+
FID="test_noblocks"
|
|
177
|
+
rc=0
|
|
178
|
+
filter_file "$SRC" "$DEST" "$FID" || rc=$?
|
|
179
|
+
assert_eq "returns 1 when no blocks found" "1" "$rc"
|
|
180
|
+
|
|
181
|
+
# ── Test 7: Unclosed block emits warning and flushes ─────────────────────
|
|
182
|
+
printf '\nTest 7: Unclosed block\n'
|
|
183
|
+
rm -f "$CACHE"/*
|
|
184
|
+
|
|
185
|
+
SRC="$TMPDIR/unclosed.js"
|
|
186
|
+
DEST="$TMPDIR/unclosed-filtered.js"
|
|
187
|
+
cat > "$SRC" <<'EOF'
|
|
188
|
+
line1
|
|
189
|
+
// simplify-ignore-start
|
|
190
|
+
orphan code
|
|
191
|
+
EOF
|
|
192
|
+
|
|
193
|
+
FID="test_unclosed"
|
|
194
|
+
stderr_out=$(filter_file "$SRC" "$DEST" "$FID" 2>&1) || true
|
|
195
|
+
assert_eq "warning emitted for unclosed block" "1" "$(printf '%s' "$stderr_out" | grep -c 'unclosed')"
|
|
196
|
+
assert_eq "orphan code flushed to output" "1" "$(grep -c 'orphan code' "$DEST")"
|
|
197
|
+
|
|
198
|
+
# ── Test 8: Single-line block with reason ────────────────────────────────
|
|
199
|
+
printf '\nTest 8: Single-line block with reason\n'
|
|
200
|
+
rm -f "$CACHE"/*
|
|
201
|
+
|
|
202
|
+
SRC="$TMPDIR/single-reason.js"
|
|
203
|
+
DEST="$TMPDIR/single-reason-filtered.js"
|
|
204
|
+
cat > "$SRC" <<'EOF'
|
|
205
|
+
before
|
|
206
|
+
/* simplify-ignore-start: hot-path */ x = compute(); /* simplify-ignore-end */
|
|
207
|
+
after
|
|
208
|
+
EOF
|
|
209
|
+
|
|
210
|
+
FID="test_single_reason"
|
|
211
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
212
|
+
|
|
213
|
+
placeholder_count=$(grep -c 'BLOCK_' "$DEST")
|
|
214
|
+
assert_eq "exactly one placeholder for single-line+reason" "1" "$placeholder_count"
|
|
215
|
+
assert_eq "reason in placeholder" "1" "$(grep -c 'hot-path' "$DEST")"
|
|
216
|
+
|
|
217
|
+
# ── Test 9: HTML comment syntax ──────────────────────────────────────────
|
|
218
|
+
printf '\nTest 9: HTML comment syntax\n'
|
|
219
|
+
rm -f "$CACHE"/*
|
|
220
|
+
|
|
221
|
+
SRC="$TMPDIR/html.html"
|
|
222
|
+
DEST="$TMPDIR/html-filtered.html"
|
|
223
|
+
cat > "$SRC" <<'EOF'
|
|
224
|
+
<div>
|
|
225
|
+
<!-- simplify-ignore-start -->
|
|
226
|
+
<secret-component />
|
|
227
|
+
<!-- simplify-ignore-end -->
|
|
228
|
+
</div>
|
|
229
|
+
EOF
|
|
230
|
+
|
|
231
|
+
FID="test_html"
|
|
232
|
+
filter_file "$SRC" "$DEST" "$FID"
|
|
233
|
+
|
|
234
|
+
placeholder_count=$(grep -c 'BLOCK_' "$DEST")
|
|
235
|
+
assert_eq "HTML block replaced" "1" "$placeholder_count"
|
|
236
|
+
assert_eq "HTML suffix preserved" "1" "$(grep -c '\-\->' "$DEST")"
|
|
237
|
+
|
|
238
|
+
# ── Test 10: JSON parsing error warning ──────────────────────────────────
|
|
239
|
+
printf '\nTest 10: Malformed JSON input produces warning\n'
|
|
240
|
+
|
|
241
|
+
warning_out=$(echo 'NOT_JSON{{{' | bash hooks/simplify-ignore.sh 2>&1) || true
|
|
242
|
+
assert_eq "warning on bad JSON" "1" "$(printf '%s' "$warning_out" | grep -c 'Warning.*failed to parse')"
|
|
243
|
+
|
|
244
|
+
# ── Summary ──────────────────────────────────────────────────────────────
|
|
245
|
+
printf '\n══════════════════════════════════════════\n'
|
|
246
|
+
printf 'Results: %d passed, %d failed\n' "$PASS" "$FAIL"
|
|
247
|
+
[ "$FAIL" -eq 0 ] && exit 0 || exit 1
|