@rasensio/aidlc 1.55.0 → 1.56.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.
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The "how work runs" step of `aidlc init`: how implementation tasks run in this
3
+ * repo, then whether to set up autopilot now (init-sets-work-mode/AC-1..AC-12).
4
+ *
5
+ * A sibling of `collectInteractiveAnswers`, called right after it, rather than more
6
+ * questions inside it. The project questions and their tests stay as they were, and
7
+ * the roadmap projection offer stays the last of them — the position
8
+ * issue-tracker-in-init/AC-1 gave it so a project that never publishes reaches the
9
+ * end of those questions without thinking about it.
10
+ *
11
+ * @module
12
+ */
13
+ import type { Prompter } from '../core/prompt.js';
14
+ import type { ReleasePreset } from '../autopilot/presets.js';
15
+ import { type AutopilotPicks } from '../autopilot/questions.js';
16
+ import type { AutopilotConfig } from '../autopilot/state.js';
17
+ import type { TeamDefaults } from '../autopilot/team.js';
18
+ import { type SetupConfig, type TaskAgents } from './setup-compute.js';
19
+ /**
20
+ * Which of these platforms declare sub-agents. Read from the same capability maps
21
+ * that put the offer into the implementation skill, so "where one agent per task
22
+ * works" has one source (init-sets-work-mode/AC-2, AC-3).
23
+ */
24
+ export declare function subagentSupport(platforms: readonly string[]): {
25
+ with: string[];
26
+ without: string[];
27
+ };
28
+ /** The task-agents answer already in `.aidlc/config.yaml`, or null. */
29
+ export declare function existingTaskAgents(existing: SetupConfig | null): TaskAgents | null;
30
+ export interface WorkModeInput {
31
+ existing: SetupConfig | null;
32
+ /** The platforms configured once this init completes: existing plus selected. */
33
+ platforms: string[];
34
+ /** null outside a git repository, where autopilot cannot keep its state. */
35
+ autopilot: null | {
36
+ /** `--autopilot`: skip the yes/no and go straight to the four questions. */
37
+ flag: boolean;
38
+ machine: AutopilotConfig | null;
39
+ team: TeamDefaults;
40
+ releases: ReleasePreset[];
41
+ };
42
+ }
43
+ /** `undefined` fields were not asked, and change nothing. */
44
+ export interface WorkModeAnswers {
45
+ taskAgents?: TaskAgents;
46
+ autopilot?: AutopilotPicks;
47
+ }
48
+ /**
49
+ * Ask the step. Returns null on any cancel, and `runInit` then cancels the whole
50
+ * init with nothing written, as every other init question does (AC-11).
51
+ */
52
+ export declare function collectWorkMode(input: WorkModeInput, prompt: Prompter): Promise<WorkModeAnswers | null>;
53
+ //# sourceMappingURL=work-mode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-mode.d.ts","sourceRoot":"","sources":["../../src/setup/work-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACzG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAsB,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE3F;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG;IAAE,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAOnG;AAED,uEAAuE;AACvE,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,WAAW,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CAGlF;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,WAAW,GAAG,IAAI,CAAC;IAC7B,iFAAiF;IACjF,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,4EAA4E;IAC5E,SAAS,EAAE,IAAI,GAAG;QAChB,4EAA4E;QAC5E,IAAI,EAAE,OAAO,CAAC;QACd,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;QAChC,IAAI,EAAE,YAAY,CAAC;QACnB,QAAQ,EAAE,aAAa,EAAE,CAAC;KAC3B,CAAC;CACH;AAED,6DAA6D;AAC7D,MAAM,WAAW,eAAe;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,cAAc,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC,CAyC7G"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * The "how work runs" step of `aidlc init`: how implementation tasks run in this
3
+ * repo, then whether to set up autopilot now (init-sets-work-mode/AC-1..AC-12).
4
+ *
5
+ * A sibling of `collectInteractiveAnswers`, called right after it, rather than more
6
+ * questions inside it. The project questions and their tests stay as they were, and
7
+ * the roadmap projection offer stays the last of them — the position
8
+ * issue-tracker-in-init/AC-1 gave it so a project that never publishes reaches the
9
+ * end of those questions without thinking about it.
10
+ *
11
+ * @module
12
+ */
13
+ import { getCapabilityMap } from '@rasensio/aidlc-content';
14
+ import { askAutopilotQuestions, currentPreselect } from '../autopilot/questions.js';
15
+ import { TASK_AGENTS_VALUES } from './setup-compute.js';
16
+ /**
17
+ * Which of these platforms declare sub-agents. Read from the same capability maps
18
+ * that put the offer into the implementation skill, so "where one agent per task
19
+ * works" has one source (init-sets-work-mode/AC-2, AC-3).
20
+ */
21
+ export function subagentSupport(platforms) {
22
+ const out = { with: [], without: [] };
23
+ for (const platform of platforms) {
24
+ const caps = getCapabilityMap(platform)?.capabilities ?? {};
25
+ (Object.hasOwn(caps, 'subagents') ? out.with : out.without).push(platform);
26
+ }
27
+ return out;
28
+ }
29
+ /** The task-agents answer already in `.aidlc/config.yaml`, or null. */
30
+ export function existingTaskAgents(existing) {
31
+ const v = existing?.task_agents;
32
+ return TASK_AGENTS_VALUES.includes(v) ? v : null;
33
+ }
34
+ /**
35
+ * Ask the step. Returns null on any cancel, and `runInit` then cancels the whole
36
+ * init with nothing written, as every other init question does (AC-11).
37
+ */
38
+ export async function collectWorkMode(input, prompt) {
39
+ const answers = {};
40
+ const support = subagentSupport(input.platforms);
41
+ if (support.with.length > 0) {
42
+ const where = `One agent per task works in ${support.with.join(', ')}.` +
43
+ (support.without.length > 0 ? ` ${support.without.join(', ')} always run${support.without.length === 1 ? 's' : ''} one session.` : '');
44
+ const mode = await prompt.select({
45
+ message: `How should implementation tasks run? ${where}`,
46
+ options: [
47
+ { value: 'one-session', label: 'One session (recommended)', hint: 'every task runs in the session doing the work — cheapest' },
48
+ // The cost is in the label because clack shows a hint only for the focused
49
+ // option, and this is the line that decides the choice (AC-1).
50
+ { value: 'per-task', label: 'One agent per task — roughly twice the tokens', hint: 'each task in a fresh agent, checked by a reviewer' },
51
+ ],
52
+ initialValue: existingTaskAgents(input.existing) ?? 'one-session',
53
+ });
54
+ if (!mode.ok)
55
+ return null;
56
+ answers.taskAgents = mode.value;
57
+ }
58
+ const ap = input.autopilot;
59
+ if (ap === null)
60
+ return answers;
61
+ if (!ap.flag) {
62
+ // Default no, and "no" is not "remove": it leaves every autopilot setting where it
63
+ // is, so pressing Enter through a re-run cannot lose anything (AC-6, AC-7). A
64
+ // first-time user is not asked about agent permissions before running a feature.
65
+ const now = await prompt.confirm({
66
+ message: 'Set up autopilot now? (works the backlog in the background; `aidlc autopilot setup` asks the same later)',
67
+ initialValue: false,
68
+ });
69
+ if (!now.ok)
70
+ return null;
71
+ if (!now.value)
72
+ return answers;
73
+ }
74
+ const picks = await askAutopilotQuestions(prompt, ap.releases, currentPreselect(ap.machine, ap.team, ap.releases));
75
+ if (picks === null)
76
+ return null;
77
+ answers.autopilot = picks;
78
+ return answers;
79
+ }
80
+ //# sourceMappingURL=work-mode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"work-mode.js","sourceRoot":"","sources":["../../src/setup/work-mode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;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OAAO,OAAO,CAAC;IACjC,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,qBAAqB,CAAC,MAAM,EAAE,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnH,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAChC,OAAO,CAAC,SAAS,GAAG,KAAK,CAAC;IAC1B,OAAO,OAAO,CAAC;AACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rasensio/aidlc",
3
- "version": "1.55.0",
3
+ "version": "1.56.0",
4
4
  "description": "AI Development Lifecycle Framework — structured lifecycle guidance for AI coding agents across platforms",
5
5
  "homepage": "https://aidlc.rodrigoasensio.com",
6
6
  "repository": {
@@ -31,7 +31,7 @@
31
31
  "commander": "15.0.0",
32
32
  "picomatch": "4.0.5",
33
33
  "yaml": "2.9.0",
34
- "@rasensio/aidlc-content": "1.55.0"
34
+ "@rasensio/aidlc-content": "1.56.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "22.15.32",