@open-agent-toolkit/cli 0.0.61 → 0.0.64
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/assets/docs/cli-utilities/tool-packs.md +74 -4
- package/assets/docs/workflows/ideas/index.md +6 -0
- package/assets/docs/workflows/ideas/lifecycle.md +12 -0
- package/assets/docs/workflows/projects/lifecycle.md +20 -0
- package/assets/docs/workflows/skills/index.md +8 -2
- package/assets/public-package-versions.json +4 -4
- package/assets/skills/oat-brainstorm/SKILL.md +600 -0
- package/assets/skills/oat-brainstorm/references/destinations.md +167 -0
- package/assets/skills/oat-brainstorm/references/dogfood-results.md +731 -0
- package/assets/skills/oat-brainstorm/references/visual-companion.md +316 -0
- package/assets/skills/oat-brainstorm/scripts/frame-template.html +214 -0
- package/assets/skills/oat-brainstorm/scripts/helper.js +88 -0
- package/assets/skills/oat-brainstorm/scripts/server.cjs +354 -0
- package/assets/skills/oat-brainstorm/scripts/start-server.sh +176 -0
- package/assets/skills/oat-brainstorm/scripts/stop-server.sh +56 -0
- package/assets/skills/oat-brainstorm/templates/brainstorm-doc.md +79 -0
- package/assets/skills/oat-idea-ideate/SKILL.md +8 -4
- package/assets/skills/oat-pjm-add-backlog-item/SKILL.md +2 -1
- package/assets/skills/oat-pjm-update-repo-reference/SKILL.md +2 -1
- package/assets/skills/oat-project-document/SKILL.md +2 -1
- package/assets/skills/oat-project-pr-final/SKILL.md +2 -1
- package/assets/skills/oat-project-spec/SKILL.md +2 -2
- package/assets/skills/oat-project-summary/SKILL.md +2 -1
- package/dist/commands/config/index.d.ts.map +1 -1
- package/dist/commands/config/index.js +12 -0
- package/dist/commands/init/tools/brainstorm/index.d.ts +22 -0
- package/dist/commands/init/tools/brainstorm/index.d.ts.map +1 -0
- package/dist/commands/init/tools/brainstorm/index.js +145 -0
- package/dist/commands/init/tools/brainstorm/install-brainstorm.d.ts +19 -0
- package/dist/commands/init/tools/brainstorm/install-brainstorm.d.ts.map +1 -0
- package/dist/commands/init/tools/brainstorm/install-brainstorm.js +37 -0
- package/dist/commands/init/tools/index.d.ts +3 -1
- package/dist/commands/init/tools/index.d.ts.map +1 -1
- package/dist/commands/init/tools/index.js +76 -6
- package/dist/commands/init/tools/shared/skill-manifest.d.ts +7 -0
- package/dist/commands/init/tools/shared/skill-manifest.d.ts.map +1 -1
- package/dist/commands/init/tools/shared/skill-manifest.js +11 -0
- package/dist/commands/tools/remove/index.d.ts.map +1 -1
- package/dist/commands/tools/remove/index.js +2 -1
- package/dist/commands/tools/shared/install-sync-context.d.ts.map +1 -1
- package/dist/commands/tools/shared/install-sync-context.js +3 -1
- package/dist/commands/tools/shared/scan-tools.d.ts.map +1 -1
- package/dist/commands/tools/shared/scan-tools.js +3 -1
- package/dist/commands/tools/shared/types.d.ts +1 -1
- package/dist/commands/tools/shared/types.d.ts.map +1 -1
- package/dist/commands/tools/update/index.d.ts.map +1 -1
- package/dist/commands/tools/update/index.js +2 -1
- package/dist/commands/tools/update/update-tools.d.ts.map +1 -1
- package/dist/commands/tools/update/update-tools.js +6 -1
- package/dist/config/oat-config.d.ts +1 -1
- package/dist/config/oat-config.d.ts.map +1 -1
- package/dist/config/oat-config.js +1 -0
- package/dist/config/resolve.d.ts.map +1 -1
- package/dist/config/resolve.js +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-idea-ideate
|
|
3
|
-
version: 1.2.
|
|
4
|
-
description: Use when continuing
|
|
3
|
+
version: 1.2.1
|
|
4
|
+
description: Use when continuing an existing tracked idea or expanding an explicit scratchpad seed from {IDEAS_ROOT}/scratchpad.md. Do NOT use to start a brand-new, destinationless brainstorm; use oat-brainstorm for that.
|
|
5
5
|
argument-hint: '[--global]'
|
|
6
6
|
disable-model-invocation: true
|
|
7
7
|
user-invocable: true
|
|
@@ -10,13 +10,13 @@ allowed-tools: Read, Write, Bash, Glob, AskUserQuestion
|
|
|
10
10
|
|
|
11
11
|
# Ideate
|
|
12
12
|
|
|
13
|
-
Resume brainstorming on an existing idea, or
|
|
13
|
+
Resume brainstorming on an existing tracked idea, or expand an explicit scratchpad seed into a tracked idea before continuing ideation.
|
|
14
14
|
|
|
15
15
|
## Mode Assertion
|
|
16
16
|
|
|
17
17
|
**OAT MODE: Ideation**
|
|
18
18
|
|
|
19
|
-
**Purpose:** Lightweight brainstorming through natural, exploratory conversation. Capture the essence of
|
|
19
|
+
**Purpose:** Lightweight brainstorming through natural, exploratory conversation for an idea record that already exists or for a scratchpad seed the user explicitly selects. Capture the essence of that tracked idea without formal structure or implementation detail.
|
|
20
20
|
|
|
21
21
|
**BLOCKED Activities:**
|
|
22
22
|
|
|
@@ -25,6 +25,7 @@ Resume brainstorming on an existing idea, or pick one from the scratchpad to sta
|
|
|
25
25
|
- No technical designs or architecture
|
|
26
26
|
- No task breakdowns or plans
|
|
27
27
|
- No forced structure — let the idea breathe
|
|
28
|
+
- No brand-new destinationless brainstorm activation. Use `oat-brainstorm` when the user says "let's brainstorm", "brainstorm this", or otherwise opens exploratory discussion without naming an existing idea or scratchpad seed.
|
|
28
29
|
|
|
29
30
|
**ALLOWED Activities:**
|
|
30
31
|
|
|
@@ -41,6 +42,7 @@ If you catch yourself:
|
|
|
41
42
|
- Writing implementation details → STOP (capture as an Open Question instead)
|
|
42
43
|
- Formalizing requirements → STOP (keep it conversational)
|
|
43
44
|
- Creating structured deliverables → STOP (save for project workflow)
|
|
45
|
+
- Treating a generic brainstorm request as a scratchpad entry → STOP. Scratchpad mode requires an actual unchecked entry in `{IDEAS_ROOT}/scratchpad.md` or an explicit user reference to one.
|
|
44
46
|
|
|
45
47
|
**Recovery:**
|
|
46
48
|
|
|
@@ -90,6 +92,8 @@ Determine whether to operate at project level or user (global) level.
|
|
|
90
92
|
|
|
91
93
|
### Step 1: Resolve Active Idea
|
|
92
94
|
|
|
95
|
+
This skill is a resume / expand flow, not a blank-slate brainstorm entry point. If the user has only asked to brainstorm and has not named an existing idea, an active idea, or a scratchpad seed, stop and route to `oat-brainstorm`.
|
|
96
|
+
|
|
93
97
|
Read `activeIdea` from config:
|
|
94
98
|
|
|
95
99
|
```bash
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-pjm-add-backlog-item
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: Use when the user requests or confirms adding a new repo backlog item — e.g. "add a backlog item for X", "capture that as backlog", "track that follow-up", "file a backlog ticket", or confirms a previously offered backlog capture. Do NOT auto-invoke when a follow-up is mentioned. Creates the item file in the file-per-item backlog structure, regenerates the index, and prompts for curated overview updates.
|
|
5
|
+
disable-model-invocation: false
|
|
5
6
|
user-invocable: true
|
|
6
7
|
allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
|
|
7
8
|
---
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-pjm-update-repo-reference
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: Use when repo reference artifacts need updating — roadmap, decision records, backlog status, or completed history. Frequently invoked at project completion, often chained from `oat-project-document`, to ensure `.oat/repo/reference/` state reflects what shipped.
|
|
5
|
+
disable-model-invocation: false
|
|
5
6
|
user-invocable: true
|
|
6
7
|
allowed-tools: Read, Write, Bash, Glob, Grep, AskUserQuestion
|
|
7
8
|
---
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-document
|
|
3
|
-
version: 1.4.
|
|
3
|
+
version: 1.4.1
|
|
4
4
|
description: Use when the user requests or confirms documenting an active OAT project — e.g. "document the project", "update the docs", "run oat-project-document", or confirms a previously offered documentation run. Do NOT auto-invoke when implementation completes. Analyzes project artifacts, presents a documentation delta plan, and applies approved changes.
|
|
5
5
|
argument-hint: '[project-path] [--auto]'
|
|
6
|
+
disable-model-invocation: false
|
|
6
7
|
user-invocable: true
|
|
7
8
|
allowed-tools: Read, Write, Edit, Bash(git:*), Glob, Grep, AskUserQuestion, Skill
|
|
8
9
|
---
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-pr-final
|
|
3
|
-
version: 1.4.
|
|
3
|
+
version: 1.4.1
|
|
4
4
|
description: Use when the user requests or confirms opening the final PR for an active OAT project — e.g. "open the final PR", "ship it", "run oat-project-pr-final", or confirms a previously offered final-PR step. Do NOT auto-invoke when phases are marked complete. Generates the final lifecycle PR description from artifacts and creates the PR.
|
|
5
|
+
disable-model-invocation: false
|
|
5
6
|
user-invocable: true
|
|
6
7
|
allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
|
|
7
8
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-spec
|
|
3
|
-
version: 2.0.
|
|
4
|
-
description:
|
|
3
|
+
version: 2.0.1
|
|
4
|
+
description: Use when discovery is complete but you're not ready to design yet, and you want to formalize requirements into a structured spec.md as an optional standalone step. Independent of the design workflow — oat-project-design confirms requirements automatically and does not require this skill to be run first.
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
user-invocable: true
|
|
7
7
|
allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: oat-project-summary
|
|
3
|
-
version: 1.1.
|
|
3
|
+
version: 1.1.1
|
|
4
4
|
description: Use when the user requests or confirms summarizing an active OAT project — e.g. "summarize the project", "generate the summary", "run oat-project-summary", or confirms a previously offered summary run. Do NOT auto-invoke when implementation completes. Generates summary.md from project artifacts as institutional memory.
|
|
5
|
+
disable-model-invocation: false
|
|
5
6
|
user-invocable: true
|
|
6
7
|
allowed-tools: Read, Write, Bash(git:*), Glob, Grep, AskUserQuestion
|
|
7
8
|
---
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/commands/config/index.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,cAAc,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/D,eAAe,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9E,mBAAmB,EAAE,CACnB,QAAQ,EAAE,MAAM,EAChB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,MAAM,CAAC,CAAC;IACrB,sBAAsB,EAAE,CACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EACrB,GAAG,EAAE,MAAM,CAAC,UAAU,KACnB,OAAO,CAAC,cAAc,CAAC,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC,UAAU,CAAC;CAC/B;AAonCD,wBAAgB,mBAAmB,CACjC,SAAS,GAAE,OAAO,CAAC,yBAAyB,CAAM,GACjD,OAAO,CA0GT"}
|
|
@@ -24,6 +24,7 @@ const KEY_ORDER = [
|
|
|
24
24
|
'documentation.requireForProjectCompletion',
|
|
25
25
|
'git.defaultBranch',
|
|
26
26
|
'projects.root',
|
|
27
|
+
'tools.brainstorm',
|
|
27
28
|
'tools.core',
|
|
28
29
|
'tools.docs',
|
|
29
30
|
'tools.ideas',
|
|
@@ -196,6 +197,17 @@ const CONFIG_CATALOG = [
|
|
|
196
197
|
owningCommand: 'oat config set archive.awsRegion <value>',
|
|
197
198
|
description: 'AWS region forwarded as AWS_REGION to every `aws` invocation made by the archive S3 sync (completion + `oat project archive sync`). Precedence: per-invocation flag > existing shell env > this config value.',
|
|
198
199
|
},
|
|
200
|
+
{
|
|
201
|
+
key: 'tools.brainstorm',
|
|
202
|
+
group: 'Shared Repo (.oat/config.json)',
|
|
203
|
+
file: '.oat/config.json',
|
|
204
|
+
scope: 'shared repo',
|
|
205
|
+
type: 'boolean',
|
|
206
|
+
defaultValue: 'false',
|
|
207
|
+
mutability: 'read/write',
|
|
208
|
+
owningCommand: 'oat tools install / oat tools update',
|
|
209
|
+
description: 'Whether the brainstorm tool pack is installed.',
|
|
210
|
+
},
|
|
199
211
|
{
|
|
200
212
|
key: 'tools.core',
|
|
201
213
|
group: 'Shared Repo (.oat/config.json)',
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type CommandContext, type GlobalOptions } from '../../../../app/command-context.js';
|
|
2
|
+
import { type PromptContext } from '../../../shared/shared.prompts.js';
|
|
3
|
+
import { type ScanToolsOptions } from '../../../tools/shared/scan-tools.js';
|
|
4
|
+
import type { ToolInfo } from '../../../tools/shared/types.js';
|
|
5
|
+
import { type OatConfig } from '../../../../config/oat-config.js';
|
|
6
|
+
import { Command } from 'commander';
|
|
7
|
+
import { type InstallBrainstormOptions, type InstallBrainstormResult } from './install-brainstorm.js';
|
|
8
|
+
type InstallScope = 'project' | 'user';
|
|
9
|
+
interface InitToolsBrainstormDependencies {
|
|
10
|
+
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
11
|
+
resolveProjectRoot: (cwd: string) => Promise<string>;
|
|
12
|
+
resolveScopeRoot: (scope: InstallScope, cwd: string, home: string) => string;
|
|
13
|
+
resolveAssetsRoot: () => Promise<string>;
|
|
14
|
+
installBrainstorm: (options: InstallBrainstormOptions) => Promise<InstallBrainstormResult>;
|
|
15
|
+
confirmAction: (message: string, ctx: PromptContext) => Promise<boolean>;
|
|
16
|
+
scanTools: (options: ScanToolsOptions) => Promise<ToolInfo[]>;
|
|
17
|
+
readOatConfig: (repoRoot: string) => Promise<OatConfig>;
|
|
18
|
+
writeOatConfig: (repoRoot: string, config: OatConfig) => Promise<void>;
|
|
19
|
+
}
|
|
20
|
+
export declare function createInitToolsBrainstormCommand(overrides?: Partial<InitToolsBrainstormDependencies>): Command;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/brainstorm/index.ts"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MAAM,EAAE,MAAM,EAAE,SAAS,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACxE;AA+KD,wBAAgB,gCAAgC,CAC9C,SAAS,GAAE,OAAO,CAAC,+BAA+B,CAAM,GACvD,OAAO,CA2BT"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { buildCommandContext, } from '../../../../app/command-context.js';
|
|
2
|
+
import { resolvePackDefaultScope } from '../../../init/tools/shared/skill-manifest.js';
|
|
3
|
+
import { confirmAction, } from '../../../shared/shared.prompts.js';
|
|
4
|
+
import { readGlobalOptions } from '../../../shared/shared.utils.js';
|
|
5
|
+
import { canonicalPathsForPack, setInstalledCanonicalPaths, } from '../../../tools/shared/install-sync-context.js';
|
|
6
|
+
import { scanTools as defaultScanTools, } from '../../../tools/shared/scan-tools.js';
|
|
7
|
+
import { readOatConfig as defaultReadOatConfig, writeOatConfig as defaultWriteOatConfig, } from '../../../../config/oat-config.js';
|
|
8
|
+
import { resolveAssetsRoot } from '../../../../fs/assets.js';
|
|
9
|
+
import { resolveProjectRoot, resolveScopeRoot } from '../../../../fs/paths.js';
|
|
10
|
+
import { Command } from 'commander';
|
|
11
|
+
import { installBrainstorm as defaultInstallBrainstorm, } from './install-brainstorm.js';
|
|
12
|
+
const DEFAULT_DEPENDENCIES = {
|
|
13
|
+
buildCommandContext,
|
|
14
|
+
resolveProjectRoot,
|
|
15
|
+
resolveScopeRoot,
|
|
16
|
+
resolveAssetsRoot,
|
|
17
|
+
installBrainstorm: defaultInstallBrainstorm,
|
|
18
|
+
confirmAction,
|
|
19
|
+
scanTools: defaultScanTools,
|
|
20
|
+
readOatConfig: defaultReadOatConfig,
|
|
21
|
+
writeOatConfig: defaultWriteOatConfig,
|
|
22
|
+
};
|
|
23
|
+
async function resolveInstallScope(context, projectRoot, userRoot, assetsRoot, dependencies) {
|
|
24
|
+
// Honor explicit --scope before any existing-install or default
|
|
25
|
+
// resolution so callers can always override.
|
|
26
|
+
if (context.scope === 'project') {
|
|
27
|
+
return { scope: 'project', source: 'explicit' };
|
|
28
|
+
}
|
|
29
|
+
if (context.scope === 'user') {
|
|
30
|
+
return { scope: 'user', source: 'explicit' };
|
|
31
|
+
}
|
|
32
|
+
// Existing-install detection MUST short-circuit before PACK_METADATA
|
|
33
|
+
// defaultScope is consulted, so re-installing a pack already placed at
|
|
34
|
+
// a particular scope never silently migrates the user across scopes.
|
|
35
|
+
const [projectTools, userTools] = await Promise.all([
|
|
36
|
+
dependencies.scanTools({
|
|
37
|
+
scope: 'project',
|
|
38
|
+
scopeRoot: projectRoot,
|
|
39
|
+
assetsRoot,
|
|
40
|
+
}),
|
|
41
|
+
dependencies.scanTools({
|
|
42
|
+
scope: 'user',
|
|
43
|
+
scopeRoot: userRoot,
|
|
44
|
+
assetsRoot,
|
|
45
|
+
}),
|
|
46
|
+
]);
|
|
47
|
+
const installedAtProject = projectTools.some((tool) => tool.pack === 'brainstorm');
|
|
48
|
+
const installedAtUser = userTools.some((tool) => tool.pack === 'brainstorm');
|
|
49
|
+
if (installedAtProject) {
|
|
50
|
+
return { scope: 'project', source: 'existing-install' };
|
|
51
|
+
}
|
|
52
|
+
if (installedAtUser) {
|
|
53
|
+
return { scope: 'user', source: 'existing-install' };
|
|
54
|
+
}
|
|
55
|
+
return {
|
|
56
|
+
scope: resolvePackDefaultScope('brainstorm'),
|
|
57
|
+
source: 'pack-default',
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function getCountSummary(result) {
|
|
61
|
+
return {
|
|
62
|
+
skills: `copied=${result.copiedSkills.length}, updated=${result.updatedSkills.length}, skipped=${result.skippedSkills.length}`,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function reportSuccess(context, scope, targetRoot, assetsRoot, result) {
|
|
66
|
+
if (context.json) {
|
|
67
|
+
context.logger.json({
|
|
68
|
+
status: 'ok',
|
|
69
|
+
scope,
|
|
70
|
+
targetRoot,
|
|
71
|
+
assetsRoot,
|
|
72
|
+
result,
|
|
73
|
+
});
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
const counts = getCountSummary(result);
|
|
77
|
+
context.logger.info('Installed brainstorm tool pack.');
|
|
78
|
+
context.logger.info(`Scope: ${scope}`);
|
|
79
|
+
context.logger.info(`Target root: ${targetRoot}`);
|
|
80
|
+
context.logger.info(`Skills: ${counts.skills}`);
|
|
81
|
+
context.logger.info(`Run: oat sync --scope ${scope}`);
|
|
82
|
+
}
|
|
83
|
+
async function persistConfigAfterInstall(projectRoot, dependencies) {
|
|
84
|
+
const config = await dependencies.readOatConfig(projectRoot);
|
|
85
|
+
const tools = { ...(config.tools ?? {}), brainstorm: true };
|
|
86
|
+
await dependencies.writeOatConfig(projectRoot, { ...config, tools });
|
|
87
|
+
}
|
|
88
|
+
async function runInitToolsBrainstorm(context, options, dependencies) {
|
|
89
|
+
try {
|
|
90
|
+
const projectRoot = await dependencies.resolveProjectRoot(context.cwd);
|
|
91
|
+
const userRoot = dependencies.resolveScopeRoot('user', context.cwd, context.home);
|
|
92
|
+
const assetsRoot = await dependencies.resolveAssetsRoot();
|
|
93
|
+
const { scope } = await resolveInstallScope(context, projectRoot, userRoot, assetsRoot, dependencies);
|
|
94
|
+
const targetRoot = scope === 'project' ? projectRoot : userRoot;
|
|
95
|
+
if (options.force && context.interactive) {
|
|
96
|
+
const confirmed = await dependencies.confirmAction(`Force overwrite existing brainstorm assets in ${scope} scope?`, { interactive: context.interactive });
|
|
97
|
+
if (!confirmed) {
|
|
98
|
+
if (!context.json) {
|
|
99
|
+
context.logger.info('Cancelled: no files were overwritten.');
|
|
100
|
+
}
|
|
101
|
+
process.exitCode = 0;
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
const result = await dependencies.installBrainstorm({
|
|
106
|
+
assetsRoot,
|
|
107
|
+
targetRoot,
|
|
108
|
+
force: options.force,
|
|
109
|
+
});
|
|
110
|
+
// Persist tools.brainstorm: true to .oat/config.json after a
|
|
111
|
+
// successful install so config-write semantics match the main
|
|
112
|
+
// installer flow used by `oat init tools`.
|
|
113
|
+
await persistConfigAfterInstall(projectRoot, dependencies);
|
|
114
|
+
reportSuccess(context, scope, targetRoot, assetsRoot, result);
|
|
115
|
+
process.exitCode = 0;
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
catch (error) {
|
|
119
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
120
|
+
if (context.json) {
|
|
121
|
+
context.logger.json({ status: 'error', message });
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
context.logger.error(message);
|
|
125
|
+
}
|
|
126
|
+
process.exitCode = 1;
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
export function createInitToolsBrainstormCommand(overrides = {}) {
|
|
131
|
+
const dependencies = {
|
|
132
|
+
...DEFAULT_DEPENDENCIES,
|
|
133
|
+
...overrides,
|
|
134
|
+
};
|
|
135
|
+
return new Command('brainstorm')
|
|
136
|
+
.description('Install OAT brainstorm skill (always-on entry point with visual companion)')
|
|
137
|
+
.option('--force', 'Overwrite existing files where applicable')
|
|
138
|
+
.action(async (options, command) => {
|
|
139
|
+
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
140
|
+
const didInstall = await runInitToolsBrainstorm(context, options, dependencies);
|
|
141
|
+
if (didInstall) {
|
|
142
|
+
setInstalledCanonicalPaths(command, canonicalPathsForPack('brainstorm'));
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BRAINSTORM_SKILLS } from '../../../init/tools/shared/skill-manifest.js';
|
|
2
|
+
export { BRAINSTORM_SKILLS };
|
|
3
|
+
export interface InstallBrainstormOptions {
|
|
4
|
+
assetsRoot: string;
|
|
5
|
+
targetRoot: string;
|
|
6
|
+
force?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface InstallBrainstormResult {
|
|
9
|
+
copiedSkills: string[];
|
|
10
|
+
updatedSkills: string[];
|
|
11
|
+
skippedSkills: string[];
|
|
12
|
+
outdatedSkills: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
installed: string | null;
|
|
15
|
+
bundled: string | null;
|
|
16
|
+
}>;
|
|
17
|
+
}
|
|
18
|
+
export declare function installBrainstorm(options: InstallBrainstormOptions): Promise<InstallBrainstormResult>;
|
|
19
|
+
//# sourceMappingURL=install-brainstorm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install-brainstorm.d.ts","sourceRoot":"","sources":["../../../../../src/commands/init/tools/brainstorm/install-brainstorm.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAE/E,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,MAAM,WAAW,wBAAwB;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,KAAK,CAAC;QACpB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KACxB,CAAC,CAAC;CACJ;AAED,wBAAsB,iBAAiB,CACrC,OAAO,EAAE,wBAAwB,GAChC,OAAO,CAAC,uBAAuB,CAAC,CAqClC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { join } from 'node:path';
|
|
2
|
+
import { copyDirWithVersionCheck } from '../../../init/tools/shared/copy-helpers.js';
|
|
3
|
+
import { BRAINSTORM_SKILLS } from '../../../init/tools/shared/skill-manifest.js';
|
|
4
|
+
export { BRAINSTORM_SKILLS };
|
|
5
|
+
export async function installBrainstorm(options) {
|
|
6
|
+
const force = options.force ?? false;
|
|
7
|
+
const result = {
|
|
8
|
+
copiedSkills: [],
|
|
9
|
+
updatedSkills: [],
|
|
10
|
+
skippedSkills: [],
|
|
11
|
+
outdatedSkills: [],
|
|
12
|
+
};
|
|
13
|
+
for (const skill of BRAINSTORM_SKILLS) {
|
|
14
|
+
const source = join(options.assetsRoot, 'skills', skill);
|
|
15
|
+
const destination = join(options.targetRoot, '.agents', 'skills', skill);
|
|
16
|
+
// The visual-companion bundle (scripts/, references/) ships under the
|
|
17
|
+
// skill directory and copies along with it via copyDirWithVersionCheck.
|
|
18
|
+
const copyResult = await copyDirWithVersionCheck(source, destination, force);
|
|
19
|
+
if (copyResult.status === 'copied') {
|
|
20
|
+
result.copiedSkills.push(skill);
|
|
21
|
+
}
|
|
22
|
+
else if (copyResult.status === 'updated') {
|
|
23
|
+
result.updatedSkills.push(skill);
|
|
24
|
+
}
|
|
25
|
+
else if (copyResult.status === 'outdated') {
|
|
26
|
+
result.outdatedSkills.push({
|
|
27
|
+
name: skill,
|
|
28
|
+
installed: copyResult.installedVersion ?? null,
|
|
29
|
+
bundled: copyResult.bundledVersion ?? null,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
result.skippedSkills.push(skill);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return result;
|
|
37
|
+
}
|
|
@@ -6,6 +6,7 @@ import type { ToolInfo } from '../../tools/shared/types.js';
|
|
|
6
6
|
import { type OatConfig } from '../../../config/oat-config.js';
|
|
7
7
|
import type { ConcreteScope } from '../../../shared/types.js';
|
|
8
8
|
import { Command } from 'commander';
|
|
9
|
+
import { type InstallBrainstormOptions, type InstallBrainstormResult } from './brainstorm/install-brainstorm.js';
|
|
9
10
|
import { type InstallCoreOptions, type InstallCoreResult } from './core/install-core.js';
|
|
10
11
|
import { type InstallDocsOptions, type InstallDocsResult } from './docs/install-docs.js';
|
|
11
12
|
import { type InstallIdeasOptions, type InstallIdeasResult } from './ideas/install-ideas.js';
|
|
@@ -15,7 +16,7 @@ import { type InstallUtilityOptions, type InstallUtilityResult } from './utility
|
|
|
15
16
|
import { type InstallWorkflowsOptions, type InstallWorkflowsResult } from './workflows/install-workflows.js';
|
|
16
17
|
type InstallScope = 'project' | 'user';
|
|
17
18
|
type PackInstallTarget = InstallScope | 'both';
|
|
18
|
-
export type ToolPack = 'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research';
|
|
19
|
+
export type ToolPack = 'core' | 'ideas' | 'docs' | 'workflows' | 'utility' | 'project-management' | 'research' | 'brainstorm';
|
|
19
20
|
export interface InitToolsDependencies {
|
|
20
21
|
buildCommandContext: (options: GlobalOptions) => CommandContext;
|
|
21
22
|
resolveProjectRoot: (cwd: string) => Promise<string>;
|
|
@@ -31,6 +32,7 @@ export interface InitToolsDependencies {
|
|
|
31
32
|
installUtility: (options: InstallUtilityOptions) => Promise<InstallUtilityResult>;
|
|
32
33
|
installProjectManagement: (options: InstallProjectManagementOptions) => Promise<InstallProjectManagementResult>;
|
|
33
34
|
installResearch: (options: InstallResearchOptions) => Promise<InstallResearchResult>;
|
|
35
|
+
installBrainstorm: (options: InstallBrainstormOptions) => Promise<InstallBrainstormResult>;
|
|
34
36
|
copyDirWithStatus: (source: string, destination: string, force: boolean) => Promise<'copied' | 'updated' | 'skipped'>;
|
|
35
37
|
removeDirectory: (target: string) => Promise<void>;
|
|
36
38
|
removeFile: (target: string) => Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/init/tools/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EACL,KAAK,mBAAmB,EAGzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,YAAY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AU,aAAa;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,aAAa,EAAE,GAAG,MAAM,CA8CxE;AAED,wBAAsB,YAAY,CAChC,OAAO,EAAE,cAAc,EACvB,YAAY,EAAE,qBAAqB,GAClC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAyWrB;AAED,wBAAsB,wBAAwB,CAC5C,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC,QAAQ,EAAE,CAAC,CAErB;AAED,wBAAgB,sBAAsB,CACpC,SAAS,GAAE,OAAO,CAAC,qBAAqB,CAAM,GAC7C,OAAO,CA4BT"}
|
|
@@ -13,6 +13,8 @@ import { readOatConfig, resolveLocalPaths, writeOatConfig, } from '../../../conf
|
|
|
13
13
|
import { resolveAssetsRoot } from '../../../fs/assets.js';
|
|
14
14
|
import { resolveProjectRoot, resolveScopeRoot } from '../../../fs/paths.js';
|
|
15
15
|
import { Command } from 'commander';
|
|
16
|
+
import { createInitToolsBrainstormCommand } from './brainstorm/index.js';
|
|
17
|
+
import { installBrainstorm as defaultInstallBrainstorm, } from './brainstorm/install-brainstorm.js';
|
|
16
18
|
import { createInitToolsCoreCommand } from './core/index.js';
|
|
17
19
|
import { installCore as defaultInstallCore, } from './core/install-core.js';
|
|
18
20
|
import { createInitToolsDocsCommand } from './docs/index.js';
|
|
@@ -24,7 +26,7 @@ import { createInitToolsProjectManagementCommand } from './project-management/in
|
|
|
24
26
|
import { installProjectManagement as defaultInstallProjectManagement, } from './project-management/install-project-management.js';
|
|
25
27
|
import { createInitToolsResearchCommand } from './research/index.js';
|
|
26
28
|
import { installResearch as defaultInstallResearch, } from './research/install-research.js';
|
|
27
|
-
import { DOCS_SKILLS, IDEA_SKILLS, RESEARCH_AGENTS, RESEARCH_SKILLS, UTILITY_SKILLS, } from './shared/skill-manifest.js';
|
|
29
|
+
import { BRAINSTORM_SKILLS, DOCS_SKILLS, IDEA_SKILLS, RESEARCH_AGENTS, RESEARCH_SKILLS, UTILITY_SKILLS, resolvePackDefaultScope, } from './shared/skill-manifest.js';
|
|
28
30
|
import { createInitToolsUtilityCommand } from './utility/index.js';
|
|
29
31
|
import { installUtility as defaultInstallUtility, } from './utility/install-utility.js';
|
|
30
32
|
import { createInitToolsWorkflowsCommand } from './workflows/index.js';
|
|
@@ -40,6 +42,7 @@ const ALL_TOOL_PACKS = [
|
|
|
40
42
|
'utility',
|
|
41
43
|
'project-management',
|
|
42
44
|
'research',
|
|
45
|
+
'brainstorm',
|
|
43
46
|
];
|
|
44
47
|
const USER_ELIGIBLE_PACK_MEMBERS = {
|
|
45
48
|
ideas: {
|
|
@@ -58,6 +61,10 @@ const USER_ELIGIBLE_PACK_MEMBERS = {
|
|
|
58
61
|
skills: RESEARCH_SKILLS,
|
|
59
62
|
agents: RESEARCH_AGENTS,
|
|
60
63
|
},
|
|
64
|
+
brainstorm: {
|
|
65
|
+
skills: BRAINSTORM_SKILLS,
|
|
66
|
+
agents: [],
|
|
67
|
+
},
|
|
61
68
|
};
|
|
62
69
|
let lastRunInitToolsMetadata = null;
|
|
63
70
|
const DEFAULT_DEPENDENCIES = {
|
|
@@ -75,6 +82,7 @@ const DEFAULT_DEPENDENCIES = {
|
|
|
75
82
|
installUtility: defaultInstallUtility,
|
|
76
83
|
installProjectManagement: defaultInstallProjectManagement,
|
|
77
84
|
installResearch: defaultInstallResearch,
|
|
85
|
+
installBrainstorm: defaultInstallBrainstorm,
|
|
78
86
|
copyDirWithStatus,
|
|
79
87
|
removeDirectory: async (target) => {
|
|
80
88
|
await rm(target, { recursive: true, force: true });
|
|
@@ -104,6 +112,7 @@ const USER_ELIGIBLE_PACKS = new Set([
|
|
|
104
112
|
'docs',
|
|
105
113
|
'utility',
|
|
106
114
|
'research',
|
|
115
|
+
'brainstorm',
|
|
107
116
|
]);
|
|
108
117
|
function isUserEligiblePack(pack) {
|
|
109
118
|
return USER_ELIGIBLE_PACKS.has(pack);
|
|
@@ -175,17 +184,32 @@ function buildPackChoices(installedPackStates) {
|
|
|
175
184
|
value: 'research',
|
|
176
185
|
checked: true,
|
|
177
186
|
},
|
|
187
|
+
{
|
|
188
|
+
label: `Brainstorm [project|user]${installedPackStates.brainstorm.location === 'not-installed' ? '' : ` (installed: ${formatInstalledLocation(installedPackStates.brainstorm.location)})`} — Always-on brainstorming entry point with visual companion`,
|
|
189
|
+
value: 'brainstorm',
|
|
190
|
+
checked: true,
|
|
191
|
+
},
|
|
178
192
|
];
|
|
179
193
|
}
|
|
180
194
|
function buildUserScopeChoices(packs, installedPackStates) {
|
|
181
195
|
return packs.map((pack) => {
|
|
182
196
|
const location = installedPackStates[pack].location;
|
|
197
|
+
// Existing-install detection wins over PACK_METADATA defaultScope so
|
|
198
|
+
// re-installs of an already-placed pack do not silently migrate the
|
|
199
|
+
// user across scopes. When the pack is not yet installed at any
|
|
200
|
+
// scope, fall back to PACK_METADATA[pack]?.defaultScope (defaults
|
|
201
|
+
// to 'project' when absent).
|
|
202
|
+
const checked = location === 'user' || location === 'both'
|
|
203
|
+
? true
|
|
204
|
+
: location === 'not-installed'
|
|
205
|
+
? resolvePackDefaultScope(pack) === 'user'
|
|
206
|
+
: false;
|
|
183
207
|
return {
|
|
184
208
|
label: location === 'not-installed'
|
|
185
209
|
? pack
|
|
186
210
|
: `${pack} (current: ${formatInstalledLocation(location)})`,
|
|
187
211
|
value: pack,
|
|
188
|
-
checked
|
|
212
|
+
checked,
|
|
189
213
|
};
|
|
190
214
|
});
|
|
191
215
|
}
|
|
@@ -247,10 +271,30 @@ async function resolvePackScopes(context, selections, installedPackStates, depen
|
|
|
247
271
|
}
|
|
248
272
|
return scopes;
|
|
249
273
|
}
|
|
250
|
-
// Non-interactive
|
|
274
|
+
// Non-interactive resolution.
|
|
275
|
+
//
|
|
276
|
+
// Migration-safety contract: existing-install detection wins over
|
|
277
|
+
// PACK_METADATA defaultScope. If the pack is already installed at any
|
|
278
|
+
// scope, preserve that placement so re-running `oat init tools`
|
|
279
|
+
// non-interactively never silently migrates a user's prior install
|
|
280
|
+
// across scopes. Only when the pack is not yet present do we consult
|
|
281
|
+
// PACK_METADATA[name]?.defaultScope (with absent entries falling back
|
|
282
|
+
// to 'project' for backwards compatibility).
|
|
251
283
|
if (!context.interactive) {
|
|
252
284
|
for (const pack of eligiblePacks) {
|
|
253
|
-
|
|
285
|
+
const currentLocation = installedPackStates[pack].location;
|
|
286
|
+
if (currentLocation === 'user') {
|
|
287
|
+
scopes[pack] = 'user';
|
|
288
|
+
}
|
|
289
|
+
else if (currentLocation === 'both') {
|
|
290
|
+
scopes[pack] = 'both';
|
|
291
|
+
}
|
|
292
|
+
else if (currentLocation === 'project') {
|
|
293
|
+
scopes[pack] = 'project';
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
scopes[pack] = resolvePackDefaultScope(pack);
|
|
297
|
+
}
|
|
254
298
|
}
|
|
255
299
|
return scopes;
|
|
256
300
|
}
|
|
@@ -323,6 +367,7 @@ const PACK_DESCRIPTIONS = {
|
|
|
323
367
|
'project-management': 'Local backlog, roadmap, and reference doc management (oat-pjm-* skills)',
|
|
324
368
|
utility: 'Standalone utilities (skill authoring, maintainability review, code reviews)',
|
|
325
369
|
research: 'Research, analysis, verification, and synthesis',
|
|
370
|
+
brainstorm: 'Always-on brainstorming entry point with visual companion',
|
|
326
371
|
};
|
|
327
372
|
export function buildToolPacksSectionBody(packs) {
|
|
328
373
|
const userPacks = packs.filter((p) => p.scope === 'user' || p.scope === 'both');
|
|
@@ -362,7 +407,15 @@ export async function runInitTools(context, dependencies) {
|
|
|
362
407
|
const initialPackStates = await loadInstalledPackStates(projectRoot, userRoot, assetsRoot, dependencies);
|
|
363
408
|
const selectedPacks = context.interactive
|
|
364
409
|
? ((await dependencies.selectManyWithAbort('Select tool packs to install', buildPackChoices(initialPackStates), { interactive: context.interactive })) ?? [])
|
|
365
|
-
: [
|
|
410
|
+
: [
|
|
411
|
+
'core',
|
|
412
|
+
'ideas',
|
|
413
|
+
'docs',
|
|
414
|
+
'workflows',
|
|
415
|
+
'utility',
|
|
416
|
+
'research',
|
|
417
|
+
'brainstorm',
|
|
418
|
+
];
|
|
366
419
|
if (!context.interactive) {
|
|
367
420
|
selectedPacks.push('project-management');
|
|
368
421
|
}
|
|
@@ -552,6 +605,22 @@ export async function runInitTools(context, dependencies) {
|
|
|
552
605
|
}
|
|
553
606
|
}
|
|
554
607
|
}
|
|
608
|
+
if (selectedPacks.includes('brainstorm')) {
|
|
609
|
+
for (const targetRoot of packTargets('brainstorm')) {
|
|
610
|
+
affectedScopes.add(targetRoot === userRoot ? 'user' : 'project');
|
|
611
|
+
const brainstormResult = await dependencies.installBrainstorm({
|
|
612
|
+
assetsRoot,
|
|
613
|
+
targetRoot,
|
|
614
|
+
});
|
|
615
|
+
for (const skill of brainstormResult.outdatedSkills) {
|
|
616
|
+
outdatedSkills.push({
|
|
617
|
+
...skill,
|
|
618
|
+
targetRoot,
|
|
619
|
+
selectionKey: `${skill.name}:${targetRoot}`,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
}
|
|
623
|
+
}
|
|
555
624
|
if (outdatedSkills.length > 0) {
|
|
556
625
|
reportOutdatedSkills(context, outdatedSkills);
|
|
557
626
|
if (context.interactive) {
|
|
@@ -616,7 +685,7 @@ export function createInitToolsCommand(overrides = {}) {
|
|
|
616
685
|
...overrides,
|
|
617
686
|
};
|
|
618
687
|
return new Command('tools')
|
|
619
|
-
.description('Install OAT tool packs (core, ideas, docs, workflows, utility, project-management, research)')
|
|
688
|
+
.description('Install OAT tool packs (core, ideas, docs, workflows, utility, project-management, research, brainstorm)')
|
|
620
689
|
.addCommand(createInitToolsCoreCommand())
|
|
621
690
|
.addCommand(createInitToolsIdeasCommand())
|
|
622
691
|
.addCommand(createInitToolsDocsCommand())
|
|
@@ -624,6 +693,7 @@ export function createInitToolsCommand(overrides = {}) {
|
|
|
624
693
|
.addCommand(createInitToolsWorkflowsCommand())
|
|
625
694
|
.addCommand(createInitToolsUtilityCommand())
|
|
626
695
|
.addCommand(createInitToolsResearchCommand())
|
|
696
|
+
.addCommand(createInitToolsBrainstormCommand())
|
|
627
697
|
.action(async (_options, command) => {
|
|
628
698
|
const context = dependencies.buildCommandContext(readGlobalOptions(command));
|
|
629
699
|
const selectedPacks = await runInitTools(context, dependencies);
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
* `bundle-assets.sh` maintains its own bash array — `bundle-consistency.test.ts`
|
|
6
6
|
* validates that it stays in sync with these lists.
|
|
7
7
|
*/
|
|
8
|
+
export interface PackMetadata {
|
|
9
|
+
name: string;
|
|
10
|
+
defaultScope: 'user' | 'project';
|
|
11
|
+
}
|
|
12
|
+
export declare const PACK_METADATA: Record<string, PackMetadata>;
|
|
13
|
+
export declare function resolvePackDefaultScope(packName: string): 'user' | 'project';
|
|
8
14
|
export declare const WORKFLOW_SKILLS: readonly ["oat-project-capture", "oat-project-clear-active", "oat-project-complete", "oat-project-design", "oat-project-discover", "oat-project-document", "oat-project-implement", "oat-project-import-plan", "oat-project-new", "oat-project-next", "oat-project-open", "oat-project-plan", "oat-project-plan-writing", "oat-project-pr-final", "oat-project-pr-progress", "oat-project-progress", "oat-project-promote-spec-driven", "oat-project-quick-start", "oat-project-reconcile", "oat-project-revise", "oat-project-review-provide", "oat-project-review-receive", "oat-project-review-receive-remote", "oat-project-spec", "oat-project-summary", "oat-repo-knowledge-index", "oat-worktree-bootstrap", "oat-worktree-bootstrap-auto", "oat-wrap-up"];
|
|
9
15
|
export declare const WORKFLOW_AGENTS: readonly ["oat-codebase-mapper.md", "oat-phase-implementer.md", "oat-reviewer.md"];
|
|
10
16
|
export declare const WORKFLOW_TEMPLATES: readonly ["state.md", "discovery.md", "spec.md", "design.md", "plan.md", "implementation.md", "summary.md"];
|
|
@@ -17,6 +23,7 @@ export declare const UTILITY_SKILLS: readonly ["create-agnostic-skill", "oat-rep
|
|
|
17
23
|
export declare const PROJECT_MANAGEMENT_SKILLS: readonly ["oat-pjm-add-backlog-item", "oat-pjm-update-repo-reference", "oat-pjm-review-backlog"];
|
|
18
24
|
export declare const PROJECT_MANAGEMENT_TEMPLATES: readonly ["backlog-item.md", "roadmap.md"];
|
|
19
25
|
export declare const PROJECT_MANAGEMENT_SCRIPTS: readonly [];
|
|
26
|
+
export declare const BRAINSTORM_SKILLS: readonly ["oat-brainstorm"];
|
|
20
27
|
export declare const RESEARCH_SKILLS: readonly ["analyze", "compare", "deep-research", "skeptic", "synthesize"];
|
|
21
28
|
export declare const RESEARCH_AGENTS: readonly ["skeptical-evaluator.md"];
|
|
22
29
|
//# sourceMappingURL=skill-manifest.d.ts.map
|