@rasensio/aidlc 1.4.0 → 1.6.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.
Files changed (86) hide show
  1. package/dist/commands/claim.d.ts +8 -6
  2. package/dist/commands/claim.d.ts.map +1 -1
  3. package/dist/commands/claim.js +49 -41
  4. package/dist/commands/claim.js.map +1 -1
  5. package/dist/commands/gate.d.ts.map +1 -1
  6. package/dist/commands/gate.js +20 -2
  7. package/dist/commands/gate.js.map +1 -1
  8. package/dist/commands/init.js +13 -0
  9. package/dist/commands/init.js.map +1 -1
  10. package/dist/commands/start.d.ts.map +1 -1
  11. package/dist/commands/start.js +145 -4
  12. package/dist/commands/start.js.map +1 -1
  13. package/dist/commands/status.d.ts.map +1 -1
  14. package/dist/commands/status.js +110 -3
  15. package/dist/commands/status.js.map +1 -1
  16. package/dist/commands/transition.d.ts.map +1 -1
  17. package/dist/commands/transition.js +39 -4
  18. package/dist/commands/transition.js.map +1 -1
  19. package/dist/commands/update.d.ts.map +1 -1
  20. package/dist/commands/update.js +13 -0
  21. package/dist/commands/update.js.map +1 -1
  22. package/dist/concurrency/claim-store.d.ts +44 -0
  23. package/dist/concurrency/claim-store.d.ts.map +1 -0
  24. package/dist/concurrency/claim-store.js +273 -0
  25. package/dist/concurrency/claim-store.js.map +1 -0
  26. package/dist/concurrency/common-dir.d.ts +25 -0
  27. package/dist/concurrency/common-dir.d.ts.map +1 -0
  28. package/dist/concurrency/common-dir.js +81 -0
  29. package/dist/concurrency/common-dir.js.map +1 -0
  30. package/dist/concurrency/detect.d.ts +23 -0
  31. package/dist/concurrency/detect.d.ts.map +1 -0
  32. package/dist/concurrency/detect.js +59 -0
  33. package/dist/concurrency/detect.js.map +1 -0
  34. package/dist/concurrency/gitattributes.d.ts +23 -0
  35. package/dist/concurrency/gitattributes.d.ts.map +1 -0
  36. package/dist/concurrency/gitattributes.js +52 -0
  37. package/dist/concurrency/gitattributes.js.map +1 -0
  38. package/dist/concurrency/registry.d.ts +48 -0
  39. package/dist/concurrency/registry.d.ts.map +1 -0
  40. package/dist/concurrency/registry.js +163 -0
  41. package/dist/concurrency/registry.js.map +1 -0
  42. package/dist/concurrency/session-id.d.ts +22 -0
  43. package/dist/concurrency/session-id.d.ts.map +1 -0
  44. package/dist/concurrency/session-id.js +35 -0
  45. package/dist/concurrency/session-id.js.map +1 -0
  46. package/dist/concurrency/types.d.ts +39 -0
  47. package/dist/concurrency/types.d.ts.map +1 -0
  48. package/dist/concurrency/types.js +12 -0
  49. package/dist/concurrency/types.js.map +1 -0
  50. package/dist/concurrency/worktree.d.ts +49 -0
  51. package/dist/concurrency/worktree.d.ts.map +1 -0
  52. package/dist/concurrency/worktree.js +169 -0
  53. package/dist/concurrency/worktree.js.map +1 -0
  54. package/dist/core/gate.d.ts +19 -1
  55. package/dist/core/gate.d.ts.map +1 -1
  56. package/dist/core/gate.js +18 -1
  57. package/dist/core/gate.js.map +1 -1
  58. package/dist/core/lifecycle.d.ts.map +1 -1
  59. package/dist/core/lifecycle.js +7 -3
  60. package/dist/core/lifecycle.js.map +1 -1
  61. package/dist/core/types.d.ts +16 -1
  62. package/dist/core/types.d.ts.map +1 -1
  63. package/dist/cost/ledger.d.ts.map +1 -1
  64. package/dist/cost/ledger.js +6 -0
  65. package/dist/cost/ledger.js.map +1 -1
  66. package/dist/cost/sessions.d.ts +6 -1
  67. package/dist/cost/sessions.d.ts.map +1 -1
  68. package/dist/cost/sessions.js +10 -1
  69. package/dist/cost/sessions.js.map +1 -1
  70. package/dist/tasks/gate-criterion.d.ts +42 -0
  71. package/dist/tasks/gate-criterion.d.ts.map +1 -0
  72. package/dist/tasks/gate-criterion.js +180 -0
  73. package/dist/tasks/gate-criterion.js.map +1 -0
  74. package/dist/tasks/parser.d.ts +30 -0
  75. package/dist/tasks/parser.d.ts.map +1 -0
  76. package/dist/tasks/parser.js +200 -0
  77. package/dist/tasks/parser.js.map +1 -0
  78. package/dist/tasks/status.d.ts +20 -0
  79. package/dist/tasks/status.d.ts.map +1 -0
  80. package/dist/tasks/status.js +41 -0
  81. package/dist/tasks/status.js.map +1 -0
  82. package/dist/tasks/types.d.ts +90 -0
  83. package/dist/tasks/types.d.ts.map +1 -0
  84. package/dist/tasks/types.js +9 -0
  85. package/dist/tasks/types.js.map +1 -0
  86. package/package.json +2 -2
@@ -0,0 +1,163 @@
1
+ /**
2
+ * Instance registry: cross-worktree instance existence (AC-15, AC-16,
3
+ * AC-24, AC-26).
4
+ *
5
+ * One YAML file per instance under `<common-dir>/aidlc/registry/`.
6
+ * Creation writes with flag 'wx' DIRECTLY on the final path — the atomic
7
+ * exactly-one-success arbiter for racing `aidlc start` calls (AC-24).
8
+ * This is the one deliberate exception to the temp-rename discipline:
9
+ * creation is a single write, and readers tolerate parse failures as
10
+ * absent, so there is no partial-read hazard.
11
+ *
12
+ * The registry is live coordination data, not durable identity (design
13
+ * F5): entries exist from creation until pruned or completed. A merged
14
+ * instance with no entry and no claim is "complete and inactive".
15
+ */
16
+ import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync, } from 'node:fs';
17
+ import { join } from 'node:path';
18
+ import { execFileSync } from 'node:child_process';
19
+ import { parse as parseYaml } from 'yaml';
20
+ import { serializeYaml } from '../state/yaml-helpers.js';
21
+ import { coordinationRoot } from './common-dir.js';
22
+ const INSTANCE_NAME_RE = /^[a-z0-9][a-z0-9-]*$/;
23
+ /** Thrown when a registry entry for the name already exists (AC-24). */
24
+ export class RegistryConflictError extends Error {
25
+ instance;
26
+ constructor(instance) {
27
+ super(`instance '${instance}' already registered in this repository`);
28
+ this.instance = instance;
29
+ this.name = 'RegistryConflictError';
30
+ }
31
+ }
32
+ function isEntry(v) {
33
+ if (typeof v !== 'object' || v === null)
34
+ return false;
35
+ const r = v;
36
+ return (typeof r.name === 'string' &&
37
+ (typeof r.branch === 'string' || r.branch === null) &&
38
+ (typeof r.worktree_path === 'string' || r.worktree_path === null) &&
39
+ typeof r.created_at === 'string');
40
+ }
41
+ export class Registry {
42
+ dir;
43
+ projectRoot;
44
+ constructor(dir, projectRoot) {
45
+ this.dir = dir;
46
+ this.projectRoot = projectRoot;
47
+ }
48
+ entryPath(name) {
49
+ if (!INSTANCE_NAME_RE.test(name))
50
+ throw new Error(`invalid instance name: ${name}`);
51
+ return join(this.dir, `${name}.yaml`);
52
+ }
53
+ /** Register a new instance; fails atomically if it exists (AC-24). */
54
+ register(entry) {
55
+ mkdirSync(this.dir, { recursive: true });
56
+ try {
57
+ writeFileSync(this.entryPath(entry.name), serializeYaml(entry), {
58
+ encoding: 'utf8',
59
+ flag: 'wx',
60
+ });
61
+ }
62
+ catch (err) {
63
+ if (err.code === 'EEXIST') {
64
+ throw new RegistryConflictError(entry.name);
65
+ }
66
+ throw err;
67
+ }
68
+ }
69
+ lookup(name) {
70
+ try {
71
+ const data = parseYaml(readFileSync(this.entryPath(name), 'utf8'));
72
+ return isEntry(data) ? data : null;
73
+ }
74
+ catch {
75
+ return null;
76
+ }
77
+ }
78
+ list() {
79
+ let files;
80
+ try {
81
+ files = readdirSync(this.dir);
82
+ }
83
+ catch {
84
+ return [];
85
+ }
86
+ const entries = [];
87
+ for (const f of files) {
88
+ if (!f.endsWith('.yaml'))
89
+ continue;
90
+ const entry = this.lookup(f.slice(0, -'.yaml'.length));
91
+ if (entry)
92
+ entries.push(entry);
93
+ }
94
+ return entries;
95
+ }
96
+ /** Remove an entry (AC-17 completion cleanup). Missing entry is a no-op. */
97
+ remove(name) {
98
+ try {
99
+ unlinkSync(this.entryPath(name));
100
+ }
101
+ catch (err) {
102
+ if (err.code !== 'ENOENT')
103
+ throw err;
104
+ }
105
+ }
106
+ /** True when `branch` is merged into main (AC-26). */
107
+ isMerged(branch) {
108
+ try {
109
+ execFileSync('git', ['merge-base', '--is-ancestor', branch, 'main'], {
110
+ cwd: this.projectRoot,
111
+ stdio: 'ignore',
112
+ });
113
+ return true;
114
+ }
115
+ catch {
116
+ return false;
117
+ }
118
+ }
119
+ branchExists(branch) {
120
+ try {
121
+ execFileSync('git', ['show-ref', '--verify', '--quiet', `refs/heads/${branch}`], {
122
+ cwd: this.projectRoot,
123
+ stdio: 'ignore',
124
+ });
125
+ return true;
126
+ }
127
+ catch {
128
+ return false;
129
+ }
130
+ }
131
+ /**
132
+ * Identify stale entries: worktree path gone AND branch merged or
133
+ * deleted (AC-16). Removal only happens here — explicit prune.
134
+ */
135
+ prune() {
136
+ const removed = [];
137
+ for (const entry of this.list()) {
138
+ const worktreeGone = entry.worktree_path === null || !existsSync(entry.worktree_path);
139
+ if (!worktreeGone)
140
+ continue;
141
+ if (entry.branch === null)
142
+ continue; // no-code instances are pruned on completion only
143
+ const merged = this.isMerged(entry.branch);
144
+ const deleted = !this.branchExists(entry.branch);
145
+ if (merged || deleted) {
146
+ this.remove(entry.name);
147
+ removed.push({
148
+ name: entry.name,
149
+ reason: merged ? 'worktree gone, branch merged' : 'worktree gone, branch deleted',
150
+ });
151
+ }
152
+ }
153
+ return removed;
154
+ }
155
+ }
156
+ /** Open the registry, or null when no writable common dir exists (AC-27). */
157
+ export function openRegistry(projectRoot) {
158
+ const root = coordinationRoot(projectRoot);
159
+ if (root === null)
160
+ return null;
161
+ return new Registry(join(root, 'registry'), projectRoot);
162
+ }
163
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/concurrency/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC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KAAK,CAAC,aAAa,CAAC,CAAC;YACtF,IAAI,CAAC,YAAY;gBAAE,SAAS;YAC5B,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI;gBAAE,SAAS,CAAC,kDAAkD;YACvF,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC3C,MAAM,OAAO,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACjD,IAAI,MAAM,IAAI,OAAO,EAAE,CAAC;gBACtB,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACxB,OAAO,CAAC,IAAI,CAAC;oBACX,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,+BAA+B;iBAClF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED,6EAA6E;AAC7E,MAAM,UAAU,YAAY,CAAC,WAAmB;IAC9C,MAAM,IAAI,GAAG,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,IAAI,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC;AAC3D,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Stable session identity for concurrency detection (design F2).
3
+ *
4
+ * `resolveSession` in commands/claim.ts used to mint a fresh agent UUID
5
+ * per invocation, so a solo agent session could never recognize its own
6
+ * claim and would block itself. Resolution order here:
7
+ *
8
+ * 1. AIDLC_SESSION_ID env var — set once by the agent/skill at session
9
+ * start, reused by every CLI invocation in that session.
10
+ * 2. Platform session from the active-session stash (strict
11
+ * single-candidate rule, unchanged).
12
+ * 3. Process-lifetime cached agent UUID — stable within one process,
13
+ * still fresh across processes (documented limitation for agents that
14
+ * neither stash nor set the env var).
15
+ */
16
+ export interface SessionIdentity {
17
+ id: string;
18
+ source: 'platform' | 'agent';
19
+ agent: string;
20
+ }
21
+ export declare function resolveSessionIdentity(projectRoot: string): SessionIdentity;
22
+ //# sourceMappingURL=session-id.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-id.d.ts","sourceRoot":"","sources":["../../src/concurrency/session-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;IAC7B,KAAK,EAAE,MAAM,CAAC;CACf;AAID,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CAa3E"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Stable session identity for concurrency detection (design F2).
3
+ *
4
+ * `resolveSession` in commands/claim.ts used to mint a fresh agent UUID
5
+ * per invocation, so a solo agent session could never recognize its own
6
+ * claim and would block itself. Resolution order here:
7
+ *
8
+ * 1. AIDLC_SESSION_ID env var — set once by the agent/skill at session
9
+ * start, reused by every CLI invocation in that session.
10
+ * 2. Platform session from the active-session stash (strict
11
+ * single-candidate rule, unchanged).
12
+ * 3. Process-lifetime cached agent UUID — stable within one process,
13
+ * still fresh across processes (documented limitation for agents that
14
+ * neither stash nor set the env var).
15
+ */
16
+ import { randomUUID } from 'node:crypto';
17
+ import { resolveCurrentSession } from '../cost/sessions.js';
18
+ let processAgentId = null;
19
+ export function resolveSessionIdentity(projectRoot) {
20
+ const envId = process.env.AIDLC_SESSION_ID;
21
+ if (envId && envId.trim() !== '') {
22
+ return {
23
+ id: envId.trim(),
24
+ source: envId.trim().startsWith('agent-') ? 'agent' : 'platform',
25
+ agent: process.env.AIDLC_AGENT ?? 'unknown',
26
+ };
27
+ }
28
+ const active = resolveCurrentSession(projectRoot);
29
+ if (active)
30
+ return { id: active.session_id, source: 'platform', agent: active.agent };
31
+ if (processAgentId === null)
32
+ processAgentId = `agent-${randomUUID()}`;
33
+ return { id: processAgentId, source: 'agent', agent: process.env.AIDLC_AGENT ?? 'unknown' };
34
+ }
35
+ //# sourceMappingURL=session-id.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-id.js","sourceRoot":"","sources":["../../src/concurrency/session-id.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAQ5D,IAAI,cAAc,GAAkB,IAAI,CAAC;AAEzC,MAAM,UAAU,sBAAsB,CAAC,WAAmB;IACxD,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC;IAC3C,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;QACjC,OAAO;YACL,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE;YAChB,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU;YAChE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,SAAS;SAC5C,CAAC;IACJ,CAAC;IACD,MAAM,MAAM,GAAG,qBAAqB,CAAC,WAAW,CAAC,CAAC;IAClD,IAAI,MAAM;QAAE,OAAO,EAAE,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;IACtF,IAAI,cAAc,KAAK,IAAI;QAAE,cAAc,GAAG,SAAS,UAAU,EAAE,EAAE,CAAC;IACtE,OAAO,EAAE,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,SAAS,EAAE,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Shared types for the concurrency module (git-worktree instance).
3
+ *
4
+ * Coordination data lives in `<git-common-dir>/aidlc/` so every worktree
5
+ * of a repository sees the same claims and registry (AC-1, AC-2, AC-15).
6
+ * Durable artifacts stay tracked in git; only live coordination moves here.
7
+ */
8
+ /** A live claim on an instance (AC-1). Stored per instance, never committed. */
9
+ export interface Claim {
10
+ session: string;
11
+ claimed_at: string;
12
+ renewed_at?: string;
13
+ id_source: 'platform' | 'agent';
14
+ /** Set when the claiming session works in a linked worktree (AC-18b). */
15
+ worktree_path?: string;
16
+ }
17
+ /** A registry entry recording instance existence across worktrees (AC-26). */
18
+ export interface RegistryEntry {
19
+ name: string;
20
+ /** Branch owning the instance; null for no-code instances (AC-11). */
21
+ branch: string | null;
22
+ worktree_path: string | null;
23
+ created_at: string;
24
+ }
25
+ /** Concurrency policy from `.aidlc/config.yaml` (AC-13). */
26
+ export interface ConcurrencyConfig {
27
+ mode: 'offer-worktree' | 'forbid' | 'ask';
28
+ worktree_dir: string;
29
+ }
30
+ export declare const DEFAULT_CONCURRENCY: ConcurrencyConfig;
31
+ /** Result of concurrency detection (AC-7). */
32
+ export interface Detection {
33
+ busy: boolean;
34
+ holders: Array<{
35
+ instance: string;
36
+ session: string;
37
+ }>;
38
+ }
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/concurrency/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,gFAAgF;AAChF,MAAM,WAAW,KAAK;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC;IAChC,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,8EAA8E;AAC9E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,sEAAsE;IACtE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,gBAAgB,GAAG,QAAQ,GAAG,KAAK,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,mBAAmB,EAAE,iBAGjC,CAAC;AAEF,8CAA8C;AAC9C,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACvD"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared types for the concurrency module (git-worktree instance).
3
+ *
4
+ * Coordination data lives in `<git-common-dir>/aidlc/` so every worktree
5
+ * of a repository sees the same claims and registry (AC-1, AC-2, AC-15).
6
+ * Durable artifacts stay tracked in git; only live coordination moves here.
7
+ */
8
+ export const DEFAULT_CONCURRENCY = {
9
+ mode: 'offer-worktree',
10
+ worktree_dir: '../',
11
+ };
12
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/concurrency/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA2BH,MAAM,CAAC,MAAM,mBAAmB,GAAsB;IACpD,IAAI,EAAE,gBAAgB;IACtB,YAAY,EAAE,KAAK;CACpB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Git worktree wrappers (AC-9, AC-10, AC-17, NFR-5).
3
+ *
4
+ * `createWorktree` creates branch + worktree in one step, always based on
5
+ * main, so an in-flight session in the primary checkout is never moved
6
+ * off its branch (idea goal 2). Callers export AIDLC_WORKTREE=1 before
7
+ * firing on-instance-start actions so the shipped branch action no-ops
8
+ * (AC-10).
9
+ *
10
+ * Removal order (AC-17, design F6): worktree remove FIRST — the claim is
11
+ * released only after removal succeeds, so a dirty worktree keeps its
12
+ * instance locked.
13
+ */
14
+ /** Sanitize a path component to [a-z0-9-] (NFR-5). */
15
+ export declare function sanitizeComponent(raw: string): string;
16
+ export interface CreateWorktreeOpts {
17
+ prefix: string;
18
+ name: string;
19
+ worktreeDir: string;
20
+ projectRoot: string;
21
+ /** YYYYMMDD stamp; injectable for tests. */
22
+ dateStamp?: string;
23
+ }
24
+ export interface WorktreeRef {
25
+ branch: string;
26
+ path: string;
27
+ }
28
+ /**
29
+ * Create branch and worktree in one step, based on main (AC-9). Fails —
30
+ * never reuses — when the branch or target directory already exists (AC-24).
31
+ */
32
+ export declare function createWorktree(opts: CreateWorktreeOpts): WorktreeRef;
33
+ export interface RemoveReport {
34
+ removedWorktree: boolean;
35
+ deletedBranch: boolean;
36
+ reason?: string;
37
+ }
38
+ /**
39
+ * Remove a worktree and delete its branch iff merged into main (AC-17).
40
+ * A dirty worktree fails removal (no --force) and reports; the caller
41
+ * must NOT release the claim in that case (design F6).
42
+ */
43
+ export declare function removeWorktree(ref: WorktreeRef, projectRoot: string): RemoveReport;
44
+ /** List worktrees known to git (for status cross-checks, AC-18). */
45
+ export declare function listWorktrees(projectRoot: string): Array<{
46
+ path: string;
47
+ branch: string | null;
48
+ }>;
49
+ //# sourceMappingURL=worktree.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree.d.ts","sourceRoot":"","sources":["../../src/concurrency/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAMH,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAIrD;AA2CD,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,kBAAkB,GAAG,WAAW,CAsBpE;AAED,MAAM,WAAW,YAAY;IAC3B,eAAe,EAAE,OAAO,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,GAAG,EAAE,WAAW,EAChB,WAAW,EAAE,MAAM,GAClB,YAAY,CA4Cd;AAED,oEAAoE;AACpE,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,CAAC,CAmBjG"}
@@ -0,0 +1,169 @@
1
+ /**
2
+ * Git worktree wrappers (AC-9, AC-10, AC-17, NFR-5).
3
+ *
4
+ * `createWorktree` creates branch + worktree in one step, always based on
5
+ * main, so an in-flight session in the primary checkout is never moved
6
+ * off its branch (idea goal 2). Callers export AIDLC_WORKTREE=1 before
7
+ * firing on-instance-start actions so the shipped branch action no-ops
8
+ * (AC-10).
9
+ *
10
+ * Removal order (AC-17, design F6): worktree remove FIRST — the claim is
11
+ * released only after removal succeeds, so a dirty worktree keeps its
12
+ * instance locked.
13
+ */
14
+ import { existsSync, realpathSync } from 'node:fs';
15
+ import { basename, dirname, join, resolve, sep } from 'node:path';
16
+ import { execFileSync } from 'node:child_process';
17
+ /** Sanitize a path component to [a-z0-9-] (NFR-5). */
18
+ export function sanitizeComponent(raw) {
19
+ const cleaned = raw.toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '');
20
+ if (cleaned === '')
21
+ throw new Error(`unusable path component: ${raw}`);
22
+ return cleaned;
23
+ }
24
+ function git(args, cwd) {
25
+ return execFileSync('git', args, {
26
+ cwd,
27
+ encoding: 'utf8',
28
+ stdio: ['ignore', 'pipe', 'pipe'],
29
+ }).trim();
30
+ }
31
+ /** Resolve symlinks on the deepest existing ancestor of `p` (design F8). */
32
+ function realResolve(p) {
33
+ let probe = resolve(p);
34
+ const tail = [];
35
+ while (!existsSync(probe)) {
36
+ tail.unshift(basename(probe));
37
+ const parent = dirname(probe);
38
+ if (parent === probe)
39
+ break;
40
+ probe = parent;
41
+ }
42
+ try {
43
+ probe = realpathSync(probe);
44
+ }
45
+ catch {
46
+ // keep resolved path
47
+ }
48
+ return tail.length > 0 ? join(probe, ...tail) : probe;
49
+ }
50
+ /**
51
+ * Traversal guard (design F8): the worktree target must not live inside
52
+ * the project root or inside any `.git` directory.
53
+ */
54
+ function assertSafeTarget(target, projectRoot) {
55
+ const realTarget = realResolve(target);
56
+ const realRoot = realResolve(projectRoot);
57
+ if (realTarget === realRoot || realTarget.startsWith(realRoot + sep)) {
58
+ throw new Error(`worktree target ${target} resolves inside the project root`);
59
+ }
60
+ if (realTarget.split(sep).includes('.git')) {
61
+ throw new Error(`worktree target ${target} resolves inside a .git directory`);
62
+ }
63
+ }
64
+ /**
65
+ * Create branch and worktree in one step, based on main (AC-9). Fails —
66
+ * never reuses — when the branch or target directory already exists (AC-24).
67
+ */
68
+ export function createWorktree(opts) {
69
+ const stamp = opts.dateStamp ?? new Date().toISOString().slice(0, 10).replace(/-/g, '');
70
+ const name = sanitizeComponent(opts.name);
71
+ const repo = sanitizeComponent(basename(realResolve(opts.projectRoot)));
72
+ const branch = `${opts.prefix}/${stamp}-${name}`;
73
+ const target = resolve(opts.projectRoot, opts.worktreeDir, `${repo}-${name}`);
74
+ assertSafeTarget(target, opts.projectRoot);
75
+ if (existsSync(target)) {
76
+ throw new Error(`worktree target already exists: ${target}`);
77
+ }
78
+ try {
79
+ git(['show-ref', '--verify', '--quiet', `refs/heads/${branch}`], opts.projectRoot);
80
+ throw new Error(`branch already exists: ${branch}`);
81
+ }
82
+ catch (err) {
83
+ if (err.message.startsWith('branch already exists'))
84
+ throw err;
85
+ // show-ref failed → branch does not exist, proceed
86
+ }
87
+ git(['worktree', 'add', '-b', branch, target, 'main'], opts.projectRoot);
88
+ return { branch, path: target };
89
+ }
90
+ /**
91
+ * Remove a worktree and delete its branch iff merged into main (AC-17).
92
+ * A dirty worktree fails removal (no --force) and reports; the caller
93
+ * must NOT release the claim in that case (design F6).
94
+ */
95
+ export function removeWorktree(ref, projectRoot) {
96
+ if (existsSync(ref.path)) {
97
+ try {
98
+ git(['worktree', 'remove', ref.path], projectRoot);
99
+ }
100
+ catch (err) {
101
+ return {
102
+ removedWorktree: false,
103
+ deletedBranch: false,
104
+ reason: `worktree not removed (dirty or locked): ${err.message.split('\n')[0]}`,
105
+ };
106
+ }
107
+ }
108
+ else {
109
+ // Directory already gone (manual removal) — let git drop the stale record.
110
+ try {
111
+ git(['worktree', 'prune'], projectRoot);
112
+ }
113
+ catch {
114
+ // non-fatal
115
+ }
116
+ }
117
+ let merged = false;
118
+ try {
119
+ git(['merge-base', '--is-ancestor', ref.branch, 'main'], projectRoot);
120
+ merged = true;
121
+ }
122
+ catch {
123
+ merged = false;
124
+ }
125
+ if (!merged) {
126
+ return {
127
+ removedWorktree: true,
128
+ deletedBranch: false,
129
+ reason: `branch ${ref.branch} is not merged into main — left in place`,
130
+ };
131
+ }
132
+ try {
133
+ git(['branch', '-d', ref.branch], projectRoot);
134
+ return { removedWorktree: true, deletedBranch: true };
135
+ }
136
+ catch (err) {
137
+ return {
138
+ removedWorktree: true,
139
+ deletedBranch: false,
140
+ reason: `branch not deleted: ${err.message.split('\n')[0]}`,
141
+ };
142
+ }
143
+ }
144
+ /** List worktrees known to git (for status cross-checks, AC-18). */
145
+ export function listWorktrees(projectRoot) {
146
+ let out;
147
+ try {
148
+ out = git(['worktree', 'list', '--porcelain'], projectRoot);
149
+ }
150
+ catch {
151
+ return [];
152
+ }
153
+ const result = [];
154
+ let current = null;
155
+ for (const line of out.split('\n')) {
156
+ if (line.startsWith('worktree ')) {
157
+ if (current)
158
+ result.push(current);
159
+ current = { path: line.slice('worktree '.length), branch: null };
160
+ }
161
+ else if (line.startsWith('branch ') && current) {
162
+ current.branch = line.slice('branch refs/heads/'.length);
163
+ }
164
+ }
165
+ if (current)
166
+ result.push(current);
167
+ return result;
168
+ }
169
+ //# sourceMappingURL=worktree.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worktree.js","sourceRoot":"","sources":["../../src/concurrency/worktree.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,WAAW,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,sDAAsD;AACtD,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC3C,MAAM,OAAO,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;IACvF,IAAI,OAAO,KAAK,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,GAAG,EAAE,CAAC,CAAC;IACvE,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,GAAG,CAAC,IAAc,EAAE,GAAW;IACtC,OAAO,YAAY,CAAC,KAAK,EAAE,IAAI,EAAE;QAC/B,GAAG;QACH,QAAQ,EAAE,MAAM;QAChB,KAAK,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC;KAClC,CAAC,CAAC,IAAI,EAAE,CAAC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IAAI,OAAO;QAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAClC,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -7,8 +7,9 @@
7
7
  *
8
8
  * Requirements: 9.1, 9.6
9
9
  */
10
- import type { PhaseState, WorkflowTemplate } from './types.js';
10
+ import type { PhaseState, WorkflowTemplate, TemplatePhase } from './types.js';
11
11
  import type { TraceabilityResult } from '../traceability/types.js';
12
+ import type { TasksResult } from '../tasks/types.js';
12
13
  /**
13
14
  * Gate check result for CI/CD integration.
14
15
  */
@@ -27,6 +28,13 @@ export interface GateCheckResult {
27
28
  * layer; evaluateGate itself never sets it (traceability-ids AC-15).
28
29
  */
29
30
  traceability?: TraceabilityResult;
31
+ /**
32
+ * Task breakdown result — present only when the tasks criterion evaluated
33
+ * (implementation phase, task-bearing or required-scope instance). Attached
34
+ * at the command layer; evaluateGate itself never sets it (task-breakdown
35
+ * AC-19).
36
+ */
37
+ tasks?: TasksResult;
30
38
  }
31
39
  /**
32
40
  * Evaluate whether a phase passes its gate check.
@@ -40,4 +48,14 @@ export interface GateCheckResult {
40
48
  * @returns A GateCheckResult indicating pass/fail with structured details.
41
49
  */
42
50
  export declare function evaluateGate(phaseName: string, phaseStates: Map<string, PhaseState>, template: WorkflowTemplate): GateCheckResult;
51
+ /**
52
+ * Effective required artifacts for a phase, applying the tasks.md legacy
53
+ * filter (task-breakdown AC-27, design §5a): the design-phase `tasks.md`
54
+ * requirement binds only instances whose phase state carries a tasks.md
55
+ * artifact entry (seeded at `aidlc start` from the new templates).
56
+ * Pre-existing instances without the entry are legacy-allowed — mirroring
57
+ * the branch-gate "missing field = legacy-allowed" precedent. Deliberately
58
+ * narrow: only tasks.md, only the design phase.
59
+ */
60
+ export declare function effectiveRequiredArtifacts(templatePhase: TemplatePhase, phaseState: PhaseState | undefined): TemplatePhase['required_artifacts'];
43
61
  //# sourceMappingURL=gate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/core/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAiB,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAMnE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,IAAI,EAAE,OAAO,CAAC;IACd,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;CACnC;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACpC,QAAQ,EAAE,gBAAgB,GACzB,eAAe,CAiCjB"}
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../src/core/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mDAAmD;IACnD,IAAI,EAAE,OAAO,CAAC;IACd,0BAA0B;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,8DAA8D;IAC9D,mBAAmB,EAAE,MAAM,EAAE,CAAC;IAC9B;;;;OAIG;IACH,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAMD;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,EACpC,QAAQ,EAAE,gBAAgB,GACzB,eAAe,CAiCjB;AAMD;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,aAAa,EAAE,aAAa,EAC5B,UAAU,EAAE,UAAU,GAAG,SAAS,GACjC,aAAa,CAAC,oBAAoB,CAAC,CAKrC"}
package/dist/core/gate.js CHANGED
@@ -54,6 +54,23 @@ export function evaluateGate(phaseName, phaseStates, template) {
54
54
  // ---------------------------------------------------------------------------
55
55
  // Helpers
56
56
  // ---------------------------------------------------------------------------
57
+ /**
58
+ * Effective required artifacts for a phase, applying the tasks.md legacy
59
+ * filter (task-breakdown AC-27, design §5a): the design-phase `tasks.md`
60
+ * requirement binds only instances whose phase state carries a tasks.md
61
+ * artifact entry (seeded at `aidlc start` from the new templates).
62
+ * Pre-existing instances without the entry are legacy-allowed — mirroring
63
+ * the branch-gate "missing field = legacy-allowed" precedent. Deliberately
64
+ * narrow: only tasks.md, only the design phase.
65
+ */
66
+ export function effectiveRequiredArtifacts(templatePhase, phaseState) {
67
+ const required = templatePhase.required_artifacts ?? [];
68
+ if (templatePhase.name !== 'design' || !phaseState)
69
+ return required;
70
+ if (phaseState.artifacts.some((a) => a.name === 'tasks.md'))
71
+ return required;
72
+ return required.filter((decl) => decl.name !== 'tasks.md');
73
+ }
57
74
  /**
58
75
  * Determine which required artifacts from the template are not yet 'complete'
59
76
  * in the phase state.
@@ -70,7 +87,7 @@ function getMissingArtifacts(phaseName, state, template) {
70
87
  .filter((a) => a.status === 'complete')
71
88
  .map((a) => a.name));
72
89
  // Find required artifacts that are not complete
73
- return templatePhase.required_artifacts
90
+ return effectiveRequiredArtifacts(templatePhase, state)
74
91
  .filter((decl) => !completedArtifacts.has(decl.name))
75
92
  .map((decl) => decl.name);
76
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gate.js","sourceRoot":"","sources":["../../src/core/gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6BH,8EAA8E;AAC9E,kBAAkB;AAClB,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,YAAY,CAC1B,SAAiB,EACjB,WAAoC,EACpC,QAA0B;IAE1B,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAEzC,2BAA2B;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO;YACL,IAAI,EAAE,KAAK;YACX,KAAK,EAAE,SAAS;YAChB,gBAAgB,EAAE,EAAE;YACpB,mBAAmB,EAAE,CAAC,mCAAmC,CAAC;SAC3D,CAAC;IACJ,CAAC;IAED,kCAAkC;IAClC,IAAI,KAAK,CAAC,MAAM,KAAK,UAAU,EAAE,CAAC;QAChC,OAAO;YACL,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,SAAS;YAChB,gBAAgB,EAAE,EAAE;YACpB,mBAAmB,EAAE,EAAE;SACxB,CAAC;IACJ,CAAC;IAED,yEAAyE;IACzE,MAAM,gBAAgB,GAAG,mBAAmB,CAAC,SAAS,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACzE,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,KAAK,CAAC,CAAC;IAE1D,OAAO;QACL,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,SAAS;QAChB,gBAAgB;QAChB,mBAAmB;KACpB,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E;;;GAGG;AACH,SAAS,mBAAmB,CAC1B,SAAiB,EACjB,KAAiB,EACjB,QAA0B;IAE1B,qCAAqC;IACrC,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,IAAI,CACxC,CAAC,CAAgB,E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