@rasensio/aidlc 1.11.0 → 1.13.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/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +3 -4
- package/dist/cli.js.map +1 -1
- package/dist/commands/cost.d.ts.map +1 -1
- package/dist/commands/cost.js +57 -9
- package/dist/commands/cost.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +14 -0
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +23 -37
- package/dist/commands/update.js.map +1 -1
- package/dist/compile/roadmap-skill.d.ts +76 -0
- package/dist/compile/roadmap-skill.d.ts.map +1 -0
- package/dist/compile/roadmap-skill.js +132 -0
- package/dist/compile/roadmap-skill.js.map +1 -0
- package/dist/core/version.d.ts +39 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +69 -0
- package/dist/core/version.js.map +1 -0
- package/dist/cost/hooks/claude-code.d.ts +12 -0
- package/dist/cost/hooks/claude-code.d.ts.map +1 -1
- package/dist/cost/hooks/claude-code.js +8 -4
- package/dist/cost/hooks/claude-code.js.map +1 -1
- package/dist/cost/hooks/kiro.d.ts.map +1 -1
- package/dist/cost/hooks/kiro.js +6 -4
- package/dist/cost/hooks/kiro.js.map +1 -1
- package/dist/cost/hooks/shim.d.ts +21 -0
- package/dist/cost/hooks/shim.d.ts.map +1 -1
- package/dist/cost/hooks/shim.js +48 -1
- package/dist/cost/hooks/shim.js.map +1 -1
- package/dist/cost/ledger.d.ts +14 -0
- package/dist/cost/ledger.d.ts.map +1 -1
- package/dist/cost/ledger.js +26 -1
- package/dist/cost/ledger.js.map +1 -1
- package/dist/cost/sync.d.ts +8 -0
- package/dist/cost/sync.d.ts.map +1 -1
- package/dist/cost/sync.js +377 -9
- package/dist/cost/sync.js.map +1 -1
- package/dist/doctor/migrations/index.d.ts.map +1 -1
- package/dist/doctor/migrations/index.js +12 -0
- package/dist/doctor/migrations/index.js.map +1 -1
- package/dist/doctor/migrations/missing-cost-shim.d.ts +40 -0
- package/dist/doctor/migrations/missing-cost-shim.d.ts.map +1 -0
- package/dist/doctor/migrations/missing-cost-shim.js +92 -0
- package/dist/doctor/migrations/missing-cost-shim.js.map +1 -0
- package/dist/doctor/migrations/roadmap-layout.d.ts +73 -0
- package/dist/doctor/migrations/roadmap-layout.d.ts.map +1 -0
- package/dist/doctor/migrations/roadmap-layout.js +281 -0
- package/dist/doctor/migrations/roadmap-layout.js.map +1 -0
- package/dist/doctor/migrations/stale-idea-skill.d.ts +28 -0
- package/dist/doctor/migrations/stale-idea-skill.d.ts.map +1 -0
- package/dist/doctor/migrations/stale-idea-skill.js +111 -0
- package/dist/doctor/migrations/stale-idea-skill.js.map +1 -0
- package/dist/events/event-bus.d.ts.map +1 -1
- package/dist/events/event-bus.js +33 -0
- package/dist/events/event-bus.js.map +1 -1
- package/dist/events/shipped-actions.d.ts.map +1 -1
- package/dist/events/shipped-actions.js +10 -0
- package/dist/events/shipped-actions.js.map +1 -1
- package/dist/metrics/report.d.ts +30 -2
- package/dist/metrics/report.d.ts.map +1 -1
- package/dist/metrics/report.js +18 -2
- package/dist/metrics/report.js.map +1 -1
- package/dist/roadmap/paths.d.ts +96 -0
- package/dist/roadmap/paths.d.ts.map +1 -0
- package/dist/roadmap/paths.js +194 -0
- package/dist/roadmap/paths.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* missing-cost-shim migration: regenerate `.aidlc/cost/capture.sh` when a hook
|
|
3
|
+
* is armed against it and it cannot run.
|
|
4
|
+
*
|
|
5
|
+
* WHY THIS EXISTS. `cost-capture-goes-dark` replaced absolute hook paths with a
|
|
6
|
+
* generated shim and deleted `commandResolvable`, recording that "the failure
|
|
7
|
+
* class is retired, not merely detected". The shim removed the *stale path*
|
|
8
|
+
* failure and introduced a *missing file* one: the shim is generated per install,
|
|
9
|
+
* is gitignored on purpose (it embeds machine-specific resolution hints), and no
|
|
10
|
+
* tracked file can supply it — while `.claude/settings.json`, which arms the
|
|
11
|
+
* hooks, IS tracked. So every fresh clone and every second machine starts with
|
|
12
|
+
* hooks pointing at nothing.
|
|
13
|
+
*
|
|
14
|
+
* That is not hypothetical: capture was dead from 2026-08-26 21:12 to 2026-08-28
|
|
15
|
+
* 13:44 local, $535.54 of usage was never recorded, and `aidlc cost hooks status`
|
|
16
|
+
* read `installed` throughout.
|
|
17
|
+
*
|
|
18
|
+
* WHY SAFE TIER, AND WHY IT REPAIRS RATHER THAN REPORTS. The shim is generated
|
|
19
|
+
* output with no user content, already gitignored, and `writeShim` is idempotent —
|
|
20
|
+
* rewriting it destroys nothing a user authored. Report-only was tried for this
|
|
21
|
+
* exact failure class (`stale-cost-hooks`) and the data was lost anyway, because
|
|
22
|
+
* the last link in the chain was a human reading a line. `aidlc cost` already
|
|
23
|
+
* prints "run `aidlc doctor` to repair"; this is the migration that makes that
|
|
24
|
+
* sentence true.
|
|
25
|
+
*
|
|
26
|
+
* Self-clearing: once the shim exists and is executable, `shimProblem` returns
|
|
27
|
+
* null and this stops reporting without anyone editing state.
|
|
28
|
+
*/
|
|
29
|
+
import { claudeCodeHookStatus } from '../../cost/hooks/claude-code.js';
|
|
30
|
+
import { kiroHookStatus } from '../../cost/hooks/kiro.js';
|
|
31
|
+
import { cliEntryPath } from '../../cost/hooks/entry.js';
|
|
32
|
+
import { describeShimProblem, shimProblem, writeShim } from '../../cost/hooks/shim.js';
|
|
33
|
+
/*
|
|
34
|
+
* Static for the same reason `legacy-cost-hooks` is: allProviders() is only
|
|
35
|
+
* populated by an explicit registerBuiltinProviders() call, so a caller that has
|
|
36
|
+
* not made it sees an empty list and the migration silently finds nothing. Hook
|
|
37
|
+
* installation exists for these two platforms only.
|
|
38
|
+
*/
|
|
39
|
+
const HOOK_PLATFORMS = [
|
|
40
|
+
{ name: 'claude-code', status: claudeCodeHookStatus },
|
|
41
|
+
{ name: 'kiro', status: kiroHookStatus },
|
|
42
|
+
];
|
|
43
|
+
/**
|
|
44
|
+
* Platforms whose hook is armed against an unusable shim. Read-only half,
|
|
45
|
+
* exported for reuse and direct testing.
|
|
46
|
+
*
|
|
47
|
+
* Legacy hooks are excluded: they do not invoke the shim, so its state is not
|
|
48
|
+
* their problem — `legacy-cost-hooks` re-installs those, which writes the shim as
|
|
49
|
+
* a side effect anyway.
|
|
50
|
+
*/
|
|
51
|
+
export function platformsWithUnusableShim(projectRoot) {
|
|
52
|
+
if (shimProblem(projectRoot) === null)
|
|
53
|
+
return [];
|
|
54
|
+
return HOOK_PLATFORMS.filter((p) => {
|
|
55
|
+
const s = p.status(projectRoot);
|
|
56
|
+
return s.installed && !s.legacy;
|
|
57
|
+
}).map((p) => p.name);
|
|
58
|
+
}
|
|
59
|
+
export const missingCostShim = {
|
|
60
|
+
id: 'missing-cost-shim',
|
|
61
|
+
tier: 'safe',
|
|
62
|
+
check(ctx) {
|
|
63
|
+
const affected = platformsWithUnusableShim(ctx.projectRoot);
|
|
64
|
+
if (affected.length === 0)
|
|
65
|
+
return { applicable: true, pending: false };
|
|
66
|
+
const problem = shimProblem(ctx.projectRoot);
|
|
67
|
+
return {
|
|
68
|
+
applicable: true,
|
|
69
|
+
pending: true,
|
|
70
|
+
description: `${describeShimProblem(problem)} but ${affected.join(' and ')} ` +
|
|
71
|
+
`hook${affected.length === 1 ? ' is' : 's are'} armed against it — ` +
|
|
72
|
+
'capture cannot run and cannot report that it did not; would regenerate it',
|
|
73
|
+
};
|
|
74
|
+
},
|
|
75
|
+
apply(ctx) {
|
|
76
|
+
const affected = platformsWithUnusableShim(ctx.projectRoot);
|
|
77
|
+
if (affected.length === 0)
|
|
78
|
+
return { changed: false, summary: 'cost shim is usable' };
|
|
79
|
+
// Hints only. The shim validates both at run time and never trusts them to
|
|
80
|
+
// still exist, which is what lets it survive a node or machine change.
|
|
81
|
+
writeShim(ctx.projectRoot, process.execPath, cliEntryPath());
|
|
82
|
+
const remaining = shimProblem(ctx.projectRoot);
|
|
83
|
+
if (remaining !== null) {
|
|
84
|
+
return { changed: false, summary: `could not regenerate the cost shim: ${describeShimProblem(remaining)}` };
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
changed: true,
|
|
88
|
+
summary: `regenerated .aidlc/cost/capture.sh for ${affected.join(', ')}`,
|
|
89
|
+
};
|
|
90
|
+
},
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=missing-cost-shim.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"missing-cost-shim.js","sourceRoot":"","sources":["../../../src/doctor/migrations/missing-cost-shim.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAQvF;;;;;GAKG;AACH,MAAM,cAAc,GAAmB;IACrC,EAAE,IAAI,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,EAAE;IACrD,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE;CACzC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,UAAU,yBAAyB,CAAC,WAAmB;IAC3D,IAAI,WAAW,CAAC,WAAW,CAAC,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IACjD,OAAO,cAAc,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE;QACjC,MAAM,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAChC,OAAO,CAAC,CAAC,SAAS,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IAClC,CAAC,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KAAK,EAAE,OAAO,EAAE,uCAAuC,mBAAmB,CAAC,SAAS,CAAC,EAAE,EAAE,CAAC;QAC9G,CAAC;QACD,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,0CAA0C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SACzE,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* roadmap-layout migration (roadmap-revamp/AC-23..AC-27, AC-38, confirm tier):
|
|
3
|
+
* move a legacy `.aidlc/ideas/` backlog into `.aidlc/roadmap/<status>/` and
|
|
4
|
+
* rewrite each item's frontmatter to the new schema.
|
|
5
|
+
*
|
|
6
|
+
* This is the first migration in this project that moves the *user's own*
|
|
7
|
+
* content rather than regenerating a framework artifact, which is why it is
|
|
8
|
+
* confirm tier and why every move goes through `git mv` when the file is
|
|
9
|
+
* tracked: a mistake stays one `git checkout` away from undone.
|
|
10
|
+
*
|
|
11
|
+
* `check` and `apply` both derive everything from `planRoadmapMoves` and nothing
|
|
12
|
+
* else computes pending-ness — the rule stated in `../types.ts`, so a dry run and
|
|
13
|
+
* a real run cannot disagree about what will happen.
|
|
14
|
+
*
|
|
15
|
+
* Old status maps to new directory: `raw` → `inbox`, `dropped` → `hold`,
|
|
16
|
+
* `promoted` → `done` or `in-progress` depending on whether the named instance
|
|
17
|
+
* actually finished. Raw items land in `inbox` rather than `backlog` because the
|
|
18
|
+
* old format has no field recording whether anything was ever triaged, and
|
|
19
|
+
* mapping to `backlog` would manufacture that signal (DD-8).
|
|
20
|
+
*
|
|
21
|
+
* Whether an instance finished is answered by `completionInfo` from the metrics
|
|
22
|
+
* module, not by a local "is the last phase complete?" test — that naive form is
|
|
23
|
+
* wrong for maintenance-terminal templates, which complete on maintenance entry.
|
|
24
|
+
*/
|
|
25
|
+
import type { Migration } from '../types.js';
|
|
26
|
+
import type { DoctorContext } from '../types.js';
|
|
27
|
+
import { type RoadmapStatus } from '../../roadmap/paths.js';
|
|
28
|
+
/** One planned relocation, with everything `apply` needs to carry it out. */
|
|
29
|
+
export interface RoadmapMove {
|
|
30
|
+
/** Absolute source path. */
|
|
31
|
+
from: string;
|
|
32
|
+
/** Absolute target path. */
|
|
33
|
+
to: string;
|
|
34
|
+
/** Repo-relative source, for the printed command list. */
|
|
35
|
+
fromRel: string;
|
|
36
|
+
/** Repo-relative target, for the printed command list. */
|
|
37
|
+
toRel: string;
|
|
38
|
+
status: RoadmapStatus;
|
|
39
|
+
/** Rewritten file contents. */
|
|
40
|
+
contents: string;
|
|
41
|
+
/** Tracked by git, so the move can preserve history. */
|
|
42
|
+
tracked: boolean;
|
|
43
|
+
}
|
|
44
|
+
export interface RoadmapPlan {
|
|
45
|
+
moves: RoadmapMove[];
|
|
46
|
+
/** Repo-relative paths the planner could not classify; left in place. */
|
|
47
|
+
unclassified: string[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Rewrite a legacy idea's frontmatter to the roadmap schema.
|
|
51
|
+
*
|
|
52
|
+
* Key order is fixed by AC-4, so the block is rebuilt rather than edited: the
|
|
53
|
+
* legacy shape shares only `promoted_to` and `depends_on` with the new one.
|
|
54
|
+
* The body below the frontmatter is copied through untouched apart from being
|
|
55
|
+
* read for its title.
|
|
56
|
+
*
|
|
57
|
+
* `author` is deliberately omitted rather than guessed. The legacy format never
|
|
58
|
+
* recorded one, and `created_by` from an unrelated instance is not the author of
|
|
59
|
+
* an idea.
|
|
60
|
+
*/
|
|
61
|
+
export declare function rewriteFrontmatter(raw: string, filename: string, status: RoadmapStatus): {
|
|
62
|
+
contents: string;
|
|
63
|
+
id: string;
|
|
64
|
+
} | null;
|
|
65
|
+
/**
|
|
66
|
+
* Everything the migration would do, computed without writing.
|
|
67
|
+
*
|
|
68
|
+
* The single source of pending-ness. Sorted by source path so the plan never
|
|
69
|
+
* depends on directory read order.
|
|
70
|
+
*/
|
|
71
|
+
export declare function planRoadmapMoves(ctx: DoctorContext): RoadmapPlan;
|
|
72
|
+
export declare const roadmapLayout: Migration;
|
|
73
|
+
//# sourceMappingURL=roadmap-layout.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roadmap-layout.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/roadmap-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAMH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAGjD,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,wBAAwB,CAAC;AAEhC,6EAA6E;AAC7E,MAAM,WAAW,WAAW;IAC1B,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,OAAO,EAAE,MAAM,CAAC;IAChB,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,aAAa,CAAC;IACtB,+BAA+B;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,yEAAyE;IACzE,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAsBD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,aAAa,GACpB;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA8CzC;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,aAAa,GAAG,WAAW,CAmEhE;AASD,eAAO,MAAM,aAAa,EAAE,SA8G3B,CAAC"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* roadmap-layout migration (roadmap-revamp/AC-23..AC-27, AC-38, confirm tier):
|
|
3
|
+
* move a legacy `.aidlc/ideas/` backlog into `.aidlc/roadmap/<status>/` and
|
|
4
|
+
* rewrite each item's frontmatter to the new schema.
|
|
5
|
+
*
|
|
6
|
+
* This is the first migration in this project that moves the *user's own*
|
|
7
|
+
* content rather than regenerating a framework artifact, which is why it is
|
|
8
|
+
* confirm tier and why every move goes through `git mv` when the file is
|
|
9
|
+
* tracked: a mistake stays one `git checkout` away from undone.
|
|
10
|
+
*
|
|
11
|
+
* `check` and `apply` both derive everything from `planRoadmapMoves` and nothing
|
|
12
|
+
* else computes pending-ness — the rule stated in `../types.ts`, so a dry run and
|
|
13
|
+
* a real run cannot disagree about what will happen.
|
|
14
|
+
*
|
|
15
|
+
* Old status maps to new directory: `raw` → `inbox`, `dropped` → `hold`,
|
|
16
|
+
* `promoted` → `done` or `in-progress` depending on whether the named instance
|
|
17
|
+
* actually finished. Raw items land in `inbox` rather than `backlog` because the
|
|
18
|
+
* old format has no field recording whether anything was ever triaged, and
|
|
19
|
+
* mapping to `backlog` would manufacture that signal (DD-8).
|
|
20
|
+
*
|
|
21
|
+
* Whether an instance finished is answered by `completionInfo` from the metrics
|
|
22
|
+
* module, not by a local "is the last phase complete?" test — that naive form is
|
|
23
|
+
* wrong for maintenance-terminal templates, which complete on maintenance entry.
|
|
24
|
+
*/
|
|
25
|
+
import { execFileSync } from 'node:child_process';
|
|
26
|
+
import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmdirSync, writeFileSync } from 'node:fs';
|
|
27
|
+
import { basename, dirname, join } from 'node:path';
|
|
28
|
+
import { parse as parseYaml } from 'yaml';
|
|
29
|
+
import { trackedFiles } from '../git.js';
|
|
30
|
+
import { completionInfo, loadAllTemplates, loadInstance } from '../../metrics/report.js';
|
|
31
|
+
import { ITEM_FILENAME_RE, LEGACY_IDEAS_DIR, ROADMAP_DIR, } from '../../roadmap/paths.js';
|
|
32
|
+
/** Map a legacy `status:` value onto a roadmap directory. */
|
|
33
|
+
function targetStatus(legacy, promotedTo, ctx, templates) {
|
|
34
|
+
if (legacy === 'raw')
|
|
35
|
+
return 'inbox';
|
|
36
|
+
if (legacy === 'dropped')
|
|
37
|
+
return 'hold';
|
|
38
|
+
if (legacy !== 'promoted')
|
|
39
|
+
return null;
|
|
40
|
+
// A promoted item with no instance name is a broken record, not a status we
|
|
41
|
+
// can derive. Treat it as in-flight rather than claiming it shipped.
|
|
42
|
+
if (promotedTo === null)
|
|
43
|
+
return 'in-progress';
|
|
44
|
+
const inst = loadInstance(ctx.projectRoot, promotedTo);
|
|
45
|
+
if (inst === null)
|
|
46
|
+
return 'in-progress';
|
|
47
|
+
return completionInfo(inst, templates).completed ? 'done' : 'in-progress';
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Rewrite a legacy idea's frontmatter to the roadmap schema.
|
|
51
|
+
*
|
|
52
|
+
* Key order is fixed by AC-4, so the block is rebuilt rather than edited: the
|
|
53
|
+
* legacy shape shares only `promoted_to` and `depends_on` with the new one.
|
|
54
|
+
* The body below the frontmatter is copied through untouched apart from being
|
|
55
|
+
* read for its title.
|
|
56
|
+
*
|
|
57
|
+
* `author` is deliberately omitted rather than guessed. The legacy format never
|
|
58
|
+
* recorded one, and `created_by` from an unrelated instance is not the author of
|
|
59
|
+
* an idea.
|
|
60
|
+
*/
|
|
61
|
+
export function rewriteFrontmatter(raw, filename, status) {
|
|
62
|
+
const nameMatch = ITEM_FILENAME_RE.exec(filename);
|
|
63
|
+
if (!nameMatch)
|
|
64
|
+
return null;
|
|
65
|
+
const [, digits, slug] = nameMatch;
|
|
66
|
+
const createdAt = `${digits.slice(0, 4)}-${digits.slice(4, 6)}-${digits.slice(6, 8)}`;
|
|
67
|
+
const id = `item-${digits}-${slug}`;
|
|
68
|
+
if (!raw.startsWith('---\n'))
|
|
69
|
+
return null;
|
|
70
|
+
const close = raw.indexOf('\n---\n', 4);
|
|
71
|
+
if (close === -1)
|
|
72
|
+
return null;
|
|
73
|
+
let legacy = {};
|
|
74
|
+
try {
|
|
75
|
+
const parsed = parseYaml(raw.slice(4, close + 1));
|
|
76
|
+
if (typeof parsed === 'object' && parsed !== null)
|
|
77
|
+
legacy = parsed;
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
return null;
|
|
81
|
+
}
|
|
82
|
+
const body = raw.slice(close + '\n---\n'.length);
|
|
83
|
+
const titleMatch = /^#\s+(?:Idea:\s*)?(.+)$/m.exec(body);
|
|
84
|
+
const title = titleMatch ? titleMatch[1].trim() : slug.replaceAll('-', ' ');
|
|
85
|
+
const promotedTo = typeof legacy.promoted_to === 'string' ? legacy.promoted_to : null;
|
|
86
|
+
// Legacy `depends_on` names files; the new field names identifiers.
|
|
87
|
+
const deps = Array.isArray(legacy.depends_on)
|
|
88
|
+
? legacy.depends_on
|
|
89
|
+
.filter((d) => typeof d === 'string' && d.length > 0)
|
|
90
|
+
.map((d) => (d.startsWith('item-') ? d : `item-${d.replace(/\.md$/, '')}`))
|
|
91
|
+
: [];
|
|
92
|
+
const lines = [
|
|
93
|
+
'---',
|
|
94
|
+
`id: ${id}`,
|
|
95
|
+
`title: ${title.includes(': ') ? JSON.stringify(title) : title}`,
|
|
96
|
+
`created_at: ${createdAt}`,
|
|
97
|
+
'source: import',
|
|
98
|
+
`promoted_to: ${promotedTo === null ? 'null' : promotedTo}`,
|
|
99
|
+
`depends_on: [${deps.join(', ')}]`,
|
|
100
|
+
'history:',
|
|
101
|
+
` - { status: ${status}, at: ${createdAt} }`,
|
|
102
|
+
'---',
|
|
103
|
+
];
|
|
104
|
+
return { contents: `${lines.join('\n')}\n${body}`, id };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Everything the migration would do, computed without writing.
|
|
108
|
+
*
|
|
109
|
+
* The single source of pending-ness. Sorted by source path so the plan never
|
|
110
|
+
* depends on directory read order.
|
|
111
|
+
*/
|
|
112
|
+
export function planRoadmapMoves(ctx) {
|
|
113
|
+
const legacyDir = join(ctx.projectRoot, ...LEGACY_IDEAS_DIR.split('/'));
|
|
114
|
+
if (!existsSync(legacyDir))
|
|
115
|
+
return { moves: [], unclassified: [] };
|
|
116
|
+
const templates = loadAllTemplates(ctx.projectRoot);
|
|
117
|
+
const tracked = new Set(trackedFiles(ctx.projectRoot, [LEGACY_IDEAS_DIR]));
|
|
118
|
+
const moves = [];
|
|
119
|
+
const unclassified = [];
|
|
120
|
+
for (const name of readdirSync(legacyDir).sort()) {
|
|
121
|
+
if (!name.endsWith('.md'))
|
|
122
|
+
continue;
|
|
123
|
+
const from = join(legacyDir, name);
|
|
124
|
+
const fromRel = `${LEGACY_IDEAS_DIR}/${name}`;
|
|
125
|
+
let raw;
|
|
126
|
+
try {
|
|
127
|
+
raw = readFileSync(from, 'utf8');
|
|
128
|
+
}
|
|
129
|
+
catch {
|
|
130
|
+
unclassified.push(fromRel);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
let legacyStatus = null;
|
|
134
|
+
if (raw.startsWith('---\n')) {
|
|
135
|
+
const close = raw.indexOf('\n---\n', 4);
|
|
136
|
+
if (close !== -1) {
|
|
137
|
+
const m = /^status:\s*(\w+)/m.exec(raw.slice(4, close + 1));
|
|
138
|
+
if (m)
|
|
139
|
+
legacyStatus = m[1];
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (legacyStatus === null) {
|
|
143
|
+
unclassified.push(fromRel);
|
|
144
|
+
continue;
|
|
145
|
+
}
|
|
146
|
+
const promotedTo = /^promoted_to:\s*(\S+)/m.exec(raw)?.[1] ?? null;
|
|
147
|
+
const status = targetStatus(legacyStatus, promotedTo === null || promotedTo === 'null' ? null : promotedTo, ctx, templates);
|
|
148
|
+
if (status === null) {
|
|
149
|
+
unclassified.push(fromRel);
|
|
150
|
+
continue;
|
|
151
|
+
}
|
|
152
|
+
const rewritten = rewriteFrontmatter(raw, name, status);
|
|
153
|
+
if (rewritten === null) {
|
|
154
|
+
unclassified.push(fromRel);
|
|
155
|
+
continue;
|
|
156
|
+
}
|
|
157
|
+
const toRel = `${ROADMAP_DIR}/${status}/${name}`;
|
|
158
|
+
moves.push({
|
|
159
|
+
from,
|
|
160
|
+
to: join(ctx.projectRoot, ...toRel.split('/')),
|
|
161
|
+
fromRel,
|
|
162
|
+
toRel,
|
|
163
|
+
status,
|
|
164
|
+
contents: rewritten.contents,
|
|
165
|
+
tracked: tracked.has(fromRel),
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
return { moves, unclassified };
|
|
169
|
+
}
|
|
170
|
+
/** Counts per status, for a one-line description. */
|
|
171
|
+
function byStatus(moves) {
|
|
172
|
+
const counts = new Map();
|
|
173
|
+
for (const m of moves)
|
|
174
|
+
counts.set(m.status, (counts.get(m.status) ?? 0) + 1);
|
|
175
|
+
return [...counts.entries()].map(([s, n]) => `${n} → ${s}`).join(', ');
|
|
176
|
+
}
|
|
177
|
+
export const roadmapLayout = {
|
|
178
|
+
id: 'roadmap-layout',
|
|
179
|
+
tier: 'confirm',
|
|
180
|
+
check(ctx) {
|
|
181
|
+
const legacyDir = join(ctx.projectRoot, ...LEGACY_IDEAS_DIR.split('/'));
|
|
182
|
+
if (!existsSync(legacyDir)) {
|
|
183
|
+
return { applicable: false, reason: `no legacy ${LEGACY_IDEAS_DIR} directory` };
|
|
184
|
+
}
|
|
185
|
+
const { moves, unclassified } = planRoadmapMoves(ctx);
|
|
186
|
+
if (moves.length === 0) {
|
|
187
|
+
// Files this migration cannot parse are reported as NOT APPLICABLE, not as
|
|
188
|
+
// pending work. `apply` will never fix them — only a human can — and
|
|
189
|
+
// `aidlc doctor` exits 1 on pending confirm work, so calling it pending
|
|
190
|
+
// would fail doctor forever on any repo holding one malformed file. That
|
|
191
|
+
// trains people to ignore doctor output, which costs more than the file
|
|
192
|
+
// does. `not-applicable` still prints the detail, and the files are sitting
|
|
193
|
+
// visibly in the legacy directory either way.
|
|
194
|
+
if (unclassified.length > 0) {
|
|
195
|
+
return {
|
|
196
|
+
applicable: false,
|
|
197
|
+
reason: `${unclassified.length} file(s) in ${LEGACY_IDEAS_DIR} have no readable status and need a human: ${unclassified.map((p) => basename(p)).join(', ')}`,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
// An already-drained directory still needs removing, and `apply` only runs
|
|
201
|
+
// when `check` says pending — so reporting clean here would leave it on
|
|
202
|
+
// disk for good (AC-26). A directory holding non-item files is not empty
|
|
203
|
+
// and is correctly left alone.
|
|
204
|
+
if (readdirSync(legacyDir).length === 0) {
|
|
205
|
+
return {
|
|
206
|
+
applicable: true,
|
|
207
|
+
pending: true,
|
|
208
|
+
description: `would remove the now-empty ${LEGACY_IDEAS_DIR} directory`,
|
|
209
|
+
commands: [],
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
return { applicable: true, pending: false };
|
|
213
|
+
}
|
|
214
|
+
const existing = moves.filter((m) => existsSync(m.to));
|
|
215
|
+
if (existing.length > 0) {
|
|
216
|
+
return {
|
|
217
|
+
applicable: true,
|
|
218
|
+
pending: true,
|
|
219
|
+
description: `would move ${moves.length} roadmap item(s) (${byStatus(moves)})`,
|
|
220
|
+
commands: moves.map((m) => `git mv -- ${m.fromRel} ${m.toRel}`),
|
|
221
|
+
blocked: `${existing[0].toRel} already exists — resolve the collision, then re-run aidlc doctor`,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
const suffix = unclassified.length > 0 ? `; ${unclassified.length} file(s) left in place` : '';
|
|
225
|
+
return {
|
|
226
|
+
applicable: true,
|
|
227
|
+
pending: true,
|
|
228
|
+
description: `would move ${moves.length} roadmap item(s) from ${LEGACY_IDEAS_DIR} (${byStatus(moves)})${suffix}`,
|
|
229
|
+
commands: moves.map((m) => `git mv -- ${m.fromRel} ${m.toRel}`),
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
apply(ctx) {
|
|
233
|
+
const { moves, unclassified } = planRoadmapMoves(ctx);
|
|
234
|
+
const legacyDir = join(ctx.projectRoot, ...LEGACY_IDEAS_DIR.split('/'));
|
|
235
|
+
for (const move of moves) {
|
|
236
|
+
mkdirSync(dirname(move.to), { recursive: true });
|
|
237
|
+
// Rewrite in place first, then move. A failure between the two leaves the
|
|
238
|
+
// item where it was with new frontmatter — recoverable — rather than moved
|
|
239
|
+
// with the old schema, which a second run would not detect.
|
|
240
|
+
writeFileSync(move.from, move.contents, 'utf8');
|
|
241
|
+
if (move.tracked) {
|
|
242
|
+
try {
|
|
243
|
+
execFileSync('git', ['mv', '--', move.fromRel, move.toRel], {
|
|
244
|
+
cwd: ctx.projectRoot,
|
|
245
|
+
stdio: ['ignore', 'ignore', 'pipe'],
|
|
246
|
+
});
|
|
247
|
+
continue;
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
// Fall through to a plain rename: git refuses in states (unmerged
|
|
251
|
+
// index, unborn HEAD) where the move itself is still correct.
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
renameSync(move.from, move.to);
|
|
255
|
+
}
|
|
256
|
+
// Remove the legacy directory only when nothing is left in it (AC-26).
|
|
257
|
+
let removed = false;
|
|
258
|
+
if (existsSync(legacyDir) && readdirSync(legacyDir).length === 0) {
|
|
259
|
+
try {
|
|
260
|
+
rmdirSync(legacyDir);
|
|
261
|
+
removed = true;
|
|
262
|
+
}
|
|
263
|
+
catch {
|
|
264
|
+
// A non-empty-by-race or permission-denied directory is not a failure.
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
const parts = [];
|
|
268
|
+
if (moves.length > 0)
|
|
269
|
+
parts.push(`moved ${moves.length} roadmap item(s) (${byStatus(moves)})`);
|
|
270
|
+
if (unclassified.length > 0) {
|
|
271
|
+
parts.push(`left ${unclassified.length} unclassifiable file(s) in place: ${unclassified.map((p) => basename(p)).join(', ')}`);
|
|
272
|
+
}
|
|
273
|
+
if (removed)
|
|
274
|
+
parts.push(`removed empty ${LEGACY_IDEAS_DIR}`);
|
|
275
|
+
return {
|
|
276
|
+
changed: moves.length > 0 || removed,
|
|
277
|
+
summary: parts.length > 0 ? parts.join('; ') : 'nothing to move',
|
|
278
|
+
};
|
|
279
|
+
},
|
|
280
|
+
};
|
|
281
|
+
//# sourceMappingURL=roadmap-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roadmap-layout.js","sourceRoot":"","sources":["../../../src/doctor/migrations/roadmap-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACjH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAG1C,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACzF,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,GAEZ,MAAM,wBAAwB,CAAC;AAyBhC,6DAA6D;AAC7D,SAAS,YAAY,CACnB,MAAc,EACd,UAAyB,EACzB,GAAkB,EAClB,SAA8C;IAE9C,IAAI,MAAM,KAAK,KAAK;QAAE,OAAO,OAAO,CAAC;IACrC,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IACxC,IAAI,MAAM,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IAEvC,4EAA4E;IAC5E,qEAAqE;IACrE,IAAI,UAAU,KAAK,IAAI;QAAE,OAAO,aAAa,CAAC;IAE9C,MAAM,IAAI,GAAG,YAAY,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AC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClH,CAAC;QACJ,CAAC;QACD,IAAI,OAAO;YAAE,KAAK,CAAC,IAAI,CAAC,iBAAiB,gBAAgB,EAAE,CAAC,CAAC;QAE7D,OAAO;YACL,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO;YACpC,OAAO,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,iBAAiB;SACjE,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stale-idea-skill migration (roadmap-revamp/AC-47, safe tier): remove the
|
|
3
|
+
* artifacts left behind when `aidlc-idea` was renamed to `aidlc-roadmap`.
|
|
4
|
+
*
|
|
5
|
+
* Renaming a framework skill leaves residue, because the emitters only ever
|
|
6
|
+
* *write* — `FileOp` has `create`, `replace` and `merge-block`, and no delete.
|
|
7
|
+
* So an existing project that updates gets the new skill and keeps the old one,
|
|
8
|
+
* and the old one is a live instruction pointing at a canonical body that no
|
|
9
|
+
* longer exists. An agent reading it follows a dangling path. That is a
|
|
10
|
+
* correctness problem, not untidiness, which is why this ships with the rename
|
|
11
|
+
* rather than after it.
|
|
12
|
+
*
|
|
13
|
+
* Safe tier, but narrowly: a file is deleted only when its content still points
|
|
14
|
+
* at the old canonical path. A user who edited their copy keeps it. Deleting on
|
|
15
|
+
* filename alone would be the destructive version of this migration, and the
|
|
16
|
+
* project has already learned that narrowing the blast radius to what you own is
|
|
17
|
+
* the precondition for repairing automatically.
|
|
18
|
+
*/
|
|
19
|
+
import type { Migration } from '../types.js';
|
|
20
|
+
/**
|
|
21
|
+
* Orphaned artifact paths present and still pointing at the old canonical body.
|
|
22
|
+
*
|
|
23
|
+
* The canonical body itself is matched on its own heading instead, since it does
|
|
24
|
+
* not reference its own path.
|
|
25
|
+
*/
|
|
26
|
+
export declare function staleIdeaSkillPaths(projectRoot: string): string[];
|
|
27
|
+
export declare const staleIdeaSkill: Migration;
|
|
28
|
+
//# sourceMappingURL=stale-idea-skill.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stale-idea-skill.d.ts","sourceRoot":"","sources":["../../../src/doctor/migrations/stale-idea-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAsB7C;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBjE;AAED,eAAO,MAAM,cAAc,EAAE,SA0C5B,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* stale-idea-skill migration (roadmap-revamp/AC-47, safe tier): remove the
|
|
3
|
+
* artifacts left behind when `aidlc-idea` was renamed to `aidlc-roadmap`.
|
|
4
|
+
*
|
|
5
|
+
* Renaming a framework skill leaves residue, because the emitters only ever
|
|
6
|
+
* *write* — `FileOp` has `create`, `replace` and `merge-block`, and no delete.
|
|
7
|
+
* So an existing project that updates gets the new skill and keeps the old one,
|
|
8
|
+
* and the old one is a live instruction pointing at a canonical body that no
|
|
9
|
+
* longer exists. An agent reading it follows a dangling path. That is a
|
|
10
|
+
* correctness problem, not untidiness, which is why this ships with the rename
|
|
11
|
+
* rather than after it.
|
|
12
|
+
*
|
|
13
|
+
* Safe tier, but narrowly: a file is deleted only when its content still points
|
|
14
|
+
* at the old canonical path. A user who edited their copy keeps it. Deleting on
|
|
15
|
+
* filename alone would be the destructive version of this migration, and the
|
|
16
|
+
* project has already learned that narrowing the blast radius to what you own is
|
|
17
|
+
* the precondition for repairing automatically.
|
|
18
|
+
*/
|
|
19
|
+
import { existsSync, readFileSync, readdirSync, rmSync, rmdirSync } from 'node:fs';
|
|
20
|
+
import { join } from 'node:path';
|
|
21
|
+
/** The canonical body path the orphaned artifacts still reference. */
|
|
22
|
+
const OLD_CANONICAL = '.aidlc/skills/aidlc-idea.md';
|
|
23
|
+
/**
|
|
24
|
+
* Every path the old skill name could have been emitted to, across all five
|
|
25
|
+
* supported platforms.
|
|
26
|
+
*
|
|
27
|
+
* Listed rather than derived from the platform config: a project that switched
|
|
28
|
+
* platforms still has the artifacts from the one it used before, and those are
|
|
29
|
+
* exactly the ones nothing else will ever clean up.
|
|
30
|
+
*/
|
|
31
|
+
const ORPHAN_PATHS = [
|
|
32
|
+
OLD_CANONICAL,
|
|
33
|
+
'.claude/skills/aidlc-idea/SKILL.md',
|
|
34
|
+
'.kiro/skills/aidlc-idea/SKILL.md',
|
|
35
|
+
'.cursor/rules/aidlc-idea.mdc',
|
|
36
|
+
'.windsurf/rules/aidlc-idea.md',
|
|
37
|
+
'.agents/skills/aidlc-idea/SKILL.md',
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* Orphaned artifact paths present and still pointing at the old canonical body.
|
|
41
|
+
*
|
|
42
|
+
* The canonical body itself is matched on its own heading instead, since it does
|
|
43
|
+
* not reference its own path.
|
|
44
|
+
*/
|
|
45
|
+
export function staleIdeaSkillPaths(projectRoot) {
|
|
46
|
+
const found = [];
|
|
47
|
+
for (const rel of ORPHAN_PATHS) {
|
|
48
|
+
const abs = join(projectRoot, ...rel.split('/'));
|
|
49
|
+
if (!existsSync(abs))
|
|
50
|
+
continue;
|
|
51
|
+
let body;
|
|
52
|
+
try {
|
|
53
|
+
body = readFileSync(abs, 'utf8');
|
|
54
|
+
}
|
|
55
|
+
catch {
|
|
56
|
+
continue;
|
|
57
|
+
}
|
|
58
|
+
const isFrameworkOwned = rel === OLD_CANONICAL
|
|
59
|
+
? /^#\s+Idea Capture and Backlog\s*$/m.test(body)
|
|
60
|
+
: body.includes(OLD_CANONICAL);
|
|
61
|
+
if (isFrameworkOwned)
|
|
62
|
+
found.push(rel);
|
|
63
|
+
}
|
|
64
|
+
return found;
|
|
65
|
+
}
|
|
66
|
+
export const staleIdeaSkill = {
|
|
67
|
+
id: 'stale-idea-skill',
|
|
68
|
+
tier: 'safe',
|
|
69
|
+
check(ctx) {
|
|
70
|
+
const stale = staleIdeaSkillPaths(ctx.projectRoot);
|
|
71
|
+
if (stale.length === 0) {
|
|
72
|
+
return { applicable: true, pending: false };
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
applicable: true,
|
|
76
|
+
pending: true,
|
|
77
|
+
description: `would remove ${stale.length} orphaned aidlc-idea skill file(s) superseded by aidlc-roadmap: ${stale.join(', ')}`,
|
|
78
|
+
};
|
|
79
|
+
},
|
|
80
|
+
apply(ctx) {
|
|
81
|
+
const stale = staleIdeaSkillPaths(ctx.projectRoot);
|
|
82
|
+
if (stale.length === 0)
|
|
83
|
+
return { changed: false, summary: 'no orphaned files' };
|
|
84
|
+
const removed = [];
|
|
85
|
+
for (const rel of stale) {
|
|
86
|
+
try {
|
|
87
|
+
rmSync(join(ctx.projectRoot, ...rel.split('/')));
|
|
88
|
+
removed.push(rel);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
// A per-skill directory left empty by the removal is itself residue.
|
|
94
|
+
const parent = join(ctx.projectRoot, ...rel.split('/').slice(0, -1));
|
|
95
|
+
if (parent.endsWith('aidlc-idea')) {
|
|
96
|
+
try {
|
|
97
|
+
if (readdirSync(parent).length === 0)
|
|
98
|
+
rmdirSync(parent);
|
|
99
|
+
}
|
|
100
|
+
catch {
|
|
101
|
+
// A non-empty or unremovable directory is not a failure.
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return {
|
|
106
|
+
changed: removed.length > 0,
|
|
107
|
+
summary: `removed ${removed.length} orphaned aidlc-idea file(s): ${removed.join(', ')}`,
|
|
108
|
+
};
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
//# sourceMappingURL=stale-idea-skill.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stale-idea-skill.js","sourceRoot":"","sources":["../../../src/doctor/migrations/stale-idea-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACnF,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,sEAAsE;AACtE,MAAM,aAAa,GAAG,6BAA6B,CAAC;AAEpD;;;;;;;GAOG;AACH,MAAM,YAAY,GAAG;IACnB,aAAa;IACb,oCAAoC;IACpC,kCAAkC;IAClC,8BAA8B;IAC9B,+BAA+B;IAC/B,oCAAoC;CACrC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,WAAmB;IACrD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QAC/B,IAAI,IAAY,CAAC;QACjB,IAAI,CAAC;YACH,IAAI,GAAG,YAAY,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,SAAS;QACX,CAAC;QACD,MAAM,gBAAgB,GACpB,GAAG,KAAK,aAAa;YACnB,CAAC,CAAC,oCAAoC,CAAC,IAAI,CAAC,IAAI,CAAC;YACjD,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;QACnC,IAAI,gBAAgB;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,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,CAAC,YAAY,CAAC,EAAE,CAAC;gBAClC,IAAI,CAAC;oBACH,IAAI,WAAW,CAAC,MAAM,CAAC,CAAC,MAAM,KAAK,CAAC;wBAAE,SAAS,CAAC,MAAM,CAAC,CAAC;gBAC1D,CAAC;gBAAC,MAAM,CAAC;oBACP,yDAAyD;gBAC3D,CAAC;YACH,CAAC;QACH,CAAC;QAED,OAAO;YACL,OAAO,EAAE,OAAO,CAAC,MAAM,GAAG,CAAC;YAC3B,OAAO,EAAE,WAAW,OAAO,CAAC,MAAM,iCAAiC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;SACxF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;
|
|
1
|
+
{"version":3,"file":"event-bus.d.ts","sourceRoot":"","sources":["../../src/events/event-bus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AASH,OAAO,KAAK,EACV,aAAa,EAEb,YAAY,EACZ,cAAc,EAEf,MAAM,kBAAkB,CAAC;AAM1B;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM9E;AAkDD;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,IAAI,CAyB3E;AAMD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,CAC3B,KAAK,EAAE,YAAY,EACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,KACxC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAwG1C;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI,CAE3E;AA0ED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAClB,KAAK,EAAE,YAAY,EACnB,OAAO,EAAE,aAAa,GAAG,IAAI,EAC7B,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,GAC1B,cAAc,CA6ChB"}
|