@chief-clancy/plan 0.1.0 → 0.3.0

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/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  npx @chief-clancy/plan
9
9
  ```
10
10
 
11
- Fetch backlog tickets from your board, explore the codebase, and generate structured implementation plans posted as comments for human review. Works with board credentials no full pipeline required.
11
+ Generate structured implementation plans for your codebase. Plan from board tickets (posted as ticket comments) or fully offline from local Clancy briefs (read from `.clancy/briefs/`, with plans saved to `.clancy/plans/`). No full pipeline required.
12
12
 
13
13
  ## What it does
14
14
 
@@ -25,25 +25,62 @@ The `/clancy:plan` slash command explores your codebase, runs a feasibility scan
25
25
  ## How it works
26
26
 
27
27
  1. **Install:** `npx @chief-clancy/plan` — choose global or local
28
- 2. **Configure board:** `/clancy:board-setup` — connect to your project board
29
- 3. **Run:** `/clancy:plan PROJ-123` plan a specific ticket
30
-
31
- Plans are posted as comments on the ticket for human review.
28
+ 2. **Pick an input source:**
29
+ - **Board tickets** — run `/clancy:board-setup` to configure credentials, then `/clancy:plan PROJ-123`. Plans are posted as comments on the ticket.
30
+ - **Local briefs** — point at a Clancy brief file with `/clancy:plan --from .clancy/briefs/<brief>.md`. Plans are saved to `.clancy/plans/<slug>-<row>.md`.
31
+ 3. **Review and revise:** add a `## Feedback` section to the plan (board comment or local file), then re-run `/clancy:plan` to revise.
32
32
 
33
33
  ## Input modes
34
34
 
35
- | Mode | Example | Board needed? |
36
- | --------------- | ------------------------------------------- | --------------------------- |
37
- | Specific ticket | `/clancy:plan PROJ-123`, `/clancy:plan #42` | Yes (`/clancy:board-setup`) |
38
- | Batch | `/clancy:plan 3` | Yes (`/clancy:board-setup`) |
39
- | Queue (default) | `/clancy:plan` | Yes (`/clancy:board-setup`) |
35
+ | Mode | Example | Board needed? |
36
+ | --------------- | ----------------------------------------------------- | --------------------------- |
37
+ | Local brief | `/clancy:plan --from .clancy/briefs/add-dark-mode.md` | No |
38
+ | Specific ticket | `/clancy:plan PROJ-123`, `/clancy:plan #42` | Yes (`/clancy:board-setup`) |
39
+ | Batch | `/clancy:plan 3` | Yes (`/clancy:board-setup`) |
40
+ | Queue (default) | `/clancy:plan` | Yes (`/clancy:board-setup`) |
41
+
42
+ The local brief path can be any Clancy-format markdown file — `--from` is not tied to `@chief-clancy/brief`. You can hand-write a brief (just include a `## Problem Statement` or `## Ticket Decomposition` heading) and point at it from anywhere on disk. Briefs generated by `@chief-clancy/brief` happen to use a `YYYY-MM-DD-slug.md` naming convention, but the date prefix is optional — Step 3a strips it when present and uses the full filename otherwise.
40
43
 
41
44
  ## Flags
42
45
 
43
- | Flag | Description |
44
- | --------- | ------------------------------------ |
45
- | `--afk` | Auto-confirm all prompts |
46
- | `--fresh` | Discard existing plan and start over |
46
+ | Flag | Description |
47
+ | ------------------- | ----------------------------------------------------------------------- |
48
+ | `--from <path> [N]` | Plan from a local Clancy brief file. Optional row number targets a row. |
49
+ | `--afk` | Auto-confirm all prompts. With `--from`, plans every unplanned row. |
50
+ | `--fresh` | Discard the existing plan and start over. |
51
+ | `--list` | Show inventory of existing local plans in `.clancy/plans/` and stop. |
52
+
53
+ ## Local planning workflow
54
+
55
+ The `--from` flag lets you go from idea to implementation plan without ever touching a board:
56
+
57
+ ```bash
58
+ # 1. Generate a brief (uses @chief-clancy/brief)
59
+ /clancy:brief "Add dark mode support"
60
+ # Saved to .clancy/briefs/2026-04-08-add-dark-mode.md
61
+
62
+ # 2. Plan the first decomposition row
63
+ /clancy:plan --from .clancy/briefs/2026-04-08-add-dark-mode.md
64
+ # Saved to .clancy/plans/add-dark-mode-1.md
65
+
66
+ # 3. Plan a specific row
67
+ /clancy:plan --from .clancy/briefs/2026-04-08-add-dark-mode.md 3
68
+ # Saved to .clancy/plans/add-dark-mode-3.md
69
+
70
+ # 4. Or plan every unplanned row in one pass
71
+ /clancy:plan --afk --from .clancy/briefs/2026-04-08-add-dark-mode.md
72
+
73
+ # 5. Review what's been planned
74
+ /clancy:plan --list
75
+
76
+ # 6. Revise — edit the plan file and add a `## Feedback` section
77
+ /clancy:plan --from .clancy/briefs/2026-04-08-add-dark-mode.md 3
78
+ # Detects feedback, regenerates with a `### Changes From Previous Plan` section
79
+ ```
80
+
81
+ Plans are tracked in the brief file itself via a `<!-- planned:1,2,3 -->` marker, so re-running advances to the next unplanned row automatically.
82
+
83
+ To approve and implement plans you'll need the full pipeline (`npx chief-clancy`).
47
84
 
48
85
  ## Board ticket mode
49
86
 
package/bin/plan.js CHANGED
@@ -83,6 +83,10 @@ const ask = (label) => new Promise((resolve) => rl.question(label, resolve));
83
83
  // File lists (keep in sync with install.ts)
84
84
  // ---------------------------------------------------------------------------
85
85
 
86
+ // Note: `approve-plan.md` lives in `packages/plan/src/{commands,workflows}/`
87
+ // after PR 7a but is NOT shipped by the standalone installer yet — the
88
+ // workflow content is currently board-only (byte-identical to terminal's
89
+ // previous version). PR 7b makes it standalone-safe and adds it here.
86
90
  const COMMAND_FILES = ['board-setup.md', 'plan.md'];
87
91
  const WORKFLOW_FILES = ['board-setup.md', 'plan.md'];
88
92
 
@@ -1 +1 @@
1
- {"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/installer/install.ts"],"names":[],"mappings":"AAaA,wEAAwE;AACxE,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEjD,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,iDAAiD;AACjD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF;;;;GAIG;AACH,KAAK,eAAe,GAAG;IACrB,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM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ACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,eAAe,EACrB,SAAS,MAAM,EACf,KAAK,MAAM,KACV,gBAQF,CAAC;AA4EF;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,GAAI,SAAS,qBAAqB,KAAG,IAuB/D,CAAC"}
@@ -9,9 +9,17 @@ import { join } from 'node:path';
9
9
  // ---------------------------------------------------------------------------
10
10
  // Constants
11
11
  // ---------------------------------------------------------------------------
12
- /** Command files shipped with the plan package. */
12
+ /**
13
+ * Command files shipped with the plan package.
14
+ *
15
+ * Note: `approve-plan.md` exists in `src/commands/` after PR 7a but is NOT
16
+ * shipped by the standalone installer yet — the workflow content is currently
17
+ * board-only (byte-identical to terminal's previous version). PR 7b makes it
18
+ * standalone-safe and adds it here. Terminal already ships approve-plan via
19
+ * `plan-content.ts`, so the file is reachable from `npx chief-clancy`.
20
+ */
13
21
  const COMMAND_FILES = ['board-setup.md', 'plan.md'];
14
- /** Workflow files shipped with the plan package. */
22
+ /** Workflow files shipped with the plan package. See COMMAND_FILES. */
15
23
  const WORKFLOW_FILES = ['board-setup.md', 'plan.md'];
16
24
  /** Matches `@.claude/clancy/workflows/<filename>.md` on its own line. */
17
25
  const WORKFLOW_REF = /^@\.claude\/clancy\/workflows\/([^/\\]+\.md)\r?$/gm;
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/installer/install.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA6CjC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,mDAAmD;AACnD,MAAM,aAAa,GAAG,CAAC,gBAAgB,EAAE,SAAS,CAAU,CAAC;AAE7D,oDAAoD;AACpD,MAAM,cAAc,GAAG,CAAC,gBAAgB,EAAE,SAAS,CAAU,CAAC;AAE9D,yEAAyE;AACzE,MAAM,YAAY,GAAG,oDAAoD,CAAC;AAE1E,8EAA8E;AAC9E,iBA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,SAAS,CAAC,CAAC;YACrC,EAAE,CAAC,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QAClC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,8EAA8E;AAC9E,gBAAgB;AAChB,8EAA8E;AAE9E;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,OAA8B,EAAQ,EAAE;IACrE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IAEtD,SAAS,CAAC;QACR,KAAK,EAAE,aAAa;QACpB,MAAM,EAAE,OAAO,CAAC,WAAW;QAC3B,OAAO,EAAE,KAAK,CAAC,YAAY;QAC3B,EAAE;KACH,CAAC,CAAC;IACH,SAAS,CAAC;QACR,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,OAAO,CAAC,YAAY;QAC5B,OAAO,EAAE,KAAK,CAAC,aAAa;QAC5B,EAAE;KACH,CAAC,CAAC;IAEH,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,cAAc,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,aAAa,EAAE,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC7D,aAAa,CAAC,WAAW,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC;IACzC,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC;AACrC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chief-clancy/plan",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "Implementation planner for Claude Code — decompose briefs into actionable plans",
6
6
  "author": "Alex Clapperton",
@@ -0,0 +1,11 @@
1
+ # /clancy:approve-plan
2
+
3
+ Promote an approved Clancy plan to the ticket description. Accepts an optional ticket key argument (e.g. `/clancy:approve-plan PROJ-123`). When no key is provided, auto-selects the oldest planned-but-unapproved ticket.
4
+
5
+ Optional flags:
6
+
7
+ - **Skip confirmation:** `--afk` — auto-confirm without prompting (for automation)
8
+
9
+ @.claude/clancy/workflows/approve-plan.md
10
+
11
+ Follow the approve-plan workflow above. Fetch the plan comment, confirm with the user, append it to the ticket description, and transition the ticket to the implementation queue.
@@ -11,7 +11,7 @@ import { describe, expect, it } from 'vitest';
11
11
 
12
12
  const COMMANDS_DIR = fileURLToPath(new URL('.', import.meta.url));
13
13
 
14
- const EXPECTED_COMMANDS = ['board-setup.md', 'plan.md'];
14
+ const EXPECTED_COMMANDS = ['approve-plan.md', 'board-setup.md', 'plan.md'];
15
15
 
16
16
  describe('commands directory structure', () => {
17
17
  it('contains exactly the expected command files', () => {
@@ -37,3 +37,36 @@ describe('commands directory structure', () => {
37
37
  expect(issues).toEqual([]);
38
38
  });
39
39
  });
40
+
41
+ // ---------------------------------------------------------------------------
42
+ // plan.md content assertions
43
+ // ---------------------------------------------------------------------------
44
+
45
+ describe('plan command', () => {
46
+ const content = readFileSync(new URL('plan.md', import.meta.url), 'utf8');
47
+
48
+ it('documents --from flag', () => {
49
+ expect(content).toContain('--from');
50
+ });
51
+
52
+ it('shows --from example', () => {
53
+ expect(content).toContain('/clancy:plan --from');
54
+ });
55
+
56
+ it('notes --from cannot combine with ticket key', () => {
57
+ expect(content).toContain('Cannot be combined with a ticket key');
58
+ });
59
+
60
+ it('documents row selection with bare integer', () => {
61
+ expect(content).toContain('row number to target');
62
+ });
63
+
64
+ it('documents --list flag', () => {
65
+ expect(content).toContain('--list');
66
+ expect(content).toContain('inventory');
67
+ });
68
+
69
+ it('shows --list example', () => {
70
+ expect(content).toContain('/clancy:plan --list');
71
+ });
72
+ });
@@ -1,22 +1,26 @@
1
1
  # /clancy:plan
2
2
 
3
- Fetch backlog tickets from the board, explore the codebase, and generate structured implementation plans. Plans are posted as comments on the ticket for human review.
3
+ Fetch backlog tickets from the board, explore the codebase, and generate structured implementation plans. Plans are posted as comments on the ticket for human review. With `--from`, plans from local brief files are saved to `.clancy/plans/` instead, with an optional board comment when credentials are available.
4
4
 
5
5
  Accepts optional arguments:
6
6
 
7
+ - **From brief:** `/clancy:plan --from .clancy/briefs/slug.md` — plan from a local brief file. Cannot be combined with a ticket key or batch number. Optionally pass a row number to target a specific decomposition row (e.g. `/clancy:plan --from brief.md 3`). Without a row number, plans the first unplanned row.
7
8
  - **Batch mode:** `/clancy:plan 3` — plan up to 3 tickets from the queue
8
9
  - **Specific ticket:** `/clancy:plan PROJ-123`, `/clancy:plan #42`, `/clancy:plan ENG-42` — plan a single ticket by key
9
10
  - **Fresh start:** `--fresh` — discard any existing plan and start over
10
11
  - **Skip confirmations:** `--afk` — auto-confirm all prompts (for automation)
12
+ - **List plans:** `--list` — show inventory of existing local plans in `.clancy/plans/` and stop
11
13
 
12
14
  Examples:
13
15
 
16
+ - `/clancy:plan --from .clancy/briefs/add-dark-mode.md` — plan from a local brief (any Clancy-format markdown file path works)
14
17
  - `/clancy:plan` — plan 1 ticket from queue
15
18
  - `/clancy:plan 3` — plan 3 tickets from queue
16
19
  - `/clancy:plan PROJ-123` — plan a specific Jira/Linear ticket
17
20
  - `/clancy:plan #42` — plan a specific GitHub issue
18
21
  - `/clancy:plan --fresh PROJ-123` — discard existing plan and start over
22
+ - `/clancy:plan --list` — show inventory of all local plans
19
23
 
20
24
  @.claude/clancy/workflows/plan.md
21
25
 
22
- Follow the plan workflow above. For each ticket: run the feasibility scan, explore the codebase, generate the plan, and post it as a comment. Do not implement anything — planning only.
26
+ Follow the plan workflow above. For each ticket or brief: run the feasibility scan, explore the codebase, and generate the plan. In board mode, post it as a comment. With `--from`, save it to `.clancy/plans/`. Do not implement anything — planning only.