command-code 0.52.5 → 1.0.1
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/CHANGELOG.md +2547 -0
- package/dist/bundled/command-code-knowledge/SKILL.md +52 -0
- package/dist/bundled/command-code-knowledge/reference/checkpoints.md +366 -0
- package/dist/bundled/command-code-knowledge/reference/custom-agents.md +91 -0
- package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +345 -0
- package/dist/bundled/command-code-knowledge/reference/headless.md +234 -0
- package/dist/bundled/command-code-knowledge/reference/hooks.md +1097 -0
- package/dist/bundled/command-code-knowledge/reference/mcp.md +626 -0
- package/dist/bundled/command-code-knowledge/reference/memory.md +98 -0
- package/dist/bundled/command-code-knowledge/reference/models.md +81 -0
- package/dist/bundled/command-code-knowledge/reference/permissions.md +412 -0
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +101 -0
- package/dist/bundled/command-code-knowledge/reference/product-help.md +421 -0
- package/dist/bundled/command-code-knowledge/reference/skills.md +993 -0
- package/dist/bundled/mod-builder/SKILL.md +128 -0
- package/dist/bundled/mod-builder/examples/block-dangerous-commands.ts +41 -0
- package/dist/bundled/mod-builder/examples/custom-entry-renderer.ts +32 -0
- package/dist/bundled/mod-builder/examples/custom-tool.ts +53 -0
- package/dist/bundled/mod-builder/examples/flags-and-options.ts +29 -0
- package/dist/bundled/mod-builder/examples/input-shortcuts.ts +41 -0
- package/dist/bundled/mod-builder/examples/kitchen-sink.ts +110 -0
- package/dist/bundled/mod-builder/examples/lifecycle-hooks.ts +64 -0
- package/dist/bundled/mod-builder/examples/observe-events.ts +30 -0
- package/dist/bundled/mod-builder/examples/slash-command.ts +33 -0
- package/dist/bundled/mod-builder/reference/api.md +81 -0
- package/dist/bundled/mod-builder/reference/hooks-and-events.md +308 -0
- package/dist/bundled/mod-builder/reference/overview.md +161 -0
- package/dist/bundled/mod-builder/reference/packaging.md +63 -0
- package/dist/bundled/mod-builder/reference/ui.md +63 -0
- package/dist/bundled/mod-builder/reference/verify.md +58 -0
- package/dist/bundled/skill-builder/SKILL.md +104 -0
- package/dist/cli.mjs +5 -5
- package/package.json +35 -26
- package/vsix/commandcode-vscode.vsix +0 -0
- /package/{skills → dist/bundled}/agent-browser/SKILL.md +0 -0
- /package/{skills → dist/bundled}/design/SKILL.md +0 -0
- /package/{skills → dist/bundled}/design/references/border.md +0 -0
- /package/{skills → dist/bundled}/design/references/button.md +0 -0
- /package/{skills → dist/bundled}/design/references/checkup.md +0 -0
- /package/{skills → dist/bundled}/design/references/color.md +0 -0
- /package/{skills → dist/bundled}/design/references/create.md +0 -0
- /package/{skills → dist/bundled}/design/references/design-html.md +0 -0
- /package/{skills → dist/bundled}/design/references/deslop.md +0 -0
- /package/{skills → dist/bundled}/design/references/finish.md +0 -0
- /package/{skills → dist/bundled}/design/references/interaction.md +0 -0
- /package/{skills → dist/bundled}/design/references/layout.md +0 -0
- /package/{skills → dist/bundled}/design/references/motion.md +0 -0
- /package/{skills → dist/bundled}/design/references/redesign.md +0 -0
- /package/{skills → dist/bundled}/design/references/refine.md +0 -0
- /package/{skills → dist/bundled}/design/references/relayout.md +0 -0
- /package/{skills → dist/bundled}/design/references/report-html.md +0 -0
- /package/{skills → dist/bundled}/design/references/responsive.md +0 -0
- /package/{skills → dist/bundled}/design/references/review.md +0 -0
- /package/{skills → dist/bundled}/design/references/setup.md +0 -0
- /package/{skills → dist/bundled}/design/references/shadow.md +0 -0
- /package/{skills → dist/bundled}/design/references/smell.md +0 -0
- /package/{skills → dist/bundled}/design/references/surface.md +0 -0
- /package/{skills → dist/bundled}/design/references/tokenize.md +0 -0
- /package/{skills → dist/bundled}/design/references/typeset.md +0 -0
- /package/{skills → dist/bundled}/design/references/voice.md +0 -0
- /package/{skills → dist/bundled}/design/references/writing.md +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<!-- GENERATED FILE — do not edit. Source: packages/docs/src/app/core-concepts/plan-mode/page.mdx. Regenerate: pnpm generate:knowledge -->
|
|
2
|
+
|
|
3
|
+
# Plan Mode and Auto-Accept Mode
|
|
4
|
+
|
|
5
|
+
Command Code separates reasoning from execution using permission modes:
|
|
6
|
+
|
|
7
|
+
- **Plan Mode**: Explore and plan without executing file changes
|
|
8
|
+
- **Auto-Accept Mode**: Implement changes without confirmation prompts
|
|
9
|
+
|
|
10
|
+
`Shift + Tab` is your CLI shortcut to switch between plan and auto-accept modes.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Plan Mode
|
|
15
|
+
|
|
16
|
+
Plan mode helps you with structured thinking. It can:
|
|
17
|
+
|
|
18
|
+
- Read your codebase
|
|
19
|
+
- Search files
|
|
20
|
+
- Analyze architecture
|
|
21
|
+
- Discuss tradeoffs
|
|
22
|
+
- Propose implementation plans
|
|
23
|
+
|
|
24
|
+
It **cannot**:
|
|
25
|
+
|
|
26
|
+
- Modify files
|
|
27
|
+
- Run shell commands
|
|
28
|
+
- Apply patches
|
|
29
|
+
|
|
30
|
+
We recommend Plan mode to:
|
|
31
|
+
|
|
32
|
+
- Explore unfamiliar codebases
|
|
33
|
+
- Debug complex issues
|
|
34
|
+
- Design multi-file features
|
|
35
|
+
- Evaluate architecture decisions
|
|
36
|
+
- Identify edge cases early
|
|
37
|
+
- Review sensitive or critical flows
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Auto-Accept Mode
|
|
42
|
+
|
|
43
|
+
Auto-Accept mode is for fast implementation and execution.
|
|
44
|
+
|
|
45
|
+
- Modifies files directly
|
|
46
|
+
- Applies patches without confirmation
|
|
47
|
+
- Executes shell commands
|
|
48
|
+
- Proceeds step-by-step automatically
|
|
49
|
+
|
|
50
|
+
We recommend Auto-Accept mode when:
|
|
51
|
+
|
|
52
|
+
- The approach is already clear
|
|
53
|
+
- You are iterating quickly
|
|
54
|
+
- You trust the implementation path
|
|
55
|
+
|
|
56
|
+
Command Code creates **Checkpoints** before modifying files, so you can rewind at any time.
|
|
57
|
+
|
|
58
|
+
Learn how to use [checkpoints](./checkpoints.md) in Command Code.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Default Mode
|
|
63
|
+
|
|
64
|
+
Default mode sits between the Plan and Auto-Accept modes.
|
|
65
|
+
|
|
66
|
+
- File edits require confirmation
|
|
67
|
+
- Commands require approval
|
|
68
|
+
|
|
69
|
+
Use the Default mode when you want controlled iteration without fully separating planning and execution.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Suggested workflow with modes
|
|
74
|
+
|
|
75
|
+
1. Start in **Plan Mode**
|
|
76
|
+
2. Explore relevant files
|
|
77
|
+
3. Discuss approach and edge cases
|
|
78
|
+
4. Switch to **Auto-Accept Mode** if you're ready to implement
|
|
79
|
+
5. Rewind with Checkpoints if needed
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Example use cases for choosing the right mode
|
|
84
|
+
|
|
85
|
+
| Use Case | Recommended Mode |
|
|
86
|
+
| ------------------------------ | ---------------- |
|
|
87
|
+
| New feature with unclear scope | Plan |
|
|
88
|
+
| Debugging complex issue | Plan |
|
|
89
|
+
| Multi-file refactor | Plan |
|
|
90
|
+
| Security review | Plan |
|
|
91
|
+
| Small bug fix | Auto-Accept |
|
|
92
|
+
| Routine refactor | Auto-Accept |
|
|
93
|
+
| Running tests and adjusting | Auto-Accept |
|
|
94
|
+
| Quick typo fix | Auto-Accept |
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Next Steps
|
|
99
|
+
|
|
100
|
+
- Use **Plan Mode** to outline a change, then switch to **Auto-Accept** to implement it
|
|
101
|
+
- Join our [Discord community](https://commandcode.ai/discord) for support
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
<!-- GENERATED FILE — do not edit. Source: packages/harness/src/tools/get-command-code-knowledge/knowledge-content.ts. Regenerate: pnpm generate:knowledge -->
|
|
2
|
+
|
|
3
|
+
# Command Code — Product Knowledge
|
|
4
|
+
|
|
5
|
+
## KEYBOARD SHORTCUTS
|
|
6
|
+
- Shift+Tab: Toggle mode (default → auto-accept → plan)
|
|
7
|
+
- Ctrl+O: Toggle expanded tool output
|
|
8
|
+
- Alt+P: Quick model switch (Option+P on macOS)
|
|
9
|
+
- Ctrl+G: Open input in external editor ($EDITOR)
|
|
10
|
+
- Press Esc twice: Rewind to previous checkpoint
|
|
11
|
+
- /: Open command menu
|
|
12
|
+
|
|
13
|
+
## SLASH COMMANDS (type these in the chat input)
|
|
14
|
+
- /init: Initialize AGENTS.md for this project
|
|
15
|
+
- /import [claude|codex|cursor|pi|opencode|gemini]: Import your setup (skills, agents, commands, MCP, memory) from another coding agent
|
|
16
|
+
- /goal [<objective>|clear|status]: Set an objective for the agent to work towards
|
|
17
|
+
- /memory: Manage Command Code memory
|
|
18
|
+
- /resume: Resume a past conversation
|
|
19
|
+
- /sessions: Resume a past conversation (alias of /resume)
|
|
20
|
+
- /fork [name]: Fork the conversation into a new session
|
|
21
|
+
- /worktree [name|list|remove <name>]: Create, list, or switch isolated git worktrees
|
|
22
|
+
- /clone: Clone the current branch into a new session and switch to it
|
|
23
|
+
- /rename [name]: Rename the current session
|
|
24
|
+
- /name [name]: Alias of /rename; bare /name shows the current name
|
|
25
|
+
- /rewind: Restore to a previous checkpoint (Press Esc twice)
|
|
26
|
+
- /tree: Browse the session tree and jump to any point in it
|
|
27
|
+
- /clear (new): Start a new session with empty context; previous stays on disk, resumable with /resume (/new is the same command)
|
|
28
|
+
- /theme: Switch between dark and light themes
|
|
29
|
+
- /share [gist]: Share conversation — /share [gist [html|jsonl|md]]
|
|
30
|
+
- /unshare: Stop sharing conversation
|
|
31
|
+
- /taste: Manage Taste learning and usage
|
|
32
|
+
- /learn-taste: Learn taste from sessions with other coding agents (Claude Code, Cursor, etc)
|
|
33
|
+
- /skills: Browse and open agent skills
|
|
34
|
+
- /agents: Manage agent configurations
|
|
35
|
+
- /design: Design partner: audit, build, compose, and ship UI — type /design to browse modes
|
|
36
|
+
- /mcp: Manage MCP server connections
|
|
37
|
+
- /model: Switch between Command Code models
|
|
38
|
+
- /effort: Set reasoning effort for the current model
|
|
39
|
+
- /provider: Select AI provider (Command Code or Anthropic)
|
|
40
|
+
- /compact: Compact the conversation history
|
|
41
|
+
- /compact-mode: Select a compact mode to compact sessions
|
|
42
|
+
- /config: Search and change settings, including which model runs each built-in task
|
|
43
|
+
- /context: Show context window usage and breakdown
|
|
44
|
+
- /ide: Connect IDE to share your open file and selected lines
|
|
45
|
+
- /terminal-setup: Setup VSCode keybindings
|
|
46
|
+
- /login: Log in to Command Code
|
|
47
|
+
- /logout: Log out of Command Code
|
|
48
|
+
- /courses: Open Command Code courses in your browser
|
|
49
|
+
- /feedback [title]: Share feedback or report bugs (optional title)
|
|
50
|
+
- /trace: Copy the current trace id; required for support debugging
|
|
51
|
+
- /session-file: Show the current session id and path to the on-disk session file
|
|
52
|
+
- /copy: Copy the last response to the clipboard
|
|
53
|
+
- /export [path]: Export session — /export [html|jsonl|md] or a file path
|
|
54
|
+
- /session: Show session info: id, model, messages, context
|
|
55
|
+
- /changelog: See what's new in Command Code
|
|
56
|
+
- /hotkeys: Show all keyboard shortcuts
|
|
57
|
+
- /todos: Manage the session todo list — x to remove an item, c to clear
|
|
58
|
+
- /plan [task]: Enter plan mode; `/plan <task>` plans that task
|
|
59
|
+
- /mode [name]: Show or switch the permission mode — /mode [default|auto-accept|plan]
|
|
60
|
+
- /mode:default: Switch to default mode (prompt before edits/commands)
|
|
61
|
+
- /mode:auto-accept: Switch to auto-accept mode (accept edits automatically)
|
|
62
|
+
- /mode:plan: Switch to plan mode (read-only, no side effects)
|
|
63
|
+
- /plans [name]: Browse, review, and annotate saved plans
|
|
64
|
+
- /plan-review: Review this session's latest plan
|
|
65
|
+
- /review [pr]: Review a pull request (optional PR number)
|
|
66
|
+
- /pr-comments: Fetch all PR comments for current branch
|
|
67
|
+
- /add-dir: Manage additional directory scope
|
|
68
|
+
- /status: Show comprehensive environment status
|
|
69
|
+
- /usage: Display credits, plan, and usage metrics
|
|
70
|
+
- /upgrade: Open billing page to upgrade your plan
|
|
71
|
+
- /extra: Open billing page to buy on-demand credits
|
|
72
|
+
- /update: Update Command Code to the latest version
|
|
73
|
+
- /reload: Restart Command Code and resume this session (applies a staged update)
|
|
74
|
+
- /help: Display help information
|
|
75
|
+
- /exit: Exit Command Code
|
|
76
|
+
- /quit: Exit Command Code (alias of /exit)
|
|
77
|
+
|
|
78
|
+
## CLI SUBCOMMANDS
|
|
79
|
+
- cmd info: Display system information
|
|
80
|
+
- cmd status: Show authentication status
|
|
81
|
+
- cmd help: Display help information
|
|
82
|
+
- cmd whoami: Show current user
|
|
83
|
+
- cmd update: Update Command Code to the latest version
|
|
84
|
+
- cmd feedback [title]: Share feedback or report bugs (optional title)
|
|
85
|
+
- cmd taste: Manage taste learning packages
|
|
86
|
+
- cmd taste learn <source>: Learn taste from a local repository or GitHub repo
|
|
87
|
+
- cmd learn-taste: Learn command structure from repositories
|
|
88
|
+
- cmd mcp: Manage MCP (Model Context Protocol) servers
|
|
89
|
+
- cmd skills: Manage skills from GitHub repositories
|
|
90
|
+
- cmd mods: Manage mods (loadable extensions) from npm, git, or local paths
|
|
91
|
+
- cmd login: Login with Command Code account
|
|
92
|
+
- cmd logout: Log out of Command Code
|
|
93
|
+
|
|
94
|
+
## CLI EXAMPLES
|
|
95
|
+
- cmd: Start interactive session
|
|
96
|
+
- cmd "fix the login bug": Start with a task
|
|
97
|
+
- cmd -c: Continue last conversation
|
|
98
|
+
- cmd -r: Resume a past session
|
|
99
|
+
- cmd --resume "auth refactor": Resume a named session
|
|
100
|
+
- cmd -p "your query": Run non-interactive query
|
|
101
|
+
- cmd taste learn .: Learn taste from the current repository
|
|
102
|
+
- cmd taste learn owner/repo: Learn taste from a GitHub repository
|
|
103
|
+
- cmd --add-dir ../shared: Start with additional directory scope
|
|
104
|
+
- cmd info: Show system information
|
|
105
|
+
- cmd feedback "title": Open feedback form with title
|
|
106
|
+
|
|
107
|
+
## CLI OPTIONS (flags when launching cmd)
|
|
108
|
+
- cmd: Start interactive session
|
|
109
|
+
- cmd "message": Start with initial message
|
|
110
|
+
- -r, --resume [name]: Resume a conversation by id or name (use quotes for multi-word names), or pick from history
|
|
111
|
+
- -c, --continue: Continue the last conversation
|
|
112
|
+
- --fork-session: With --resume/--continue, fork the session into a new one (original left untouched)
|
|
113
|
+
- --session <path|id>: Resume a session by transcript path (.jsonl) or a unique session-id prefix
|
|
114
|
+
- --no-session: Don't persist this session to disk (in-memory only)
|
|
115
|
+
- -n, --name <name>: Set the session display name
|
|
116
|
+
- -t, --trust: Auto-trust project (skip initial permission prompt)
|
|
117
|
+
- -p, --print [query]: Run in non-interactive mode, output response and exit
|
|
118
|
+
- --max-turns <number>: Cap conversation turns in -p mode (default 100; exit 8 on cap-hit)
|
|
119
|
+
- --output-format <format>: -p output: text (default) or json (NDJSON event stream + final result line)
|
|
120
|
+
- -m, --model <model>: Run on a specific model this session
|
|
121
|
+
- --effort <level>: Set reasoning effort for the session (e.g. low, medium, high) — depends on the model
|
|
122
|
+
- --theme <theme>: Set the color theme (dark or light)
|
|
123
|
+
- --config <key=value>: Set any setting headlessly, e.g. --config theme=dark (repeatable) — the CLI form of /config
|
|
124
|
+
- --list-models: List the models available for use
|
|
125
|
+
- --effort <level>: Set reasoning effort (low, medium, high — per model)
|
|
126
|
+
- --theme <theme>: Set the color theme (dark or light)
|
|
127
|
+
- --config <key=value>: Set a setting headlessly, e.g. --config theme=dark (repeatable)
|
|
128
|
+
- --plan: Start in plan mode
|
|
129
|
+
- --permission-mode <mode>: Set permission mode (standard, plan, auto-accept)
|
|
130
|
+
- --auto-accept: Start in auto-accept mode
|
|
131
|
+
- --yolo: Bypass all permission prompts (alias for --dangerously-skip-permissions)
|
|
132
|
+
- --add-dir <directory>: Add directory to workspace context
|
|
133
|
+
- -w, --worktree [name]: Run in an isolated managed worktree (name, path, or #PR; generated when omitted)
|
|
134
|
+
- --mod <path>: Load a mod file or directory for this session (repeatable)
|
|
135
|
+
- --mod-option <name=value>: Set a mod-declared flag value (repeatable)
|
|
136
|
+
- --skill <path>: Load extra skills from a path (a skill directory or a directory of skills); repeatable
|
|
137
|
+
- --no-skills: Skip skill discovery; paths given via --skill still load
|
|
138
|
+
- --skip-onboarding: Skip taste onboarding (for automated runs)
|
|
139
|
+
- --ide-setup: Connect IDE to share your open file and selected lines
|
|
140
|
+
- --no-auto-update: Disable automatic background updates for this run
|
|
141
|
+
- -v, --version: Output the version number
|
|
142
|
+
- -h, --help: Display this help message
|
|
143
|
+
|
|
144
|
+
## TASTE SYSTEM
|
|
145
|
+
Taste is powered by the meta neuro-symbolic AI model taste-1 with continuous reinforcement learning (RL). It combines reasoning with neural intuition to learn your coding preferences.
|
|
146
|
+
|
|
147
|
+
How taste works:
|
|
148
|
+
- Learns from you — every accept, reject, and edit becomes a signal
|
|
149
|
+
- Thinks like you — learns patterns and micro-decisions you'd never document
|
|
150
|
+
- Grows with you — continuous learning loop that never goes stale
|
|
151
|
+
|
|
152
|
+
Enable taste: Use /taste in a session or run npx taste from the command line.
|
|
153
|
+
|
|
154
|
+
Taste packages (three types):
|
|
155
|
+
- Project: Stored in .commandcode/taste/ — learnings unique to this codebase
|
|
156
|
+
- Global: Stored in ~/.commandcode/taste/ — personal taste across all projects (use -g flag)
|
|
157
|
+
- Remote: Stored at commandcode.ai/username/taste — team sharing, backup, sync across machines
|
|
158
|
+
|
|
159
|
+
File structure:
|
|
160
|
+
.commandcode/taste/
|
|
161
|
+
├── taste.md (main taste file)
|
|
162
|
+
├── cli/taste.md
|
|
163
|
+
├── typescript/taste.md
|
|
164
|
+
└── architecture/taste.md
|
|
165
|
+
|
|
166
|
+
Key commands:
|
|
167
|
+
- npx taste push --all — push entire project taste to remote
|
|
168
|
+
- npx taste pull username/project-name — pull taste from remote
|
|
169
|
+
- npx taste push cli -g — push package to global
|
|
170
|
+
- npx taste pull cli -g — pull package from global
|
|
171
|
+
- npx taste list — list available packages
|
|
172
|
+
- npx taste lint — validate package format
|
|
173
|
+
- npx taste open — open packages in editor
|
|
174
|
+
|
|
175
|
+
Privacy: Taste processing runs on your codebase and stores learning data locally only.
|
|
176
|
+
|
|
177
|
+
## KEY FEATURES
|
|
178
|
+
- Taste System: Automatically learns coding preferences from interactions and applies them consistently
|
|
179
|
+
- Skills: User-defined knowledge modules for specialized tasks (stored in .commandcode/skills/ or .agents/skills/)
|
|
180
|
+
- Agents: Custom agent configurations for different workflows (stored in .commandcode/agents/)
|
|
181
|
+
- Memory: Project-specific instructions via COMMANDCODE.md files
|
|
182
|
+
- MCP: Model Context Protocol server connections for extended tool capabilities
|
|
183
|
+
- Plan Mode: Structured exploration and planning before implementation [Shift+Tab to toggle]
|
|
184
|
+
- Conversation Management: Resume, continue, share, and rewind conversations
|
|
185
|
+
- PR Review: Built-in pull request review capabilities (/review command)
|
|
186
|
+
- Taste Learning: Learnings appear inline in the conversation as TASTE blocks while you work
|
|
187
|
+
- Model Switching: Switch between models with Alt+P (Option+P on macOS)
|
|
188
|
+
|
|
189
|
+
## EXTENDING COMMAND CODE
|
|
190
|
+
Command Code is extended with skills, agents, MCP servers, and project memory — all discovered from files in your project or home directory, no restart required.
|
|
191
|
+
|
|
192
|
+
SKILLS (reusable playbooks): a directory containing a SKILL.md file, discovered from:
|
|
193
|
+
- .commandcode/skills/<name>/SKILL.md (project)
|
|
194
|
+
- ~/.commandcode/skills/<name>/SKILL.md (personal, across all projects)
|
|
195
|
+
- .agents/skills/<name>/SKILL.md (compat location, project or personal)
|
|
196
|
+
|
|
197
|
+
Minimal SKILL.md:
|
|
198
|
+
---
|
|
199
|
+
name: commit-messages
|
|
200
|
+
description: Write a conventional commit message from staged changes. Use when the user asks to commit or write a commit message.
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
# Commit Messages
|
|
204
|
+
1. Run `git diff --staged` to see what changed.
|
|
205
|
+
2. Write a one-line conventional-commit summary (type(scope): subject).
|
|
206
|
+
3. Add a short body only if the change needs explaining.
|
|
207
|
+
|
|
208
|
+
Frontmatter fields: name (required — lowercase letters/numbers/hyphens only, must match the directory name), description (required, ≤1024 chars — this is what the model matches against), allowed-tools (optional — a space-delimited allowlist, e.g. "Bash(git:*) Read"), argument-hint (optional — shown when the skill is invoked with arguments), disable-model-invocation (optional true/false — true stops the model from auto-invoking it; /name still works). Invoke with /<name>, or let the model invoke it automatically when the description matches the task. Manage installed skills with /skills.
|
|
209
|
+
|
|
210
|
+
AGENTS (sub-agents for the task tool): a single Markdown file at .commandcode/agents/<name>.md (project) or ~/.commandcode/agents/<name>.md (personal). Full authoring guide — file format, model pinning, and the create-an-agent-on-request recipe — is in the CUSTOM AGENTS section (topic: agents).
|
|
211
|
+
|
|
212
|
+
MCP SERVERS (external tools and data): add one with the CLI —
|
|
213
|
+
cmd mcp add --transport http notion https://mcp.notion.com/mcp
|
|
214
|
+
cmd mcp add github -- npx -y @modelcontextprotocol/server-github
|
|
215
|
+
or hand-write .mcp.json in the project root:
|
|
216
|
+
{
|
|
217
|
+
"mcpServers": {
|
|
218
|
+
"github": {
|
|
219
|
+
"command": "npx",
|
|
220
|
+
"args": ["-y", "@modelcontextprotocol/server-github"]
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
Scopes, lowest to highest precedence: user (~/.commandcode/mcp.json) < project (<project>/.mcp.json, checked in and shared) < local (~/.commandcode/projects/<slug>/mcp.json, private to this machine, not checked in). Manage connections with /mcp.
|
|
225
|
+
|
|
226
|
+
PROJECT MEMORY (AGENTS.md): the project-root AGENTS.md holds conventions the agent should always follow (build/test commands, code style, architecture notes). A nested <dir>/AGENTS.md layers in directory-specific rules for files under that directory (nearest wins). An @path reference inlines another file's content (skipped inside fenced code blocks). Run /init to scaffold one, /memory to edit it.
|
|
227
|
+
|
|
228
|
+
## CUSTOM AGENTS (sub-agents)
|
|
229
|
+
Custom agents are specialized sub-agents the main session delegates to via the task tool. Each is ONE Markdown file — no build step, no restart; the registry re-reads disk every turn, so a new agent is usable on the next message.
|
|
230
|
+
|
|
231
|
+
Locations (project wins a name clash):
|
|
232
|
+
- .commandcode/agents/<name>.md — this project
|
|
233
|
+
- ~/.commandcode/agents/<name>.md — personal, all projects
|
|
234
|
+
|
|
235
|
+
Complete agent file:
|
|
236
|
+
---
|
|
237
|
+
name: "changelog-writer"
|
|
238
|
+
description: "Writes and updates CHANGELOG.md entries from recent commits. Use after merging changes or when the user asks for a changelog."
|
|
239
|
+
tools: "read_file, grep, glob, shell_command, edit_file"
|
|
240
|
+
model: "moonshotai/Kimi-K2.5"
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
You write crisp changelog entries. Read the recent commits, group them by type (features, fixes), and write terse one-liners under the right heading in CHANGELOG.md.
|
|
244
|
+
|
|
245
|
+
Frontmatter fields:
|
|
246
|
+
- name (required) — lowercase-kebab-case; becomes the subagent_type the task tool dispatches on. Reserved (do not use): explore, plan, review, general.
|
|
247
|
+
- description (required) — when to delegate to this agent; the orchestrator picks agents by this text.
|
|
248
|
+
- tools (optional) — "*" for every tool, or a comma/space-delimited list of tool names; OMITTED MEANS NO TOOLS. Grant the minimum the role needs (read-only for reviewers/analysts; add edit_file/shell_command only for agents that must change things).
|
|
249
|
+
- model (optional) — pins the model this agent ALWAYS runs on, independent of the session's /model. Omit it (or write "inherit") to follow the session model. Pinned agents keep their own prompt cache.
|
|
250
|
+
|
|
251
|
+
Valid model ids (the /model catalog — use these EXACT ids):
|
|
252
|
+
- claude-sonnet-5
|
|
253
|
+
- claude-sonnet-4-6
|
|
254
|
+
- claude-fable-5
|
|
255
|
+
- claude-opus-4-8
|
|
256
|
+
- claude-opus-4-7
|
|
257
|
+
- claude-haiku-4-5-20251001
|
|
258
|
+
- gpt-5.6-sol
|
|
259
|
+
- gpt-5.6-terra
|
|
260
|
+
- gpt-5.6-luna
|
|
261
|
+
- gpt-5.5
|
|
262
|
+
- gpt-5.4
|
|
263
|
+
- gpt-5.3-codex
|
|
264
|
+
- gpt-5.4-mini
|
|
265
|
+
- MiniMaxAI/MiniMax-M3-Free
|
|
266
|
+
- moonshotai/Kimi-K3
|
|
267
|
+
- thinkingmachines/inkling
|
|
268
|
+
- deepseek/deepseek-v4-pro
|
|
269
|
+
- deepseek/deepseek-v4-flash
|
|
270
|
+
- moonshotai/Kimi-K2.7-Code
|
|
271
|
+
- moonshotai/Kimi-K2.7-Code-Highspeed
|
|
272
|
+
- moonshotai/Kimi-K2.6
|
|
273
|
+
- moonshotai/Kimi-K2.5
|
|
274
|
+
- zai-org/GLM-5.2
|
|
275
|
+
- zai-org/GLM-5.2-Fast
|
|
276
|
+
- zai-org/GLM-5.1
|
|
277
|
+
- zai-org/GLM-5
|
|
278
|
+
- MiniMaxAI/MiniMax-M3
|
|
279
|
+
- MiniMaxAI/MiniMax-M2.7
|
|
280
|
+
- MiniMaxAI/MiniMax-M2.5
|
|
281
|
+
- xiaomi/mimo-v2.5-pro
|
|
282
|
+
- xiaomi/mimo-v2.5
|
|
283
|
+
- Qwen/Qwen3.6-Max-Preview
|
|
284
|
+
- Qwen/Qwen3.6-Plus
|
|
285
|
+
- Qwen/Qwen3.7-Max
|
|
286
|
+
- Qwen/Qwen3.7-Plus
|
|
287
|
+
- stepfun/Step-3.7-Flash
|
|
288
|
+
- stepfun/Step-3.5-Flash
|
|
289
|
+
- tencent/Hy3
|
|
290
|
+
- google/gemini-3.6-flash
|
|
291
|
+
- google/gemini-3.5-flash
|
|
292
|
+
- google/gemini-3.5-flash-lite
|
|
293
|
+
- google/gemini-3.1-flash-lite
|
|
294
|
+
- sakana/fugu-ultra
|
|
295
|
+
- xai/grok-4.5
|
|
296
|
+
- meta/muse-spark-1.1
|
|
297
|
+
- nvidia/nemotron-3-ultra-550b-a55b
|
|
298
|
+
- poolside/laguna-s-2.1-free
|
|
299
|
+
A BYO-provider id (from a configured custom provider) also works and is passed through as-is.
|
|
300
|
+
|
|
301
|
+
WHEN THE USER ASKS YOU TO CREATE AN AGENT (e.g. "make a changelog agent with a cheap model"):
|
|
302
|
+
1. Do NOT search the codebase for how — this section is the authoritative spec.
|
|
303
|
+
2. Derive a lowercase-kebab-case name (not a reserved name), a delegation-worthy description, and a short, focused system prompt for the role.
|
|
304
|
+
3. Pick the minimal tool set for the role.
|
|
305
|
+
4. If the user named a model (or a tier like "cheap"/"fast"/"deep reasoning"), map it to an EXACT id from the list above and set model:; otherwise omit model: so the agent inherits the session model. Never invent a model id.
|
|
306
|
+
5. Write the file to .commandcode/agents/<name>.md (project) unless the user asked for a personal agent (~/.commandcode/agents/<name>.md).
|
|
307
|
+
6. Confirm: the agent is live on the next message — the user can also see it under /agents, and the task tool can now dispatch to it by name.
|
|
308
|
+
|
|
309
|
+
To modify an existing agent, edit its file in place (same fields). To remove one, delete the file.
|
|
310
|
+
|
|
311
|
+
## MODS (loadable plugins — the ModApi)
|
|
312
|
+
Mods are loadable plugins written against the ModApi — a TypeScript file that Command Code discovers on disk and loads onto its agent loop. This is the plugin layer above hooks/skills: a mod can add tools the model calls, slash commands, mutating lifecycle hooks, event observers, typed-input interception, custom feed rendering, flags, and model providers. Command Code's own built-in features (providers, session titling, the update notice) are written as mods against this same API.
|
|
313
|
+
|
|
314
|
+
A mod default-exports a factory that receives the API bound as `cmd`:
|
|
315
|
+
|
|
316
|
+
import type {ModApi} from '@commandcode/harness';
|
|
317
|
+
export default function (cmd: ModApi) {
|
|
318
|
+
cmd.addCommand({name: 'hello', handler: () => ({message: 'hi from a mod'})});
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
Save it at ~/.commandcode/mods/<name>.ts (personal) or <project>/.commandcode/mods/<name>.ts (project, trust-gated). It loads next session, or test now with `cmd --mod ./<name>.ts`. No build step — jiti compiles at load. Manage packages with `cmd mods add|remove|list|update`.
|
|
322
|
+
|
|
323
|
+
Registration verbs (each returns a Disposable): cmd.addTool, cmd.addCommand, cmd.addFlag, cmd.addProvider, cmd.addRenderer, cmd.on(event, handler), and cmd.hooks({...}). THE ONE RULE: cmd.hooks mutates (block/rewrite a tool via beforeToolCall/afterToolCall, add to the prompt via appendSystemPrompt, rewrite typed input via transformInput, post-turn work via onRunEnd); cmd.on only observes.
|
|
324
|
+
|
|
325
|
+
To help a developer build one: use the bundled "mod-builder" skill (/mod-builder or let the model invoke it) — it has runnable single-file examples for each capability plus the full mods reference under its reference/ directory (generated from the public docs at https://commandcode.ai/docs/mods).
|
|
326
|
+
|
|
327
|
+
## FREQUENTLY ASKED QUESTIONS
|
|
328
|
+
Q: What is Command Code?
|
|
329
|
+
A: Command Code is the first coding agent that automatically learns your taste of writing great code.
|
|
330
|
+
|
|
331
|
+
Q: What is taste-1?
|
|
332
|
+
A: taste-1 is our meta neuro-symbolic AI model with continuous reinforcement learning (RL).
|
|
333
|
+
|
|
334
|
+
Q: Is Command Code free?
|
|
335
|
+
A: Command Code offers both free and premium plans. Check https://commandcode.ai/pricing for details.
|
|
336
|
+
|
|
337
|
+
Q: How do I install Command Code?
|
|
338
|
+
A: Run npm i -g command-code, then cmd login, then cmd to start.
|
|
339
|
+
|
|
340
|
+
Q: What are Agent Skills?
|
|
341
|
+
A: Reusable instructions that teach Command Code how to handle specific tasks like code reviews, testing, or commit messages. Use /skills to browse them.
|
|
342
|
+
|
|
343
|
+
Q: What are MCP servers?
|
|
344
|
+
A: MCP (Model Context Protocol) servers let Command Code connect to external tools and data sources like GitHub, Notion, databases, and more. Use /mcp to manage them.
|
|
345
|
+
|
|
346
|
+
Q: What is plan mode?
|
|
347
|
+
A: Plan mode lets you review and approve Command Code's approach before it writes any code. Press Shift+Tab to toggle it.
|
|
348
|
+
|
|
349
|
+
Q: What is headless mode?
|
|
350
|
+
A: Headless mode lets you run Command Code non-interactively in scripts, CI/CD pipelines, and automation workflows. Use cmd -p "query" to run.
|
|
351
|
+
|
|
352
|
+
Q: How do I fix "command not found" after installing?
|
|
353
|
+
A: Ensure your global npm bin directory is in your PATH. Run npm config get prefix to find it, then add <prefix>/bin to your PATH.
|
|
354
|
+
|
|
355
|
+
Q: Why am I getting unauthorized errors?
|
|
356
|
+
A: Run cmd logout followed by cmd login to refresh your session. If the issue persists, check your account at https://commandcode.ai/studio.
|
|
357
|
+
|
|
358
|
+
Q: How do I check my usage limits?
|
|
359
|
+
A: Visit the billing page in Command Code Studio at https://commandcode.ai/studio.
|
|
360
|
+
|
|
361
|
+
Q: My MCP server won't connect. What should I do?
|
|
362
|
+
A: Check the server config with cmd mcp get <name> and use /mcp inside a session to see the error. For stdio servers, ensure the command is installed and in your PATH.
|
|
363
|
+
|
|
364
|
+
Q: Where can I get help?
|
|
365
|
+
A: Join our Discord at https://commandcode.ai/discord, report issues on GitHub, or email support@commandcode.ai.
|
|
366
|
+
|
|
367
|
+
## TROUBLESHOOTING
|
|
368
|
+
|
|
369
|
+
### Installation
|
|
370
|
+
- "command not found" after install: Ensure global npm bin directory is in PATH. Run npm config get prefix, add <prefix>/bin to PATH, restart terminal.
|
|
371
|
+
|
|
372
|
+
### Authentication
|
|
373
|
+
- Login fails or session expired: Run cmd logout then cmd login. If still failing, delete ~/.commandcode/auth.json and retry.
|
|
374
|
+
- API key or provider issues: Verify provider config, check API key validity, check usage limits.
|
|
375
|
+
- Chrome Local Network Access prompt during login: Click "Allow" — this is expected and safe. Command Code runs a temporary local server for OAuth callback.
|
|
376
|
+
|
|
377
|
+
### MCP Servers
|
|
378
|
+
- Server won't connect: Check config with cmd mcp get <name>, verify command is in PATH, use /mcp in session for error details.
|
|
379
|
+
- Authentication issues: Re-authenticate with cmd mcp auth <server>, or clear and retry with cmd mcp auth --clear <server>.
|
|
380
|
+
|
|
381
|
+
### Skills
|
|
382
|
+
- Not appearing in /skills menu: Check directory structure (.commandcode/skills/ or .agents/skills/), verify SKILL.md exists with valid frontmatter.
|
|
383
|
+
- Editor not opening: Check $EDITOR is set and the editor is in PATH.
|
|
384
|
+
- Skill not being used: Make description more specific with keywords, ask Command Code explicitly to use the skill.
|
|
385
|
+
|
|
386
|
+
### Performance
|
|
387
|
+
- Slow responses: Check internet connection, disconnect unneeded MCP servers, keep prompts focused and specific.
|
|
388
|
+
- High token usage: Review usage in Studio, use headless mode for scripted tasks, use plan mode to agree on approach first.
|
|
389
|
+
|
|
390
|
+
### Support
|
|
391
|
+
- Discord: https://commandcode.ai/discord
|
|
392
|
+
- GitHub: https://github.com/commandcode/command-code
|
|
393
|
+
- Email: support@commandcode.ai
|
|
394
|
+
|
|
395
|
+
## PRICING & LIMITS
|
|
396
|
+
How it works:
|
|
397
|
+
- Monthly reset: Request limits reset at the start of each billing cycle.
|
|
398
|
+
- Auto top-up: Buy extra credits at model cost. Credits roll over and never expire.
|
|
399
|
+
- No AI training: Command Code does not train on your code or store your code snippets.
|
|
400
|
+
|
|
401
|
+
Manage your plan:
|
|
402
|
+
- Purchase credits or subscribe: Studio > Billing at https://commandcode.ai/billing
|
|
403
|
+
- Track usage: https://commandcode.ai/usage (personal). For an org: https://commandcode.ai/<orgLogin>/settings/usage
|
|
404
|
+
- Manage payment methods: Access billing portal from Studio > Billing
|
|
405
|
+
|
|
406
|
+
Premium requests: Any request that uses a premium model (like taste-1) during your coding session.
|
|
407
|
+
When you hit your limit: Continue with auto top-up enabled. Extra credits are purchased at model cost and roll over.
|
|
408
|
+
Switch plans: Upgrade or downgrade anytime from Studio > Billing. Changes take effect next billing cycle.
|
|
409
|
+
Team billing: Billed per seat. Credits are pooled at the team level.
|
|
410
|
+
|
|
411
|
+
Enterprise: Enhanced security, compliance, and control. Contact support@commandcode.ai for Enterprise edition.
|
|
412
|
+
|
|
413
|
+
## PRIVACY & LEGAL
|
|
414
|
+
- Command Code does not train on your code or store your code snippets.
|
|
415
|
+
- Taste processing runs on your codebase and stores learning data in your project and on your local machine only.
|
|
416
|
+
- Privacy Policy: https://commandcode.ai/privacy
|
|
417
|
+
- Terms of Service: https://commandcode.ai/terms
|
|
418
|
+
|
|
419
|
+
## HELPFUL LINKS
|
|
420
|
+
- Documentation: https://commandcode.ai/docs
|
|
421
|
+
- Discord Community: https://commandcode.ai/discord
|