Skip to content

feat(compass): add instruction template system for AI prompts#34

Open
acmacalister wants to merge 2 commits into
mainfrom
switchboard-helmsman
Open

feat(compass): add instruction template system for AI prompts#34
acmacalister wants to merge 2 commits into
mainfrom
switchboard-helmsman

Conversation

@acmacalister
Copy link
Copy Markdown
Collaborator

Port Helmsman Ruby gem functionality to manage system instructions/prompts for AI assistants with Go text/template support.

  • Add Instruction type and InstructionsConfig to domain types (mcp.go)
  • Implement compass package with model tier detection (~30 models), environment detection (OS, shell, Docker, SSH, tools), and template rendering with ModelContext and EnvContext
  • Extend ConfigService with instruction CRUD methods
  • Register "instructions" MCP prompt that renders enabled instructions with optional model_id argument for context-aware output
  • Add web UI pages for instructions management (list, create, edit, delete) with live preview functionality
  • Include comprehensive tests for config persistence, tier detection, env detection, and template rendering

🐨 Generated with Claude Code

acmacalister and others added 2 commits March 3, 2026 15:39
Port Helmsman Ruby gem functionality to manage system instructions/prompts
for AI assistants with Go text/template support.

- Add Instruction type and InstructionsConfig to domain types (mcp.go)
- Implement compass package with model tier detection (~30 models),
  environment detection (OS, shell, Docker, SSH, tools), and template
  rendering with ModelContext and EnvContext
- Extend ConfigService with instruction CRUD methods
- Register "instructions" MCP prompt that renders enabled instructions
  with optional model_id argument for context-aware output
- Add web UI pages for instructions management (list, create, edit, delete)
  with live preview functionality
- Include comprehensive tests for config persistence, tier detection,
  env detection, and template rendering

🐨 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
…uctions

- Change model tiers from agi/engineer/monkey to large/small
- Add ModelTiers field to InstructionsConfig for custom model mappings
- Custom tiers from config override built-in defaults
- Fix comment: Helmsman is Rust, not Ruby

Add repo-local instruction discovery for worktree sharing:
- .git/switchboard/instructions.json - worktree-shared, uncommitted
- .switchboard/instructions.json - committed, version-controlled
- ~/.config/switchboard/config.json - user-wide defaults

Instructions merge with priority: repo-local > project > global.
This allows testing instructions across git worktrees without committing.

🐨 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant