Conversation
Analyzes svelte-mcp architecture patterns for creating a similar MCP server for springboard. Documents key patterns including: - Tool orchestration (list-sections → get-documentation → autofixer) - Use cases as keywords for smart doc selection - Iterative validation with AST visitors - Context-efficient workflow design Proposes springboard-mcp design with validator patterns for: - State mutation detection - Missing cleanup handlers - Route conflicts - Module interface merging Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Redesign springboard-ai as a CLI tool instead of MCP server for: - Simpler integration (any AI agent can run shell commands) - No protocol overhead (direct stdin/stdout) - Easier testing (run commands manually) - Portability (works with any AI tool) CLI commands: - sb-ai list-sections: Discover docs with use_cases - sb-ai get-docs: Fetch documentation - sb-ai validate: Validate module code (issues/suggestions) - sb-ai scaffold: Generate module templates - sb-ai context: Output full agent context prompt - sb-ai types: Output TypeScript definitions Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Integrate with existing `sb` CLI rather than separate tool: - sb docs list - List docs with use_cases - sb docs get - Fetch documentation - sb docs validate - Validate module code - sb docs scaffold - Generate templates - sb docs context - Agent context prompt - sb docs types - TypeScript definitions Implementation extends /packages/springboard/cli/ instead of new package. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates new `sb docs` subcommand with placeholder implementations for: - sb docs list: List documentation sections with use_cases - sb docs get: Fetch specific documentation - sb docs validate: Validate module code - sb docs scaffold: Generate module templates (module/feature/utility) - sb docs context: Output agent context prompt - sb docs types: Output TypeScript definitions All commands return TODO messages and will be implemented in follow-up commits. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes: 1. Make `sb docs` (without subcommand) show help output 2. Add CLAUDE.md creation in create-springboard-app with: - Instructions to run `npx sb docs --help` before coding - Key commands and workflow for Claude Code agents - Emphasis on using docs tools to ensure correct code 3. Add AGENTS.md creation in create-springboard-app with: - Similar instructions for other AI coding assistants - Clear workflow recommendations - Guidance to lean on `sb docs` commands Both files are created automatically when running create-springboard-app, ensuring AI agents have immediate context about available documentation tools. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Changes based on analysis of svelte-mcp's approach: 1. Add helpful text to `sb docs --help`: - Guides AI agents to run `sb docs context` first - Explains that context includes full docs list - Shows recommended workflow: context → validate → get 2. Update CLAUDE.md and AGENTS.md: - Emphasize `sb docs context` as the single starting point - Explain that context includes everything (framework info + docs list) - Clarify that `list` is redundant if you've run `context` - Simplify workflow to match svelte-mcp pattern Following svelte-mcp's pattern where the prompt pre-loads all available docs and explicitly tells agents "you do not need to call list-sections again." Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates bundled examples system similar to svelte-mcp's approach: 1. Add `sb docs examples` commands: - `sb docs examples list` - List all available examples - `sb docs examples show <name>` - Display full code for an example 2. Create three example modules: - basic-feature-module: Shared state + actions + routes - persistent-state-module: Database-backed state - user-agent-state-module: localStorage-backed UI state 3. Examples are stored as .txt files and bundled in npm package - Copied to dist/examples/ during build - Read at runtime via fs.readFileSync - Categorized by type (state, actions, routing, patterns) - Tagged for discoverability 4. Add comparison document (.planning/sb-docs-vs-svelte-mcp.md): - Documents what svelte-mcp has vs what we have - Key differences: MCP vs CLI, playground-link vs examples - Missing features: live docs fetching, use_cases metadata - Architecture decisions needed This follows svelte-mcp's pattern of providing concrete examples, though via bundled files instead of playground links (no playground equivalent for Springboard yet). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created comprehensive questionnaire based on deep research of: - Springboard core APIs (ModuleAPI, StatesAPI, Actions, Routing, etc.) - Real-world usage in songdrive (19+ modules, patterns, anti-patterns) Questionnaire covers 25 questions across: - General architecture (doc source, format, use_cases metadata) - Command-specific decisions for each sb docs command - Validation patterns to detect (from songdrive analysis) - Implementation priority and MVP scope - Integration with CLAUDE.md/AGENTS.md Key decisions needed: - Documentation source: Bundle vs Runtime vs Hosted - Use cases generation: Claude Batch vs Manual vs Skip - Validation scope: Which patterns to detect - Scaffold: Keep vs Remove vs Replace with examples - MVP: Which commands are minimum viable Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add full implementation of sb docs CLI commands for AI agent support: - sb docs list: Lists 13 documentation sections with use_cases keywords - sb docs get <section>: Fetches specific documentation content - sb docs context: Outputs comprehensive context prompt for AI agents - sb docs types: Shows TypeScript type definitions - sb docs validate: Placeholder for future AST-based validation - sb docs scaffold: Redirects to examples system Create LLM-optimized documentation covering: - Module API, state management, actions, routing - Module types and communication patterns - Core dependencies and lifecycle - Platform support and server modules - Common patterns and anti-patterns Add build scripts to copy docs to dist during npm build. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
These commands don't match svelte-mcp patterns: - validate: svelte-mcp has real AST validation, ours was just a placeholder - scaffold: svelte-mcp doesn't have scaffolding, uses playground-link instead Remaining commands match svelte-mcp interface: - list: matches list-sections tool - get: matches get-documentation tool - context: matches svelte-task prompt - types: Springboard-specific addition - examples: replaces playground-link for offline use Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Port the useModule pattern from SongDrive to Springboard core.
This hook provides type-safe module access from React components:
const audioPlayer = useModule('AudioPlayer');
const currentFile = audioPlayer.currentlyPlayingFile.useState();
Use this instead of moduleAPI.getModule() when in React components.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update the generated agent instruction files to reflect the removal of sb docs validate. Replace with examples commands in the workflow. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
No benefit to maintaining two different versions of the same content. Use one string for both files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Deploying jamtools-docs-new with
|
| Latest commit: |
72a1841
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ad75adf3.jamtools-docs-new.pages.dev |
| Branch Preview URL: | https://vk-e9bf-analyze-svelte-m.jamtools-docs-new.pages.dev |
|
Claude finished @mickmister's task —— View job PR Review: Add cli docs command for agentsI've completed my review of this PR. This is a well-implemented feature that adds comprehensive documentation support for AI agents working with Springboard projects. Todo List:
✅ StrengthsArchitecture & Design:
Code Quality:
Documentation Content:
Build System:
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7646ba7ad7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
packages/springboard/cli/src/cli.ts
Outdated
| const packageJSON = require('../package.json'); | ||
|
|
||
| import type { SpringboardPlatform, Plugin } from './types.js'; | ||
| import {createDocsCommand} from './docs_command'; |
There was a problem hiding this comment.
Add .js extension to docs command import
This package is published as ESM ("type": "module"), but this relative import is emitted without an extension in dist/cli.js, so Node cannot resolve it at runtime. Running the built CLI (node dist/cli.js --help) immediately throws ERR_MODULE_NOT_FOUND for ./docs_command, which makes every sb command unusable before argument parsing.
Useful? React with 👍 / 👎.
| sections: DocSection[]; | ||
| } | ||
|
|
||
| const docsDir = __dirname; |
There was a problem hiding this comment.
Resolve docs directory without __dirname in ESM
The docs loader runs as an ES module, where __dirname is not defined, so sb docs list/get/context crashes during import with ReferenceError: __dirname is not defined in ES module scope (reproduced via npx tsx src/cli.ts docs list). This should derive paths from import.meta.url instead of relying on CommonJS globals.
Useful? React with 👍 / 👎.
| code: string; | ||
| } | ||
|
|
||
| const examplesDir = __dirname; |
There was a problem hiding this comment.
Resolve examples directory without __dirname in ESM
The examples loader has the same ESM/CJS mismatch: __dirname is undefined in this module format, so sb docs examples list/show fails at runtime with ReferenceError as soon as this file is imported. Using an import.meta.url-based path is required for these commands to work.
Useful? React with 👍 / 👎.
| **Before writing any code, run:** | ||
|
|
||
| \`\`\`bash | ||
| npx sb docs context |
There was a problem hiding this comment.
Install sb CLI before telling agents to run it
The scaffolded AGENTS/CLAUDE guidance tells users to run npx sb docs context, but this generator does not install springboard-cli (only springboard and runtime deps are installed earlier), so fresh projects have no local sb binary. In that state the first recommended command fails (or may resolve an unrelated package via npx), which breaks the onboarding flow this change introduces.
Useful? React with 👍 / 👎.
Add the CLI to the main springboard package: - Add bin entry pointing to cli/dist/cli.js as 'sb' command - Include cli/dist in published files - Update build-all.sh to build CLI - Update prepublishOnly to use build:all This allows users to run 'sb docs' commands after installing springboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace __dirname with ES module equivalent using import.meta.url:
- import { fileURLToPath } from 'url'
- import { dirname } from 'path'
- const __filename = fileURLToPath(import.meta.url)
- const __dirname = dirname(__filename)
Fixes ReferenceError when CLI is run from published package.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This PR adds a
sb docscommand for agents to run when working in a springboard project