@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,245 @@
|
|
|
1
|
+
// Methods that render real scaffolding today. `treesitter` and `embeddings` intentionally have
|
|
2
|
+
// no adapter yet — unlike graphify/aider/lsp/sourcegraph, there is no canonical local
|
|
3
|
+
// tree-sitter-symbols tool or embeddings-search tool wired up here yet, so both stay an honest
|
|
4
|
+
// "coming soon" (via render/capabilities.ts's generic fallback) rather than a fabricated one.
|
|
5
|
+
const REAL_METHODS = new Set(["imports", "graphify", "aider", "lsp", "sourcegraph"]);
|
|
6
|
+
/** `.baselane/graph/README.md` (repo) / `graph/README.md` (bundle) — the `imports` method protocol. */
|
|
7
|
+
const GRAPH_README = `# Graph protocol (method: imports)
|
|
8
|
+
|
|
9
|
+
A queryable map of this repo's module dependencies, generated by lexical import scanning — so an
|
|
10
|
+
agent can answer "what imports this" / "what does this import" from a file instead of guessing
|
|
11
|
+
from grep.
|
|
12
|
+
|
|
13
|
+
## Schema
|
|
14
|
+
|
|
15
|
+
\`\`\`json
|
|
16
|
+
{
|
|
17
|
+
"version": 1,
|
|
18
|
+
"generated": "<ISO 8601 timestamp>",
|
|
19
|
+
"nodes": [
|
|
20
|
+
{ "id": "<repo-relative-posix-path>", "kind": "module", "language": "<optional>" },
|
|
21
|
+
{ "id": "pkg:<name>", "kind": "external" }
|
|
22
|
+
],
|
|
23
|
+
"edges": [
|
|
24
|
+
{ "from": "<node id>", "to": "<node id>", "kind": "import", "confidence": "extracted" }
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
\`edges[].kind\` is one of \`import\`, \`require\`, or \`export-from\`.
|
|
30
|
+
|
|
31
|
+
## The query-before-grep rule
|
|
32
|
+
|
|
33
|
+
Before cross-module or refactoring work, consult \`.baselane/graph.json\` (or the human-readable
|
|
34
|
+
\`.baselane/graph/GRAPH.md\`) to answer what imports a file or what a file imports — do not reach
|
|
35
|
+
for grep first. The graph is generated from real import/require/export statements, so it is
|
|
36
|
+
authoritative for that question; grep is not (it also matches comments, strings, and unrelated
|
|
37
|
+
substrings).
|
|
38
|
+
|
|
39
|
+
## Regenerating
|
|
40
|
+
|
|
41
|
+
Run \`baselane graph .\` from the repo root whenever modules are added, removed, or moved. This
|
|
42
|
+
overwrites \`.baselane/graph.json\` and \`.baselane/graph/GRAPH.md\` in place — commit the refreshed
|
|
43
|
+
files alongside the change that caused them to go stale.
|
|
44
|
+
|
|
45
|
+
## Extracted vs inferred
|
|
46
|
+
|
|
47
|
+
Every edge here has \`confidence: "extracted"\` — it came from a direct lexical match, never a
|
|
48
|
+
guess. A future \`confidence: "inferred"\` tier is reserved for LLM-based enrichment (e.g. a
|
|
49
|
+
dependency that only shows up through dynamic dispatch); nothing in this repo fabricates an
|
|
50
|
+
inferred edge today.
|
|
51
|
+
`;
|
|
52
|
+
const GRAPH_COMMAND = {
|
|
53
|
+
name: "graph",
|
|
54
|
+
description: "Query the module dependency graph, or regenerate it after moving/adding modules.",
|
|
55
|
+
argument_hint: '<module path to query | "regenerate">',
|
|
56
|
+
prompt: "Follow the graph protocol in `.baselane/graph/README.md` for $ARGUMENTS. If this is a " +
|
|
57
|
+
"lookup, read `.baselane/graph.json` (or `.baselane/graph/GRAPH.md`) to answer what imports " +
|
|
58
|
+
"$ARGUMENTS or what $ARGUMENTS imports — do not grep for it. If $ARGUMENTS is " +
|
|
59
|
+
'"regenerate" (or modules were just added, removed, or moved), run `baselane graph .` from ' +
|
|
60
|
+
"the repo root and commit the refreshed `.baselane/graph.json` and `.baselane/graph/GRAPH.md`.",
|
|
61
|
+
};
|
|
62
|
+
const GRAPH_STOP_HOOK = {
|
|
63
|
+
event: "Stop",
|
|
64
|
+
matcher: "",
|
|
65
|
+
description: "Reminds the agent to regenerate the graph after adding or moving modules.",
|
|
66
|
+
action: "print-reminder",
|
|
67
|
+
message: "Before finishing, if you added, removed, or moved modules, regenerate the graph " +
|
|
68
|
+
"(`baselane graph .` for the imports method, or your configured adapter's own step) — " +
|
|
69
|
+
"see .baselane/graph/README.md.",
|
|
70
|
+
};
|
|
71
|
+
const GRAPHIFY_HOOK = {
|
|
72
|
+
event: "SessionStart",
|
|
73
|
+
matcher: "",
|
|
74
|
+
description: "Regenerates the graphify graph if the tool is installed; otherwise points at setup docs.",
|
|
75
|
+
action: "run-command",
|
|
76
|
+
command: 'command -v graphify >/dev/null 2>&1 && graphify build . || echo "graphify not installed — ' +
|
|
77
|
+
'see .baselane/graph/graphify/README.md for setup"',
|
|
78
|
+
};
|
|
79
|
+
/** The AGENTS.md capabilities-section note for a graph capability, regardless of store or method. */
|
|
80
|
+
export const GRAPH_AGENTS_NOTE = "### Graph\n\n" +
|
|
81
|
+
"`.baselane/graph.json` / `.baselane/graph/GRAPH.md` is a generated module-dependency graph — " +
|
|
82
|
+
"consult it before cross-module or refactoring work instead of grepping, and regenerate it via " +
|
|
83
|
+
"`baselane graph .` (or `/graph regenerate`) whenever modules are added, removed, or moved.";
|
|
84
|
+
const GRAPHIFY_README = `# Graph adapter: graphify
|
|
85
|
+
|
|
86
|
+
## Setup
|
|
87
|
+
|
|
88
|
+
Install graphify (check the tool's own install docs for the current command, e.g.
|
|
89
|
+
\`npm install -g graphify\` or \`pipx install graphify\`), then verify it's on PATH:
|
|
90
|
+
|
|
91
|
+
\`\`\`
|
|
92
|
+
graphify --version
|
|
93
|
+
\`\`\`
|
|
94
|
+
|
|
95
|
+
## Usage
|
|
96
|
+
|
|
97
|
+
Run \`graphify build .\` to produce graphify's own graph — it tags edges as \`EXTRACTED\` or
|
|
98
|
+
\`INFERRED\`, going beyond this repo's zero-dep lexical scan. If graphify exposes an MCP server,
|
|
99
|
+
prefer querying it directly over reading its graph.json by hand.
|
|
100
|
+
|
|
101
|
+
A hook in this pack already guards on availability so it never fails silently when the tool
|
|
102
|
+
isn't installed:
|
|
103
|
+
|
|
104
|
+
\`\`\`
|
|
105
|
+
command -v graphify >/dev/null 2>&1 && graphify build . || echo "graphify not installed — see this file for setup"
|
|
106
|
+
\`\`\`
|
|
107
|
+
|
|
108
|
+
## How this maps to the baselane protocol
|
|
109
|
+
|
|
110
|
+
Same rule as the \`imports\` method: consult the graph before cross-module changes, not grep.
|
|
111
|
+
graphify's \`EXTRACTED\`/\`INFERRED\` split lines up with this repo's \`confidence\` field — treat
|
|
112
|
+
\`INFERRED\` edges as lower-confidence hints, not ground truth.
|
|
113
|
+
`;
|
|
114
|
+
const AIDER_README = `# Graph adapter: aider
|
|
115
|
+
|
|
116
|
+
## Setup
|
|
117
|
+
|
|
118
|
+
Install aider: \`pip install aider-chat\` (or \`pipx install aider-chat\`). There is no separate
|
|
119
|
+
graph-build step — aider computes its repo map automatically each session.
|
|
120
|
+
|
|
121
|
+
## Usage
|
|
122
|
+
|
|
123
|
+
Aider ranks and includes a "repo map" (signatures plus a relevance ordering) in its own context
|
|
124
|
+
automatically; there is nothing to run to regenerate it. When working through aider specifically,
|
|
125
|
+
trust its repo map for "what's relevant to this file" instead of asking it to grep.
|
|
126
|
+
|
|
127
|
+
## How this maps to the baselane protocol
|
|
128
|
+
|
|
129
|
+
Aider's repo map answers the same question this repo's \`imports\` method answers ("what's
|
|
130
|
+
connected to what"), just scoped to aider's own session rather than a checked-in graph.json. If
|
|
131
|
+
this repo also has an \`imports\`-method graph checked in, prefer that as the durable,
|
|
132
|
+
tool-agnostic source of truth; use aider's repo map as a live supplement while working in aider.
|
|
133
|
+
`;
|
|
134
|
+
const LSP_README = `# Graph adapter: lsp (Serena MCP)
|
|
135
|
+
|
|
136
|
+
## Setup
|
|
137
|
+
|
|
138
|
+
This adapter wires up [Serena](https://github.com/oraios/serena), an MCP server that gives an
|
|
139
|
+
agent LSP-grade semantic navigation (find-references, go-to-definition, symbol search) instead of
|
|
140
|
+
a static graph file.
|
|
141
|
+
|
|
142
|
+
A ready-to-merge MCP server entry is scaffolded at \`.baselane/mcp/serena.json\`. Merge its
|
|
143
|
+
contents into this repo's \`.mcp.json\` under the top-level \`"mcpServers"\` key — **never
|
|
144
|
+
overwrite an existing \`.mcp.json\`**; add the \`"serena"\` key alongside whatever servers are
|
|
145
|
+
already configured there. If there is no \`.mcp.json\` yet, the scaffolded file's contents can be
|
|
146
|
+
used as the entire \`.mcp.json\` body.
|
|
147
|
+
|
|
148
|
+
## Usage
|
|
149
|
+
|
|
150
|
+
Once merged and the MCP connection is available, prefer Serena's semantic tools (references,
|
|
151
|
+
definitions, symbol search) over lexical grep for any "what calls this" / "what implements this"
|
|
152
|
+
question — it understands the language's actual structure, not just import statements.
|
|
153
|
+
|
|
154
|
+
## How this maps to the baselane protocol
|
|
155
|
+
|
|
156
|
+
Same query-before-grep rule as the \`imports\` method, but answered with live semantic queries
|
|
157
|
+
instead of a generated graph.json. The two are complementary: \`imports\` is a durable, checked-in
|
|
158
|
+
snapshot; Serena is a live, more precise, but session-only index.
|
|
159
|
+
`;
|
|
160
|
+
const SERENA_MCP_SNIPPET = JSON.stringify({
|
|
161
|
+
mcpServers: {
|
|
162
|
+
serena: {
|
|
163
|
+
command: "uvx",
|
|
164
|
+
args: ["--from", "git+https://github.com/oraios/serena", "serena-mcp-server"],
|
|
165
|
+
},
|
|
166
|
+
},
|
|
167
|
+
}, null, 2) + "\n";
|
|
168
|
+
const SOURCEGRAPH_README = `# Graph adapter: sourcegraph
|
|
169
|
+
|
|
170
|
+
## Setup
|
|
171
|
+
|
|
172
|
+
Install the Sourcegraph CLI (\`src\`) — see https://sourcegraph.com/docs/cli — then point it at
|
|
173
|
+
your instance:
|
|
174
|
+
|
|
175
|
+
\`\`\`
|
|
176
|
+
src login <your-sourcegraph-endpoint>
|
|
177
|
+
\`\`\`
|
|
178
|
+
|
|
179
|
+
(or set \`SRC_ENDPOINT\` / \`SRC_ACCESS_TOKEN\` in the environment instead of an interactive login).
|
|
180
|
+
|
|
181
|
+
## Usage
|
|
182
|
+
|
|
183
|
+
Use \`src search\` for cross-repo code search, and \`src api\` (or the GraphQL API directly) to ask
|
|
184
|
+
"what references this symbol" across every repo the instance indexes — not just this one.
|
|
185
|
+
|
|
186
|
+
## How this maps to the baselane protocol
|
|
187
|
+
|
|
188
|
+
Same query-before-grep rule as the \`imports\` method, scoped to an entire Sourcegraph instance
|
|
189
|
+
rather than one checked-out repo. Reach for this adapter specifically when the question spans
|
|
190
|
+
multiple repos; use \`imports\` (or another local adapter) for single-repo questions.
|
|
191
|
+
`;
|
|
192
|
+
function graphCapabilities(pack, store) {
|
|
193
|
+
return (pack.capabilities ?? []).filter((c) => c.type === "graph" && c.store === store && REAL_METHODS.has(c.method));
|
|
194
|
+
}
|
|
195
|
+
export function hasRepoGraphCapability(pack) {
|
|
196
|
+
return graphCapabilities(pack, "repo").length > 0;
|
|
197
|
+
}
|
|
198
|
+
export function hasOrgGraphCapability(pack) {
|
|
199
|
+
return graphCapabilities(pack, "org").length > 0;
|
|
200
|
+
}
|
|
201
|
+
/** Adds the /graph command + Stop-hook reminder (and, if configured, the graphify hook). */
|
|
202
|
+
export function withGraphScaffolding(pack) {
|
|
203
|
+
const hasGraphify = (pack.capabilities ?? []).some((c) => c.type === "graph" && c.method === "graphify");
|
|
204
|
+
return {
|
|
205
|
+
...pack,
|
|
206
|
+
commands: [...pack.commands, GRAPH_COMMAND],
|
|
207
|
+
hooks: [...pack.hooks, GRAPH_STOP_HOOK, ...(hasGraphify ? [GRAPHIFY_HOOK] : [])],
|
|
208
|
+
};
|
|
209
|
+
}
|
|
210
|
+
/** Files for one graph method, rooted at `baseDir` (`.baselane/graph` for repo, `graph` for bundle). */
|
|
211
|
+
function methodFiles(baseDir, method, isRepo) {
|
|
212
|
+
switch (method) {
|
|
213
|
+
case "imports":
|
|
214
|
+
return { [`${baseDir}/README.md`]: GRAPH_README };
|
|
215
|
+
case "graphify":
|
|
216
|
+
return { [`${baseDir}/graphify/README.md`]: GRAPHIFY_README };
|
|
217
|
+
case "aider":
|
|
218
|
+
return { [`${baseDir}/aider/README.md`]: AIDER_README };
|
|
219
|
+
case "lsp":
|
|
220
|
+
// The MCP snippet is repo-local by nature (it merges into this repo's own .mcp.json), so
|
|
221
|
+
// it's only rendered on the repo side, never into the laptop bundle.
|
|
222
|
+
return {
|
|
223
|
+
[`${baseDir}/lsp/README.md`]: LSP_README,
|
|
224
|
+
...(isRepo ? { ".baselane/mcp/serena.json": SERENA_MCP_SNIPPET } : {}),
|
|
225
|
+
};
|
|
226
|
+
case "sourcegraph":
|
|
227
|
+
return { [`${baseDir}/sourcegraph/README.md`]: SOURCEGRAPH_README };
|
|
228
|
+
default:
|
|
229
|
+
return {};
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
function renderGraphFilesFor(capabilities, baseDir, isRepo) {
|
|
233
|
+
const files = {};
|
|
234
|
+
for (const c of capabilities)
|
|
235
|
+
Object.assign(files, methodFiles(baseDir, c.method, isRepo));
|
|
236
|
+
return files;
|
|
237
|
+
}
|
|
238
|
+
/** `.baselane/graph/...` files, for every real-method repo-store graph capability the pack declares. */
|
|
239
|
+
export function renderRepoGraphFiles(pack) {
|
|
240
|
+
return renderGraphFilesFor(graphCapabilities(pack, "repo"), ".baselane/graph", true);
|
|
241
|
+
}
|
|
242
|
+
/** `graph/...` files in the laptop bundle, for every real-method org-store graph capability. */
|
|
243
|
+
export function renderBundleGraphFiles(pack) {
|
|
244
|
+
return renderGraphFilesFor(graphCapabilities(pack, "org"), "graph", false);
|
|
245
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { FileMap, WorkflowPack } from "../types.ts";
|
|
2
|
+
/** The AGENTS.md capabilities-section note for a memory+files capability, regardless of store. */
|
|
3
|
+
export declare const MEMORY_AGENTS_NOTE: string;
|
|
4
|
+
export declare const MEMORY_NATIVE_AGENTS_NOTE: string;
|
|
5
|
+
export declare const MEMORY_CLAUDE_MEM_AGENTS_NOTE: string;
|
|
6
|
+
export declare const MEMORY_VECTOR_AGENTS_NOTE: string;
|
|
7
|
+
export declare const MEMORY_LETTA_AGENTS_NOTE: string;
|
|
8
|
+
/** Despite the name — kept for compatibility with the existing gate call sites in
|
|
9
|
+
* render-pack.ts/bundle.ts/capabilities.ts — this now guards `withMemoryScaffolding` for every
|
|
10
|
+
* wired-up memory method in the repo store, not `files` alone. */
|
|
11
|
+
export declare function hasRepoMemoryFiles(pack: WorkflowPack): boolean;
|
|
12
|
+
/** Org-store counterpart of {@link hasRepoMemoryFiles}. */
|
|
13
|
+
export declare function hasOrgMemoryFiles(pack: WorkflowPack): boolean;
|
|
14
|
+
/** #9: `MEMORY_AGENTS_NOTE` describes the `files` method specifically (`.baselane/memory/`,
|
|
15
|
+
* `/remember`). Unlike {@link hasRepoMemoryFiles} (which gates scaffolding for ANY memory method),
|
|
16
|
+
* this gates only that note — so a native/vector/letta/claude-mem pack isn't handed a note pointing
|
|
17
|
+
* at a `.baselane/memory/` path it never created. */
|
|
18
|
+
export declare function hasRepoMemoryFilesMethod(pack: WorkflowPack): boolean;
|
|
19
|
+
/** #9: narrow, note-only gates for each sibling method — same rationale as
|
|
20
|
+
* {@link hasRepoMemoryFilesMethod} above, one per method so each note is only shown when its own
|
|
21
|
+
* method is actually present. */
|
|
22
|
+
export declare function hasRepoMemoryNativeMethod(pack: WorkflowPack): boolean;
|
|
23
|
+
export declare function hasRepoMemoryClaudeMemMethod(pack: WorkflowPack): boolean;
|
|
24
|
+
export declare function hasRepoMemoryVectorMethod(pack: WorkflowPack): boolean;
|
|
25
|
+
export declare function hasRepoMemoryLettaMethod(pack: WorkflowPack): boolean;
|
|
26
|
+
/** Adds the present memory method(s)' command(s) + Stop-hook reminder(s) for one store to a
|
|
27
|
+
* pack, without disturbing what it already declares. `store` defaults to "repo" for
|
|
28
|
+
* compatibility with pre-multi-method call sites; render-pack.ts passes "repo" and bundle.ts
|
|
29
|
+
* passes "org" explicitly so a method declared in one store never leaks scaffolding into the
|
|
30
|
+
* other's file map. */
|
|
31
|
+
export declare function withMemoryScaffolding(pack: WorkflowPack, store?: "org" | "repo"): WorkflowPack;
|
|
32
|
+
/** `.baselane/memory/...`, for whichever repo-store memory methods the pack declares. */
|
|
33
|
+
export declare function renderRepoMemoryFiles(pack: WorkflowPack): FileMap;
|
|
34
|
+
/** `memory/...` in the laptop bundle, for whichever org-store memory methods the pack declares. */
|
|
35
|
+
export declare function renderBundleMemoryFiles(pack: WorkflowPack): FileMap;
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
/** `.baselane/memory/README.md` (repo) / `memory/README.md` (bundle) — same body either way. */
|
|
2
|
+
const MEMORY_README = `# Memory protocol
|
|
3
|
+
|
|
4
|
+
This directory holds durable facts the AI has learned while working on this project —
|
|
5
|
+
one fact per file, plus an index. Consult the index before acting; add a fact after
|
|
6
|
+
learning something durable (a decision, a correction, a constraint that isn't obvious
|
|
7
|
+
from the code).
|
|
8
|
+
|
|
9
|
+
## Format
|
|
10
|
+
|
|
11
|
+
Each fact is a single markdown file with simple frontmatter:
|
|
12
|
+
|
|
13
|
+
\`\`\`markdown
|
|
14
|
+
---
|
|
15
|
+
name: <short-kebab-case-slug>
|
|
16
|
+
description: <one-line summary — used to decide relevance during recall>
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
<the fact, in a sentence or two.>
|
|
20
|
+
\`\`\`
|
|
21
|
+
|
|
22
|
+
## Index
|
|
23
|
+
|
|
24
|
+
\`MEMORY.md\` in this directory lists every fact, one line per file, so the index alone
|
|
25
|
+
can be scanned without opening each one:
|
|
26
|
+
|
|
27
|
+
\`\`\`markdown
|
|
28
|
+
- [Title](file.md) — one-line hook
|
|
29
|
+
\`\`\`
|
|
30
|
+
|
|
31
|
+
## Rule
|
|
32
|
+
|
|
33
|
+
- Consult \`MEMORY.md\` before acting — recall what's already known.
|
|
34
|
+
- After learning something durable, write a new fact file and add a line to
|
|
35
|
+
\`MEMORY.md\`. Use \`/remember <fact>\` to do both in one step.
|
|
36
|
+
`;
|
|
37
|
+
const REMEMBER_COMMAND = {
|
|
38
|
+
name: "remember",
|
|
39
|
+
description: "Append a durable fact to .baselane/memory/ and update its index.",
|
|
40
|
+
argument_hint: "<fact>",
|
|
41
|
+
prompt: "Write $ARGUMENTS as a new fact file under `.baselane/memory/` (kebab-case name, " +
|
|
42
|
+
"frontmatter with `name` and `description`, then the fact itself). Then add a " +
|
|
43
|
+
"one-line entry for it to `.baselane/memory/MEMORY.md` (create the index if it " +
|
|
44
|
+
"doesn't exist yet). Keep the fact to one durable, non-obvious sentence or two.",
|
|
45
|
+
};
|
|
46
|
+
const MEMORY_STOP_HOOK = {
|
|
47
|
+
event: "Stop",
|
|
48
|
+
matcher: "",
|
|
49
|
+
description: "Reminds the agent to capture durable decisions to memory before ending the session.",
|
|
50
|
+
action: "print-reminder",
|
|
51
|
+
message: "Before finishing, capture any durable decisions or facts from this session to " +
|
|
52
|
+
".baselane/memory/ (use /remember) and update its MEMORY.md index.",
|
|
53
|
+
};
|
|
54
|
+
/** `.baselane/memory/native/README.md` (repo) / `memory/native/README.md` (bundle) — native Claude Code memory. */
|
|
55
|
+
const NATIVE_MEMORY_README = `# Memory adapter: native (Claude Code)
|
|
56
|
+
|
|
57
|
+
This project uses Claude Code's own built-in persistent memory instead of an in-repo
|
|
58
|
+
\`.baselane/memory/\` store. Facts live under \`~/.claude/projects/<project>/memory/\` on the
|
|
59
|
+
machine running the agent — one fact per file, plus a \`MEMORY.md\` index — and are recalled
|
|
60
|
+
automatically at the start of a session.
|
|
61
|
+
|
|
62
|
+
## Setup
|
|
63
|
+
|
|
64
|
+
No install step: native memory ships with Claude Code itself. There is nothing to add to
|
|
65
|
+
\`.mcp.json\` and no package to install.
|
|
66
|
+
|
|
67
|
+
## Usage
|
|
68
|
+
|
|
69
|
+
- **Save a fact fast:** type \`# <fact>\` at the start of a chat message. Claude Code writes
|
|
70
|
+
it straight to the memory directory with frontmatter (\`name\`, \`description\`) and appends
|
|
71
|
+
a line to \`MEMORY.md\` — no extra step needed.
|
|
72
|
+
- **Save a fact deliberately:** ask the agent to write a new file under
|
|
73
|
+
\`~/.claude/projects/<project>/memory/\` with the same one-fact-per-file, frontmatter +
|
|
74
|
+
index convention, for facts that need more than a sentence.
|
|
75
|
+
- **CLAUDE.md memory hierarchy:** \`CLAUDE.md\` (project) and \`~/.claude/CLAUDE.md\` (user,
|
|
76
|
+
global across all projects) are read every session and take precedence for standing
|
|
77
|
+
instructions; the memory directory is for facts learned *during* work, not standing
|
|
78
|
+
preferences — put those in \`CLAUDE.md\` instead.
|
|
79
|
+
- **Recall:** memories relevant to the current work surface automatically; \`MEMORY.md\` can
|
|
80
|
+
also be read directly for the full index.
|
|
81
|
+
|
|
82
|
+
## How this maps to the baselane protocol
|
|
83
|
+
|
|
84
|
+
Native memory replaces \`.baselane/memory/README.md\` + \`MEMORY.md\` — Claude Code manages the
|
|
85
|
+
store itself, so there is no separate baselane-owned directory to keep in sync. Org-store
|
|
86
|
+
sync (pushing memory to a shared org-level store) does not apply to this method: native
|
|
87
|
+
memory is entirely tool-managed and local to the machine, so declaring it at \`org\` scope
|
|
88
|
+
only documents that fact rather than provisioning any additional sync.
|
|
89
|
+
`;
|
|
90
|
+
const NATIVE_REMEMBER_COMMAND = {
|
|
91
|
+
name: "remember",
|
|
92
|
+
description: "Save a durable fact to Claude Code's native memory.",
|
|
93
|
+
argument_hint: "<fact>",
|
|
94
|
+
prompt: "Save $ARGUMENTS as a durable fact using Claude Code's native memory: write it as a " +
|
|
95
|
+
"new file under `~/.claude/projects/<project>/memory/` with frontmatter (`name`, " +
|
|
96
|
+
"`description`) and the fact itself, then add a one-line entry to that directory's " +
|
|
97
|
+
"`MEMORY.md` index. For a short fact, the `# <fact>` chat shortcut does both steps in " +
|
|
98
|
+
"one. Keep the fact to one durable, non-obvious sentence or two.",
|
|
99
|
+
};
|
|
100
|
+
const NATIVE_STOP_HOOK = {
|
|
101
|
+
event: "Stop",
|
|
102
|
+
matcher: "",
|
|
103
|
+
description: "Reminds the agent to capture durable decisions to native memory before ending the session.",
|
|
104
|
+
action: "print-reminder",
|
|
105
|
+
message: "Before finishing, capture any durable decisions or facts from this session to " +
|
|
106
|
+
"Claude Code's native memory (use `# <fact>` or /remember).",
|
|
107
|
+
};
|
|
108
|
+
/** `.baselane/memory/claude-mem/README.md` (repo) / `memory/claude-mem/README.md` (bundle) — claude-mem. */
|
|
109
|
+
const CLAUDE_MEM_README = `# Memory adapter: claude-mem
|
|
110
|
+
|
|
111
|
+
This project uses \`claude-mem\` for durable memory: a companion tool that captures Claude
|
|
112
|
+
Code session transcripts, compresses them into semantic summaries, and stores them locally
|
|
113
|
+
so future sessions can search past decisions instead of re-deriving them.
|
|
114
|
+
|
|
115
|
+
## Setup
|
|
116
|
+
|
|
117
|
+
\`\`\`bash
|
|
118
|
+
npm install -g claude-mem
|
|
119
|
+
claude-mem install
|
|
120
|
+
\`\`\`
|
|
121
|
+
|
|
122
|
+
\`claude-mem install\` wires its own hooks into this project's Claude Code configuration —
|
|
123
|
+
it does not touch or replace any hooks already declared by this pack; both run.
|
|
124
|
+
|
|
125
|
+
## Usage
|
|
126
|
+
|
|
127
|
+
- Memory capture happens automatically at the end of a session (or compaction) via the
|
|
128
|
+
installed hooks — no manual save step for ordinary work.
|
|
129
|
+
- To inspect what has been stored, search the local memory store from the CLI:
|
|
130
|
+
\`claude-mem search "<topic>"\` lists past compressed summaries relevant to a query.
|
|
131
|
+
- Captures are compressed, not raw transcripts — expect a short summary of the decision or
|
|
132
|
+
fact, not the full conversation.
|
|
133
|
+
|
|
134
|
+
## How this maps to the baselane protocol
|
|
135
|
+
|
|
136
|
+
\`claude-mem\`'s captured-and-compressed summaries are the equivalent of a
|
|
137
|
+
\`.baselane/memory/\` fact file: durable, one-topic, written after learning something. The
|
|
138
|
+
read-before/write-after loop still applies — search claude-mem's store for relevant context
|
|
139
|
+
before acting, and let its Stop-time hook capture what changed after.
|
|
140
|
+
`;
|
|
141
|
+
const CLAUDE_MEM_STOP_HOOK = {
|
|
142
|
+
event: "Stop",
|
|
143
|
+
matcher: "",
|
|
144
|
+
description: "Confirms claude-mem is installed and available to capture this session's memory.",
|
|
145
|
+
action: "run-command",
|
|
146
|
+
command: 'command -v claude-mem >/dev/null 2>&1 && echo "claude-mem will capture this session\'s memory automatically." || echo "claude-mem not installed — see .baselane/memory/claude-mem/README.md for setup (npm install -g claude-mem && claude-mem install)"',
|
|
147
|
+
};
|
|
148
|
+
/** `.baselane/memory/vector/README.md` (repo) / `memory/vector/README.md` (bundle) — mem0 vector memory. */
|
|
149
|
+
const VECTOR_README = `# Memory adapter: vector (mem0)
|
|
150
|
+
|
|
151
|
+
This project uses mem0 for durable memory: facts are embedded and stored in a vector store,
|
|
152
|
+
then recalled by semantic similarity rather than an exact filename or index lookup.
|
|
153
|
+
|
|
154
|
+
## Setup
|
|
155
|
+
|
|
156
|
+
\`\`\`bash
|
|
157
|
+
pip install mem0ai
|
|
158
|
+
export MEM0_API_KEY=<your-key> # or configure a self-hosted vector store per mem0's docs
|
|
159
|
+
\`\`\`
|
|
160
|
+
|
|
161
|
+
## Usage
|
|
162
|
+
|
|
163
|
+
\`\`\`python
|
|
164
|
+
from mem0 import Memory
|
|
165
|
+
m = Memory()
|
|
166
|
+
|
|
167
|
+
# recall — read before acting
|
|
168
|
+
relevant = m.search(query="<what you're about to do>", user_id="<project-or-agent-id>")
|
|
169
|
+
|
|
170
|
+
# write — after learning something durable
|
|
171
|
+
m.add("<the fact>", user_id="<project-or-agent-id>")
|
|
172
|
+
\`\`\`
|
|
173
|
+
|
|
174
|
+
Facts are retrieved by meaning, not by filename — a search for "database migration
|
|
175
|
+
strategy" can surface a fact that never used those exact words.
|
|
176
|
+
|
|
177
|
+
## How this maps to the baselane protocol
|
|
178
|
+
|
|
179
|
+
\`m.search(...)\` before acting is the same discipline as reading
|
|
180
|
+
\`.baselane/memory/MEMORY.md\` before acting; \`m.add(...)\` after learning is the same
|
|
181
|
+
discipline as writing a new fact file. The read-before/write-after loop is identical — only
|
|
182
|
+
the storage and retrieval mechanism (embeddings + similarity search vs. flat files + an
|
|
183
|
+
index) differs.
|
|
184
|
+
`;
|
|
185
|
+
const VECTOR_STOP_HOOK = {
|
|
186
|
+
event: "Stop",
|
|
187
|
+
matcher: "",
|
|
188
|
+
description: "Confirms mem0 is installed and reminds the agent to write durable facts to it.",
|
|
189
|
+
action: "run-command",
|
|
190
|
+
command: 'python3 -c "import mem0" >/dev/null 2>&1 && echo "Before finishing, write any durable facts from this session to mem0 (m.add(...))." || echo "mem0 not installed — see .baselane/memory/vector/README.md for setup (pip install mem0ai)"',
|
|
191
|
+
};
|
|
192
|
+
/** `.baselane/memory/letta/README.md` (repo) / `memory/letta/README.md` (bundle) — Letta tiered memory. */
|
|
193
|
+
const LETTA_README = `# Memory adapter: letta
|
|
194
|
+
|
|
195
|
+
This project uses Letta (formerly MemGPT) for durable memory: a local server manages
|
|
196
|
+
tiered memory for the agent, inspectable and editable through Letta's ADE (Agent
|
|
197
|
+
Development Environment) UI.
|
|
198
|
+
|
|
199
|
+
## Setup
|
|
200
|
+
|
|
201
|
+
\`\`\`bash
|
|
202
|
+
pip install letta
|
|
203
|
+
letta server
|
|
204
|
+
\`\`\`
|
|
205
|
+
|
|
206
|
+
Then open the ADE at http://localhost:8283 to inspect or edit memory directly, or drive it
|
|
207
|
+
programmatically with the Letta client SDK.
|
|
208
|
+
|
|
209
|
+
## Usage
|
|
210
|
+
|
|
211
|
+
Letta's memory is tiered:
|
|
212
|
+
|
|
213
|
+
- **Core memory** — a small set of always-in-context editable blocks (e.g. persona, current
|
|
214
|
+
task); update these for facts that should be visible on every turn.
|
|
215
|
+
- **Recall memory** — the full conversation history, searchable but not always in context.
|
|
216
|
+
- **Archival memory** — a long-term vector store for facts that don't need to be in every
|
|
217
|
+
context window; write here for durable, occasionally-needed facts.
|
|
218
|
+
|
|
219
|
+
## How this maps to the baselane protocol
|
|
220
|
+
|
|
221
|
+
Writing a durable fact to archival memory after learning it is the write-after half of the
|
|
222
|
+
loop; querying archival/recall memory (or checking the relevant core memory block) before
|
|
223
|
+
acting is the read-before half. Core memory blocks are the closest analog to \`MEMORY.md\`'s
|
|
224
|
+
index — small, always-visible, and worth keeping current.
|
|
225
|
+
`;
|
|
226
|
+
const LETTA_STOP_HOOK = {
|
|
227
|
+
event: "Stop",
|
|
228
|
+
matcher: "",
|
|
229
|
+
description: "Confirms the Letta server is available and reminds the agent to archive durable facts.",
|
|
230
|
+
action: "run-command",
|
|
231
|
+
command: 'command -v letta >/dev/null 2>&1 && echo "Before finishing, write any durable facts from this session to Letta\'s archival memory." || echo "letta not installed — see .baselane/memory/letta/README.md for setup (pip install letta && letta server)"',
|
|
232
|
+
};
|
|
233
|
+
/** The AGENTS.md capabilities-section note for a memory+files capability, regardless of store. */
|
|
234
|
+
export const MEMORY_AGENTS_NOTE = "### Memory\n\n" +
|
|
235
|
+
"Consult `.baselane/memory/` and its `MEMORY.md` index before acting — it holds " +
|
|
236
|
+
"durable facts from past sessions. Use `/remember` to add one after learning " +
|
|
237
|
+
"something durable.";
|
|
238
|
+
// #9: each sibling method gets its own note naming the path/command it actually scaffolds,
|
|
239
|
+
// instead of memory+files' note being handed to every method (see hasRepoMemoryFilesMethod).
|
|
240
|
+
export const MEMORY_NATIVE_AGENTS_NOTE = "### Memory (native)\n\n" +
|
|
241
|
+
"This project uses Claude Code's native memory instead of `.baselane/memory/` — facts live " +
|
|
242
|
+
"under `~/.claude/projects/<project>/memory/` and are recalled automatically each session. " +
|
|
243
|
+
"Use `/remember` (or the `# <fact>` chat shortcut) to add one after learning something durable.";
|
|
244
|
+
export const MEMORY_CLAUDE_MEM_AGENTS_NOTE = "### Memory (claude-mem)\n\n" +
|
|
245
|
+
"This project uses claude-mem to capture and compress session transcripts into searchable " +
|
|
246
|
+
"summaries (see `.baselane/memory/claude-mem/README.md`) — run `claude-mem search \"<topic>\"` " +
|
|
247
|
+
"before acting; capture happens automatically at session end via its own hooks.";
|
|
248
|
+
export const MEMORY_VECTOR_AGENTS_NOTE = "### Memory (vector)\n\n" +
|
|
249
|
+
"This project uses mem0 for durable memory (see `.baselane/memory/vector/README.md`) — recall " +
|
|
250
|
+
"by semantic similarity with `m.search(...)` before acting, and `m.add(...)` after learning " +
|
|
251
|
+
"something durable.";
|
|
252
|
+
export const MEMORY_LETTA_AGENTS_NOTE = "### Memory (letta)\n\n" +
|
|
253
|
+
"This project uses Letta's tiered memory (see `.baselane/memory/letta/README.md`) — write " +
|
|
254
|
+
"durable facts to archival memory after learning them, and query archival/recall memory (or " +
|
|
255
|
+
"the relevant core memory block) before acting.";
|
|
256
|
+
function memoryCapabilitiesFor(pack, store) {
|
|
257
|
+
return (pack.capabilities ?? []).filter((c) => c.type === "memory" && c.store === store);
|
|
258
|
+
}
|
|
259
|
+
function hasMemoryMethod(pack, store, method) {
|
|
260
|
+
return memoryCapabilitiesFor(pack, store).some((c) => c.method === method);
|
|
261
|
+
}
|
|
262
|
+
/** True if this store has any wired-up memory method (files, native, claude-mem, vector, letta)
|
|
263
|
+
* that needs scaffolding spliced into the pack via `withMemoryScaffolding`. */
|
|
264
|
+
function hasMemoryScaffoldingNeed(pack, store) {
|
|
265
|
+
return (hasMemoryMethod(pack, store, "files") ||
|
|
266
|
+
hasMemoryMethod(pack, store, "native") ||
|
|
267
|
+
hasMemoryMethod(pack, store, "claude-mem") ||
|
|
268
|
+
hasMemoryMethod(pack, store, "vector") ||
|
|
269
|
+
hasMemoryMethod(pack, store, "letta"));
|
|
270
|
+
}
|
|
271
|
+
/** Despite the name — kept for compatibility with the existing gate call sites in
|
|
272
|
+
* render-pack.ts/bundle.ts/capabilities.ts — this now guards `withMemoryScaffolding` for every
|
|
273
|
+
* wired-up memory method in the repo store, not `files` alone. */
|
|
274
|
+
export function hasRepoMemoryFiles(pack) {
|
|
275
|
+
return hasMemoryScaffoldingNeed(pack, "repo");
|
|
276
|
+
}
|
|
277
|
+
/** Org-store counterpart of {@link hasRepoMemoryFiles}. */
|
|
278
|
+
export function hasOrgMemoryFiles(pack) {
|
|
279
|
+
return hasMemoryScaffoldingNeed(pack, "org");
|
|
280
|
+
}
|
|
281
|
+
/** #9: `MEMORY_AGENTS_NOTE` describes the `files` method specifically (`.baselane/memory/`,
|
|
282
|
+
* `/remember`). Unlike {@link hasRepoMemoryFiles} (which gates scaffolding for ANY memory method),
|
|
283
|
+
* this gates only that note — so a native/vector/letta/claude-mem pack isn't handed a note pointing
|
|
284
|
+
* at a `.baselane/memory/` path it never created. */
|
|
285
|
+
export function hasRepoMemoryFilesMethod(pack) {
|
|
286
|
+
return hasMemoryMethod(pack, "repo", "files");
|
|
287
|
+
}
|
|
288
|
+
/** #9: narrow, note-only gates for each sibling method — same rationale as
|
|
289
|
+
* {@link hasRepoMemoryFilesMethod} above, one per method so each note is only shown when its own
|
|
290
|
+
* method is actually present. */
|
|
291
|
+
export function hasRepoMemoryNativeMethod(pack) {
|
|
292
|
+
return hasMemoryMethod(pack, "repo", "native");
|
|
293
|
+
}
|
|
294
|
+
export function hasRepoMemoryClaudeMemMethod(pack) {
|
|
295
|
+
return hasMemoryMethod(pack, "repo", "claude-mem");
|
|
296
|
+
}
|
|
297
|
+
export function hasRepoMemoryVectorMethod(pack) {
|
|
298
|
+
return hasMemoryMethod(pack, "repo", "vector");
|
|
299
|
+
}
|
|
300
|
+
export function hasRepoMemoryLettaMethod(pack) {
|
|
301
|
+
return hasMemoryMethod(pack, "repo", "letta");
|
|
302
|
+
}
|
|
303
|
+
/** Adds the present memory method(s)' command(s) + Stop-hook reminder(s) for one store to a
|
|
304
|
+
* pack, without disturbing what it already declares. `store` defaults to "repo" for
|
|
305
|
+
* compatibility with pre-multi-method call sites; render-pack.ts passes "repo" and bundle.ts
|
|
306
|
+
* passes "org" explicitly so a method declared in one store never leaks scaffolding into the
|
|
307
|
+
* other's file map. */
|
|
308
|
+
export function withMemoryScaffolding(pack, store = "repo") {
|
|
309
|
+
const methods = new Set(memoryCapabilitiesFor(pack, store).map((c) => c.method));
|
|
310
|
+
const commands = [...pack.commands];
|
|
311
|
+
const hooks = [...pack.hooks];
|
|
312
|
+
if (methods.has("files")) {
|
|
313
|
+
commands.push(REMEMBER_COMMAND);
|
|
314
|
+
hooks.push(MEMORY_STOP_HOOK);
|
|
315
|
+
}
|
|
316
|
+
if (methods.has("native")) {
|
|
317
|
+
commands.push(NATIVE_REMEMBER_COMMAND);
|
|
318
|
+
hooks.push(NATIVE_STOP_HOOK);
|
|
319
|
+
}
|
|
320
|
+
if (methods.has("claude-mem"))
|
|
321
|
+
hooks.push(CLAUDE_MEM_STOP_HOOK);
|
|
322
|
+
if (methods.has("vector"))
|
|
323
|
+
hooks.push(VECTOR_STOP_HOOK);
|
|
324
|
+
if (methods.has("letta"))
|
|
325
|
+
hooks.push(LETTA_STOP_HOOK);
|
|
326
|
+
return { ...pack, commands, hooks };
|
|
327
|
+
}
|
|
328
|
+
/** File map for one store's memory capabilities — `files`' README at the top-level slot, every
|
|
329
|
+
* other real method under its own subdirectory so multiple methods can coexist without one
|
|
330
|
+
* silently clobbering another's docs. `pathFor` picks repo vs bundle path shape for a leaf. */
|
|
331
|
+
function memoryFilesFor(pack, store, pathFor) {
|
|
332
|
+
const methods = new Set(memoryCapabilitiesFor(pack, store).map((c) => c.method));
|
|
333
|
+
const files = {};
|
|
334
|
+
if (methods.has("files"))
|
|
335
|
+
files[pathFor("memory/README.md")] = MEMORY_README;
|
|
336
|
+
if (methods.has("native"))
|
|
337
|
+
files[pathFor("memory/native/README.md")] = NATIVE_MEMORY_README;
|
|
338
|
+
if (methods.has("claude-mem"))
|
|
339
|
+
files[pathFor("memory/claude-mem/README.md")] = CLAUDE_MEM_README;
|
|
340
|
+
if (methods.has("vector"))
|
|
341
|
+
files[pathFor("memory/vector/README.md")] = VECTOR_README;
|
|
342
|
+
if (methods.has("letta"))
|
|
343
|
+
files[pathFor("memory/letta/README.md")] = LETTA_README;
|
|
344
|
+
return files;
|
|
345
|
+
}
|
|
346
|
+
/** `.baselane/memory/...`, for whichever repo-store memory methods the pack declares. */
|
|
347
|
+
export function renderRepoMemoryFiles(pack) {
|
|
348
|
+
return memoryFilesFor(pack, "repo", (leaf) => `.baselane/${leaf}`);
|
|
349
|
+
}
|
|
350
|
+
/** `memory/...` in the laptop bundle, for whichever org-store memory methods the pack declares. */
|
|
351
|
+
export function renderBundleMemoryFiles(pack) {
|
|
352
|
+
return memoryFilesFor(pack, "org", (leaf) => leaf);
|
|
353
|
+
}
|