@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,241 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: finishing-a-development-branch
|
|
3
|
+
description: Use when implementation is complete, all tests pass, and you need to decide how to integrate the work - guides completion of development work by presenting structured options for merge, PR, or cleanup
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Finishing a Development Branch
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Guide completion of development work by presenting clear options and handling chosen workflow.
|
|
11
|
+
|
|
12
|
+
**Core principle:** Verify tests → Detect environment → Present options → Execute choice → Clean up.
|
|
13
|
+
|
|
14
|
+
**Announce at start:** "I'm using the finishing-a-development-branch skill to complete this work."
|
|
15
|
+
|
|
16
|
+
## The Process
|
|
17
|
+
|
|
18
|
+
### Step 1: Verify Tests
|
|
19
|
+
|
|
20
|
+
**Before presenting options, verify tests pass:**
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Run project's test suite
|
|
24
|
+
npm test / cargo test / pytest / go test ./...
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**If tests fail:**
|
|
28
|
+
```
|
|
29
|
+
Tests failing (<N> failures). Must fix before completing:
|
|
30
|
+
|
|
31
|
+
[Show failures]
|
|
32
|
+
|
|
33
|
+
Cannot proceed with merge/PR until tests pass.
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Stop. Don't proceed to Step 2.
|
|
37
|
+
|
|
38
|
+
**If tests pass:** Continue to Step 2.
|
|
39
|
+
|
|
40
|
+
### Step 2: Detect Environment
|
|
41
|
+
|
|
42
|
+
**Determine workspace state before presenting options:**
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
|
|
46
|
+
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
This determines which menu to show and how cleanup works:
|
|
50
|
+
|
|
51
|
+
| State | Menu | Cleanup |
|
|
52
|
+
|-------|------|---------|
|
|
53
|
+
| `GIT_DIR == GIT_COMMON` (normal repo) | Standard 4 options | No worktree to clean up |
|
|
54
|
+
| `GIT_DIR != GIT_COMMON`, named branch | Standard 4 options | Provenance-based (see Step 6) |
|
|
55
|
+
| `GIT_DIR != GIT_COMMON`, detached HEAD | Reduced 3 options (no merge) | No cleanup (externally managed) |
|
|
56
|
+
|
|
57
|
+
### Step 3: Determine Base Branch
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Try common base branches
|
|
61
|
+
git merge-base HEAD main 2>/dev/null || git merge-base HEAD master 2>/dev/null
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Or ask: "This branch split from main - is that correct?"
|
|
65
|
+
|
|
66
|
+
### Step 4: Present Options
|
|
67
|
+
|
|
68
|
+
**Normal repo and named-branch worktree — present exactly these 4 options:**
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Implementation complete. What would you like to do?
|
|
72
|
+
|
|
73
|
+
1. Merge back to <base-branch> locally
|
|
74
|
+
2. Push and create a Pull Request
|
|
75
|
+
3. Keep the branch as-is (I'll handle it later)
|
|
76
|
+
4. Discard this work
|
|
77
|
+
|
|
78
|
+
Which option?
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Detached HEAD — present exactly these 3 options:**
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
Implementation complete. You're on a detached HEAD (externally managed workspace).
|
|
85
|
+
|
|
86
|
+
1. Push as new branch and create a Pull Request
|
|
87
|
+
2. Keep as-is (I'll handle it later)
|
|
88
|
+
3. Discard this work
|
|
89
|
+
|
|
90
|
+
Which option?
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**Don't add explanation** - keep options concise.
|
|
94
|
+
|
|
95
|
+
### Step 5: Execute Choice
|
|
96
|
+
|
|
97
|
+
#### Option 1: Merge Locally
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Get main repo root for CWD safety
|
|
101
|
+
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
|
102
|
+
cd "$MAIN_ROOT"
|
|
103
|
+
|
|
104
|
+
# Merge first — verify success before removing anything
|
|
105
|
+
git checkout <base-branch>
|
|
106
|
+
git pull
|
|
107
|
+
git merge <feature-branch>
|
|
108
|
+
|
|
109
|
+
# Verify tests on merged result
|
|
110
|
+
<test command>
|
|
111
|
+
|
|
112
|
+
# Only after merge succeeds: cleanup worktree (Step 6), then delete branch
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Then: Cleanup worktree (Step 6), then delete branch:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
git branch -d <feature-branch>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Option 2: Push and Create PR
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
# Push branch
|
|
125
|
+
git push -u origin <feature-branch>
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Do NOT clean up worktree** — user needs it alive to iterate on PR feedback.
|
|
129
|
+
|
|
130
|
+
#### Option 3: Keep As-Is
|
|
131
|
+
|
|
132
|
+
Report: "Keeping branch <name>. Worktree preserved at <path>."
|
|
133
|
+
|
|
134
|
+
**Don't cleanup worktree.**
|
|
135
|
+
|
|
136
|
+
#### Option 4: Discard
|
|
137
|
+
|
|
138
|
+
**Confirm first:**
|
|
139
|
+
```
|
|
140
|
+
This will permanently delete:
|
|
141
|
+
- Branch <name>
|
|
142
|
+
- All commits: <commit-list>
|
|
143
|
+
- Worktree at <path>
|
|
144
|
+
|
|
145
|
+
Type 'discard' to confirm.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Wait for exact confirmation.
|
|
149
|
+
|
|
150
|
+
If confirmed:
|
|
151
|
+
```bash
|
|
152
|
+
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
|
153
|
+
cd "$MAIN_ROOT"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Then: Cleanup worktree (Step 6), then force-delete branch:
|
|
157
|
+
```bash
|
|
158
|
+
git branch -D <feature-branch>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
### Step 6: Cleanup Workspace
|
|
162
|
+
|
|
163
|
+
**Only runs for Options 1 and 4.** Options 2 and 3 always preserve the worktree.
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
GIT_DIR=$(cd "$(git rev-parse --git-dir)" 2>/dev/null && pwd -P)
|
|
167
|
+
GIT_COMMON=$(cd "$(git rev-parse --git-common-dir)" 2>/dev/null && pwd -P)
|
|
168
|
+
WORKTREE_PATH=$(git rev-parse --show-toplevel)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
**If `GIT_DIR == GIT_COMMON`:** Normal repo, no worktree to clean up. Done.
|
|
172
|
+
|
|
173
|
+
**If worktree path is under `.worktrees/` or `worktrees/`:** Superpowers created this worktree — we own cleanup.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
MAIN_ROOT=$(git -C "$(git rev-parse --git-common-dir)/.." rev-parse --show-toplevel)
|
|
177
|
+
cd "$MAIN_ROOT"
|
|
178
|
+
git worktree remove "$WORKTREE_PATH"
|
|
179
|
+
git worktree prune # Self-healing: clean up any stale registrations
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Otherwise:** The host environment (harness) owns this workspace. Do NOT remove it. If your platform provides a workspace-exit tool, use it. Otherwise, leave the workspace in place.
|
|
183
|
+
|
|
184
|
+
## Quick Reference
|
|
185
|
+
|
|
186
|
+
| Option | Merge | Push | Keep Worktree | Cleanup Branch |
|
|
187
|
+
|--------|-------|------|---------------|----------------|
|
|
188
|
+
| 1. Merge locally | yes | - | - | yes |
|
|
189
|
+
| 2. Create PR | - | yes | yes | - |
|
|
190
|
+
| 3. Keep as-is | - | - | yes | - |
|
|
191
|
+
| 4. Discard | - | - | - | yes (force) |
|
|
192
|
+
|
|
193
|
+
## Common Mistakes
|
|
194
|
+
|
|
195
|
+
**Skipping test verification**
|
|
196
|
+
- **Problem:** Merge broken code, create failing PR
|
|
197
|
+
- **Fix:** Always verify tests before offering options
|
|
198
|
+
|
|
199
|
+
**Open-ended questions**
|
|
200
|
+
- **Problem:** "What should I do next?" is ambiguous
|
|
201
|
+
- **Fix:** Present exactly 4 structured options (or 3 for detached HEAD)
|
|
202
|
+
|
|
203
|
+
**Cleaning up worktree for Option 2**
|
|
204
|
+
- **Problem:** Remove worktree user needs for PR iteration
|
|
205
|
+
- **Fix:** Only cleanup for Options 1 and 4
|
|
206
|
+
|
|
207
|
+
**Deleting branch before removing worktree**
|
|
208
|
+
- **Problem:** `git branch -d` fails because worktree still references the branch
|
|
209
|
+
- **Fix:** Merge first, remove worktree, then delete branch
|
|
210
|
+
|
|
211
|
+
**Running git worktree remove from inside the worktree**
|
|
212
|
+
- **Problem:** Command fails silently when CWD is inside the worktree being removed
|
|
213
|
+
- **Fix:** Always `cd` to main repo root before `git worktree remove`
|
|
214
|
+
|
|
215
|
+
**Cleaning up harness-owned worktrees**
|
|
216
|
+
- **Problem:** Removing a worktree the harness created causes phantom state
|
|
217
|
+
- **Fix:** Only clean up worktrees under `.worktrees/` or `worktrees/`
|
|
218
|
+
|
|
219
|
+
**No confirmation for discard**
|
|
220
|
+
- **Problem:** Accidentally delete work
|
|
221
|
+
- **Fix:** Require typed "discard" confirmation
|
|
222
|
+
|
|
223
|
+
## Red Flags
|
|
224
|
+
|
|
225
|
+
**Never:**
|
|
226
|
+
- Proceed with failing tests
|
|
227
|
+
- Merge without verifying tests on result
|
|
228
|
+
- Delete work without confirmation
|
|
229
|
+
- Force-push without explicit request
|
|
230
|
+
- Remove a worktree before confirming merge success
|
|
231
|
+
- Clean up worktrees you didn't create (provenance check)
|
|
232
|
+
- Run `git worktree remove` from inside the worktree
|
|
233
|
+
|
|
234
|
+
**Always:**
|
|
235
|
+
- Verify tests before offering options
|
|
236
|
+
- Detect environment before presenting menu
|
|
237
|
+
- Present exactly 4 options (or 3 for detached HEAD)
|
|
238
|
+
- Get typed confirmation for Option 4
|
|
239
|
+
- Clean up worktree for Options 1 & 4 only
|
|
240
|
+
- `cd` to main repo root before worktree removal
|
|
241
|
+
- Run `git worktree prune` after removal
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# First-party skills
|
|
2
|
+
|
|
3
|
+
Baselane-authored skills, distributed alongside the imported third-party seed catalog.
|
|
4
|
+
|
|
5
|
+
Unlike the rest of `skills/` — which `scripts/import-skills.ts` fetches from upstream repos and
|
|
6
|
+
**wipes and rebuilds on every re-import** — everything under this `first-party/` directory is
|
|
7
|
+
hand-authored and version-controlled here. `resetFetchedArea()` in the import script preserves this
|
|
8
|
+
subtree, so re-running the fetch never clobbers it.
|
|
9
|
+
|
|
10
|
+
## Layout
|
|
11
|
+
|
|
12
|
+
```
|
|
13
|
+
first-party/
|
|
14
|
+
manifest.json # [{ name, category }] — the skills to load, in catalog order
|
|
15
|
+
<skill-name>/SKILL.md # one dir per skill; standard agentskills.io SKILL.md (frontmatter + body)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Conventions
|
|
19
|
+
|
|
20
|
+
- **No `attribution`.** First-party skills are ours; they carry no third-party licence notice and no
|
|
21
|
+
`LICENSE` file. `loadSeedSkills` tags them `source: "baselane"` (`FIRST_PARTY_SOURCE`), which drives
|
|
22
|
+
the catalog's first-party/third-party filter.
|
|
23
|
+
- **Must pass `validateSkill`** — slug name, single-line description (≤1024 chars), body ≤500 lines.
|
|
24
|
+
- **`category`** is one of the phase slugs (`plan` / `write` / `debug` / `review` / `ship`) or any
|
|
25
|
+
custom org category; it is baselane-side taxonomy and is never written into SKILL.md frontmatter.
|
|
26
|
+
|
|
27
|
+
## Adding a skill
|
|
28
|
+
|
|
29
|
+
1. Create `first-party/<name>/SKILL.md`.
|
|
30
|
+
2. Add `{ "name": "<name>", "category": "<phase>" }` to `manifest.json`.
|
|
31
|
+
3. `loadSeedSkills()` picks it up automatically — it becomes catalog-visible, importable, and
|
|
32
|
+
overlap-detectable with no further wiring.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: append-only-jsonl-stores
|
|
3
|
+
description: Use when building a simple durable store without a database — persist each change as a new JSON line appended to a .jsonl file, fold latest-record-per-id on read, and never rewrite a line in place.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Append-only JSONL stores
|
|
7
|
+
|
|
8
|
+
For modest persistence needs, a database is often overkill. An append-only JSON-Lines file — one
|
|
9
|
+
JSON object per line — gives you durable, debuggable, dependency-free storage. **Updating a record
|
|
10
|
+
means appending a new line with the changed fields; you never rewrite or delete an existing line.**
|
|
11
|
+
|
|
12
|
+
## The pattern
|
|
13
|
+
|
|
14
|
+
- **Write:** serialize the record to one line, `appendFile` it. Never open-truncate-rewrite.
|
|
15
|
+
- **Read:** stream the file top to bottom, `JSON.parse` each line, and **fold latest-record-per-id
|
|
16
|
+
wins** — a later line for the same id supersedes the earlier one.
|
|
17
|
+
- **Delete:** append a tombstone (e.g. `{ id, deleted: true }`); the fold treats it as "gone."
|
|
18
|
+
- **Malformed line:** skip it and keep going. A half-written trailing line from a crash must not
|
|
19
|
+
break every future read.
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// update = append a new line, not mutate the old one
|
|
23
|
+
await appendFile(path, JSON.stringify({ id, ...changes }) + "\n");
|
|
24
|
+
|
|
25
|
+
// read = fold latest-per-id
|
|
26
|
+
const byId = new Map();
|
|
27
|
+
for (const line of (await readFile(path, "utf8")).split("\n")) {
|
|
28
|
+
if (!line.trim()) continue;
|
|
29
|
+
try { const r = JSON.parse(line); byId.set(r.id, r); } catch { /* skip malformed */ }
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Why append-only
|
|
34
|
+
|
|
35
|
+
- **Crash-safe writes.** Appending never corrupts existing data; the worst case is one torn trailing
|
|
36
|
+
line, which the reader skips.
|
|
37
|
+
- **Free audit history.** Every version of every record is still on disk, in order — invaluable for
|
|
38
|
+
debugging "how did this get into that state?".
|
|
39
|
+
- **Immutability by construction.** Records are never mutated in place, so a reader mid-fold can
|
|
40
|
+
never observe a half-updated record.
|
|
41
|
+
|
|
42
|
+
## Trade-offs and remedies
|
|
43
|
+
|
|
44
|
+
- **File grows unbounded.** Periodically **compact**: read, fold to latest-per-id, and rewrite a
|
|
45
|
+
fresh file atomically (write to a temp path, then rename). Compaction is the *only* time you
|
|
46
|
+
rewrite — and it produces a new file rather than editing lines.
|
|
47
|
+
- **Whole-file read on load.** Fine up to tens of thousands of records; past that, reach for a real
|
|
48
|
+
database. This pattern is for the small-to-medium tier, not for high write throughput.
|
|
49
|
+
- **No cross-record transactions.** If you need multi-record atomicity or rich queries, this is the
|
|
50
|
+
wrong tool.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: golden-snapshot-discipline
|
|
3
|
+
description: Use when a code path has committed golden/snapshot output — treat a snapshot diff as a signal, review it before regenerating, and update the golden only when the change in output is intentional.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Golden snapshot discipline
|
|
7
|
+
|
|
8
|
+
A golden snapshot is committed expected output — rendered files, serialized structures, generated
|
|
9
|
+
text — that a test compares byte-for-byte against what the code produces now. Its whole value is
|
|
10
|
+
that **an unintended change to output shows up as a failing diff.** Regenerating snapshots
|
|
11
|
+
reflexively to make the test pass throws that value away.
|
|
12
|
+
|
|
13
|
+
## The rule
|
|
14
|
+
|
|
15
|
+
- **A snapshot diff is a question, not a chore.** When a golden test fails, read the diff first. Did
|
|
16
|
+
*this* change intend to alter that output?
|
|
17
|
+
- **Intended change → update the golden in the same commit,** so the diff is reviewable alongside the
|
|
18
|
+
code that caused it. The reviewer sees both the cause and the effect.
|
|
19
|
+
- **Unintended change → you found a bug.** Fix the code; do not update the golden. The snapshot just
|
|
20
|
+
did its job.
|
|
21
|
+
- **Never regenerate blindly.** `--update`-ing every snapshot to get green is how a real regression
|
|
22
|
+
silently becomes the new "expected."
|
|
23
|
+
|
|
24
|
+
## Workflow
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
1. Run the tests → a golden fails.
|
|
28
|
+
2. Read the diff. Is every changed byte something this change was supposed to do?
|
|
29
|
+
- YES → regenerate the golden, commit code + golden together, call out the output change.
|
|
30
|
+
- NO → stop. The code is wrong. Fix it; the golden stays.
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Why this matters
|
|
34
|
+
|
|
35
|
+
- **Catches action-at-a-distance.** A refactor "far away" from the output path that nonetheless
|
|
36
|
+
shifts a byte is exactly what goldens exist to surface.
|
|
37
|
+
- **Makes output changes explicit and reviewed.** A golden update in a diff is a visible,
|
|
38
|
+
human-approved statement: "yes, the output changed, on purpose, this way."
|
|
39
|
+
|
|
40
|
+
## Authoring goldens that stay useful
|
|
41
|
+
|
|
42
|
+
- Keep them **deterministic** — sort keys, pin timestamps/versions/random seeds, normalize line
|
|
43
|
+
endings — so a passing test means "output is correct," not "output happened to match today."
|
|
44
|
+
- Keep them **readable** — a golden a human can eyeball makes review of its diffs meaningful.
|
|
45
|
+
- Scope them tightly — one golden per unit of output, so a failure points at what changed.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: immutable-updates
|
|
3
|
+
description: Use when updating objects, arrays, or records in application code — return a new copy with the change applied instead of mutating the original in place, to prevent hidden side effects and aliasing bugs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Immutable updates
|
|
7
|
+
|
|
8
|
+
When you change a value, **produce a new copy — never mutate the argument you were handed.** Shared
|
|
9
|
+
references mean an in-place mutation is a spooky-action-at-a-distance bug: some other holder of the
|
|
10
|
+
same object sees a change it never asked for.
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
// WRONG — mutates the caller's object
|
|
14
|
+
function rename(user, name) {
|
|
15
|
+
user.name = name;
|
|
16
|
+
return user;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// CORRECT — returns a new object, original untouched
|
|
20
|
+
function rename(user, name) {
|
|
21
|
+
return { ...user, name };
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Patterns
|
|
26
|
+
|
|
27
|
+
- **Object field:** `{ ...obj, field: value }`.
|
|
28
|
+
- **Nested field:** spread each level you touch — `{ ...obj, addr: { ...obj.addr, city } }`.
|
|
29
|
+
- **Array append/remove:** `[...list, item]`, `list.filter(x => x.id !== id)`,
|
|
30
|
+
`list.map(x => x.id === id ? { ...x, done: true } : x)` — not `push`/`splice`/index assignment.
|
|
31
|
+
- **Record update:** `{ ...map, [key]: value }` and `const { [key]: _drop, ...rest } = map` to remove.
|
|
32
|
+
|
|
33
|
+
## Why it pays off
|
|
34
|
+
|
|
35
|
+
- **No hidden side effects.** A function that returns a new value can't corrupt state its caller
|
|
36
|
+
still depends on. Behavior is a function of inputs, not of call order.
|
|
37
|
+
- **Debugging is local.** When a value is wrong, the mutation that produced it is the expression
|
|
38
|
+
that built it — not some distant `.sort()` or field write on a shared reference.
|
|
39
|
+
- **Safe concurrency and change-detection.** Referential equality (`prev !== next`) becomes a
|
|
40
|
+
reliable "did this change?" signal for caches, memoization, and UI diffing.
|
|
41
|
+
|
|
42
|
+
## When in-place is acceptable
|
|
43
|
+
|
|
44
|
+
A locally-scoped object that never escapes the function — a builder/accumulator you allocated and
|
|
45
|
+
return once — is fine to mutate. The rule protects values that are *shared*: arguments, fields on
|
|
46
|
+
long-lived state, anything another holder still references.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skills": [
|
|
3
|
+
{ "name": "ts-extension-imports", "category": "write" },
|
|
4
|
+
{ "name": "immutable-updates", "category": "write" },
|
|
5
|
+
{ "name": "append-only-jsonl-stores", "category": "write" },
|
|
6
|
+
{ "name": "zero-dependency-discipline", "category": "review" },
|
|
7
|
+
{ "name": "golden-snapshot-discipline", "category": "review" },
|
|
8
|
+
{ "name": "validate-at-boundaries", "category": "review" }
|
|
9
|
+
]
|
|
10
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ts-extension-imports
|
|
3
|
+
description: Use when writing or editing TypeScript in a no-build ESM repo that runs .ts sources directly under Node — every relative import must carry an explicit .ts extension, or Node's resolver fails to find the file at runtime.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TypeScript `.ts`-extension imports
|
|
7
|
+
|
|
8
|
+
Some TypeScript projects have **no build step**: packages are consumed directly as `.ts` sources
|
|
9
|
+
over ESM, run by Node (≥24) with `--experimental-transform-types` semantics. There is no transpile
|
|
10
|
+
pass and no emitted `.js`. In that setup one rule is load-bearing:
|
|
11
|
+
|
|
12
|
+
**Every relative import must carry its explicit `.ts` extension.**
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
// CORRECT — the path resolves to a file that exists on disk
|
|
16
|
+
import { validatePack } from "./validate.ts";
|
|
17
|
+
import type { WorkflowPack } from "../types.ts";
|
|
18
|
+
|
|
19
|
+
// WRONG — extensionless: works with a bundler, but Node's ESM resolver won't guess ".ts"
|
|
20
|
+
import { validatePack } from "./validate";
|
|
21
|
+
|
|
22
|
+
// WRONG — ".js": there is no emitted .js in this tree, so this points at nothing
|
|
23
|
+
import { validatePack } from "./validate.js";
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Why
|
|
27
|
+
|
|
28
|
+
- Node's ESM loader resolves the specifier you write, **verbatim**. It does not try appending
|
|
29
|
+
extensions the way a bundler does. An extensionless or `.js` specifier names a file that isn't
|
|
30
|
+
on disk, and the import throws `ERR_MODULE_NOT_FOUND` at runtime — not at build time, because
|
|
31
|
+
there is no build.
|
|
32
|
+
- The extension is part of the module's identity here, not decoration.
|
|
33
|
+
|
|
34
|
+
## What this rule does **not** change
|
|
35
|
+
|
|
36
|
+
- **Bare package specifiers stay bare.** `import { readFile } from "node:fs/promises"` and
|
|
37
|
+
`import { x } from "@scope/pkg"` have no extension — the rule is about *relative* paths (`./`,
|
|
38
|
+
`../`) only.
|
|
39
|
+
- **Type-only imports still need it.** `import type { Foo } from "./foo.ts"`. The extension names
|
|
40
|
+
the file on disk; whether the import is erased at runtime is irrelevant to resolution.
|
|
41
|
+
- **Directory index imports.** Prefer naming the file explicitly (`./index.ts`) rather than relying
|
|
42
|
+
on directory resolution, which ESM does not do without a package boundary.
|
|
43
|
+
|
|
44
|
+
## Before you save
|
|
45
|
+
|
|
46
|
+
- [ ] Every `from "./…"` / `from "../…"` ends in `.ts`.
|
|
47
|
+
- [ ] No `.js` extension in any relative import (there is no `.js` in this source tree).
|
|
48
|
+
- [ ] `node:*` and package specifiers left extensionless.
|
|
49
|
+
- [ ] Dynamic `import("./x.ts")` and re-exports (`export { y } from "./y.ts"`) carry `.ts` too.
|
|
@@ -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,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: zero-dependency-discipline
|
|
3
|
+
description: Use when tempted to add a third-party package — first check for a zero-dependency way using the platform and existing code, because most "we need a library" moments are solvable with a few lines and no new supply-chain risk.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Zero-dependency discipline
|
|
7
|
+
|
|
8
|
+
Before adding any third-party dependency, **prove you need it.** A new package is permanent
|
|
9
|
+
surface area: supply-chain risk, version churn, transitive bloat, and one more thing to audit. The
|
|
10
|
+
default answer to "should we pull in a library for this?" is "probably not — check first."
|
|
11
|
+
|
|
12
|
+
## The check, in order
|
|
13
|
+
|
|
14
|
+
1. **Does the platform already do it?** Modern runtimes ship a lot: `fetch`, `crypto`,
|
|
15
|
+
`structuredClone`, `Intl`, `URL`, streams, `node:*` modules. Reach here first.
|
|
16
|
+
2. **Do we already have it?** A helper, an existing dependency that covers the case, or a pattern
|
|
17
|
+
elsewhere in the codebase you can follow.
|
|
18
|
+
3. **Is it a few lines to write ourselves?** A slug function, a debounce, a small parser, an
|
|
19
|
+
env-var reader — vendoring 20 lines you understand beats importing 2,000 you don't.
|
|
20
|
+
4. **Only if all three fail:** consider a dependency — and then weigh maintenance, license, size,
|
|
21
|
+
and transitive count before committing.
|
|
22
|
+
|
|
23
|
+
## Worked example
|
|
24
|
+
|
|
25
|
+
An HTTP API integration does **not** require the vendor's SDK. Global `fetch` plus the documented
|
|
26
|
+
REST endpoints is usually the whole job — no SDK, no auth-helper package, no version-pinning dance.
|
|
27
|
+
The same holds for most "convenience" wrappers around things the platform already exposes.
|
|
28
|
+
|
|
29
|
+
## Why the bar is high
|
|
30
|
+
|
|
31
|
+
- **Supply chain.** Every dependency (and its transitive tree) is code you now run and must trust.
|
|
32
|
+
- **Longevity.** Zero-dep code doesn't break when an upstream maintainer ships a breaking major or
|
|
33
|
+
abandons the package.
|
|
34
|
+
- **Clarity.** Code you wrote is code you can read, debug, and change. A black-box import is not.
|
|
35
|
+
|
|
36
|
+
## When a dependency IS the right call
|
|
37
|
+
|
|
38
|
+
Genuinely hard, well-specified, security-sensitive problems — cryptography primitives, timezone
|
|
39
|
+
databases, complex parsers/compilers — are where a mature, audited library beats rolling your own.
|
|
40
|
+
The discipline is not "never add deps"; it's "don't add one until the platform, the codebase, and a
|
|
41
|
+
few honest lines have each failed to cover it."
|