@braingrid/cli 0.2.2 → 0.2.4

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 CHANGED
@@ -5,6 +5,73 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.4] - 2025-11-10
9
+
10
+ ### Added
11
+
12
+ - **BrainGrid context in Claude Code status line** (#36)
13
+ - Two-line status display showing project/requirement/task progress
14
+ - Auto-detects from `.braingrid/project.json` and git branch names
15
+ - Color-coded output: cyan for project, green for requirement, yellow for tasks
16
+ - Displays current task completion (e.g., `PROJ-130 > REQ-128 [2/5]`)
17
+ - Always shows workspace path, model name, and token usage
18
+ - Installed automatically with `braingrid setup claude-code`
19
+
20
+ - **Setup commands for Claude Code and Cursor integrations** (#35)
21
+ - New `braingrid setup claude-code` command installs slash commands and skills
22
+ - New `braingrid setup cursor` command installs Cursor rules and commands
23
+ - Fetches integration files from BrainGridAI/braingrid repository
24
+ - Injects content into CLAUDE.md or AGENTS.md with markers
25
+ - Interactive prompts for file conflicts with overwrite/skip/all/quit options
26
+ - Dry-run mode with `--dry-run` flag
27
+ - Force mode with `--force` flag to skip all prompts
28
+
29
+ - **Cursor IDE integration** (#34)
30
+ - Added AGENTS.md standard for Cursor AI agent configuration
31
+ - Supports auto-detection of project and requirement context
32
+ - Works with agent mode for autonomous task execution
33
+
34
+ - **Claude Code sync automation** (#33)
35
+ - New `pnpm docs:sync-claude` command syncs skills and slash commands
36
+ - Automatically updates BrainGridAI/braingrid repository
37
+ - Keeps Claude Code integration files in sync across repos
38
+
39
+ ### Fixed
40
+
41
+ - **Status line script path resolution** (code review fixes)
42
+ - Fixed critical bug using `import.meta.url` instead of `process.cwd()`
43
+ - Script now loads from package location, not user's directory
44
+ - Prevents "file not found" errors during setup
45
+
46
+ - **Shell script error handling**
47
+ - Added `set -o pipefail` to status line script
48
+ - Properly detects braingrid command failures in pipelines
49
+ - More robust JSON parsing with better error detection
50
+
51
+ - **Token display formatting**
52
+ - Fixed bug showing incorrect token counts (e.g., "24000k/200000k")
53
+ - Now correctly displays as "24k/200k tokens"
54
+
55
+ ## [0.2.3] - 2025-01-10
56
+
57
+ ### Added
58
+
59
+ - New `task summary` subcommand for quick table overview without content
60
+ - Use `braingrid task summary -r REQ-X` for compact task list
61
+ - Complements full detail view with lightweight summary option
62
+
63
+ ### Changed
64
+
65
+ - Simplified CLI output format with markdown as default
66
+ - `requirement breakdown` now defaults to markdown format (was table)
67
+ - `task list` now defaults to markdown format with full content (was table)
68
+ - Removed `--verbose` flag - full content always shown by default for AI-ready output
69
+ - Use `--format table` or new `task summary` command for compact view
70
+ - Updated `/breakdown` slash command documentation
71
+ - Removed all `--verbose` flag references
72
+ - Updated examples to use new default markdown format
73
+ - Added references to `task summary` for quick overviews
74
+
8
75
  ## [0.2.2] - 2025-11-10
9
76
 
10
77
  ### Added
package/README.md CHANGED
@@ -37,6 +37,80 @@ npm install -g @braingrid/cli
37
37
 
38
38
  ---
39
39
 
40
+ ## AI Coding Tool Integration
41
+
42
+ BrainGrid integrates natively with AI coding tools like **Cursor IDE** and **Claude Code** through the [AGENTS.md standard](https://agents.md/), providing seamless access to spec-driven development workflows directly in your editor.
43
+
44
+ ### What is AGENTS.md?
45
+
46
+ [AGENTS.md](https://agents.md/) is an open standard that allows AI coding assistants to automatically load project-specific guidance and commands. BrainGrid uses this standard to provide consistent CLI guidance across multiple tools:
47
+
48
+ - ✅ **Cursor IDE** - Automatic loading via AGENTS.md + slash commands
49
+ - ✅ **Claude Code** - Automatic loading via AGENTS.md or .claude/CLAUDE.md
50
+ - ✅ **GitHub Copilot** - Context from AGENTS.md
51
+ - ✅ **Growing ecosystem** of AGENTS.md-compatible tools
52
+
53
+ ### Setup for Cursor IDE
54
+
55
+ **Prerequisites:**
56
+
57
+ - Cursor IDE installed ([download here](https://cursor.sh/))
58
+ - BrainGrid CLI installed and authenticated
59
+
60
+ **How it works:**
61
+
62
+ 1. **AGENTS.md** at your repository root is automatically loaded by Cursor
63
+ 2. **.cursor/rules/braingrid.mdc** provides Cursor-specific enhancements (always-on rules)
64
+ 3. **Slash commands** available via `/` in Cursor's Agent input
65
+
66
+ **Available Commands:**
67
+
68
+ Type `/` in Cursor's Agent input to access:
69
+
70
+ - `/specify` - Create AI-refined requirements from natural language
71
+ - `/breakdown` - Break requirements into implementation tasks
72
+ - `/save-requirement` - Save requirement content to BrainGrid
73
+ - `/build` - Generate complete implementation plan
74
+
75
+ **Quick Start Example:**
76
+
77
+ ```bash
78
+ # In Cursor IDE Agent input
79
+ /specify "Add user authentication with OAuth2"
80
+ # → Creates REQ-123
81
+
82
+ /breakdown REQ-123
83
+ # → Generates 5-10 implementation tasks
84
+
85
+ /build REQ-123
86
+ # → Shows complete requirement with all task prompts
87
+ ```
88
+
89
+ ### Setup for Claude Code
90
+
91
+ BrainGrid's AGENTS.md file also works with Claude Code. You can either:
92
+
93
+ 1. **Use AGENTS.md directly** (Claude Code automatically reads it)
94
+ 2. **Symlink for compatibility**: `ln -s AGENTS.md .claude/CLAUDE.md`
95
+
96
+ Claude Code also provides its own slash commands in `.claude/commands/`.
97
+
98
+ ### Cross-IDE Compatibility
99
+
100
+ The AGENTS.md standard ensures your BrainGrid setup works across tools:
101
+
102
+ - **AGENTS.md** provides CLI guidance for all compatible tools
103
+ - **Tool-specific directories** (.cursor/, .claude/) add enhanced features
104
+ - **Single source of truth** for BrainGrid workflows
105
+
106
+ **Learn more:**
107
+
108
+ - [AGENTS.md standard](https://agents.md/)
109
+ - [BrainGrid documentation](https://www.braingrid.ai)
110
+ - Full CLI command reference in [AGENTS.md](./AGENTS.md)
111
+
112
+ ---
113
+
40
114
  ## QuickStart: One-Minute Flow
41
115
 
42
116
  ```bash
@@ -87,6 +161,69 @@ The `init` command creates a `.braingrid/project.json` file in the `.braingrid/`
87
161
 
88
162
  > **Note:** The init command always asks for confirmation before initializing unless you use the `--force` flag.
89
163
 
164
+ ### Setup Commands
165
+
166
+ Install BrainGrid integration files for AI coding tools. These commands fetch integration files from the [BrainGrid repository](https://github.com/BrainGridAI/braingrid) and install them in your project.
167
+
168
+ **Prerequisites:**
169
+
170
+ - **GitHub CLI** must be installed and authenticated
171
+ - macOS: `brew install gh`
172
+ - Windows: `winget install GitHub.CLI`
173
+ - Linux: See [GitHub CLI installation](https://cli.github.com/manual/installation)
174
+ - After installing: `gh auth login`
175
+
176
+ **Commands:**
177
+
178
+ ```bash
179
+ # Install Claude Code integration
180
+ braingrid setup claude-code
181
+
182
+ # Install Cursor integration
183
+ braingrid setup cursor
184
+
185
+ # Skip prompts and overwrite all existing files
186
+ braingrid setup claude-code --force
187
+
188
+ # Preview changes without making modifications
189
+ braingrid setup cursor --dry-run
190
+ ```
191
+
192
+ **What gets installed:**
193
+
194
+ - **Claude Code integration:**
195
+ - Commands in `.claude/commands/` (specify, breakdown, build, save-requirement)
196
+ - Skills in `.claude/skills/braingrid-cli/`
197
+ - Content injected into `CLAUDE.md` (or creates it if it doesn't exist)
198
+
199
+ - **Cursor integration:**
200
+ - Commands in `.cursor/commands/` (specify, breakdown, build, save-requirement)
201
+ - Rules in `.cursor/rules/`
202
+ - Content injected into `AGENTS.md` (or creates it if it doesn't exist)
203
+
204
+ **Options:**
205
+
206
+ - `--force` - Skip prompts and overwrite all existing files without asking
207
+ - `--dry-run` - Show what would be done without making any changes
208
+
209
+ **File Conflicts:**
210
+
211
+ When files already exist, you'll be prompted to choose:
212
+
213
+ - `[O]verwrite` - Replace this file
214
+ - `[S]kip` - Keep existing file
215
+ - `[A]ll` - Overwrite all remaining files
216
+ - `[Q]uit` - Cancel installation
217
+
218
+ **Marker-based Updates:**
219
+
220
+ Running setup again will update the BrainGrid sections in `CLAUDE.md` or `AGENTS.md` without duplicating content. The CLI uses HTML comment markers to identify and replace existing BrainGrid content.
221
+
222
+ **Learn more:**
223
+
224
+ - [Claude Code integration guide](https://braingrid.ai/docs/integrations/claude-code)
225
+ - [Cursor integration guide](https://braingrid.ai/docs/integrations/cursor)
226
+
90
227
  ### Project Commands
91
228
 
92
229
  ```bash