@chief-clancy/brief 0.1.2 → 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 +23 -1
- package/bin/brief.js +5 -2
- package/dist/installer/install.d.ts.map +1 -1
- package/dist/installer/install.js +10 -2
- package/dist/installer/install.js.map +1 -1
- package/package.json +1 -1
- package/src/commands/approve-brief.md +23 -0
- package/src/commands/commands.test.ts +10 -1
- package/src/workflows/approve-brief.md +1567 -0
- package/src/workflows/workflows.test.ts +209 -1
package/README.md
CHANGED
|
@@ -60,9 +60,31 @@ To brief from board tickets without installing the full pipeline:
|
|
|
60
60
|
|
|
61
61
|
Credentials are stored in `.clancy/.env` and are per-project (not global).
|
|
62
62
|
|
|
63
|
+
Supported boards: Jira, GitHub Issues, Linear, Shortcut, Notion, Azure DevOps.
|
|
64
|
+
|
|
65
|
+
## Approving briefs
|
|
66
|
+
|
|
67
|
+
The brief package ships `/clancy:approve-brief` so the approval gate works without the full pipeline. The behaviour depends on the install mode.
|
|
68
|
+
|
|
69
|
+
### Standalone (no board)
|
|
70
|
+
|
|
71
|
+
`/clancy:approve-brief` requires board credentials. Approve-brief's job is to create child tickets ON the board, so without a board there is nothing for it to do. Run `/clancy:board-setup` first to configure your board, then re-run `/clancy:approve-brief`.
|
|
72
|
+
|
|
73
|
+
### Standalone+board (board credentials but no full pipeline)
|
|
74
|
+
|
|
75
|
+
`/clancy:approve-brief <slug>` walks the brief's decomposition table, creates one child ticket per row on the board (in topological/dependency order), links dependencies, and posts a tracking summary as a comment on the parent ticket. Each child ticket gets a pipeline label so downstream queue commands (`/clancy:plan`, `/clancy:implement`) know which queue picks it up.
|
|
76
|
+
|
|
77
|
+
In standalone+board mode, child tickets default to `CLANCY_LABEL_PLAN` (default `clancy:plan`), even though `CLANCY_ROLES` is unset — passing `--skip-plan` overrides this and forces `CLANCY_LABEL_BUILD` (default `clancy:build`) instead. This is the **single-source-of-truth pipeline label rule**: standalone+board users have installed both `@chief-clancy/brief` and `@chief-clancy/plan` as standalone packages and clearly intend to use plan, so the workflow defaults to the planning queue rather than the build queue.
|
|
78
|
+
|
|
79
|
+
Partial failures stop immediately. The brief file's approve marker tracks which rows already shipped to the board, so re-running `/clancy:approve-brief` resumes from where the previous run stopped — it never duplicates a ticket.
|
|
80
|
+
|
|
81
|
+
### Terminal mode (full pipeline)
|
|
82
|
+
|
|
83
|
+
Existing behaviour, unchanged. The pipeline label respects `CLANCY_ROLES`: if `planner` is enabled (or `CLANCY_ROLES` is unset, indicating a global install), child tickets get `CLANCY_LABEL_PLAN`; if `planner` is explicitly excluded, child tickets get `CLANCY_LABEL_BUILD` (the terminal user has opted out of the planning queue). The `--skip-plan` flag overrides both and forces the build label.
|
|
84
|
+
|
|
63
85
|
## Full pipeline
|
|
64
86
|
|
|
65
|
-
|
|
87
|
+
`@chief-clancy/brief` covers brief generation and ticket creation from briefs. For planning and the full development pipeline (autopilot, implementation, review), install the complete Clancy package:
|
|
66
88
|
|
|
67
89
|
```bash
|
|
68
90
|
npx chief-clancy
|
package/bin/brief.js
CHANGED
|
@@ -84,8 +84,8 @@ const ask = (label) => new Promise((resolve) => rl.question(label, resolve));
|
|
|
84
84
|
// File lists (keep in sync with install.ts)
|
|
85
85
|
// ---------------------------------------------------------------------------
|
|
86
86
|
|
|
87
|
-
const COMMAND_FILES = ['board-setup.md', 'brief.md'];
|
|
88
|
-
const WORKFLOW_FILES = ['board-setup.md', 'brief.md'];
|
|
87
|
+
const COMMAND_FILES = ['approve-brief.md', 'board-setup.md', 'brief.md'];
|
|
88
|
+
const WORKFLOW_FILES = ['approve-brief.md', 'board-setup.md', 'brief.md'];
|
|
89
89
|
const AGENT_FILES = ['devils-advocate.md'];
|
|
90
90
|
|
|
91
91
|
// ---------------------------------------------------------------------------
|
|
@@ -217,6 +217,9 @@ async function main() {
|
|
|
217
217
|
console.log(
|
|
218
218
|
` ${cyan('/clancy:brief')} ${dim('Generate a strategic brief')}`,
|
|
219
219
|
);
|
|
220
|
+
console.log(
|
|
221
|
+
` ${cyan('/clancy:approve-brief')} ${dim('Approve a brief and create board tickets')}`,
|
|
222
|
+
);
|
|
220
223
|
console.log(
|
|
221
224
|
` ${cyan('/clancy:board-setup')} ${dim('Configure board credentials (optional)')}`,
|
|
222
225
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/installer/install.ts"],"names":[],"mappings":"AAaA,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElD,+DAA+D;AAC/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,iDAAiD;AACjD,KAAK,mBAAmB,GAAG;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF;;;;GAIG;AACH,KAAK,gBAAgB,GAAG;IACtB,QAAQ,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAC5C,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,oEAAoE;IACpE,QAAQ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E,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,oEAAoE;IACpE,QAAQ,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;CAC/C,CAAC;AAEF,2CAA2C;AAC3C,MAAM,MAAM,sBAAsB,GAAG;IACnC,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,QAAQ,CAAC,KAAK,EAAE,iBAAiB,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,EAAE,gBAAgB,CAAC;CAC/B,CAAC;AA8BF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,SAAS,MAAM,EAAE,KACtB,gBAAgB,GAAG,IAKrB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACnC,MAAM,gBAAgB,EACtB,SAAS,MAAM,EACf,KAAK,MAAM,KACV,iBASF,CAAC;AA4EF;;;;;;;;GAQG;AACH,eAAO,MAAM,eAAe,GAAI,SAAS,sBAAsB,KAAG,IA6BjE,CAAC"}
|
|
@@ -10,9 +10,17 @@ import { join } from 'node:path';
|
|
|
10
10
|
// Constants
|
|
11
11
|
// ---------------------------------------------------------------------------
|
|
12
12
|
/** Command files shipped with the brief package. */
|
|
13
|
-
const COMMAND_FILES = [
|
|
13
|
+
const COMMAND_FILES = [
|
|
14
|
+
'approve-brief.md',
|
|
15
|
+
'board-setup.md',
|
|
16
|
+
'brief.md',
|
|
17
|
+
];
|
|
14
18
|
/** Workflow files shipped with the brief package. */
|
|
15
|
-
const WORKFLOW_FILES = [
|
|
19
|
+
const WORKFLOW_FILES = [
|
|
20
|
+
'approve-brief.md',
|
|
21
|
+
'board-setup.md',
|
|
22
|
+
'brief.md',
|
|
23
|
+
];
|
|
16
24
|
/** Agent files shipped with the brief package. */
|
|
17
25
|
const AGENT_FILES = ['devils-advocate.md'];
|
|
18
26
|
/** Matches `@.claude/clancy/workflows/<filename>.md` on its own line. */
|
|
@@ -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;AA+CjC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,oDAAoD;AACpD,MAAM,aAAa,GAAG,
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/installer/install.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AA+CjC,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E,oDAAoD;AACpD,MAAM,aAAa,GAAG;IACpB,kBAAkB;IAClB,gBAAgB;IAChB,UAAU;CACF,CAAC;AAEX,qDAAqD;AACrD,MAAM,cAAc,GAAG;IACrB,kBAAkB;IAClB,gBAAgB;IAChB,UAAU;CACF,CAAC;AAEX,kDAAkD;AAClD,MAAM,WAAW,GAAG,CAAC,oBAAoB,CAAU,CAAC;AAEpD,yEAAyE;AACzE,MAAM,YAAY,GAAG,oDAAoD,CAAC;AAE1E,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,IAAuB,EACE,EAAE;IAC3B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC/C,IAAI,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC;QAAE,OAAO,OAAO,CAAC;IAE7C,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAA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,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;IACH,SAAS,CAAC;QACR,KAAK,EAAE,WAAW;QAClB,MAAM,EAAE,OAAO,CAAC,SAAS;QACzB,OAAO,EAAE,KAAK,CAAC,UAAU;QACzB,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,eAAe,CAAC,CAAC;IAC9D,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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# /clancy:approve-brief
|
|
2
|
+
|
|
3
|
+
Convert an approved brief into real tickets on the board. Creates child tickets under the parent, links dependencies, and posts a tracking summary.
|
|
4
|
+
|
|
5
|
+
Accepts optional arguments:
|
|
6
|
+
|
|
7
|
+
- **By slug:** `/clancy:approve-brief auth-rework` — approve a specific brief
|
|
8
|
+
- **By index:** `/clancy:approve-brief 2` — approve the 2nd unapproved brief
|
|
9
|
+
- **By ticket:** `/clancy:approve-brief PROJ-123` — approve brief sourced from this ticket
|
|
10
|
+
- **Set parent:** `--epic PROJ-50` — override or set the parent epic
|
|
11
|
+
- **Preview:** `--dry-run` — show what would be created without making API calls
|
|
12
|
+
- **Skip confirmation:** `--afk` — auto-confirm without prompting (for automation)
|
|
13
|
+
|
|
14
|
+
Examples:
|
|
15
|
+
|
|
16
|
+
- `/clancy:approve-brief` — auto-select (if only 1 unapproved brief)
|
|
17
|
+
- `/clancy:approve-brief auth-rework` — approve by slug
|
|
18
|
+
- `/clancy:approve-brief --dry-run` — preview ticket creation
|
|
19
|
+
- `/clancy:approve-brief --epic PROJ-50` — set parent and approve
|
|
20
|
+
|
|
21
|
+
@.claude/clancy/workflows/approve-brief.md
|
|
22
|
+
|
|
23
|
+
Follow the approve-brief workflow above. Parse the decomposition, create tickets on the board, link dependencies, and post a tracking comment.
|
|
@@ -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', 'brief.md'];
|
|
14
|
+
const EXPECTED_COMMANDS = ['approve-brief.md', 'board-setup.md', 'brief.md'];
|
|
15
15
|
|
|
16
16
|
describe('commands directory structure', () => {
|
|
17
17
|
it('contains exactly the expected command files', () => {
|
|
@@ -36,4 +36,13 @@ describe('commands directory structure', () => {
|
|
|
36
36
|
|
|
37
37
|
expect(issues).toEqual([]);
|
|
38
38
|
});
|
|
39
|
+
|
|
40
|
+
it('approve-brief command starts with the approve-brief heading', () => {
|
|
41
|
+
const content = readFileSync(
|
|
42
|
+
new URL('approve-brief.md', import.meta.url),
|
|
43
|
+
'utf8',
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
expect(content.split('\n')[0]?.trim()).toBe('# /clancy:approve-brief');
|
|
47
|
+
});
|
|
39
48
|
});
|