@rasensio/aidlc 0.4.0 → 0.7.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/LICENSE +21 -0
- package/README.md +43 -253
- package/dist/cli.js +0 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/continue.d.ts.map +1 -1
- package/dist/commands/continue.js +11 -15
- package/dist/commands/continue.js.map +1 -1
- package/dist/commands/docs.d.ts.map +1 -1
- package/dist/commands/docs.js +35 -42
- package/dist/commands/docs.js.map +1 -1
- package/dist/commands/gate.d.ts.map +1 -1
- package/dist/commands/gate.js +11 -15
- package/dist/commands/gate.js.map +1 -1
- package/dist/commands/init.d.ts +17 -11
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +297 -77
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +14 -16
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +11 -15
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/transition.d.ts.map +1 -1
- package/dist/commands/transition.js +11 -15
- package/dist/commands/transition.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +31 -30
- package/dist/commands/update.js.map +1 -1
- package/dist/compile/adapters/claude-code.js +2 -2
- package/dist/compile/adapters/claude-code.js.map +1 -1
- package/dist/compile/adapters/kiro.d.ts.map +1 -1
- package/dist/compile/adapters/kiro.js +2 -1
- package/dist/compile/adapters/kiro.js.map +1 -1
- package/package.json +14 -21
- package/capabilities/claude-code.yaml +0 -9
- package/capabilities/codex.yaml +0 -8
- package/capabilities/cursor.yaml +0 -8
- package/capabilities/kiro.yaml +0 -9
- package/capabilities/windsurf.yaml +0 -8
- package/ci/aidlc-gate.yml +0 -100
- package/examples/.gitkeep +0 -0
- package/guidance/accessibility.md +0 -67
- package/guidance/api-conventions.md +0 -124
- package/guidance/index.yaml +0 -7
- package/guidance/secure-defaults.md +0 -71
- package/phases/.gitkeep +0 -0
- package/skills/00-overview.md +0 -74
- package/skills/01-getting-started.md +0 -131
- package/skills/02-first-activation.md +0 -158
- package/skills/10-ideation.md +0 -45
- package/skills/20-requirements.md +0 -54
- package/skills/30-design.md +0 -57
- package/skills/40-implementation.md +0 -64
- package/skills/50-testing.md +0 -60
- package/skills/60-deployment.md +0 -63
- package/skills/70-maintenance.md +0 -56
- package/skills/80-review.md +0 -85
- package/skills/81-continue.md +0 -57
- package/skills/82-add-action.md +0 -71
- package/templates/.gitkeep +0 -0
- package/templates/bugfix.yaml +0 -14
- package/templates/full-feature.yaml +0 -44
- package/templates/micro-task.yaml +0 -11
- package/templates/quick-feature.yaml +0 -20
- package/templates/spike.yaml +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EACL,aAAa,IAAI,oBAAoB,EACrC,UAAU,IAAI,iBAAiB,EAC/B,YAAY,IAAI,mBAAmB,GACpC,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG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C,MAAM,CAAC,KAAK,CAAC,SAAS,UAAU,IAAI,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/commands/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/commands/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkFpC;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAUnD"}
|
package/dist/commands/gate.js
CHANGED
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
*/
|
|
20
20
|
import { Command } from 'commander';
|
|
21
21
|
import { existsSync, readdirSync } from 'node:fs';
|
|
22
|
-
import { join
|
|
23
|
-
import {
|
|
22
|
+
import { join } from 'node:path';
|
|
23
|
+
import { loadTemplates as loadBuiltInTemplates } from '@rasensio/aidlc-content';
|
|
24
24
|
import { evaluateGate } from '../core/gate.js';
|
|
25
25
|
import { loadSnapshot } from '../state/snapshot-store.js';
|
|
26
26
|
import { loadTemplates, resolveTemplate } from '../core/template-resolver.js';
|
|
@@ -28,19 +28,16 @@ import { loadTemplates, resolveTemplate } from '../core/template-resolver.js';
|
|
|
28
28
|
// Helpers
|
|
29
29
|
// ---------------------------------------------------------------------------
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Load all templates: built-in from @rasensio/aidlc-content + custom from the project.
|
|
32
32
|
*/
|
|
33
|
-
function
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
function loadAllTemplates(packageRoot, projectRoot) {
|
|
41
|
-
const builtInDir = join(packageRoot, 'templates');
|
|
33
|
+
function loadAllTemplates(projectRoot) {
|
|
34
|
+
const builtInContent = loadBuiltInTemplates();
|
|
35
|
+
const templates = new Map();
|
|
36
|
+
for (const tpl of builtInContent) {
|
|
37
|
+
const cliTemplate = tpl.raw;
|
|
38
|
+
templates.set(tpl.name, cliTemplate);
|
|
39
|
+
}
|
|
42
40
|
const customDir = join(projectRoot, '.aidlc', 'templates');
|
|
43
|
-
const templates = loadTemplates(builtInDir);
|
|
44
41
|
if (existsSync(customDir)) {
|
|
45
42
|
const custom = loadTemplates(customDir);
|
|
46
43
|
for (const [name, tpl] of custom) {
|
|
@@ -97,7 +94,6 @@ export function registerGate(program) {
|
|
|
97
94
|
// Core logic
|
|
98
95
|
// ---------------------------------------------------------------------------
|
|
99
96
|
function runGate(instanceArg, phaseArg, opts) {
|
|
100
|
-
const packageRoot = getPackageRoot();
|
|
101
97
|
const projectRoot = process.cwd();
|
|
102
98
|
const stateDir = join(projectRoot, '.aidlc', 'state');
|
|
103
99
|
// Check instance exists
|
|
@@ -122,7 +118,7 @@ function runGate(instanceArg, phaseArg, opts) {
|
|
|
122
118
|
// Load phase states
|
|
123
119
|
const phaseStates = loadPhaseStates(stateDir, instanceArg);
|
|
124
120
|
// Resolve template
|
|
125
|
-
const allTemplates = loadAllTemplates(
|
|
121
|
+
const allTemplates = loadAllTemplates(projectRoot);
|
|
126
122
|
const rawTemplate = allTemplates.get(instanceState.template);
|
|
127
123
|
if (!rawTemplate) {
|
|
128
124
|
process.stderr.write(`Error: template '${instanceState.template}' not found.\n`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gate.js","sourceRoot":"","sources":["../../src/commands/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,IAAI,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,gBAAgB,EAAE,CAAC;gBAC/C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,QAAQ,IAAI,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QACD,IAAI,MAAM,CAAC,mBAAmB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;YACpD,KAAK,MAAM,SAAS,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;gBACnD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,SAAS,IAAI,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;IACH,CAAC;IAED,gCAAgC;IAChC,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AACzC,CAAC"}
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `aidlc init` command —
|
|
2
|
+
* `aidlc init` command — set up AIDLC in a project.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
4
|
+
* Single entry point that merges the former `setup` (interactive configuration
|
|
5
|
+
* wizard) and `init` (per-platform skill install) commands:
|
|
6
|
+
*
|
|
7
|
+
* - `aidlc init` — interactive wizard: collect SetupAnswers via @clack/prompts,
|
|
8
|
+
* write `.aidlc/config.yaml`, install skills for each configured platform,
|
|
9
|
+
* run discovery to generate context docs.
|
|
10
|
+
* - `aidlc init --platform <name>` — non-interactive: add the platform to the
|
|
11
|
+
* config and install skills without prompts.
|
|
12
|
+
* - `aidlc init --non-interactive` — no prompts; preserve existing config or
|
|
13
|
+
* apply defaults.
|
|
14
|
+
* - `--dry-run` — print what would be written without making any changes.
|
|
12
15
|
* - Unsupported platform → exit code 2, stderr lists supported platforms (Req 1.3).
|
|
13
16
|
* - Success → exit code 0, summary of files written (Req 1.7).
|
|
14
17
|
*
|
|
15
|
-
*
|
|
18
|
+
* `aidlc setup` remains registered as a hidden, deprecated alias.
|
|
19
|
+
*
|
|
20
|
+
* Requirements: 1.1, 1.3, 1.5, 17.1, 17.9, 21.1, 21.9, 7.8
|
|
16
21
|
*
|
|
17
22
|
* @module
|
|
18
23
|
*/
|
|
19
24
|
import { Command } from 'commander';
|
|
20
25
|
/**
|
|
21
|
-
* Register the `aidlc init` command
|
|
26
|
+
* Register the `aidlc init` command (and its deprecated `setup` alias)
|
|
27
|
+
* on the given commander program.
|
|
22
28
|
*/
|
|
23
29
|
export declare function registerInit(program: Command): void;
|
|
24
30
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoQpC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA2BnD"}
|
package/dist/commands/init.js
CHANGED
|
@@ -1,64 +1,71 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `aidlc init` command —
|
|
2
|
+
* `aidlc init` command — set up AIDLC in a project.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* -
|
|
11
|
-
*
|
|
4
|
+
* Single entry point that merges the former `setup` (interactive configuration
|
|
5
|
+
* wizard) and `init` (per-platform skill install) commands:
|
|
6
|
+
*
|
|
7
|
+
* - `aidlc init` — interactive wizard: collect SetupAnswers via @clack/prompts,
|
|
8
|
+
* write `.aidlc/config.yaml`, install skills for each configured platform,
|
|
9
|
+
* run discovery to generate context docs.
|
|
10
|
+
* - `aidlc init --platform <name>` — non-interactive: add the platform to the
|
|
11
|
+
* config and install skills without prompts.
|
|
12
|
+
* - `aidlc init --non-interactive` — no prompts; preserve existing config or
|
|
13
|
+
* apply defaults.
|
|
14
|
+
* - `--dry-run` — print what would be written without making any changes.
|
|
12
15
|
* - Unsupported platform → exit code 2, stderr lists supported platforms (Req 1.3).
|
|
13
16
|
* - Success → exit code 0, summary of files written (Req 1.7).
|
|
14
17
|
*
|
|
15
|
-
*
|
|
18
|
+
* `aidlc setup` remains registered as a hidden, deprecated alias.
|
|
19
|
+
*
|
|
20
|
+
* Requirements: 1.1, 1.3, 1.5, 17.1, 17.9, 21.1, 21.9, 7.8
|
|
16
21
|
*
|
|
17
22
|
* @module
|
|
18
23
|
*/
|
|
19
24
|
import { Command } from 'commander';
|
|
20
|
-
import { existsSync,
|
|
21
|
-
import { join,
|
|
22
|
-
import {
|
|
23
|
-
import
|
|
25
|
+
import { existsSync, readdirSync } from 'node:fs';
|
|
26
|
+
import { join, dirname } from 'node:path';
|
|
27
|
+
import { createRequire } from 'node:module';
|
|
28
|
+
import * as clack from '@clack/prompts';
|
|
29
|
+
import { getCapabilityMap as getBuiltInCapabilityMap, } from '@rasensio/aidlc-content';
|
|
24
30
|
import { loadSkills, loadGuidanceLayers } from '../compile/loaders.js';
|
|
25
31
|
import { adapters, supportedPlatforms } from '../compile/adapters/index.js';
|
|
26
32
|
import { executePlan, dryRunPlan } from '../compile/install-plan.js';
|
|
33
|
+
import { computeSetup } from '../setup/setup-compute.js';
|
|
34
|
+
import { loadYaml, saveYaml } from '../state/yaml-helpers.js';
|
|
35
|
+
// ---------------------------------------------------------------------------
|
|
36
|
+
// Constants
|
|
37
|
+
// ---------------------------------------------------------------------------
|
|
38
|
+
/**
|
|
39
|
+
* Mapping from complexity to default scope and template (Req 21.5).
|
|
40
|
+
*/
|
|
41
|
+
const COMPLEXITY_DEFAULTS = {
|
|
42
|
+
simple: { scope: 'micro', template: 'micro-task' },
|
|
43
|
+
moderate: { scope: 'standard', template: 'quick-feature' },
|
|
44
|
+
complex: { scope: 'full', template: 'full-feature' },
|
|
45
|
+
};
|
|
27
46
|
// ---------------------------------------------------------------------------
|
|
28
47
|
// Helpers
|
|
29
48
|
// ---------------------------------------------------------------------------
|
|
30
49
|
/**
|
|
31
|
-
* Resolve the package root directory (where skills/ and capabilities/ live).
|
|
32
|
-
*
|
|
33
|
-
* In tests running via ts-node/vitest, src/commands/init.ts → go up two levels.
|
|
50
|
+
* Resolve the content package root directory (where skills/ and capabilities/ live).
|
|
51
|
+
* Uses module resolution to find @rasensio/aidlc-content's installed location.
|
|
34
52
|
*/
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
return
|
|
53
|
+
function getContentPackageRoot() {
|
|
54
|
+
const require = createRequire(import.meta.url);
|
|
55
|
+
const contentPkgPath = require.resolve('@rasensio/aidlc-content/package.json');
|
|
56
|
+
return dirname(contentPkgPath);
|
|
39
57
|
}
|
|
40
58
|
/**
|
|
41
|
-
* Load the capability map
|
|
42
|
-
* Returns null if
|
|
59
|
+
* Load the capability map for a given platform from the content package.
|
|
60
|
+
* Returns null if no capability map exists for this platform.
|
|
43
61
|
*/
|
|
44
|
-
function loadCapabilityMap(platform
|
|
45
|
-
const
|
|
46
|
-
if (!
|
|
47
|
-
return null;
|
|
48
|
-
}
|
|
49
|
-
try {
|
|
50
|
-
const raw = readFileSync(filePath, 'utf8');
|
|
51
|
-
const parsed = parseYaml(raw);
|
|
52
|
-
if (typeof parsed !== 'object' || parsed === null) {
|
|
53
|
-
process.stderr.write(`warning: malformed capability map: ${filePath}\n`);
|
|
54
|
-
return null;
|
|
55
|
-
}
|
|
56
|
-
return parsed;
|
|
57
|
-
}
|
|
58
|
-
catch {
|
|
59
|
-
process.stderr.write(`warning: unable to read capability map: ${filePath}\n`);
|
|
62
|
+
function loadCapabilityMap(platform) {
|
|
63
|
+
const capMap = getBuiltInCapabilityMap(platform);
|
|
64
|
+
if (!capMap) {
|
|
60
65
|
return null;
|
|
61
66
|
}
|
|
67
|
+
// Convert from content package's CapabilityMap type to CLI's CapabilityMap type
|
|
68
|
+
return capMap;
|
|
62
69
|
}
|
|
63
70
|
/**
|
|
64
71
|
* Build the ProjectContext for a given project root.
|
|
@@ -99,56 +106,269 @@ function buildProjectContext(projectRoot) {
|
|
|
99
106
|
guidanceLayers,
|
|
100
107
|
};
|
|
101
108
|
}
|
|
102
|
-
// ---------------------------------------------------------------------------
|
|
103
|
-
// Command registration
|
|
104
|
-
// ---------------------------------------------------------------------------
|
|
105
109
|
/**
|
|
106
|
-
*
|
|
110
|
+
* Load existing config from `.aidlc/config.yaml`, or null if it doesn't exist.
|
|
111
|
+
*/
|
|
112
|
+
function loadExistingConfig(projectRoot) {
|
|
113
|
+
const configPath = join(projectRoot, '.aidlc', 'config.yaml');
|
|
114
|
+
if (!existsSync(configPath)) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
118
|
+
return loadYaml(configPath);
|
|
119
|
+
}
|
|
120
|
+
catch {
|
|
121
|
+
// Malformed config → treat as fresh setup
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* Collect answers interactively using @clack/prompts.
|
|
127
|
+
*/
|
|
128
|
+
async function collectInteractiveAnswers(existing) {
|
|
129
|
+
clack.intro('aidlc init');
|
|
130
|
+
if (existing) {
|
|
131
|
+
clack.note(`Existing configuration found. Current platforms: ${existing.platforms.join(', ') || 'none'}\n` +
|
|
132
|
+
`Scope: ${existing.defaults.scope}, Template: ${existing.defaults.template}`, 'Update mode');
|
|
133
|
+
}
|
|
134
|
+
// Project type
|
|
135
|
+
const projectType = await clack.select({
|
|
136
|
+
message: 'What kind of project is this?',
|
|
137
|
+
options: [
|
|
138
|
+
{ value: 'web-app', label: 'web-app', hint: 'Frontend or full-stack web application (React, Next.js, etc.)' },
|
|
139
|
+
{ value: 'api', label: 'api', hint: 'Backend service or REST/GraphQL API' },
|
|
140
|
+
{ value: 'cli', label: 'cli', hint: 'Command-line tool or terminal utility' },
|
|
141
|
+
{ value: 'library', label: 'library', hint: 'Reusable package or SDK consumed by other projects' },
|
|
142
|
+
{ value: 'service', label: 'service', hint: 'Background worker, MCP server, daemon, or long-running process' },
|
|
143
|
+
{ value: 'monorepo', label: 'monorepo', hint: 'Multiple packages/apps in one repo (apps, APIs, libraries, etc.)' },
|
|
144
|
+
{ value: 'other', label: 'other', hint: 'Something else — docs site, infra config, or anything not listed above' },
|
|
145
|
+
],
|
|
146
|
+
});
|
|
147
|
+
if (clack.isCancel(projectType))
|
|
148
|
+
return null;
|
|
149
|
+
// Complexity
|
|
150
|
+
const complexity = await clack.select({
|
|
151
|
+
message: 'How complex is this project? (determines which lifecycle phases are used)',
|
|
152
|
+
options: [
|
|
153
|
+
{
|
|
154
|
+
value: 'simple',
|
|
155
|
+
label: 'simple',
|
|
156
|
+
hint: 'Small tasks — skip straight to implementation and testing',
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
value: 'moderate',
|
|
160
|
+
label: 'moderate',
|
|
161
|
+
hint: 'Typical features — includes requirements, design, implementation, and testing',
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
value: 'complex',
|
|
165
|
+
label: 'complex',
|
|
166
|
+
hint: 'Large features — full lifecycle from ideation through maintenance with review gates',
|
|
167
|
+
},
|
|
168
|
+
],
|
|
169
|
+
});
|
|
170
|
+
if (clack.isCancel(complexity))
|
|
171
|
+
return null;
|
|
172
|
+
// Platforms
|
|
173
|
+
const platforms = await clack.multiselect({
|
|
174
|
+
message: 'Which AI coding platforms will you use? (generates config files for each)',
|
|
175
|
+
options: [
|
|
176
|
+
{ value: 'claude-code', label: 'claude-code', hint: 'Anthropic Claude Code (CLAUDE.md)' },
|
|
177
|
+
{ value: 'codex', label: 'codex', hint: 'OpenAI Codex CLI (AGENTS.md)' },
|
|
178
|
+
{ value: 'cursor', label: 'cursor', hint: 'Cursor IDE (.cursor/rules/)' },
|
|
179
|
+
{ value: 'kiro', label: 'kiro', hint: 'Kiro IDE (.kiro/steering/)' },
|
|
180
|
+
{ value: 'windsurf', label: 'windsurf', hint: 'Windsurf IDE (.windsurfrules)' },
|
|
181
|
+
],
|
|
182
|
+
required: false,
|
|
183
|
+
});
|
|
184
|
+
if (clack.isCancel(platforms))
|
|
185
|
+
return null;
|
|
186
|
+
// Default template
|
|
187
|
+
const template = await clack.select({
|
|
188
|
+
message: 'Default workflow template (defines the phases and artifacts for each lifecycle run):',
|
|
189
|
+
options: [
|
|
190
|
+
{
|
|
191
|
+
value: 'micro-task',
|
|
192
|
+
label: 'micro-task',
|
|
193
|
+
hint: 'Minimal: implementation → testing only',
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
value: 'quick-feature',
|
|
197
|
+
label: 'quick-feature',
|
|
198
|
+
hint: 'Standard: requirements → design → implementation → testing → deployment',
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
value: 'full-feature',
|
|
202
|
+
label: 'full-feature',
|
|
203
|
+
hint: 'Complete: ideation through maintenance with adversarial review gates',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
value: 'bugfix',
|
|
207
|
+
label: 'bugfix',
|
|
208
|
+
hint: 'Bug fixes: reproduction → requirements → implementation → testing → deployment',
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
value: 'spike',
|
|
212
|
+
label: 'spike',
|
|
213
|
+
hint: 'Research/exploration: ideation → findings documentation',
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
initialValue: COMPLEXITY_DEFAULTS[complexity]?.template ?? 'micro-task',
|
|
217
|
+
});
|
|
218
|
+
if (clack.isCancel(template))
|
|
219
|
+
return null;
|
|
220
|
+
// Default scope
|
|
221
|
+
const scope = await clack.select({
|
|
222
|
+
message: 'Default scope (controls how many lifecycle phases are active per run):',
|
|
223
|
+
options: [
|
|
224
|
+
{
|
|
225
|
+
value: 'full',
|
|
226
|
+
label: 'full',
|
|
227
|
+
hint: 'All phases enabled — ideation, requirements, design, implementation, testing, deployment, maintenance',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
value: 'standard',
|
|
231
|
+
label: 'standard',
|
|
232
|
+
hint: 'Core phases — requirements, design, implementation, testing, deployment',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
value: 'micro',
|
|
236
|
+
label: 'micro',
|
|
237
|
+
hint: 'Minimal — implementation and testing only (fastest)',
|
|
238
|
+
},
|
|
239
|
+
],
|
|
240
|
+
initialValue: COMPLEXITY_DEFAULTS[complexity]?.scope ?? 'micro',
|
|
241
|
+
});
|
|
242
|
+
if (clack.isCancel(scope))
|
|
243
|
+
return null;
|
|
244
|
+
return {
|
|
245
|
+
projectType: projectType,
|
|
246
|
+
complexity: complexity,
|
|
247
|
+
platforms: platforms,
|
|
248
|
+
template: template,
|
|
249
|
+
scope: scope,
|
|
250
|
+
};
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Register the `aidlc init` command (and its deprecated `setup` alias)
|
|
254
|
+
* on the given commander program.
|
|
107
255
|
*/
|
|
108
256
|
export function registerInit(program) {
|
|
109
|
-
|
|
257
|
+
const addOptions = (cmd) => cmd
|
|
258
|
+
.option('--platform <name>', `Install skills for a single platform without prompts (${supportedPlatforms.join(', ')})`)
|
|
259
|
+
.option('--non-interactive', 'Skip prompts, use defaults or existing config')
|
|
260
|
+
.option('--dry-run', 'Print what would be written without making changes');
|
|
261
|
+
addOptions(program
|
|
110
262
|
.command('init')
|
|
111
|
-
.description('
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
263
|
+
.description('Set up AIDLC: configure the project and install platform skills')).action(async (opts) => {
|
|
264
|
+
await runInit(opts);
|
|
265
|
+
});
|
|
266
|
+
// Deprecated alias kept for backwards compatibility.
|
|
267
|
+
addOptions(program
|
|
268
|
+
.command('setup', { hidden: true })
|
|
269
|
+
.description('Deprecated alias for `aidlc init`')).action(async (opts) => {
|
|
270
|
+
process.stderr.write('warning: `aidlc setup` is deprecated; use `aidlc init` instead.\n');
|
|
271
|
+
await runInit(opts);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
// ---------------------------------------------------------------------------
|
|
275
|
+
// Core logic
|
|
276
|
+
// ---------------------------------------------------------------------------
|
|
277
|
+
async function runInit(opts) {
|
|
278
|
+
const projectRoot = process.cwd();
|
|
279
|
+
const configPath = join(projectRoot, '.aidlc', 'config.yaml');
|
|
280
|
+
// Validate an explicitly requested platform up front (Req 1.3)
|
|
281
|
+
if (opts.platform && !adapters.has(opts.platform)) {
|
|
282
|
+
process.stderr.write(`Error: unsupported platform '${opts.platform}'\n` +
|
|
283
|
+
`Supported platforms: ${supportedPlatforms.join(', ')}\n`);
|
|
284
|
+
process.exitCode = 2;
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
// Load existing config
|
|
288
|
+
const existing = loadExistingConfig(projectRoot);
|
|
289
|
+
const isUpdate = existing !== null;
|
|
290
|
+
let answers;
|
|
291
|
+
if (opts.platform) {
|
|
292
|
+
// Explicit platform → non-interactive, merge it into the config
|
|
293
|
+
answers = { platforms: [opts.platform] };
|
|
294
|
+
}
|
|
295
|
+
else if (opts.nonInteractive) {
|
|
296
|
+
// Non-interactive: use empty answers (preserve existing or apply defaults)
|
|
297
|
+
answers = {};
|
|
298
|
+
}
|
|
299
|
+
else {
|
|
300
|
+
// Interactive: collect answers via prompts
|
|
301
|
+
const collected = await collectInteractiveAnswers(existing);
|
|
302
|
+
if (collected === null) {
|
|
303
|
+
process.stderr.write('Init cancelled.\n');
|
|
304
|
+
process.exitCode = 1;
|
|
122
305
|
return;
|
|
123
306
|
}
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
307
|
+
answers = collected;
|
|
308
|
+
}
|
|
309
|
+
// Compute the resulting config
|
|
310
|
+
const config = computeSetup(existing, answers);
|
|
311
|
+
// Write `.aidlc/config.yaml`
|
|
312
|
+
if (!opts.dryRun) {
|
|
313
|
+
saveYaml(configPath, config);
|
|
314
|
+
}
|
|
315
|
+
// Install skills for each configured platform
|
|
316
|
+
if (config.platforms.length > 0) {
|
|
317
|
+
const contentRoot = getContentPackageRoot();
|
|
318
|
+
const skillsDir = join(contentRoot, 'skills');
|
|
128
319
|
const skills = loadSkills(skillsDir);
|
|
129
320
|
if (skills.length === 0) {
|
|
130
|
-
process.stderr.write('warning: no skills found in package
|
|
321
|
+
process.stderr.write('warning: no skills found in content package\n');
|
|
131
322
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
323
|
+
for (const platform of config.platforms) {
|
|
324
|
+
const adapter = adapters.get(platform);
|
|
325
|
+
if (!adapter) {
|
|
326
|
+
// Platform came from a hand-edited config — warn and continue
|
|
327
|
+
process.stderr.write(`warning: skipping unsupported platform '${platform}' from config\n`);
|
|
328
|
+
continue;
|
|
329
|
+
}
|
|
330
|
+
process.stderr.write(`Installing skills for platform: ${platform}\n`);
|
|
331
|
+
const caps = loadCapabilityMap(platform);
|
|
332
|
+
const ctx = buildProjectContext(projectRoot);
|
|
333
|
+
const plan = adapter.plan(skills, caps, ctx);
|
|
334
|
+
// Forward plan warnings to stderr
|
|
335
|
+
for (const w of plan.warnings) {
|
|
336
|
+
process.stderr.write(`warning: ${w}\n`);
|
|
337
|
+
}
|
|
338
|
+
if (opts.dryRun) {
|
|
339
|
+
const report = dryRunPlan(plan, projectRoot);
|
|
340
|
+
printDryRunReport(report);
|
|
341
|
+
}
|
|
342
|
+
else {
|
|
343
|
+
const report = executePlan(plan, projectRoot);
|
|
344
|
+
printExecutionReport(report);
|
|
345
|
+
}
|
|
141
346
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
347
|
+
}
|
|
348
|
+
// Run discovery to generate context docs (skipped on dry-run)
|
|
349
|
+
if (!opts.dryRun) {
|
|
350
|
+
process.stderr.write('Scanning codebase for context docs...\n');
|
|
351
|
+
try {
|
|
352
|
+
const { scanCodebase, writeContextDocs } = await import('../discover/scanner.js');
|
|
353
|
+
const result = scanCodebase(projectRoot);
|
|
354
|
+
writeContextDocs(projectRoot, result);
|
|
146
355
|
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
printExecutionReport(report);
|
|
356
|
+
catch {
|
|
357
|
+
// Non-fatal: discovery may fail on empty projects
|
|
150
358
|
}
|
|
151
|
-
}
|
|
359
|
+
}
|
|
360
|
+
// Print summary
|
|
361
|
+
if (opts.dryRun) {
|
|
362
|
+
process.stdout.write(`\nDry run — config was not written (would go to ${configPath}).\n`);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
process.stdout.write(`\n${isUpdate ? 'Configuration updated' : 'Setup complete'}:\n`);
|
|
366
|
+
process.stdout.write(` Config: ${configPath}\n`);
|
|
367
|
+
process.stdout.write(` Scope: ${config.defaults.scope}\n`);
|
|
368
|
+
process.stdout.write(` Template: ${config.defaults.template}\n`);
|
|
369
|
+
process.stdout.write(` Platforms: ${config.platforms.length > 0 ? config.platforms.join(', ') : 'none'}\n`);
|
|
370
|
+
process.stdout.write(` Actions: ${config.actions.length > 0 ? config.actions.join(', ') : 'none'}\n`);
|
|
371
|
+
process.stdout.write('\n');
|
|
152
372
|
}
|
|
153
373
|
function printDryRunReport(report) {
|
|
154
374
|
process.stdout.write('Dry run — no files were written.\n\n');
|