@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,443 @@
|
|
|
1
|
+
/** Fallback tokens used whenever `capability.config` omits a value. */
|
|
2
|
+
const DEFAULT_BRAND = "#4F46E5"; // indigo-600
|
|
3
|
+
const DEFAULT_FONT_DISPLAY = "Inter";
|
|
4
|
+
const DEFAULT_FONT_BODY = "Inter";
|
|
5
|
+
const DEFAULT_RADIUS_PX = 8;
|
|
6
|
+
const DEFAULT_THEME = "both";
|
|
7
|
+
const DEFAULT_MOOD = "clean, confident, functional";
|
|
8
|
+
// Semantic feedback colors are fixed, not derived from the brand hue — a brand color that
|
|
9
|
+
// happens to be green or amber must not be confused with a success/warning state.
|
|
10
|
+
const OK_COLOR = "#16A34A";
|
|
11
|
+
const WARN_COLOR = "#D97706";
|
|
12
|
+
function parseHex(hex) {
|
|
13
|
+
const m = /^#?([0-9a-f]{6})$/i.exec(hex.trim());
|
|
14
|
+
if (!m)
|
|
15
|
+
return null;
|
|
16
|
+
const n = parseInt(m[1], 16);
|
|
17
|
+
return [(n >> 16) & 255, (n >> 8) & 255, n & 255];
|
|
18
|
+
}
|
|
19
|
+
function rgbToHsl(r, g, b) {
|
|
20
|
+
const rn = r / 255;
|
|
21
|
+
const gn = g / 255;
|
|
22
|
+
const bn = b / 255;
|
|
23
|
+
const max = Math.max(rn, gn, bn);
|
|
24
|
+
const min = Math.min(rn, gn, bn);
|
|
25
|
+
const l = (max + min) / 2;
|
|
26
|
+
if (max === min)
|
|
27
|
+
return [0, 0, l * 100];
|
|
28
|
+
const d = max - min;
|
|
29
|
+
const s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
|
|
30
|
+
let h;
|
|
31
|
+
switch (max) {
|
|
32
|
+
case rn:
|
|
33
|
+
h = (gn - bn) / d + (gn < bn ? 6 : 0);
|
|
34
|
+
break;
|
|
35
|
+
case gn:
|
|
36
|
+
h = (bn - rn) / d + 2;
|
|
37
|
+
break;
|
|
38
|
+
default:
|
|
39
|
+
h = (rn - gn) / d + 4;
|
|
40
|
+
}
|
|
41
|
+
return [h * 60, s * 100, l * 100];
|
|
42
|
+
}
|
|
43
|
+
function hslToHex(h, s, l) {
|
|
44
|
+
const sn = s / 100;
|
|
45
|
+
const ln = l / 100;
|
|
46
|
+
const c = (1 - Math.abs(2 * ln - 1)) * sn;
|
|
47
|
+
const x = c * (1 - Math.abs(((h / 60) % 2) - 1));
|
|
48
|
+
const m = ln - c / 2;
|
|
49
|
+
let [r, g, b] = [0, 0, 0];
|
|
50
|
+
if (h < 60)
|
|
51
|
+
[r, g, b] = [c, x, 0];
|
|
52
|
+
else if (h < 120)
|
|
53
|
+
[r, g, b] = [x, c, 0];
|
|
54
|
+
else if (h < 180)
|
|
55
|
+
[r, g, b] = [0, c, x];
|
|
56
|
+
else if (h < 240)
|
|
57
|
+
[r, g, b] = [0, x, c];
|
|
58
|
+
else if (h < 300)
|
|
59
|
+
[r, g, b] = [x, 0, c];
|
|
60
|
+
else
|
|
61
|
+
[r, g, b] = [c, 0, x];
|
|
62
|
+
const toByte = (v) => Math.round((v + m) * 255)
|
|
63
|
+
.toString(16)
|
|
64
|
+
.padStart(2, "0");
|
|
65
|
+
return `#${toByte(r)}${toByte(g)}${toByte(b)}`.toUpperCase();
|
|
66
|
+
}
|
|
67
|
+
/** Hue extracted from the brand color, used to bias the neutral scale instead of pure grey. */
|
|
68
|
+
function brandHue(brand) {
|
|
69
|
+
const rgb = parseHex(brand);
|
|
70
|
+
if (!rgb)
|
|
71
|
+
return 230; // a cool, unobtrusive default bias
|
|
72
|
+
return rgbToHsl(...rgb)[0];
|
|
73
|
+
}
|
|
74
|
+
/** A small neutral scale with a deliberate hue bias — never pure `#808080`-style mid-grey. */
|
|
75
|
+
function neutralScale(hue) {
|
|
76
|
+
const stops = [
|
|
77
|
+
["50", 98],
|
|
78
|
+
["100", 94],
|
|
79
|
+
["300", 82],
|
|
80
|
+
["500", 58],
|
|
81
|
+
["700", 32],
|
|
82
|
+
["900", 14],
|
|
83
|
+
];
|
|
84
|
+
return stops.map(([step, l]) => ({ step, hex: hslToHex(hue, 10, l) }));
|
|
85
|
+
}
|
|
86
|
+
function resolveTokens(config) {
|
|
87
|
+
const brand = config?.brandColor && parseHex(config.brandColor) ? config.brandColor : DEFAULT_BRAND;
|
|
88
|
+
const radiusRaw = config?.radius ? parseInt(config.radius, 10) : NaN;
|
|
89
|
+
const radius = Number.isFinite(radiusRaw) && radiusRaw > 0 ? radiusRaw : DEFAULT_RADIUS_PX;
|
|
90
|
+
const theme = config?.theme === "light" || config?.theme === "dark" ? config.theme : DEFAULT_THEME;
|
|
91
|
+
return {
|
|
92
|
+
brand,
|
|
93
|
+
fontDisplay: config?.fontDisplay || DEFAULT_FONT_DISPLAY,
|
|
94
|
+
fontBody: config?.fontBody || DEFAULT_FONT_BODY,
|
|
95
|
+
radius,
|
|
96
|
+
theme,
|
|
97
|
+
mood: config?.mood || DEFAULT_MOOD,
|
|
98
|
+
neutrals: neutralScale(brandHue(brand)),
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function visualThemeSection(t) {
|
|
102
|
+
const themeLine = t.theme === "both"
|
|
103
|
+
? "Design light and dark as two considered modes, not one inverted into the other."
|
|
104
|
+
: `This project ships a single mode: ${t.theme}.`;
|
|
105
|
+
return [
|
|
106
|
+
"## Visual theme & atmosphere",
|
|
107
|
+
"",
|
|
108
|
+
`Mood: ${t.mood}. The brand color (${t.brand}) is the single accent — everything else in the ` +
|
|
109
|
+
"interface is neutral, so the accent stays legible and the page never competes with itself.",
|
|
110
|
+
"",
|
|
111
|
+
themeLine,
|
|
112
|
+
].join("\n");
|
|
113
|
+
}
|
|
114
|
+
function colorPaletteSection(t) {
|
|
115
|
+
const rows = [
|
|
116
|
+
`| \`--color-brand\` | ${t.brand} | Accent — interactive elements, emphasis, focus rings |`,
|
|
117
|
+
...t.neutrals.map((n) => `| \`--color-neutral-${n.step}\` | ${n.hex} | ${Number(n.step) <= 100 ? "Background / surface" : Number(n.step) >= 700 ? "Text" : "Border / muted"} |`),
|
|
118
|
+
`| \`--color-ok\` | ${OK_COLOR} | Success / positive state |`,
|
|
119
|
+
`| \`--color-warn\` | ${WARN_COLOR} | Warning / caution state |`,
|
|
120
|
+
];
|
|
121
|
+
return [
|
|
122
|
+
"## Color palette & roles",
|
|
123
|
+
"",
|
|
124
|
+
"| Token | Value | Role |",
|
|
125
|
+
"| --- | --- | --- |",
|
|
126
|
+
...rows,
|
|
127
|
+
"",
|
|
128
|
+
"Exactly one accent color exists in this palette. Do not introduce a second accent for " +
|
|
129
|
+
"\"variety\" — differentiate with weight, size, and spacing instead.",
|
|
130
|
+
].join("\n");
|
|
131
|
+
}
|
|
132
|
+
function typographySection(t) {
|
|
133
|
+
return [
|
|
134
|
+
"## Typography",
|
|
135
|
+
"",
|
|
136
|
+
`- Display face: **${t.fontDisplay}** — headings, hero copy, anything meant to lead the eye.`,
|
|
137
|
+
`- Body face: **${t.fontBody}** — paragraph text, labels, UI chrome.`,
|
|
138
|
+
"- Type scale (px): 12 / 14 / 16 / 20 / 24 / 32 / 48. Pick from this set; don't invent one-off sizes.",
|
|
139
|
+
"- Line height: 1.2 for display sizes (20px+), 1.5 for body sizes (12-16px).",
|
|
140
|
+
].join("\n");
|
|
141
|
+
}
|
|
142
|
+
function componentStylingsSection(t) {
|
|
143
|
+
const sm = Math.max(2, Math.round(t.radius / 2));
|
|
144
|
+
const lg = t.radius * 2;
|
|
145
|
+
return [
|
|
146
|
+
"## Component stylings",
|
|
147
|
+
"",
|
|
148
|
+
`- Radius scale (px): sm ${sm} · md ${t.radius} · lg ${lg} · full 9999. One scale, used everywhere — ` +
|
|
149
|
+
"no ad-hoc radii next to the standard ones.",
|
|
150
|
+
"- Buttons: `md` radius, brand-colored fill for primary, neutral border for secondary, no gradient fills.",
|
|
151
|
+
"- Inputs: `sm` radius, neutral-300 border at rest, brand-colored border + ring on focus.",
|
|
152
|
+
"- Cards: `lg` radius, neutral-100 background, neutral-300 border (prefer a border over a shadow in light mode).",
|
|
153
|
+
].join("\n");
|
|
154
|
+
}
|
|
155
|
+
function layoutSpacingSection() {
|
|
156
|
+
return [
|
|
157
|
+
"## Layout & spacing",
|
|
158
|
+
"",
|
|
159
|
+
"- Spacing scale (px, 4px base grid): 4 / 8 / 12 / 16 / 24 / 32 / 48 / 64.",
|
|
160
|
+
"- Container max-width: 1200px, centered, with 24px gutters on mobile.",
|
|
161
|
+
"- Prefer asymmetric layouts — mixed widths, deliberate emphasis — over evenly divided grids; a row of " +
|
|
162
|
+
"three equal-width cards is the single biggest tell of an unreviewed template.",
|
|
163
|
+
].join("\n");
|
|
164
|
+
}
|
|
165
|
+
function depthElevationSection() {
|
|
166
|
+
return [
|
|
167
|
+
"## Depth & elevation",
|
|
168
|
+
"",
|
|
169
|
+
"- Shadow scale: `sm` for hover states, `md` for popovers/dropdowns, `lg` for modals only.",
|
|
170
|
+
"- Elevate sparingly — most surfaces should read as flat with a border, not lifted with a shadow.",
|
|
171
|
+
"- z-index layers: base 0, sticky 10, dropdown 20, modal 30, toast 40. Don't invent values outside this set.",
|
|
172
|
+
].join("\n");
|
|
173
|
+
}
|
|
174
|
+
function dosDontsSection() {
|
|
175
|
+
return [
|
|
176
|
+
"## Do's and don'ts",
|
|
177
|
+
"",
|
|
178
|
+
"**Do**",
|
|
179
|
+
"- Hold one accent color for the whole page.",
|
|
180
|
+
"- Hold one radius system for the whole page.",
|
|
181
|
+
"- Give neutrals a deliberate hue bias.",
|
|
182
|
+
"- Decide light/dark at the page level, not per component.",
|
|
183
|
+
"",
|
|
184
|
+
"**Don't**",
|
|
185
|
+
"- No second accent color, however small the use.",
|
|
186
|
+
"- No three-equal-width card rows — it's the default output of ungrounded generation.",
|
|
187
|
+
"- No AI-purple/mesh-blob gradients unless the brand explicitly calls for them.",
|
|
188
|
+
"- No pure mid-grey (`#808080`-style) neutrals — always hue-biased.",
|
|
189
|
+
"- No section-number eyebrows (\"001 · Features\") — they signal filler, not information.",
|
|
190
|
+
].join("\n");
|
|
191
|
+
}
|
|
192
|
+
function responsiveSection() {
|
|
193
|
+
return [
|
|
194
|
+
"## Responsive behavior",
|
|
195
|
+
"",
|
|
196
|
+
"- Breakpoints (px): 640 / 768 / 1024 / 1280. Design mobile-first; add complexity as width increases.",
|
|
197
|
+
"- Minimum touch target: 44x44px on any interactive element below the 768px breakpoint.",
|
|
198
|
+
"- Nav collapses to a single control below 768px; it never competes with the hero for vertical space.",
|
|
199
|
+
].join("\n");
|
|
200
|
+
}
|
|
201
|
+
function agentPromptGuideSection() {
|
|
202
|
+
return [
|
|
203
|
+
"## Agent prompt guide",
|
|
204
|
+
"",
|
|
205
|
+
"Any AI tool generating or modifying UI in this repository must follow this file as the source " +
|
|
206
|
+
"of truth for color, type, spacing, radius, and elevation. When a decision isn't covered here, " +
|
|
207
|
+
"match the closest existing pattern rather than inventing a new one — and if a new durable " +
|
|
208
|
+
"decision gets made, update this file so the next session inherits it too.",
|
|
209
|
+
].join("\n");
|
|
210
|
+
}
|
|
211
|
+
/** Google-Stitch-standard DESIGN.md body from a resolved token set — shared by every method
|
|
212
|
+
* (`author`, `import`) that ends up producing the real 9-section document. */
|
|
213
|
+
function buildDesignMd(config) {
|
|
214
|
+
const t = resolveTokens(config);
|
|
215
|
+
return ([
|
|
216
|
+
visualThemeSection(t),
|
|
217
|
+
colorPaletteSection(t),
|
|
218
|
+
typographySection(t),
|
|
219
|
+
componentStylingsSection(t),
|
|
220
|
+
layoutSpacingSection(),
|
|
221
|
+
depthElevationSection(),
|
|
222
|
+
dosDontsSection(),
|
|
223
|
+
responsiveSection(),
|
|
224
|
+
agentPromptGuideSection(),
|
|
225
|
+
].join("\n\n") + "\n");
|
|
226
|
+
}
|
|
227
|
+
/** Google-Stitch-standard DESIGN.md, built from the design capability's config tokens (all optional). */
|
|
228
|
+
export function renderDesignMd(capability) {
|
|
229
|
+
return buildDesignMd(capability.config);
|
|
230
|
+
}
|
|
231
|
+
/** The AGENTS.md capabilities-section note for a design+author capability, regardless of store. */
|
|
232
|
+
export const DESIGN_AGENTS_NOTE = "### Design\n\n" +
|
|
233
|
+
"Follow `DESIGN.md` for all UI and visual work — it is the source of truth for color, " +
|
|
234
|
+
"type, spacing, and component conventions in this project.";
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
// method: import — capability.config.tokens is a JSON string, either a flat css-var map
|
|
237
|
+
// (`{"--brand": "#..."}`) or a loosely W3C-DTCG-shaped nested tree (`{color: {brand: "#..."},
|
|
238
|
+
// font: {display, body}, radius, theme, mood}`, values optionally wrapped as `{$value: ...}`).
|
|
239
|
+
// Parsing is error-tolerant: anything that doesn't parse as a JSON object falls back to the
|
|
240
|
+
// same defaults `author` uses, with a visible note instead of a crash.
|
|
241
|
+
// ---------------------------------------------------------------------------
|
|
242
|
+
const TOKENS_PARSE_ERROR_NOTE = "> **Note:** `tokens` could not be parsed as valid JSON — using the default design tokens " +
|
|
243
|
+
"below instead. Fix the JSON and re-render to pick up the real values.\n\n";
|
|
244
|
+
/** Unwraps a raw token value, a bare string/number, or a DTCG-style `{ $value }` wrapper. */
|
|
245
|
+
function unwrapTokenValue(value) {
|
|
246
|
+
if (typeof value === "string")
|
|
247
|
+
return value;
|
|
248
|
+
if (typeof value === "number")
|
|
249
|
+
return String(value);
|
|
250
|
+
if (value && typeof value === "object" && "$value" in value) {
|
|
251
|
+
return unwrapTokenValue(value["$value"]);
|
|
252
|
+
}
|
|
253
|
+
return undefined;
|
|
254
|
+
}
|
|
255
|
+
function firstDefined(...values) {
|
|
256
|
+
return values.find((v) => v !== undefined);
|
|
257
|
+
}
|
|
258
|
+
/** Maps a loosely DTCG-shaped nested token tree (`{color:{brand}, font:{display,body}, ...}`). */
|
|
259
|
+
function mapNestedTokens(parsed) {
|
|
260
|
+
const out = {};
|
|
261
|
+
const color = parsed.color;
|
|
262
|
+
const brand = color && typeof color === "object"
|
|
263
|
+
? firstDefined(unwrapTokenValue(color.brand), unwrapTokenValue(color.primary), unwrapTokenValue(color.accent))
|
|
264
|
+
: firstDefined(unwrapTokenValue(parsed.brandColor), unwrapTokenValue(parsed.brand));
|
|
265
|
+
if (brand)
|
|
266
|
+
out.brandColor = brand;
|
|
267
|
+
const font = parsed.font;
|
|
268
|
+
if (font && typeof font === "object") {
|
|
269
|
+
const f = font;
|
|
270
|
+
const display = firstDefined(unwrapTokenValue(f.display), unwrapTokenValue(f.heading));
|
|
271
|
+
const body = firstDefined(unwrapTokenValue(f.body), unwrapTokenValue(f.text));
|
|
272
|
+
if (display)
|
|
273
|
+
out.fontDisplay = display;
|
|
274
|
+
if (body)
|
|
275
|
+
out.fontBody = body;
|
|
276
|
+
}
|
|
277
|
+
const radius = unwrapTokenValue(parsed.radius);
|
|
278
|
+
if (radius)
|
|
279
|
+
out.radius = radius.replace(/px$/, "");
|
|
280
|
+
const theme = unwrapTokenValue(parsed.theme);
|
|
281
|
+
if (theme)
|
|
282
|
+
out.theme = theme;
|
|
283
|
+
const mood = unwrapTokenValue(parsed.mood);
|
|
284
|
+
if (mood)
|
|
285
|
+
out.mood = mood;
|
|
286
|
+
return out;
|
|
287
|
+
}
|
|
288
|
+
/** Maps a flat CSS custom-property map (`{"--brand": "#...", "--font-display": "Inter", ...}`). */
|
|
289
|
+
function mapFlatCssVarTokens(parsed) {
|
|
290
|
+
const get = (...keys) => firstDefined(...keys.map((k) => unwrapTokenValue(parsed[k])));
|
|
291
|
+
const out = {};
|
|
292
|
+
const brand = get("--brand", "--color-brand", "--brand-color");
|
|
293
|
+
if (brand)
|
|
294
|
+
out.brandColor = brand;
|
|
295
|
+
const display = get("--font-display", "--font-heading");
|
|
296
|
+
if (display)
|
|
297
|
+
out.fontDisplay = display;
|
|
298
|
+
const body = get("--font-body", "--font-text");
|
|
299
|
+
if (body)
|
|
300
|
+
out.fontBody = body;
|
|
301
|
+
const radius = get("--radius", "--border-radius");
|
|
302
|
+
if (radius)
|
|
303
|
+
out.radius = radius.replace(/px$/, "");
|
|
304
|
+
const theme = get("--theme");
|
|
305
|
+
if (theme)
|
|
306
|
+
out.theme = theme;
|
|
307
|
+
const mood = get("--mood");
|
|
308
|
+
if (mood)
|
|
309
|
+
out.mood = mood;
|
|
310
|
+
return out;
|
|
311
|
+
}
|
|
312
|
+
/** Parses `config.tokens` into the same `Record<string,string>` shape `resolveTokens` expects.
|
|
313
|
+
* Never throws: a missing `tokens` string resolves to `{ config: {}, failed: false }` (silent
|
|
314
|
+
* defaults, nothing was actually malformed); invalid JSON or a non-object resolves to
|
|
315
|
+
* `{ config: {}, failed: true }` (defaults, but with a visible parse-error note). */
|
|
316
|
+
function parseDesignTokens(tokensJson) {
|
|
317
|
+
if (!tokensJson)
|
|
318
|
+
return { config: {}, failed: false };
|
|
319
|
+
let parsed;
|
|
320
|
+
try {
|
|
321
|
+
parsed = JSON.parse(tokensJson);
|
|
322
|
+
}
|
|
323
|
+
catch {
|
|
324
|
+
return { config: {}, failed: true };
|
|
325
|
+
}
|
|
326
|
+
if (!parsed || typeof parsed !== "object" || Array.isArray(parsed)) {
|
|
327
|
+
return { config: {}, failed: true };
|
|
328
|
+
}
|
|
329
|
+
const record = parsed;
|
|
330
|
+
const isFlatCssVars = Object.keys(record).some((k) => k.startsWith("--"));
|
|
331
|
+
return { config: isFlatCssVars ? mapFlatCssVarTokens(record) : mapNestedTokens(record), failed: false };
|
|
332
|
+
}
|
|
333
|
+
/** DESIGN.md for the `import` method: parses `capability.config.tokens`, then reuses the exact
|
|
334
|
+
* same 9-section builder `author` uses. A parse failure falls back to `author`'s own defaults,
|
|
335
|
+
* with a visible note rather than crashing. */
|
|
336
|
+
export function renderImportDesignMd(capability) {
|
|
337
|
+
const { config, failed } = parseDesignTokens(capability.config?.tokens);
|
|
338
|
+
const md = buildDesignMd(config);
|
|
339
|
+
return failed ? TOKENS_PARSE_ERROR_NOTE + md : md;
|
|
340
|
+
}
|
|
341
|
+
// ---------------------------------------------------------------------------
|
|
342
|
+
// method: analyze — capability.config.url → a DESIGN.md SKELETON with TODO-extraction markers,
|
|
343
|
+
// plus a /design-analyze command. Extraction runs in the agent session (WebFetch + reasoning
|
|
344
|
+
// over the fetched CSS), never server-side at render time — this file only ever ships the
|
|
345
|
+
// skeleton and the protocol for filling it in.
|
|
346
|
+
// ---------------------------------------------------------------------------
|
|
347
|
+
const ANALYZE_SECTION_TITLES = [
|
|
348
|
+
"Visual theme & atmosphere",
|
|
349
|
+
"Color palette & roles",
|
|
350
|
+
"Typography",
|
|
351
|
+
"Component stylings",
|
|
352
|
+
"Layout & spacing",
|
|
353
|
+
"Depth & elevation",
|
|
354
|
+
"Do's and don'ts",
|
|
355
|
+
"Responsive behavior",
|
|
356
|
+
"Agent prompt guide",
|
|
357
|
+
];
|
|
358
|
+
function analyzeSkeletonSection(title, url) {
|
|
359
|
+
return [
|
|
360
|
+
`## ${title}`,
|
|
361
|
+
"",
|
|
362
|
+
`<!-- TODO(design-analyze): fetch ${url}, extract the tokens relevant to "${title}" from ` +
|
|
363
|
+
"its live CSS, fill this section in the same format the `author`/`import` methods use, " +
|
|
364
|
+
"then delete this marker. -->",
|
|
365
|
+
].join("\n");
|
|
366
|
+
}
|
|
367
|
+
/** DESIGN.md skeleton for the `analyze` method — same 9 headings as the real document, each
|
|
368
|
+
* still holding a TODO marker naming what to extract and from where. */
|
|
369
|
+
export function renderAnalyzeDesignSkeleton(capability) {
|
|
370
|
+
const url = capability.config?.url || "<no url configured — set capability.config.url>";
|
|
371
|
+
return ([
|
|
372
|
+
`# DESIGN.md (skeleton — run \`/design-analyze\` to fill this in)`,
|
|
373
|
+
`This is a placeholder generated by the \`design\`/\`analyze\` method for **${url}**. ` +
|
|
374
|
+
"Nothing below has been extracted yet — every section still holds a TODO marker. Run " +
|
|
375
|
+
"`/design-analyze` (see the command for the exact protocol) to fetch the site, extract " +
|
|
376
|
+
"its design tokens, fill in each section, and delete the markers.",
|
|
377
|
+
...ANALYZE_SECTION_TITLES.map((title) => analyzeSkeletonSection(title, url)),
|
|
378
|
+
].join("\n\n") + "\n");
|
|
379
|
+
}
|
|
380
|
+
function designAnalyzeCommand(url) {
|
|
381
|
+
return {
|
|
382
|
+
name: "design-analyze",
|
|
383
|
+
description: "Fetch a reference site and fill in DESIGN.md's skeleton from its live CSS.",
|
|
384
|
+
argument_hint: "[url — defaults to the configured reference site]",
|
|
385
|
+
prompt: `Fetch ${url} (or $ARGUMENTS, if a different URL is given) with a web-fetch tool and read ` +
|
|
386
|
+
"its rendered CSS. Extract: the dominant accent color plus a neutral scale (color palette " +
|
|
387
|
+
"& roles), the heading/body font stack (typography), the border-radius scale in use " +
|
|
388
|
+
"(component stylings), and the spacing scale (layout & spacing). This extraction runs in " +
|
|
389
|
+
"the agent session, not on a server — there is no build-time scraper — so re-run " +
|
|
390
|
+
"`/design-analyze` whenever the reference site's design changes. Fill in each " +
|
|
391
|
+
"`<!-- TODO(design-analyze): ... -->` section of `DESIGN.md`, matching the table/list " +
|
|
392
|
+
"format the `author`/`import` methods produce, then delete the marker comment for every " +
|
|
393
|
+
"section once it's filled in.",
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
function designCapabilityFor(pack, store) {
|
|
397
|
+
return (pack.capabilities ?? []).find((c) => c.type === "design" && c.store === store && (c.method === "author" || c.method === "import" || c.method === "analyze"));
|
|
398
|
+
}
|
|
399
|
+
function renderDesignFileFor(capability) {
|
|
400
|
+
if (capability.method === "import")
|
|
401
|
+
return renderImportDesignMd(capability);
|
|
402
|
+
if (capability.method === "analyze")
|
|
403
|
+
return renderAnalyzeDesignSkeleton(capability);
|
|
404
|
+
return renderDesignMd(capability);
|
|
405
|
+
}
|
|
406
|
+
/** True if this store has a real (non-"coming soon") design capability that would actually
|
|
407
|
+
* scaffold a DESIGN.md — used by capabilities.ts to gate the AGENTS.md note (bug #37.1). */
|
|
408
|
+
export function hasRepoDesignCapability(pack) {
|
|
409
|
+
return designCapabilityFor(pack, "repo") !== undefined;
|
|
410
|
+
}
|
|
411
|
+
export function hasOrgDesignCapability(pack) {
|
|
412
|
+
return designCapabilityFor(pack, "org") !== undefined;
|
|
413
|
+
}
|
|
414
|
+
/** `DESIGN.md` at the repo root, for a repo-store design capability using `author`, `import`,
|
|
415
|
+
* or `analyze` — whichever is present. */
|
|
416
|
+
export function renderRepoDesignFiles(pack) {
|
|
417
|
+
const capability = designCapabilityFor(pack, "repo");
|
|
418
|
+
return capability ? { "DESIGN.md": renderDesignFileFor(capability) } : {};
|
|
419
|
+
}
|
|
420
|
+
/** `DESIGN.md` in the laptop bundle, for an org-store design capability using `author`,
|
|
421
|
+
* `import`, or `analyze` — whichever is present. */
|
|
422
|
+
export function renderBundleDesignFiles(pack) {
|
|
423
|
+
const capability = designCapabilityFor(pack, "org");
|
|
424
|
+
return capability ? { "DESIGN.md": renderDesignFileFor(capability) } : {};
|
|
425
|
+
}
|
|
426
|
+
function designAnalyzeCapabilityFor(pack, store) {
|
|
427
|
+
return (pack.capabilities ?? []).find((c) => c.type === "design" && c.method === "analyze" && c.store === store);
|
|
428
|
+
}
|
|
429
|
+
export function hasRepoDesignAnalyze(pack) {
|
|
430
|
+
return designAnalyzeCapabilityFor(pack, "repo") !== undefined;
|
|
431
|
+
}
|
|
432
|
+
export function hasOrgDesignAnalyze(pack) {
|
|
433
|
+
return designAnalyzeCapabilityFor(pack, "org") !== undefined;
|
|
434
|
+
}
|
|
435
|
+
/** Adds the /design-analyze command to a pack, without disturbing what it already declares.
|
|
436
|
+
* Only called when a design+analyze capability is present for the given store. */
|
|
437
|
+
export function withDesignAnalyzeScaffolding(pack, store) {
|
|
438
|
+
const capability = designAnalyzeCapabilityFor(pack, store);
|
|
439
|
+
if (!capability)
|
|
440
|
+
return pack;
|
|
441
|
+
const url = capability.config?.url || "<no url configured — set capability.config.url>";
|
|
442
|
+
return { ...pack, commands: [...pack.commands, designAnalyzeCommand(url)] };
|
|
443
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { FileMap, WorkflowPack } from "../types.ts";
|
|
2
|
+
/** The AGENTS.md capabilities-section note for a graph capability, regardless of store or method. */
|
|
3
|
+
export declare const GRAPH_AGENTS_NOTE: string;
|
|
4
|
+
export declare function hasRepoGraphCapability(pack: WorkflowPack): boolean;
|
|
5
|
+
export declare function hasOrgGraphCapability(pack: WorkflowPack): boolean;
|
|
6
|
+
/** Adds the /graph command + Stop-hook reminder (and, if configured, the graphify hook). */
|
|
7
|
+
export declare function withGraphScaffolding(pack: WorkflowPack): WorkflowPack;
|
|
8
|
+
/** `.baselane/graph/...` files, for every real-method repo-store graph capability the pack declares. */
|
|
9
|
+
export declare function renderRepoGraphFiles(pack: WorkflowPack): FileMap;
|
|
10
|
+
/** `graph/...` files in the laptop bundle, for every real-method org-store graph capability. */
|
|
11
|
+
export declare function renderBundleGraphFiles(pack: WorkflowPack): FileMap;
|