@baselane/packs 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/LICENSE +191 -0
- package/NOTICE +6 -0
- package/README.md +15 -0
- package/dist/ai-merge.d.ts +26 -0
- package/dist/ai-merge.js +165 -0
- package/dist/aliases.d.ts +7 -0
- package/dist/aliases.js +9 -0
- package/dist/compose-draft.d.ts +19 -0
- package/dist/compose-draft.js +170 -0
- package/dist/drift-detect.d.ts +8 -0
- package/dist/drift-detect.js +21 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.js +21 -0
- package/dist/ingest.d.ts +25 -0
- package/dist/ingest.js +262 -0
- package/dist/load.d.ts +7 -0
- package/dist/load.js +29 -0
- package/dist/manifest.d.ts +71 -0
- package/dist/manifest.js +208 -0
- package/dist/materialize-harness.d.ts +15 -0
- package/dist/materialize-harness.js +48 -0
- package/dist/merge-region.d.ts +60 -0
- package/dist/merge-region.js +166 -0
- package/dist/overlap.d.ts +32 -0
- package/dist/overlap.js +49 -0
- package/dist/pack-from-fileset.d.ts +13 -0
- package/dist/pack-from-fileset.js +133 -0
- package/dist/render/adapters.d.ts +6 -0
- package/dist/render/adapters.js +43 -0
- package/dist/render/agents-md.d.ts +3 -0
- package/dist/render/agents-md.js +49 -0
- package/dist/render/bundle-union.d.ts +10 -0
- package/dist/render/bundle-union.js +87 -0
- package/dist/render/bundle.d.ts +3 -0
- package/dist/render/bundle.js +51 -0
- package/dist/render/capabilities.d.ts +19 -0
- package/dist/render/capabilities.js +86 -0
- package/dist/render/claude.d.ts +3 -0
- package/dist/render/claude.js +92 -0
- package/dist/render/design.d.ts +27 -0
- package/dist/render/design.js +443 -0
- package/dist/render/graph.d.ts +11 -0
- package/dist/render/graph.js +245 -0
- package/dist/render/memory.d.ts +35 -0
- package/dist/render/memory.js +353 -0
- package/dist/render/render-pack.d.ts +3 -0
- package/dist/render/render-pack.js +43 -0
- package/dist/render/repo-union.d.ts +14 -0
- package/dist/render/repo-union.js +94 -0
- package/dist/render/rollout-files.d.ts +18 -0
- package/dist/render/rollout-files.js +39 -0
- package/dist/render/system-map.d.ts +8 -0
- package/dist/render/system-map.js +73 -0
- package/dist/render/tasks.d.ts +32 -0
- package/dist/render/tasks.js +327 -0
- package/dist/render/wiki.d.ts +30 -0
- package/dist/render/wiki.js +288 -0
- package/dist/seed/graph-seed.d.ts +17 -0
- package/dist/seed/graph-seed.js +18 -0
- package/dist/seed/wiki-seed.d.ts +23 -0
- package/dist/seed/wiki-seed.js +133 -0
- package/dist/seed-skills.d.ts +18 -0
- package/dist/seed-skills.js +134 -0
- package/dist/types.d.ts +122 -0
- package/dist/types.js +1 -0
- package/dist/validate.d.ts +30 -0
- package/dist/validate.js +397 -0
- package/package.json +38 -0
- package/packs/database-review/pack.json +44 -0
- package/packs/database-review/rendered/.baselane/capabilities.json +10 -0
- package/packs/database-review/rendered/.baselane/system-map/README.md +18 -0
- package/packs/database-review/rendered/.claude/agents/database-reviewer.md +8 -0
- package/packs/database-review/rendered/.claude/commands/db-review.md +6 -0
- package/packs/database-review/rendered/.claude/commands/map.md +6 -0
- package/packs/database-review/rendered/.claude/settings.json +26 -0
- package/packs/database-review/rendered/.github/copilot-instructions.md +48 -0
- package/packs/database-review/rendered/AGENTS.md +66 -0
- package/packs/database-review/rendered/CLAUDE.md +9 -0
- package/packs/database-review/rendered/GEMINI.md +3 -0
- package/packs/disciplined-workflow/pack.json +63 -0
- package/packs/disciplined-workflow/rendered/.baselane/capabilities.json +10 -0
- package/packs/disciplined-workflow/rendered/.baselane/tasks/README.md +36 -0
- package/packs/disciplined-workflow/rendered/.claude/agents/plan-reviewer.md +8 -0
- package/packs/disciplined-workflow/rendered/.claude/agents/task-reviewer.md +8 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/brainstorm.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/execute-plan.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/plan-work.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/commands/write-plan.md +6 -0
- package/packs/disciplined-workflow/rendered/.claude/settings.json +24 -0
- package/packs/disciplined-workflow/rendered/.github/copilot-instructions.md +24 -0
- package/packs/disciplined-workflow/rendered/AGENTS.md +43 -0
- package/packs/disciplined-workflow/rendered/CLAUDE.md +12 -0
- package/packs/disciplined-workflow/rendered/GEMINI.md +3 -0
- package/packs/frontend-design/pack.json +129 -0
- package/packs/frontend-design/rendered/.claude/skills/clone/SKILL.md +39 -0
- package/packs/frontend-design/rendered/.claude/skills/functional-ui/SKILL.md +78 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/SKILL.md +36 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-core.md +254 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-frameworks.md +266 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-performance.md +79 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-plugins.md +433 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-react.md +136 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-scrolltrigger.md +296 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-timeline.md +107 -0
- package/packs/frontend-design/rendered/.claude/skills/gsap/gsap-utils.md +284 -0
- package/packs/frontend-design/rendered/.claude/skills/marketing-ui/SKILL.md +36 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/SKILL.md +267 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/base-vs-radix.md +306 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/cli.md +290 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/composition.md +195 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/customization.md +209 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/forms.md +192 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/icons.md +101 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/mcp.md +105 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/registry.md +277 -0
- package/packs/frontend-design/rendered/.claude/skills/shadcn/styling.md +162 -0
- package/packs/frontend-design/rendered/.github/copilot-instructions.md +474 -0
- package/packs/frontend-design/rendered/AGENTS.md +33 -0
- package/packs/frontend-design/rendered/CLAUDE.md +10 -0
- package/packs/frontend-design/rendered/GEMINI.md +456 -0
- package/packs/frontend-taste/pack.json +43 -0
- package/packs/frontend-taste/rendered/.baselane/capabilities.json +16 -0
- package/packs/frontend-taste/rendered/.claude/agents/taste-reviewer.md +8 -0
- package/packs/frontend-taste/rendered/.claude/commands/design-review.md +6 -0
- package/packs/frontend-taste/rendered/.claude/settings.json +15 -0
- package/packs/frontend-taste/rendered/.github/copilot-instructions.md +51 -0
- package/packs/frontend-taste/rendered/AGENTS.md +68 -0
- package/packs/frontend-taste/rendered/CLAUDE.md +8 -0
- package/packs/frontend-taste/rendered/DESIGN.md +72 -0
- package/packs/frontend-taste/rendered/GEMINI.md +3 -0
- package/packs/go-rules/pack.json +38 -0
- package/packs/go-rules/rendered/.claude/agents/go-reviewer.md +8 -0
- package/packs/go-rules/rendered/.claude/commands/go-review.md +6 -0
- package/packs/go-rules/rendered/.claude/settings.json +15 -0
- package/packs/go-rules/rendered/.github/copilot-instructions.md +44 -0
- package/packs/go-rules/rendered/AGENTS.md +54 -0
- package/packs/go-rules/rendered/CLAUDE.md +8 -0
- package/packs/go-rules/rendered/GEMINI.md +3 -0
- package/packs/python-rules/pack.json +38 -0
- package/packs/python-rules/rendered/.claude/agents/python-reviewer.md +8 -0
- package/packs/python-rules/rendered/.claude/commands/python-review.md +6 -0
- package/packs/python-rules/rendered/.claude/settings.json +15 -0
- package/packs/python-rules/rendered/.github/copilot-instructions.md +43 -0
- package/packs/python-rules/rendered/AGENTS.md +53 -0
- package/packs/python-rules/rendered/CLAUDE.md +8 -0
- package/packs/python-rules/rendered/GEMINI.md +3 -0
- package/packs/second-brain/pack.json +36 -0
- package/packs/second-brain/rendered/.baselane/capabilities.json +25 -0
- package/packs/second-brain/rendered/.baselane/memory/README.md +34 -0
- package/packs/second-brain/rendered/.baselane/wiki/README.md +62 -0
- package/packs/second-brain/rendered/.claude/agents/librarian.md +14 -0
- package/packs/second-brain/rendered/.claude/commands/remember.md +6 -0
- package/packs/second-brain/rendered/.claude/commands/wiki.md +6 -0
- package/packs/second-brain/rendered/.claude/settings.json +35 -0
- package/packs/second-brain/rendered/.github/copilot-instructions.md +24 -0
- package/packs/second-brain/rendered/AGENTS.md +41 -0
- package/packs/second-brain/rendered/CLAUDE.md +9 -0
- package/packs/second-brain/rendered/GEMINI.md +3 -0
- package/packs/security-review/pack.json +72 -0
- package/packs/security-review/rendered/.claude/agents/security-reviewer.md +8 -0
- package/packs/security-review/rendered/.claude/commands/security-audit.md +6 -0
- package/packs/security-review/rendered/.claude/commands/security-scan.md +6 -0
- package/packs/security-review/rendered/.claude/settings.json +35 -0
- package/packs/security-review/rendered/.claude/skills/security-audit/SKILL.md +44 -0
- package/packs/security-review/rendered/.claude/skills/validate-at-boundaries/SKILL.md +41 -0
- package/packs/security-review/rendered/.github/copilot-instructions.md +137 -0
- package/packs/security-review/rendered/AGENTS.md +66 -0
- package/packs/security-review/rendered/CLAUDE.md +11 -0
- package/packs/security-review/rendered/GEMINI.md +90 -0
- package/packs/software-engineer-harness/pack.json +98 -0
- package/packs/software-engineer-harness/rendered/.baselane/capabilities.json +15 -0
- package/packs/software-engineer-harness/rendered/.baselane/system-map/README.md +18 -0
- package/packs/software-engineer-harness/rendered/.baselane/tasks/README.md +36 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/architect.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/checker.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/code-reviewer.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/code-simplifier.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/planner.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/agents/reviewer.md +8 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/build-and-check.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/map.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/plan-change.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/plan-work.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/review-change.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/commands/tdd-task.md +6 -0
- package/packs/software-engineer-harness/rendered/.claude/settings.json +35 -0
- package/packs/software-engineer-harness/rendered/.github/copilot-instructions.md +37 -0
- package/packs/software-engineer-harness/rendered/AGENTS.md +58 -0
- package/packs/software-engineer-harness/rendered/CLAUDE.md +18 -0
- package/packs/software-engineer-harness/rendered/GEMINI.md +3 -0
- package/packs/systematic-debugging/pack.json +44 -0
- package/packs/systematic-debugging/rendered/.claude/agents/debugger.md +8 -0
- package/packs/systematic-debugging/rendered/.claude/commands/debug.md +6 -0
- package/packs/systematic-debugging/rendered/.claude/commands/root-cause.md +6 -0
- package/packs/systematic-debugging/rendered/.claude/settings.json +15 -0
- package/packs/systematic-debugging/rendered/.github/copilot-instructions.md +20 -0
- package/packs/systematic-debugging/rendered/AGENTS.md +31 -0
- package/packs/systematic-debugging/rendered/CLAUDE.md +9 -0
- package/packs/systematic-debugging/rendered/GEMINI.md +3 -0
- package/packs/token-efficiency-harness/pack.json +49 -0
- package/packs/token-efficiency-harness/rendered/.baselane/capabilities.json +10 -0
- package/packs/token-efficiency-harness/rendered/.baselane/memory/README.md +34 -0
- package/packs/token-efficiency-harness/rendered/.claude/agents/scout.md +8 -0
- package/packs/token-efficiency-harness/rendered/.claude/commands/handoff.md +6 -0
- package/packs/token-efficiency-harness/rendered/.claude/commands/remember.md +6 -0
- package/packs/token-efficiency-harness/rendered/.claude/commands/usage-audit.md +6 -0
- package/packs/token-efficiency-harness/rendered/.claude/settings.json +26 -0
- package/packs/token-efficiency-harness/rendered/.github/copilot-instructions.md +26 -0
- package/packs/token-efficiency-harness/rendered/AGENTS.md +44 -0
- package/packs/token-efficiency-harness/rendered/CLAUDE.md +10 -0
- package/packs/token-efficiency-harness/rendered/GEMINI.md +3 -0
- package/packs/typescript-rules/pack.json +46 -0
- package/packs/typescript-rules/rendered/.claude/agents/typescript-reviewer.md +8 -0
- package/packs/typescript-rules/rendered/.claude/commands/typescript-review.md +6 -0
- package/packs/typescript-rules/rendered/.claude/settings.json +15 -0
- package/packs/typescript-rules/rendered/.claude/skills/immutable-updates/SKILL.md +46 -0
- package/packs/typescript-rules/rendered/.github/copilot-instructions.md +89 -0
- package/packs/typescript-rules/rendered/AGENTS.md +55 -0
- package/packs/typescript-rules/rendered/CLAUDE.md +9 -0
- package/packs/typescript-rules/rendered/GEMINI.md +51 -0
- package/skills/algorithmic-art/LICENSE +202 -0
- package/skills/algorithmic-art/LICENSE.txt +202 -0
- package/skills/algorithmic-art/SKILL.md +405 -0
- package/skills/algorithmic-art/templates/generator_template.js +223 -0
- package/skills/algorithmic-art/templates/viewer.html +599 -0
- package/skills/brainstorming/LICENSE +21 -0
- package/skills/brainstorming/SKILL.md +159 -0
- package/skills/brainstorming/scripts/frame-template.html +213 -0
- package/skills/brainstorming/scripts/helper.js +167 -0
- package/skills/brainstorming/scripts/server.cjs +723 -0
- package/skills/brainstorming/scripts/start-server.sh +209 -0
- package/skills/brainstorming/scripts/stop-server.sh +120 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +291 -0
- package/skills/brand-guidelines/LICENSE +202 -0
- package/skills/brand-guidelines/LICENSE.txt +202 -0
- package/skills/brand-guidelines/SKILL.md +73 -0
- package/skills/canvas-design/LICENSE +202 -0
- package/skills/canvas-design/LICENSE.txt +202 -0
- package/skills/canvas-design/SKILL.md +130 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/skills/dispatching-parallel-agents/LICENSE +21 -0
- package/skills/dispatching-parallel-agents/SKILL.md +185 -0
- package/skills/executing-plans/LICENSE +21 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/finishing-a-development-branch/LICENSE +21 -0
- package/skills/finishing-a-development-branch/SKILL.md +241 -0
- package/skills/first-party/README.md +32 -0
- package/skills/first-party/append-only-jsonl-stores/SKILL.md +50 -0
- package/skills/first-party/golden-snapshot-discipline/SKILL.md +45 -0
- package/skills/first-party/immutable-updates/SKILL.md +46 -0
- package/skills/first-party/manifest.json +10 -0
- package/skills/first-party/ts-extension-imports/SKILL.md +49 -0
- package/skills/first-party/validate-at-boundaries/SKILL.md +41 -0
- package/skills/first-party/zero-dependency-discipline/SKILL.md +41 -0
- package/skills/frontend-design/LICENSE +177 -0
- package/skills/frontend-design/LICENSE.txt +177 -0
- package/skills/frontend-design/SKILL.md +55 -0
- package/skills/internal-comms/LICENSE +202 -0
- package/skills/internal-comms/LICENSE.txt +202 -0
- package/skills/internal-comms/SKILL.md +32 -0
- package/skills/internal-comms/examples/3p-updates.md +47 -0
- package/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/skills/internal-comms/examples/faq-answers.md +30 -0
- package/skills/internal-comms/examples/general-comms.md +16 -0
- package/skills/mcp-builder/LICENSE +202 -0
- package/skills/mcp-builder/LICENSE.txt +202 -0
- package/skills/mcp-builder/SKILL.md +236 -0
- package/skills/mcp-builder/reference/evaluation.md +602 -0
- package/skills/mcp-builder/reference/mcp_best_practices.md +249 -0
- package/skills/mcp-builder/reference/node_mcp_server.md +970 -0
- package/skills/mcp-builder/reference/python_mcp_server.md +719 -0
- package/skills/mcp-builder/scripts/connections.py +151 -0
- package/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/skills/receiving-code-review/LICENSE +21 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/LICENSE +21 -0
- package/skills/requesting-code-review/SKILL.md +103 -0
- package/skills/requesting-code-review/code-reviewer.md +172 -0
- package/skills/seed-manifest.json +185 -0
- package/skills/skill-creator/LICENSE +202 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +247 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +328 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/slack-gif-creator/LICENSE +202 -0
- package/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/skills/slack-gif-creator/SKILL.md +254 -0
- package/skills/slack-gif-creator/core/easing.py +234 -0
- package/skills/slack-gif-creator/core/frame_composer.py +176 -0
- package/skills/slack-gif-creator/core/gif_builder.py +269 -0
- package/skills/slack-gif-creator/core/validators.py +136 -0
- package/skills/slack-gif-creator/requirements.txt +4 -0
- package/skills/subagent-driven-development/LICENSE +21 -0
- package/skills/subagent-driven-development/SKILL.md +418 -0
- package/skills/subagent-driven-development/implementer-prompt.md +139 -0
- package/skills/subagent-driven-development/scripts/review-package +44 -0
- package/skills/subagent-driven-development/scripts/sdd-workspace +22 -0
- package/skills/subagent-driven-development/scripts/task-brief +40 -0
- package/skills/subagent-driven-development/task-reviewer-prompt.md +188 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/LICENSE +21 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/LICENSE +21 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/theme-factory/LICENSE +202 -0
- package/skills/theme-factory/LICENSE.txt +202 -0
- package/skills/theme-factory/SKILL.md +59 -0
- package/skills/theme-factory/theme-showcase.pdf +0 -0
- package/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/skills/theme-factory/themes/desert-rose.md +19 -0
- package/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/skills/theme-factory/themes/golden-hour.md +19 -0
- package/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/skills/using-git-worktrees/LICENSE +21 -0
- package/skills/using-git-worktrees/SKILL.md +202 -0
- package/skills/using-superpowers/LICENSE +21 -0
- package/skills/using-superpowers/SKILL.md +62 -0
- package/skills/using-superpowers/references/antigravity-tools.md +23 -0
- package/skills/using-superpowers/references/codex-tools.md +39 -0
- package/skills/using-superpowers/references/pi-tools.md +16 -0
- package/skills/verification-before-completion/LICENSE +21 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/web-artifacts-builder/LICENSE +202 -0
- package/skills/web-artifacts-builder/LICENSE.txt +202 -0
- package/skills/web-artifacts-builder/SKILL.md +74 -0
- package/skills/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/skills/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/skills/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/skills/webapp-testing/LICENSE +202 -0
- package/skills/webapp-testing/LICENSE.txt +202 -0
- package/skills/webapp-testing/SKILL.md +96 -0
- package/skills/webapp-testing/examples/console_logging.py +35 -0
- package/skills/webapp-testing/examples/element_discovery.py +40 -0
- package/skills/webapp-testing/examples/static_html_automation.py +33 -0
- package/skills/webapp-testing/scripts/with_server.py +106 -0
- package/skills/writing-plans/LICENSE +21 -0
- package/skills/writing-plans/SKILL.md +174 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Memory protocol
|
|
2
|
+
|
|
3
|
+
This directory holds durable facts the AI has learned while working on this project —
|
|
4
|
+
one fact per file, plus an index. Consult the index before acting; add a fact after
|
|
5
|
+
learning something durable (a decision, a correction, a constraint that isn't obvious
|
|
6
|
+
from the code).
|
|
7
|
+
|
|
8
|
+
## Format
|
|
9
|
+
|
|
10
|
+
Each fact is a single markdown file with simple frontmatter:
|
|
11
|
+
|
|
12
|
+
```markdown
|
|
13
|
+
---
|
|
14
|
+
name: <short-kebab-case-slug>
|
|
15
|
+
description: <one-line summary — used to decide relevance during recall>
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
<the fact, in a sentence or two.>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Index
|
|
22
|
+
|
|
23
|
+
`MEMORY.md` in this directory lists every fact, one line per file, so the index alone
|
|
24
|
+
can be scanned without opening each one:
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
- [Title](file.md) — one-line hook
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Rule
|
|
31
|
+
|
|
32
|
+
- Consult `MEMORY.md` before acting — recall what's already known.
|
|
33
|
+
- After learning something durable, write a new fact file and add a line to
|
|
34
|
+
`MEMORY.md`. Use `/remember <fact>` to do both in one step.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Wiki protocol
|
|
2
|
+
|
|
3
|
+
This directory is a durable knowledge base the AI reads before acting and writes after
|
|
4
|
+
learning — one concept per file, plus an index and a change log, following the Karpathy
|
|
5
|
+
"LLM Wiki" pattern of ingest/query/lint.
|
|
6
|
+
|
|
7
|
+
This wiki is Open Knowledge Format (OKF) compliant — any OKF-reading agent can consume it.
|
|
8
|
+
|
|
9
|
+
## Format (OKF)
|
|
10
|
+
|
|
11
|
+
Each page is a single markdown file with YAML frontmatter, one concept per file:
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
---
|
|
15
|
+
type: How-it-works
|
|
16
|
+
title: <optional title>
|
|
17
|
+
description: <optional one-line summary>
|
|
18
|
+
resource: <optional URI to an external system>
|
|
19
|
+
tags: [optional, list, of, tags]
|
|
20
|
+
timestamp: <optional ISO 8601 timestamp>
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
<free-form markdown body>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`type` is the only required frontmatter field — a free-form string naming what kind of
|
|
27
|
+
page this is (e.g. `How-it-works`, `Runbook`, `Decision`, `Gotcha`). Everything else in
|
|
28
|
+
the frontmatter is optional; the body below it is unconstrained markdown.
|
|
29
|
+
|
|
30
|
+
## Reserved files
|
|
31
|
+
|
|
32
|
+
- `index.md` — navigation. One line per page, link plus a one-line summary:
|
|
33
|
+
|
|
34
|
+
```markdown
|
|
35
|
+
- [Title](page.md) — one-line summary of what this page covers
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- `log.md` — append-only change log. One entry per change, parseable prefix:
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
## [YYYY-MM-DD] <operation> | <subject>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
where `<operation>` is one of `ingest`, `query`, `lint`, and `<subject>` names the
|
|
45
|
+
page(s) touched. Never rewrite a line once it's appended — only add new ones.
|
|
46
|
+
|
|
47
|
+
## Operations
|
|
48
|
+
|
|
49
|
+
- **Ingest** — when you learn something durable, create or update the relevant page(s):
|
|
50
|
+
update cross-links in related pages, add or update its `index.md` line, and append a
|
|
51
|
+
`log.md` entry.
|
|
52
|
+
- **Query** — read `index.md` first, then the relevant pages, BEFORE acting. When
|
|
53
|
+
answering required real synthesis rather than a lookup, save the result as a new page —
|
|
54
|
+
explorations compound instead of being redone.
|
|
55
|
+
- **Lint** — periodically, and via `/wiki lint`, check for: contradictions between pages,
|
|
56
|
+
stale claims, orphan pages missing from `index.md`, and broken cross-links. Reconcile
|
|
57
|
+
contradictions rather than letting them coexist — corrections beat additions.
|
|
58
|
+
|
|
59
|
+
## The loop rule
|
|
60
|
+
|
|
61
|
+
Read before acting. Write after learning. The tedious part is the bookkeeping — that's
|
|
62
|
+
your job, not the human's.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: librarian
|
|
3
|
+
description: Knowledge-base keeper: ingests durable knowledge into the OKF wiki and memory, and lints them for contradictions, stale claims, orphan pages, and broken cross-links.
|
|
4
|
+
tools: Read, Grep, Glob, Edit, Write
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are the librarian for this project's second brain (`.baselane/wiki/` and `.baselane/memory/`). You have two jobs.
|
|
9
|
+
|
|
10
|
+
(1) Ingest. When the session learned something durable — an architectural fact, a decision, a gotcha, a correction — record it. Project knowledge goes in the OKF wiki (`.baselane/wiki/`: one concept per file with a `type` frontmatter field, plus its `index.md` line and a `log.md` entry). A durable one-line fact goes in memory (`.baselane/memory/`, with its `MEMORY.md` line). Follow the protocol in each directory's README.
|
|
11
|
+
|
|
12
|
+
(2) Lint. On request (or via `/wiki lint`), scan every wiki page and memory fact for contradictions between pages, stale claims, pages missing from the index, and broken cross-links. Reconcile contradictions rather than letting them coexist — corrections beat additions.
|
|
13
|
+
|
|
14
|
+
Always read `index.md` and `MEMORY.md` before acting. Never fabricate a page or a fact; only record what the work actually established. Keep the bookkeeping — the index and log lines — current; that is your job, not the human's.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Append a durable fact to .baselane/memory/ and update its index.
|
|
3
|
+
argument-hint: <fact>
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Write $ARGUMENTS as a new fact file under `.baselane/memory/` (kebab-case name, frontmatter with `name` and `description`, then the fact itself). Then add a one-line entry for it to `.baselane/memory/MEMORY.md` (create the index if it doesn't exist yet). Keep the fact to one durable, non-obvious sentence or two.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Look up a topic, record or update one, or run a lint pass over the wiki.
|
|
3
|
+
argument-hint: <topic to look up | fact to record | "lint">
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Follow the wiki protocol in `.baselane/wiki/README.md` (or `wiki/README.md`) for $ARGUMENTS. If this is a lookup, read `index.md` first, then the relevant page(s), before answering — if the answer required real synthesis, save it as a new page. If this is new or changed durable knowledge, create or update the relevant page (OKF frontmatter with at least `type`), update cross-links, add or update its `index.md` line, and append a `log.md` entry. If $ARGUMENTS is "lint" (or empty), scan every page for contradictions, stale claims, orphan pages missing from the index, and broken cross-links — reconcile contradictions rather than leaving them, since corrections beat additions.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "echo \"Recall the second brain before acting: read .baselane/wiki/index.md and .baselane/memory/MEMORY.md first — the answer may already be written down.\""
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"Stop": [
|
|
15
|
+
{
|
|
16
|
+
"matcher": "",
|
|
17
|
+
"hooks": [
|
|
18
|
+
{
|
|
19
|
+
"type": "command",
|
|
20
|
+
"command": "echo \"Before finishing, capture any durable decisions or facts from this session to .baselane/memory/ (use /remember) and update its MEMORY.md index.\""
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"matcher": "",
|
|
26
|
+
"hooks": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "echo \"Before finishing, if you changed how something works, update the wiki entry (and its index.md/log.md lines) — see .baselane/wiki/README.md.\""
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Copilot instructions
|
|
2
|
+
|
|
3
|
+
## Second brain (OKF wiki + memory)
|
|
4
|
+
|
|
5
|
+
This project keeps a durable second brain the AI reads before acting and writes after learning:
|
|
6
|
+
|
|
7
|
+
- `.baselane/wiki/` — an Open Knowledge Format (OKF) knowledge base for project knowledge: architecture, decisions, gotchas, runbooks. One concept per file (with a `type` frontmatter field), plus an `index.md` and an append-only `log.md`.
|
|
8
|
+
- `.baselane/memory/` — durable one-line facts (decisions, corrections, non-obvious constraints), indexed by `MEMORY.md`.
|
|
9
|
+
|
|
10
|
+
Read `index.md` and `MEMORY.md` before acting — recall what's already known rather than re-deriving it. After learning something durable, ingest it (a wiki page or a memory fact) together with its index and log lines. Corrections beat additions: reconcile contradictions rather than letting them pile up. Use `/wiki` and `/remember` for one-step capture; the `librarian` subagent handles the bookkeeping and periodic lint.
|
|
11
|
+
|
|
12
|
+
## Workflow pack: Second Brain (OKF)
|
|
13
|
+
|
|
14
|
+
A durable second brain for every repo and laptop: an Open Knowledge Format (OKF) wiki for project knowledge — architecture, decisions, gotchas, runbooks — plus a memory store of durable one-line facts, maintained by a librarian subagent that ingests what the team learns and lints for contradictions. The discipline is read-before-acting and write-after-learning, and the AI keeps the bookkeeping, not you. Built on the Karpathy "LLM Wiki" ingest/query/lint loop and Google's Open Knowledge Format. It ships the format and the habit, not pre-filled content — the brain accumulates as the team works.
|
|
15
|
+
|
|
16
|
+
When acting as the librarian role: You are the librarian for this project's second brain (`.baselane/wiki/` and `.baselane/memory/`). You have two jobs.
|
|
17
|
+
|
|
18
|
+
(1) Ingest. When the session learned something durable — an architectural fact, a decision, a gotcha, a correction — record it. Project knowledge goes in the OKF wiki (`.baselane/wiki/`: one concept per file with a `type` frontmatter field, plus its `index.md` line and a `log.md` entry). A durable one-line fact goes in memory (`.baselane/memory/`, with its `MEMORY.md` line). Follow the protocol in each directory's README.
|
|
19
|
+
|
|
20
|
+
(2) Lint. On request (or via `/wiki lint`), scan every wiki page and memory fact for contradictions between pages, stale claims, pages missing from the index, and broken cross-links. Reconcile contradictions rather than letting them coexist — corrections beat additions.
|
|
21
|
+
|
|
22
|
+
Always read `index.md` and `MEMORY.md` before acting. Never fabricate a page or a fact; only record what the work actually established. Keep the bookkeeping — the index and log lines — current; that is your job, not the human's.
|
|
23
|
+
|
|
24
|
+
- Recall the second brain before acting: read .baselane/wiki/index.md and .baselane/memory/MEMORY.md first — the answer may already be written down.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
|
|
3
|
+
<!-- generated from workflow-pack second-brain v1.0.0 -->
|
|
4
|
+
|
|
5
|
+
## Second brain (OKF wiki + memory)
|
|
6
|
+
|
|
7
|
+
This project keeps a durable second brain the AI reads before acting and writes after learning:
|
|
8
|
+
|
|
9
|
+
- `.baselane/wiki/` — an Open Knowledge Format (OKF) knowledge base for project knowledge: architecture, decisions, gotchas, runbooks. One concept per file (with a `type` frontmatter field), plus an `index.md` and an append-only `log.md`.
|
|
10
|
+
- `.baselane/memory/` — durable one-line facts (decisions, corrections, non-obvious constraints), indexed by `MEMORY.md`.
|
|
11
|
+
|
|
12
|
+
Read `index.md` and `MEMORY.md` before acting — recall what's already known rather than re-deriving it. After learning something durable, ingest it (a wiki page or a memory fact) together with its index and log lines. Corrections beat additions: reconcile contradictions rather than letting them pile up. Use `/wiki` and `/remember` for one-step capture; the `librarian` subagent handles the bookkeeping and periodic lint.
|
|
13
|
+
|
|
14
|
+
## Harness capabilities
|
|
15
|
+
|
|
16
|
+
- wiki · repo · baselane — provisioned
|
|
17
|
+
- wiki · org · baselane — provisioned
|
|
18
|
+
- memory · repo · files — provisioned
|
|
19
|
+
- memory · org · files — provisioned
|
|
20
|
+
|
|
21
|
+
### Memory
|
|
22
|
+
|
|
23
|
+
Consult `.baselane/memory/` and its `MEMORY.md` index before acting — it holds durable facts from past sessions. Use `/remember` to add one after learning something durable.
|
|
24
|
+
|
|
25
|
+
### Wiki
|
|
26
|
+
|
|
27
|
+
`.baselane/wiki/` is an OKF-compliant knowledge base: read `index.md` and the relevant pages before acting, and ingest new durable knowledge into a page (with its index and log lines) after learning it. Use `/wiki` to look up, record, or lint.
|
|
28
|
+
|
|
29
|
+
## Workflow pack: Second Brain (OKF)
|
|
30
|
+
|
|
31
|
+
A durable second brain for every repo and laptop: an Open Knowledge Format (OKF) wiki for project knowledge — architecture, decisions, gotchas, runbooks — plus a memory store of durable one-line facts, maintained by a librarian subagent that ingests what the team learns and lints for contradictions. The discipline is read-before-acting and write-after-learning, and the AI keeps the bookkeeping, not you. Built on the Karpathy "LLM Wiki" ingest/query/lint loop and Google's Open Knowledge Format. It ships the format and the habit, not pre-filled content — the brain accumulates as the team works.
|
|
32
|
+
|
|
33
|
+
### Roles
|
|
34
|
+
|
|
35
|
+
- **librarian** — Knowledge-base keeper: ingests durable knowledge into the OKF wiki and memory, and lints them for contradictions, stale claims, orphan pages, and broken cross-links.
|
|
36
|
+
|
|
37
|
+
### Guardrails
|
|
38
|
+
|
|
39
|
+
- At session start, recall the second brain before acting.
|
|
40
|
+
|
|
41
|
+
Tool-specific implementations live alongside this file (see `CLAUDE.md` for the Claude Code implementation). Tools without a native subagent/command surface should treat the sections above as operating instructions.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
@AGENTS.md
|
|
4
|
+
|
|
5
|
+
This project defines a native Claude Code implementation of this workflow pack:
|
|
6
|
+
- Subagent: `.claude/agents/librarian.md`
|
|
7
|
+
- Command: `.claude/commands/remember.md`
|
|
8
|
+
- Command: `.claude/commands/wiki.md`
|
|
9
|
+
- Hooks: see `.claude/settings.json`
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://baselane.dev/schema/workflow-pack-v1.json",
|
|
3
|
+
"id": "security-review",
|
|
4
|
+
"version": "2.0.0",
|
|
5
|
+
"title": "Security review",
|
|
6
|
+
"summary": "A 4-layer pre-deploy security audit (secrets, authentication, input validation, data access) with per-layer prompts and a scan toolkit, a reviewer role, a /security-scan diff check, a /security-audit pre-deploy pass, a pre-ship Stop-hook reminder, and baseline security rules for every endpoint — flags real vulnerabilities with severity and file:line, not theater.",
|
|
7
|
+
"scope": "repo",
|
|
8
|
+
"attribution": { "source": "affaan-m/ECC", "url": "https://github.com/affaan-m/ECC", "license": "MIT" },
|
|
9
|
+
"context": {
|
|
10
|
+
"markdown": "## Security review discipline\n\nRun this against any code that handles user input, authentication, API endpoints, or sensitive data — before it reaches production.\n\n### Security rules (apply to every endpoint, always)\n\n- Never hardcode secrets — read them from environment variables (or a secret manager) and fail fast at startup if a required one is missing.\n- Use parameterized queries — never build a query by concatenating a user value into a string.\n- Every endpoint verifies authentication and authorization server-side; the client hiding a button is not access control.\n- Every data query filters by the authenticated user's own id (or explicitly checks an admin role) — never trust a client-supplied id.\n- Validate all input server-side against a schema — client-side validation alone is not validation.\n- Return generic error messages to the client; log full detail server-side only.\n- Rate-limit authentication endpoints.\n- Enable row-level security (RLS) by default on any database that supports it.\n- Set secure cookie flags — `httpOnly`, `secure`, `sameSite` — on every session cookie.\n\n### Checklist\n\n- **Injection** — Validate every external or untrusted input at the boundary before it reaches business logic; fail fast with a clear message. Are queries parameterized? Is user input ever concatenated into a query, shell command, or template string?\n- **Authorization** — Is every route/mutation checked for auth, not just authentication? Is access scoped to the resource owner, not just \"logged in\"?\n- **Secrets** — Never hardcode secrets — read them from environment variables and fail fast at startup if a required one is missing. Any hardcoded API key, password, token, or connection string in source?\n- **Unsafe deserialization** — Is untrusted input ever passed to `eval`, a pickle/deserialize call, or a dynamic `require`/`import` without validation?\n- **SSRF** — Does the server ever fetch a URL supplied by the user? If so, is the destination allow-listed, not just \"looks like a URL\"?\n- **XSS** — Is user content ever rendered as raw HTML (`innerHTML`, `dangerouslySetInnerHTML`) without sanitization?\n- **Logging** — Do logs ever include a password, token, or full PII record?\n\n### Severity\n\nHardcoded secrets, injection, and auth bypass are CRITICAL — block merge. XSS and SSRF without an allow-list are HIGH. Missing rate limiting or verbose error messages are MEDIUM.\n\n### False positives to skip\n\n`.env.example` placeholders, clearly-marked test credentials, and public API keys meant to be public are not findings — verify context before flagging.\n"
|
|
11
|
+
},
|
|
12
|
+
"skills": [
|
|
13
|
+
{
|
|
14
|
+
"name": "security-audit",
|
|
15
|
+
"description": "Run the 4-layer pre-deploy security pass (secrets, authentication, input validation, data access) before shipping code that touches user input, auth, an endpoint, or a database query.",
|
|
16
|
+
"category": "review",
|
|
17
|
+
"body": "# Security audit: the 4-layer pre-deploy pass\n\nRun this before shipping any change that touches user input, authentication, an API endpoint, or a database query. It exists because most vibe-coded security incidents come from three repeat failure modes: a committed API key (in git history or a client bundle), an endpoint the server never actually checks auth on (the client just hides the button — `GET /api/invoices/43` returns someone else's invoice), and a hand-built SQL string. All three are caught by asking specific questions in order, not by \"looking for bugs\" in general.\n\nWork through all four layers. Each has an audit prompt — answer it against the actual code, not in the abstract.\n\n## Layer 1 — Secrets\n\n**Audit prompt:** Scan the current diff and git history for hardcoded API keys, passwords, tokens, or connection strings. Is every secret read from an environment variable (or a secret manager), never a literal in source? Does startup fail fast with a clear error if a required secret is missing?\n\n**Run:** `gitleaks detect` (finds secrets already in git history) and, if a match turns up, `trufflehog` to verify the secret is still active before treating it as a false positive.\n\n## Layer 2 — Authentication\n\n**Audit prompt:** For every route and mutation, does the *server* check authentication and authorization — not just the client hiding a button? For every resource-scoped endpoint, is access scoped to the resource's owner, not just \"any logged-in user\" (the BOLA/IDOR check — `GET /api/invoices/43` must 403/404 for anyone but the invoice's owner or an explicit admin)?\n\n## Layer 3 — Input validation\n\n**Audit prompt:** Is every external or untrusted input validated server-side against a schema before it reaches business logic — not only in the client? Are queries parameterized (never a user value concatenated into SQL, a shell command, or a template string)? Do file uploads have a size limit, and do auth endpoints have rate limiting?\n\n## Layer 4 — Data access\n\n**Audit prompt:** Does every data query filter by the authenticated user's own id (or explicitly check an admin role for cross-user access), instead of trusting a client-supplied id? Do error responses returned to the client stay generic (no stack trace, no internal detail) while the full context is logged server-side? Where the schema supports it, is deletion a soft delete rather than an irreversible hard delete?\n\n## Toolkit\n\nRun what's installed; note what isn't so a human can decide whether to install it.\n\n| Tool | Layer | What it checks |\n| --- | --- | --- |\n| `gitleaks detect` | 1 | secrets already committed to git history |\n| `trufflehog` | 1 | verifies a found secret is still live before you page anyone |\n| `npm audit` / `pip-audit` | 3 | known-vulnerable dependencies |\n| `semgrep --config auto` | 3–4 | static analysis for injection, unsafe patterns |\n| GitHub Secret Scanning + Push Protection | 1 | blocks a secret from ever reaching the remote |\n\n## Severity\n\nHardcoded secrets, injection, and an auth bypass are CRITICAL — block the release. A BOLA/IDOR gap or an un-rate-limited auth endpoint is HIGH. A verbose error message or a missing rate limit is MEDIUM. Report every finding with file:line, not a vague \"looks risky.\"\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "validate-at-boundaries",
|
|
21
|
+
"description": "Use when code receives data from outside its own module — user input, API responses, file contents, env vars, message payloads — validate it against a schema at the boundary and fail fast, so untrusted shapes never propagate inward.",
|
|
22
|
+
"body": "# Validate at boundaries\n\nEvery place external data enters your system is a boundary: an HTTP handler, a file read, an API\nresponse, an environment variable, a queue message. **Validate at the boundary, before the data\nreaches any logic that assumes it is well-formed.** Inside the boundary, the value is trusted because\nyou already checked it — not because you hope it is right.\n\n```ts\n// At the boundary: parse into a known shape, or reject.\nconst parsed = OrderSchema.parse(await req.json()); // throws on bad shape\ncreateOrder(parsed); // inner code trusts `parsed`\n```\n\n## Rules\n\n- **One validator is the authority for each shape.** Route every entry point for that shape through\n it — built-in, user-supplied, or machine-generated. Never hand-construct or trust an unvalidated\n object further in.\n- **Fail fast, name the field.** Reject the whole input on the first violation with a message that\n says which field was wrong and why. A vague \"invalid input\" costs the caller a debugging session.\n- **Parse, don't just check.** Return a typed value from validation so downstream code carries the\n guarantee in its types, not just in a comment.\n- **Never trust \"internal\" data blindly.** An API response or a sibling service's payload is external\n to your module even if it's inside your company — validate it the same way.\n\n## Why\n\nUnvalidated data that flows inward turns a boundary problem into a deep-stack mystery: the crash\nhappens three layers down, far from the malformed input that caused it. Validation at the edge keeps\nthe failure where the bad data actually entered, where the error message can still be specific.\n\n## Boundaries to cover\n\nHTTP request bodies and query params · file and config contents · third-party API responses ·\nenvironment variables (validate presence and format at startup) · deserialized messages/events ·\nanything read from a store you did not just write in the same transaction.\n",
|
|
23
|
+
"category": "review"
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
"agents": [
|
|
27
|
+
{
|
|
28
|
+
"name": "security-reviewer",
|
|
29
|
+
"description": "Flags real vulnerabilities (injection, authz gaps, secrets, unsafe deserialization, SSRF, XSS) with severity and file:line. Use after writing code that touches user input, auth, or sensitive data, and before any release.",
|
|
30
|
+
"tools": ["Read", "Grep", "Glob", "Bash"],
|
|
31
|
+
"model": "sonnet",
|
|
32
|
+
"prompt": "You are a security reviewer. Read the changed code and check it against the security-review checklist in context: injection, authorization, hardcoded secrets, unsafe deserialization, SSRF, XSS, and sensitive-data logging. For each finding, cite the exact file:line, name the concrete input and outcome that makes it exploitable, and give severity (CRITICAL/HIGH/MEDIUM). Skip findings you cannot point to in the code — do not manufacture issues to look thorough. If nothing is exploitable, say so and approve."
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"commands": [
|
|
36
|
+
{
|
|
37
|
+
"name": "security-scan",
|
|
38
|
+
"description": "Run the security-reviewer over the current changes and report findings by severity.",
|
|
39
|
+
"argument_hint": "[optional: path or diff ref]",
|
|
40
|
+
"prompt": "Invoke the security-reviewer subagent over the current diff (or $ARGUMENTS if given). Report findings grouped by severity (CRITICAL, HIGH, MEDIUM) with file:line and fix for each. End with a verdict: approve, or block until CRITICAL/HIGH issues are fixed."
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "security-audit",
|
|
44
|
+
"description": "Run the security-audit skill's 4-layer pre-deploy pass (secrets, authentication, input validation, data access) and report findings by layer and severity.",
|
|
45
|
+
"argument_hint": "[optional: path or diff ref]",
|
|
46
|
+
"prompt": "Run the security-audit skill's 4-layer pass over the current diff (or $ARGUMENTS if given): secrets, authentication, input validation, data access. For each layer, run the relevant toolkit command when it's installed (gitleaks, trufflehog, npm audit / pip-audit, semgrep --config auto) and answer that layer's audit prompt against the actual code. Report findings grouped by layer with file:line and severity (CRITICAL/HIGH/MEDIUM). End with a verdict: safe to ship, or block until CRITICAL/HIGH issues are fixed."
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"hooks": [
|
|
50
|
+
{
|
|
51
|
+
"event": "PostToolUse",
|
|
52
|
+
"matcher": "Edit|Write",
|
|
53
|
+
"description": "Remind to check untrusted input at trust boundaries whenever code is edited.",
|
|
54
|
+
"action": "print-reminder",
|
|
55
|
+
"message": "Security check: any user input, external fetch, or deserialized data crossing a trust boundary here? Validate it before it's used."
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"event": "PostToolUse",
|
|
59
|
+
"matcher": "Edit|Write",
|
|
60
|
+
"description": "After an edit, scan the working tree for committed secrets with gitleaks when it is installed.",
|
|
61
|
+
"action": "run-command",
|
|
62
|
+
"command": "if command -v gitleaks >/dev/null 2>&1; then gitleaks detect --no-git --no-banner --redact; else echo \"gitleaks not found — install gitleaks to scan for secrets (security-review)\"; fi"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"event": "Stop",
|
|
66
|
+
"matcher": "",
|
|
67
|
+
"description": "Before ending the session, run the pre-deploy security toolkit and remind to run /security-audit before shipping.",
|
|
68
|
+
"action": "run-command",
|
|
69
|
+
"command": "if command -v gitleaks >/dev/null 2>&1; then gitleaks detect --no-git --no-banner --redact; else echo \"gitleaks not found — install to scan for committed secrets (security-audit layer 1)\"; fi; if command -v semgrep >/dev/null 2>&1; then semgrep --config auto --quiet; else echo \"semgrep not found — install for static analysis (security-audit layers 3-4)\"; fi; echo \"Pre-ship reminder: run /security-audit for the full 4-layer review (secrets, auth, input validation, data access) before deploying.\""
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-reviewer
|
|
3
|
+
description: Flags real vulnerabilities (injection, authz gaps, secrets, unsafe deserialization, SSRF, XSS) with severity and file:line. Use after writing code that touches user input, auth, or sensitive data, and before any release.
|
|
4
|
+
tools: Read, Grep, Glob, Bash
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a security reviewer. Read the changed code and check it against the security-review checklist in context: injection, authorization, hardcoded secrets, unsafe deserialization, SSRF, XSS, and sensitive-data logging. For each finding, cite the exact file:line, name the concrete input and outcome that makes it exploitable, and give severity (CRITICAL/HIGH/MEDIUM). Skip findings you cannot point to in the code — do not manufacture issues to look thorough. If nothing is exploitable, say so and approve.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the security-audit skill's 4-layer pre-deploy pass (secrets, authentication, input validation, data access) and report findings by layer and severity.
|
|
3
|
+
argument-hint: [optional: path or diff ref]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Run the security-audit skill's 4-layer pass over the current diff (or $ARGUMENTS if given): secrets, authentication, input validation, data access. For each layer, run the relevant toolkit command when it's installed (gitleaks, trufflehog, npm audit / pip-audit, semgrep --config auto) and answer that layer's audit prompt against the actual code. Report findings grouped by layer with file:line and severity (CRITICAL/HIGH/MEDIUM). End with a verdict: safe to ship, or block until CRITICAL/HIGH issues are fixed.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run the security-reviewer over the current changes and report findings by severity.
|
|
3
|
+
argument-hint: [optional: path or diff ref]
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Invoke the security-reviewer subagent over the current diff (or $ARGUMENTS if given). Report findings grouped by severity (CRITICAL, HIGH, MEDIUM) with file:line and fix for each. End with a verdict: approve, or block until CRITICAL/HIGH issues are fixed.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit|Write",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "echo \"Security check: any user input, external fetch, or deserialized data crossing a trust boundary here? Validate it before it's used.\""
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"matcher": "Edit|Write",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "if command -v gitleaks >/dev/null 2>&1; then gitleaks detect --no-git --no-banner --redact; else echo \"gitleaks not found — install gitleaks to scan for secrets (security-review)\"; fi"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"Stop": [
|
|
24
|
+
{
|
|
25
|
+
"matcher": "",
|
|
26
|
+
"hooks": [
|
|
27
|
+
{
|
|
28
|
+
"type": "command",
|
|
29
|
+
"command": "if command -v gitleaks >/dev/null 2>&1; then gitleaks detect --no-git --no-banner --redact; else echo \"gitleaks not found — install to scan for committed secrets (security-audit layer 1)\"; fi; if command -v semgrep >/dev/null 2>&1; then semgrep --config auto --quiet; else echo \"semgrep not found — install for static analysis (security-audit layers 3-4)\"; fi; echo \"Pre-ship reminder: run /security-audit for the full 4-layer review (secrets, auth, input validation, data access) before deploying.\""
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-audit
|
|
3
|
+
description: Run the 4-layer pre-deploy security pass (secrets, authentication, input validation, data access) before shipping code that touches user input, auth, an endpoint, or a database query.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Security audit: the 4-layer pre-deploy pass
|
|
7
|
+
|
|
8
|
+
Run this before shipping any change that touches user input, authentication, an API endpoint, or a database query. It exists because most vibe-coded security incidents come from three repeat failure modes: a committed API key (in git history or a client bundle), an endpoint the server never actually checks auth on (the client just hides the button — `GET /api/invoices/43` returns someone else's invoice), and a hand-built SQL string. All three are caught by asking specific questions in order, not by "looking for bugs" in general.
|
|
9
|
+
|
|
10
|
+
Work through all four layers. Each has an audit prompt — answer it against the actual code, not in the abstract.
|
|
11
|
+
|
|
12
|
+
## Layer 1 — Secrets
|
|
13
|
+
|
|
14
|
+
**Audit prompt:** Scan the current diff and git history for hardcoded API keys, passwords, tokens, or connection strings. Is every secret read from an environment variable (or a secret manager), never a literal in source? Does startup fail fast with a clear error if a required secret is missing?
|
|
15
|
+
|
|
16
|
+
**Run:** `gitleaks detect` (finds secrets already in git history) and, if a match turns up, `trufflehog` to verify the secret is still active before treating it as a false positive.
|
|
17
|
+
|
|
18
|
+
## Layer 2 — Authentication
|
|
19
|
+
|
|
20
|
+
**Audit prompt:** For every route and mutation, does the *server* check authentication and authorization — not just the client hiding a button? For every resource-scoped endpoint, is access scoped to the resource's owner, not just "any logged-in user" (the BOLA/IDOR check — `GET /api/invoices/43` must 403/404 for anyone but the invoice's owner or an explicit admin)?
|
|
21
|
+
|
|
22
|
+
## Layer 3 — Input validation
|
|
23
|
+
|
|
24
|
+
**Audit prompt:** Is every external or untrusted input validated server-side against a schema before it reaches business logic — not only in the client? Are queries parameterized (never a user value concatenated into SQL, a shell command, or a template string)? Do file uploads have a size limit, and do auth endpoints have rate limiting?
|
|
25
|
+
|
|
26
|
+
## Layer 4 — Data access
|
|
27
|
+
|
|
28
|
+
**Audit prompt:** Does every data query filter by the authenticated user's own id (or explicitly check an admin role for cross-user access), instead of trusting a client-supplied id? Do error responses returned to the client stay generic (no stack trace, no internal detail) while the full context is logged server-side? Where the schema supports it, is deletion a soft delete rather than an irreversible hard delete?
|
|
29
|
+
|
|
30
|
+
## Toolkit
|
|
31
|
+
|
|
32
|
+
Run what's installed; note what isn't so a human can decide whether to install it.
|
|
33
|
+
|
|
34
|
+
| Tool | Layer | What it checks |
|
|
35
|
+
| --- | --- | --- |
|
|
36
|
+
| `gitleaks detect` | 1 | secrets already committed to git history |
|
|
37
|
+
| `trufflehog` | 1 | verifies a found secret is still live before you page anyone |
|
|
38
|
+
| `npm audit` / `pip-audit` | 3 | known-vulnerable dependencies |
|
|
39
|
+
| `semgrep --config auto` | 3–4 | static analysis for injection, unsafe patterns |
|
|
40
|
+
| GitHub Secret Scanning + Push Protection | 1 | blocks a secret from ever reaching the remote |
|
|
41
|
+
|
|
42
|
+
## Severity
|
|
43
|
+
|
|
44
|
+
Hardcoded secrets, injection, and an auth bypass are CRITICAL — block the release. A BOLA/IDOR gap or an un-rate-limited auth endpoint is HIGH. A verbose error message or a missing rate limit is MEDIUM. Report every finding with file:line, not a vague "looks risky."
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: validate-at-boundaries
|
|
3
|
+
description: Use when code receives data from outside its own module — user input, API responses, file contents, env vars, message payloads — validate it against a schema at the boundary and fail fast, so untrusted shapes never propagate inward.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Validate at boundaries
|
|
7
|
+
|
|
8
|
+
Every place external data enters your system is a boundary: an HTTP handler, a file read, an API
|
|
9
|
+
response, an environment variable, a queue message. **Validate at the boundary, before the data
|
|
10
|
+
reaches any logic that assumes it is well-formed.** Inside the boundary, the value is trusted because
|
|
11
|
+
you already checked it — not because you hope it is right.
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// At the boundary: parse into a known shape, or reject.
|
|
15
|
+
const parsed = OrderSchema.parse(await req.json()); // throws on bad shape
|
|
16
|
+
createOrder(parsed); // inner code trusts `parsed`
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Rules
|
|
20
|
+
|
|
21
|
+
- **One validator is the authority for each shape.** Route every entry point for that shape through
|
|
22
|
+
it — built-in, user-supplied, or machine-generated. Never hand-construct or trust an unvalidated
|
|
23
|
+
object further in.
|
|
24
|
+
- **Fail fast, name the field.** Reject the whole input on the first violation with a message that
|
|
25
|
+
says which field was wrong and why. A vague "invalid input" costs the caller a debugging session.
|
|
26
|
+
- **Parse, don't just check.** Return a typed value from validation so downstream code carries the
|
|
27
|
+
guarantee in its types, not just in a comment.
|
|
28
|
+
- **Never trust "internal" data blindly.** An API response or a sibling service's payload is external
|
|
29
|
+
to your module even if it's inside your company — validate it the same way.
|
|
30
|
+
|
|
31
|
+
## Why
|
|
32
|
+
|
|
33
|
+
Unvalidated data that flows inward turns a boundary problem into a deep-stack mystery: the crash
|
|
34
|
+
happens three layers down, far from the malformed input that caused it. Validation at the edge keeps
|
|
35
|
+
the failure where the bad data actually entered, where the error message can still be specific.
|
|
36
|
+
|
|
37
|
+
## Boundaries to cover
|
|
38
|
+
|
|
39
|
+
HTTP request bodies and query params · file and config contents · third-party API responses ·
|
|
40
|
+
environment variables (validate presence and format at startup) · deserialized messages/events ·
|
|
41
|
+
anything read from a store you did not just write in the same transaction.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Copilot instructions
|
|
2
|
+
|
|
3
|
+
## Security review discipline
|
|
4
|
+
|
|
5
|
+
Run this against any code that handles user input, authentication, API endpoints, or sensitive data — before it reaches production.
|
|
6
|
+
|
|
7
|
+
### Security rules (apply to every endpoint, always)
|
|
8
|
+
|
|
9
|
+
- Never hardcode secrets — read them from environment variables (or a secret manager) and fail fast at startup if a required one is missing.
|
|
10
|
+
- Use parameterized queries — never build a query by concatenating a user value into a string.
|
|
11
|
+
- Every endpoint verifies authentication and authorization server-side; the client hiding a button is not access control.
|
|
12
|
+
- Every data query filters by the authenticated user's own id (or explicitly checks an admin role) — never trust a client-supplied id.
|
|
13
|
+
- Validate all input server-side against a schema — client-side validation alone is not validation.
|
|
14
|
+
- Return generic error messages to the client; log full detail server-side only.
|
|
15
|
+
- Rate-limit authentication endpoints.
|
|
16
|
+
- Enable row-level security (RLS) by default on any database that supports it.
|
|
17
|
+
- Set secure cookie flags — `httpOnly`, `secure`, `sameSite` — on every session cookie.
|
|
18
|
+
|
|
19
|
+
### Checklist
|
|
20
|
+
|
|
21
|
+
- **Injection** — Validate every external or untrusted input at the boundary before it reaches business logic; fail fast with a clear message. Are queries parameterized? Is user input ever concatenated into a query, shell command, or template string?
|
|
22
|
+
- **Authorization** — Is every route/mutation checked for auth, not just authentication? Is access scoped to the resource owner, not just "logged in"?
|
|
23
|
+
- **Secrets** — Never hardcode secrets — read them from environment variables and fail fast at startup if a required one is missing. Any hardcoded API key, password, token, or connection string in source?
|
|
24
|
+
- **Unsafe deserialization** — Is untrusted input ever passed to `eval`, a pickle/deserialize call, or a dynamic `require`/`import` without validation?
|
|
25
|
+
- **SSRF** — Does the server ever fetch a URL supplied by the user? If so, is the destination allow-listed, not just "looks like a URL"?
|
|
26
|
+
- **XSS** — Is user content ever rendered as raw HTML (`innerHTML`, `dangerouslySetInnerHTML`) without sanitization?
|
|
27
|
+
- **Logging** — Do logs ever include a password, token, or full PII record?
|
|
28
|
+
|
|
29
|
+
### Severity
|
|
30
|
+
|
|
31
|
+
Hardcoded secrets, injection, and auth bypass are CRITICAL — block merge. XSS and SSRF without an allow-list are HIGH. Missing rate limiting or verbose error messages are MEDIUM.
|
|
32
|
+
|
|
33
|
+
### False positives to skip
|
|
34
|
+
|
|
35
|
+
`.env.example` placeholders, clearly-marked test credentials, and public API keys meant to be public are not findings — verify context before flagging.
|
|
36
|
+
|
|
37
|
+
## Workflow pack: Security review
|
|
38
|
+
|
|
39
|
+
A 4-layer pre-deploy security audit (secrets, authentication, input validation, data access) with per-layer prompts and a scan toolkit, a reviewer role, a /security-scan diff check, a /security-audit pre-deploy pass, a pre-ship Stop-hook reminder, and baseline security rules for every endpoint — flags real vulnerabilities with severity and file:line, not theater.
|
|
40
|
+
|
|
41
|
+
When acting as the security-reviewer role: You are a security reviewer. Read the changed code and check it against the security-review checklist in context: injection, authorization, hardcoded secrets, unsafe deserialization, SSRF, XSS, and sensitive-data logging. For each finding, cite the exact file:line, name the concrete input and outcome that makes it exploitable, and give severity (CRITICAL/HIGH/MEDIUM). Skip findings you cannot point to in the code — do not manufacture issues to look thorough. If nothing is exploitable, say so and approve.
|
|
42
|
+
|
|
43
|
+
Workflow steps:
|
|
44
|
+
|
|
45
|
+
- security-scan: Invoke the security-reviewer subagent over the current diff (or $ARGUMENTS if given). Report findings grouped by severity (CRITICAL, HIGH, MEDIUM) with file:line and fix for each. End with a verdict: approve, or block until CRITICAL/HIGH issues are fixed.
|
|
46
|
+
- security-audit: Run the security-audit skill's 4-layer pass over the current diff (or $ARGUMENTS if given): secrets, authentication, input validation, data access. For each layer, run the relevant toolkit command when it's installed (gitleaks, trufflehog, npm audit / pip-audit, semgrep --config auto) and answer that layer's audit prompt against the actual code. Report findings grouped by layer with file:line and severity (CRITICAL/HIGH/MEDIUM). End with a verdict: safe to ship, or block until CRITICAL/HIGH issues are fixed.
|
|
47
|
+
|
|
48
|
+
- Security check: any user input, external fetch, or deserialized data crossing a trust boundary here? Validate it before it's used.
|
|
49
|
+
- After an edit, scan the working tree for committed secrets with gitleaks when it is installed.
|
|
50
|
+
- Before ending the session, run the pre-deploy security toolkit and remind to run /security-audit before shipping.
|
|
51
|
+
|
|
52
|
+
## Skills
|
|
53
|
+
|
|
54
|
+
### security-audit
|
|
55
|
+
|
|
56
|
+
Run the 4-layer pre-deploy security pass (secrets, authentication, input validation, data access) before shipping code that touches user input, auth, an endpoint, or a database query.
|
|
57
|
+
|
|
58
|
+
# Security audit: the 4-layer pre-deploy pass
|
|
59
|
+
|
|
60
|
+
Run this before shipping any change that touches user input, authentication, an API endpoint, or a database query. It exists because most vibe-coded security incidents come from three repeat failure modes: a committed API key (in git history or a client bundle), an endpoint the server never actually checks auth on (the client just hides the button — `GET /api/invoices/43` returns someone else's invoice), and a hand-built SQL string. All three are caught by asking specific questions in order, not by "looking for bugs" in general.
|
|
61
|
+
|
|
62
|
+
Work through all four layers. Each has an audit prompt — answer it against the actual code, not in the abstract.
|
|
63
|
+
|
|
64
|
+
## Layer 1 — Secrets
|
|
65
|
+
|
|
66
|
+
**Audit prompt:** Scan the current diff and git history for hardcoded API keys, passwords, tokens, or connection strings. Is every secret read from an environment variable (or a secret manager), never a literal in source? Does startup fail fast with a clear error if a required secret is missing?
|
|
67
|
+
|
|
68
|
+
**Run:** `gitleaks detect` (finds secrets already in git history) and, if a match turns up, `trufflehog` to verify the secret is still active before treating it as a false positive.
|
|
69
|
+
|
|
70
|
+
## Layer 2 — Authentication
|
|
71
|
+
|
|
72
|
+
**Audit prompt:** For every route and mutation, does the *server* check authentication and authorization — not just the client hiding a button? For every resource-scoped endpoint, is access scoped to the resource's owner, not just "any logged-in user" (the BOLA/IDOR check — `GET /api/invoices/43` must 403/404 for anyone but the invoice's owner or an explicit admin)?
|
|
73
|
+
|
|
74
|
+
## Layer 3 — Input validation
|
|
75
|
+
|
|
76
|
+
**Audit prompt:** Is every external or untrusted input validated server-side against a schema before it reaches business logic — not only in the client? Are queries parameterized (never a user value concatenated into SQL, a shell command, or a template string)? Do file uploads have a size limit, and do auth endpoints have rate limiting?
|
|
77
|
+
|
|
78
|
+
## Layer 4 — Data access
|
|
79
|
+
|
|
80
|
+
**Audit prompt:** Does every data query filter by the authenticated user's own id (or explicitly check an admin role for cross-user access), instead of trusting a client-supplied id? Do error responses returned to the client stay generic (no stack trace, no internal detail) while the full context is logged server-side? Where the schema supports it, is deletion a soft delete rather than an irreversible hard delete?
|
|
81
|
+
|
|
82
|
+
## Toolkit
|
|
83
|
+
|
|
84
|
+
Run what's installed; note what isn't so a human can decide whether to install it.
|
|
85
|
+
|
|
86
|
+
| Tool | Layer | What it checks |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `gitleaks detect` | 1 | secrets already committed to git history |
|
|
89
|
+
| `trufflehog` | 1 | verifies a found secret is still live before you page anyone |
|
|
90
|
+
| `npm audit` / `pip-audit` | 3 | known-vulnerable dependencies |
|
|
91
|
+
| `semgrep --config auto` | 3–4 | static analysis for injection, unsafe patterns |
|
|
92
|
+
| GitHub Secret Scanning + Push Protection | 1 | blocks a secret from ever reaching the remote |
|
|
93
|
+
|
|
94
|
+
## Severity
|
|
95
|
+
|
|
96
|
+
Hardcoded secrets, injection, and an auth bypass are CRITICAL — block the release. A BOLA/IDOR gap or an un-rate-limited auth endpoint is HIGH. A verbose error message or a missing rate limit is MEDIUM. Report every finding with file:line, not a vague "looks risky."
|
|
97
|
+
|
|
98
|
+
### validate-at-boundaries
|
|
99
|
+
|
|
100
|
+
Use when code receives data from outside its own module — user input, API responses, file contents, env vars, message payloads — validate it against a schema at the boundary and fail fast, so untrusted shapes never propagate inward.
|
|
101
|
+
|
|
102
|
+
# Validate at boundaries
|
|
103
|
+
|
|
104
|
+
Every place external data enters your system is a boundary: an HTTP handler, a file read, an API
|
|
105
|
+
response, an environment variable, a queue message. **Validate at the boundary, before the data
|
|
106
|
+
reaches any logic that assumes it is well-formed.** Inside the boundary, the value is trusted because
|
|
107
|
+
you already checked it — not because you hope it is right.
|
|
108
|
+
|
|
109
|
+
```ts
|
|
110
|
+
// At the boundary: parse into a known shape, or reject.
|
|
111
|
+
const parsed = OrderSchema.parse(await req.json()); // throws on bad shape
|
|
112
|
+
createOrder(parsed); // inner code trusts `parsed`
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Rules
|
|
116
|
+
|
|
117
|
+
- **One validator is the authority for each shape.** Route every entry point for that shape through
|
|
118
|
+
it — built-in, user-supplied, or machine-generated. Never hand-construct or trust an unvalidated
|
|
119
|
+
object further in.
|
|
120
|
+
- **Fail fast, name the field.** Reject the whole input on the first violation with a message that
|
|
121
|
+
says which field was wrong and why. A vague "invalid input" costs the caller a debugging session.
|
|
122
|
+
- **Parse, don't just check.** Return a typed value from validation so downstream code carries the
|
|
123
|
+
guarantee in its types, not just in a comment.
|
|
124
|
+
- **Never trust "internal" data blindly.** An API response or a sibling service's payload is external
|
|
125
|
+
to your module even if it's inside your company — validate it the same way.
|
|
126
|
+
|
|
127
|
+
## Why
|
|
128
|
+
|
|
129
|
+
Unvalidated data that flows inward turns a boundary problem into a deep-stack mystery: the crash
|
|
130
|
+
happens three layers down, far from the malformed input that caused it. Validation at the edge keeps
|
|
131
|
+
the failure where the bad data actually entered, where the error message can still be specific.
|
|
132
|
+
|
|
133
|
+
## Boundaries to cover
|
|
134
|
+
|
|
135
|
+
HTTP request bodies and query params · file and config contents · third-party API responses ·
|
|
136
|
+
environment variables (validate presence and format at startup) · deserialized messages/events ·
|
|
137
|
+
anything read from a store you did not just write in the same transaction.
|