@braingrid/cli 0.2.1 → 0.2.3

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,54 @@ 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.3] - 2025-01-10
9
+
10
+ ### Added
11
+
12
+ - New `task summary` subcommand for quick table overview without content
13
+ - Use `braingrid task summary -r REQ-X` for compact task list
14
+ - Complements full detail view with lightweight summary option
15
+
16
+ ### Changed
17
+
18
+ - Simplified CLI output format with markdown as default
19
+ - `requirement breakdown` now defaults to markdown format (was table)
20
+ - `task list` now defaults to markdown format with full content (was table)
21
+ - Removed `--verbose` flag - full content always shown by default for AI-ready output
22
+ - Use `--format table` or new `task summary` command for compact view
23
+ - Updated `/breakdown` slash command documentation
24
+ - Removed all `--verbose` flag references
25
+ - Updated examples to use new default markdown format
26
+ - Added references to `task summary` for quick overviews
27
+
28
+ ## [0.2.2] - 2025-11-10
29
+
30
+ ### Added
31
+
32
+ - Concise BrainGrid documentation for project injection (`.claude/CLAUDE.md`)
33
+ - 42-line section explaining BrainGrid workflow for Claude Code
34
+ - Slash commands reference and typical workflow
35
+ - Key features (auto-detection, reactive errors, status flows, output formats)
36
+ - BrainGrid CLI slash commands for Claude Code
37
+ - `/specify [prompt]` - Create AI-refined requirement from vague idea
38
+ - `/save-requirement [title]` - Save detailed plan as requirement
39
+ - `/breakdown [req-id]` - Break requirement into AI-prompted tasks
40
+ - `/build [req-id]` - Get complete implementation plan in markdown
41
+ - `/cut-release [patch|minor|major]` - Automate NPM release workflow
42
+ - BrainGrid CLI skill for Claude Code with comprehensive workflow guidance
43
+ - Installation instructions in braingrid-cli skill
44
+ - BrainGrid project configuration files
45
+
46
+ ### Changed
47
+
48
+ - Updated README tagline capitalization
49
+
50
+ ### Fixed
51
+
52
+ - Removed unsupported `--status` field from `/save-requirement` slash command
53
+ - API does not accept status field during requirement creation
54
+ - Status is set automatically by the backend
55
+
8
56
  ## [0.2.1] - 2025-01-07
9
57
 
10
58
  ### Added
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
  <img src="https://www.braingrid.ai/logos/braingrid-symbol-800.png" width="100"/>
3
3
  <h1>BrainGrid</h1>
4
4
 
5
- <p>Prompt AI Coding Tools like a rockstar developer</p>
5
+ <p>Prompt AI Coding Tools Like a Rockstar Developer</p>
6
6
  <h3>A CLI to turn messy thoughts into detailed specs and perfectly-prompted tasks to build well-structured, maintainable software with AI.</h3>
7
7
 
8
8
  [![npm version](https://img.shields.io/npm/v/@braingrid/cli.svg?color=blue&logo=npm)](https://www.npmjs.com/package/@braingrid/cli)
package/dist/cli.js CHANGED
@@ -422,7 +422,7 @@ import axios3, { AxiosError as AxiosError2 } from "axios";
422
422
 
423
423
  // src/build-config.ts
424
424
  var BUILD_ENV = true ? "production" : process.env.NODE_ENV === "test" ? "development" : "production";
425
- var CLI_VERSION = true ? "0.2.1" : "0.0.0-test";
425
+ var CLI_VERSION = true ? "0.2.3" : "0.0.0-test";
426
426
  var PRODUCTION_CONFIG = {
427
427
  apiUrl: "https://app.braingrid.ai",
428
428
  workosAuthUrl: "https://sensitive-harvest-60.authkit.app",
@@ -4493,10 +4493,70 @@ async function handleTaskList(opts) {
4493
4493
  }
4494
4494
  const projectShortId = projectId;
4495
4495
  const requirementShortId = opts.requirement;
4496
- const format = opts.format || "table";
4497
- const verbose = opts.verbose || false;
4496
+ const format = opts.format || "markdown";
4498
4497
  const config = getConfig();
4499
- const output = formatTasksListOutput(response.tasks, format, verbose, {
4498
+ const output = formatTasksListOutput(response.tasks, format, true, {
4499
+ requirementId,
4500
+ projectShortId,
4501
+ requirementShortId,
4502
+ apiUrl: config.apiUrl
4503
+ });
4504
+ return {
4505
+ success: true,
4506
+ message: output,
4507
+ data: response
4508
+ };
4509
+ } catch (error) {
4510
+ if (stopSpinner) {
4511
+ stopSpinner();
4512
+ }
4513
+ return {
4514
+ success: false,
4515
+ message: formatError(error, "listing tasks")
4516
+ };
4517
+ }
4518
+ }
4519
+ async function handleTaskSummary(opts) {
4520
+ let stopSpinner = null;
4521
+ try {
4522
+ const { taskService, auth } = getServices3();
4523
+ const isAuthenticated = await auth.isAuthenticated();
4524
+ if (!isAuthenticated) {
4525
+ return {
4526
+ success: false,
4527
+ message: chalk8.red("\u274C Not authenticated. Please run `braingrid login` first.")
4528
+ };
4529
+ }
4530
+ if (!opts.requirement) {
4531
+ return {
4532
+ success: false,
4533
+ message: chalk8.red("\u274C No requirement specified.\n\n") + chalk8.dim("Please provide a requirement ID:\n") + chalk8.cyan("braingrid task summary -r REQ-456") + chalk8.dim(" (if initialized) or\n") + chalk8.cyan("braingrid task summary -r REQ-456 -p PROJ-123")
4534
+ };
4535
+ }
4536
+ const workspace = await workspaceManager.getProject(opts.project);
4537
+ if (!workspace.success) {
4538
+ return {
4539
+ success: false,
4540
+ message: workspace.error
4541
+ };
4542
+ }
4543
+ const projectId = workspace.projectId;
4544
+ const requirementId = normalizeRequirementId(opts.requirement);
4545
+ stopSpinner = showSpinner("Loading tasks", chalk8.gray);
4546
+ const response = await taskService.listTasks(projectId, requirementId);
4547
+ stopSpinner();
4548
+ stopSpinner = null;
4549
+ if (response.tasks.length === 0) {
4550
+ return {
4551
+ success: true,
4552
+ message: chalk8.yellow("No tasks found."),
4553
+ data: response
4554
+ };
4555
+ }
4556
+ const projectShortId = projectId;
4557
+ const requirementShortId = opts.requirement;
4558
+ const config = getConfig();
4559
+ const output = formatTasksListOutput(response.tasks, "table", false, {
4500
4560
  requirementId,
4501
4561
  projectShortId,
4502
4562
  requirementShortId,
@@ -6205,7 +6265,7 @@ requirement.command("breakdown [id]").description(
6205
6265
  ).option(
6206
6266
  "-p, --project <id>",
6207
6267
  "project ID (auto-detects from .braingrid/project.json if not provided)"
6208
- ).option("--format <format>", "output format (table, json, xml, markdown)", "table").action(async (id, opts) => {
6268
+ ).option("--format <format>", "output format (table, json, xml, markdown)", "markdown").action(async (id, opts) => {
6209
6269
  const result = await handleRequirementBreakdown({ ...opts, id });
6210
6270
  console.log(result.message);
6211
6271
  if (!result.success) {
@@ -6225,13 +6285,20 @@ requirement.command("build [id]").description(
6225
6285
  }
6226
6286
  });
6227
6287
  var task = program.command("task").description("Manage tasks");
6228
- task.command("list").description("List tasks for a requirement").option("-r, --requirement <id>", "requirement ID (REQ-456, auto-detects project if initialized)").option("-p, --project <id>", "project ID (PROJ-123, optional if project is initialized)").option("--format <format>", "output format (table, json, xml, markdown)", "table").option("--verbose", "show detailed information with content for each task").action(async (opts) => {
6288
+ task.command("list").description("List tasks for a requirement").option("-r, --requirement <id>", "requirement ID (REQ-456, auto-detects project if initialized)").option("-p, --project <id>", "project ID (PROJ-123, optional if project is initialized)").option("--format <format>", "output format (table, json, xml, markdown)", "markdown").action(async (opts) => {
6229
6289
  const result = await handleTaskList(opts);
6230
6290
  console.log(result.message);
6231
6291
  if (!result.success) {
6232
6292
  process.exit(1);
6233
6293
  }
6234
6294
  });
6295
+ task.command("summary").description("Show task summary table (quick overview without content)").option("-r, --requirement <id>", "requirement ID (REQ-456, auto-detects project if initialized)").option("-p, --project <id>", "project ID (PROJ-123, optional if project is initialized)").action(async (opts) => {
6296
+ const result = await handleTaskSummary(opts);
6297
+ console.log(result.message);
6298
+ if (!result.success) {
6299
+ process.exit(1);
6300
+ }
6301
+ });
6235
6302
  task.command("show <id>").description("Show task details").option("-r, --requirement <id>", "requirement ID (REQ-456, auto-detects project if initialized)").option("-p, --project <id>", "project ID (PROJ-123, optional if project is initialized)").action(async (id, opts) => {
6236
6303
  const result = await handleTaskShow(id, opts);
6237
6304
  console.log(result.message);