@context-forge/core 0.1.1 → 0.3.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/README.md +12 -1
- package/dist/config/ConfigKeys.d.ts +9 -0
- package/dist/config/ConfigKeys.d.ts.map +1 -0
- package/dist/config/ConfigKeys.js +24 -0
- package/dist/config/ConfigKeys.js.map +1 -0
- package/dist/config/ConfigManager.d.ts +18 -0
- package/dist/config/ConfigManager.d.ts.map +1 -0
- package/dist/config/ConfigManager.js +129 -0
- package/dist/config/ConfigManager.js.map +1 -0
- package/dist/config/configPaths.d.ts +5 -0
- package/dist/config/configPaths.d.ts.map +1 -0
- package/dist/config/configPaths.js +11 -0
- package/dist/config/configPaths.js.map +1 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +4 -0
- package/dist/config/index.js.map +1 -0
- package/dist/guides/GuideDetector.d.ts +20 -0
- package/dist/guides/GuideDetector.d.ts.map +1 -0
- package/dist/guides/GuideDetector.js +142 -0
- package/dist/guides/GuideDetector.js.map +1 -0
- package/dist/guides/GuideManager.d.ts +21 -0
- package/dist/guides/GuideManager.d.ts.map +1 -0
- package/dist/guides/GuideManager.js +88 -0
- package/dist/guides/GuideManager.js.map +1 -0
- package/dist/guides/gitExec.d.ts +15 -0
- package/dist/guides/gitExec.d.ts.map +1 -0
- package/dist/guides/gitExec.js +39 -0
- package/dist/guides/gitExec.js.map +1 -0
- package/dist/guides/index.d.ts +4 -0
- package/dist/guides/index.d.ts.map +1 -0
- package/dist/guides/index.js +5 -0
- package/dist/guides/index.js.map +1 -0
- package/dist/guides/strategies/CloneStrategy.d.ts +7 -0
- package/dist/guides/strategies/CloneStrategy.d.ts.map +1 -0
- package/dist/guides/strategies/CloneStrategy.js +80 -0
- package/dist/guides/strategies/CloneStrategy.js.map +1 -0
- package/dist/guides/strategies/SubmoduleStrategy.d.ts +7 -0
- package/dist/guides/strategies/SubmoduleStrategy.d.ts.map +1 -0
- package/dist/guides/strategies/SubmoduleStrategy.js +74 -0
- package/dist/guides/strategies/SubmoduleStrategy.js.map +1 -0
- package/dist/guides/strategies/TarballStrategy.d.ts +19 -0
- package/dist/guides/strategies/TarballStrategy.d.ts.map +1 -0
- package/dist/guides/strategies/TarballStrategy.js +118 -0
- package/dist/guides/strategies/TarballStrategy.js.map +1 -0
- package/dist/guides/types.d.ts +44 -0
- package/dist/guides/types.d.ts.map +1 -0
- package/dist/guides/types.js +7 -0
- package/dist/guides/types.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/introspection/ArtifactIntrospector.d.ts +20 -0
- package/dist/introspection/ArtifactIntrospector.d.ts.map +1 -0
- package/dist/introspection/ArtifactIntrospector.js +140 -0
- package/dist/introspection/ArtifactIntrospector.js.map +1 -0
- package/dist/introspection/FutureWorkCollector.d.ts +7 -0
- package/dist/introspection/FutureWorkCollector.d.ts.map +1 -0
- package/dist/introspection/FutureWorkCollector.js +116 -0
- package/dist/introspection/FutureWorkCollector.js.map +1 -0
- package/dist/introspection/ProjectModelBuilder.d.ts +32 -0
- package/dist/introspection/ProjectModelBuilder.d.ts.map +1 -0
- package/dist/introspection/ProjectModelBuilder.js +321 -0
- package/dist/introspection/ProjectModelBuilder.js.map +1 -0
- package/dist/introspection/index.d.ts +4 -0
- package/dist/introspection/index.d.ts.map +1 -0
- package/dist/introspection/index.js +5 -0
- package/dist/introspection/index.js.map +1 -0
- package/dist/introspection/interfaces.d.ts +18 -0
- package/dist/introspection/interfaces.d.ts.map +1 -0
- package/dist/introspection/interfaces.js +2 -0
- package/dist/introspection/interfaces.js.map +1 -0
- package/dist/introspection/parsers/documentDetector.d.ts +12 -0
- package/dist/introspection/parsers/documentDetector.d.ts.map +1 -0
- package/dist/introspection/parsers/documentDetector.js +66 -0
- package/dist/introspection/parsers/documentDetector.js.map +1 -0
- package/dist/introspection/parsers/frontmatterParser.d.ts +8 -0
- package/dist/introspection/parsers/frontmatterParser.d.ts.map +1 -0
- package/dist/introspection/parsers/frontmatterParser.js +43 -0
- package/dist/introspection/parsers/frontmatterParser.js.map +1 -0
- package/dist/introspection/parsers/futureWorkParser.d.ts +8 -0
- package/dist/introspection/parsers/futureWorkParser.d.ts.map +1 -0
- package/dist/introspection/parsers/futureWorkParser.js +75 -0
- package/dist/introspection/parsers/futureWorkParser.js.map +1 -0
- package/dist/introspection/parsers/slicePlanParser.d.ts +8 -0
- package/dist/introspection/parsers/slicePlanParser.d.ts.map +1 -0
- package/dist/introspection/parsers/slicePlanParser.js +51 -0
- package/dist/introspection/parsers/slicePlanParser.js.map +1 -0
- package/dist/introspection/parsers/statusNormalizer.d.ts +4 -0
- package/dist/introspection/parsers/statusNormalizer.d.ts.map +1 -0
- package/dist/introspection/parsers/statusNormalizer.js +23 -0
- package/dist/introspection/parsers/statusNormalizer.js.map +1 -0
- package/dist/introspection/parsers/taskFileParser.d.ts +13 -0
- package/dist/introspection/parsers/taskFileParser.d.ts.map +1 -0
- package/dist/introspection/parsers/taskFileParser.js +66 -0
- package/dist/introspection/parsers/taskFileParser.js.map +1 -0
- package/dist/introspection/types.d.ts +178 -0
- package/dist/introspection/types.d.ts.map +1 -0
- package/dist/introspection/types.js +2 -0
- package/dist/introspection/types.js.map +1 -0
- package/dist/node.d.ts +11 -0
- package/dist/node.d.ts.map +1 -1
- package/dist/node.js +15 -0
- package/dist/node.js.map +1 -1
- package/dist/schema/projectSchema.d.ts +54 -0
- package/dist/schema/projectSchema.d.ts.map +1 -0
- package/dist/schema/projectSchema.js +131 -0
- package/dist/schema/projectSchema.js.map +1 -0
- package/dist/schema/resolveFileByIndex.d.ts +11 -0
- package/dist/schema/resolveFileByIndex.d.ts.map +1 -0
- package/dist/schema/resolveFileByIndex.js +53 -0
- package/dist/schema/resolveFileByIndex.js.map +1 -0
- package/dist/services/ContextGenerator.d.ts.map +1 -1
- package/dist/services/ContextGenerator.js +3 -5
- package/dist/services/ContextGenerator.js.map +1 -1
- package/dist/services/ContextIntegrator.d.ts.map +1 -1
- package/dist/services/ContextIntegrator.js +10 -14
- package/dist/services/ContextIntegrator.js.map +1 -1
- package/dist/services/ContextTemplateEngine.d.ts.map +1 -1
- package/dist/services/ContextTemplateEngine.js +8 -21
- package/dist/services/ContextTemplateEngine.js.map +1 -1
- package/dist/services/CoreServiceFactory.d.ts +3 -0
- package/dist/services/CoreServiceFactory.d.ts.map +1 -1
- package/dist/services/CoreServiceFactory.js +19 -1
- package/dist/services/CoreServiceFactory.js.map +1 -1
- package/dist/services/ProjectPathService.d.ts +1 -1
- package/dist/services/ProjectPathService.d.ts.map +1 -1
- package/dist/services/ProjectPathService.js +2 -4
- package/dist/services/ProjectPathService.js.map +1 -1
- package/dist/services/SectionBuilder.d.ts +0 -4
- package/dist/services/SectionBuilder.d.ts.map +1 -1
- package/dist/services/SectionBuilder.js +8 -35
- package/dist/services/SectionBuilder.js.map +1 -1
- package/dist/services/SystemPromptParser.d.ts +1 -2
- package/dist/services/SystemPromptParser.d.ts.map +1 -1
- package/dist/services/SystemPromptParser.js +3 -14
- package/dist/services/SystemPromptParser.js.map +1 -1
- package/dist/services/TemplateProcessor.d.ts.map +1 -1
- package/dist/services/TemplateProcessor.js +12 -11
- package/dist/services/TemplateProcessor.js.map +1 -1
- package/dist/services/constants.d.ts.map +1 -1
- package/dist/services/constants.js +0 -6
- package/dist/services/constants.js.map +1 -1
- package/dist/services/interfaces.d.ts +1 -1
- package/dist/services/interfaces.d.ts.map +1 -1
- package/dist/storage/FileProjectStore.d.ts.map +1 -1
- package/dist/storage/FileProjectStore.js +25 -8
- package/dist/storage/FileProjectStore.js.map +1 -1
- package/dist/types/context.d.ts +4 -6
- package/dist/types/context.d.ts.map +1 -1
- package/dist/types/project.d.ts +15 -11
- package/dist/types/project.d.ts.map +1 -1
- package/dist/types/sections.d.ts +0 -1
- package/dist/types/sections.d.ts.map +1 -1
- package/dist/types/sections.js +0 -1
- package/dist/types/sections.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { readdir, access } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
const USER_DOCS = 'project-documents/user';
|
|
4
|
+
/**
|
|
5
|
+
* Check if a file exists at the given path.
|
|
6
|
+
*/
|
|
7
|
+
export async function checkFileExists(projectPath, relativePath) {
|
|
8
|
+
try {
|
|
9
|
+
await access(join(projectPath, relativePath));
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
catch {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Read a directory listing safely — returns empty array on error.
|
|
18
|
+
*/
|
|
19
|
+
async function safeReaddir(dirPath) {
|
|
20
|
+
try {
|
|
21
|
+
return await readdir(dirPath);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Find files in a directory matching a prefix pattern like `NNN-type.`.
|
|
29
|
+
* Returns full relative paths from projectPath.
|
|
30
|
+
*/
|
|
31
|
+
function matchFiles(files, prefix, dir) {
|
|
32
|
+
return files
|
|
33
|
+
.filter((f) => f.startsWith(prefix) && f.endsWith('.md'))
|
|
34
|
+
.sort()
|
|
35
|
+
.map((f) => join(dir, f));
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Detect methodology documents for a given slice index under a project path.
|
|
39
|
+
* Checks project-documents/user/ subdirectories for matching files.
|
|
40
|
+
* Never throws — returns nulls for missing directories.
|
|
41
|
+
*/
|
|
42
|
+
export async function detectDocuments(projectPath, sliceIndex) {
|
|
43
|
+
const idx = String(sliceIndex);
|
|
44
|
+
const slicesDir = join(projectPath, USER_DOCS, 'slices');
|
|
45
|
+
const tasksDir = join(projectPath, USER_DOCS, 'tasks');
|
|
46
|
+
const archDir = join(projectPath, USER_DOCS, 'architecture');
|
|
47
|
+
const [sliceFiles, taskFiles, archFiles] = await Promise.all([
|
|
48
|
+
safeReaddir(slicesDir),
|
|
49
|
+
safeReaddir(tasksDir),
|
|
50
|
+
safeReaddir(archDir),
|
|
51
|
+
]);
|
|
52
|
+
// slices/{index}-slice.*.md → sliceDesign
|
|
53
|
+
const sliceMatches = matchFiles(sliceFiles, `${idx}-slice.`, join(USER_DOCS, 'slices'));
|
|
54
|
+
const sliceDesign = sliceMatches.length > 0 ? sliceMatches[0] : null;
|
|
55
|
+
// tasks/{index}-tasks.*.md → taskFile (array, supports split files)
|
|
56
|
+
const taskMatches = matchFiles(taskFiles, `${idx}-tasks.`, join(USER_DOCS, 'tasks'));
|
|
57
|
+
const taskFile = taskMatches.length > 0 ? taskMatches : null;
|
|
58
|
+
// architecture/{index}-arch.*.md → architecture
|
|
59
|
+
const archMatches = matchFiles(archFiles, `${idx}-arch.`, join(USER_DOCS, 'architecture'));
|
|
60
|
+
const architecture = archMatches.length > 0 ? archMatches[0] : null;
|
|
61
|
+
// architecture/{index}-slices.*.md → slicePlan
|
|
62
|
+
const planMatches = matchFiles(archFiles, `${idx}-slices.`, join(USER_DOCS, 'architecture'));
|
|
63
|
+
const slicePlan = planMatches.length > 0 ? planMatches[0] : null;
|
|
64
|
+
return { sliceDesign, taskFile, architecture, slicePlan };
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=documentDetector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentDetector.js","sourceRoot":"","sources":["../../../src/introspection/parsers/documentDetector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAGjC,MAAM,SAAS,GAAG,wBAAwB,CAAC;AAE3C;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,WAAmB,EAAE,YAAoB;IA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terResult } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extract YAML frontmatter as flat key:value dict.
|
|
4
|
+
* Ported from parse.py parse_frontmatter().
|
|
5
|
+
* Never throws — returns { found: false, data: {} } on any error.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseFrontmatter(filePath: string): Promise<FrontmatterResult>;
|
|
8
|
+
//# sourceMappingURL=frontmatterParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatterParser.d.ts","sourceRoot":"","sources":["../../../src/introspection/parsers/frontmatterParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAwCnF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
/**
|
|
3
|
+
* Extract YAML frontmatter as flat key:value dict.
|
|
4
|
+
* Ported from parse.py parse_frontmatter().
|
|
5
|
+
* Never throws — returns { found: false, data: {} } on any error.
|
|
6
|
+
*/
|
|
7
|
+
export async function parseFrontmatter(filePath) {
|
|
8
|
+
const empty = { filePath, found: false, data: {} };
|
|
9
|
+
try {
|
|
10
|
+
const content = await readFile(filePath, 'utf-8');
|
|
11
|
+
const lines = content.split('\n');
|
|
12
|
+
if (lines.length === 0 || lines[0].trim() !== '---') {
|
|
13
|
+
return empty;
|
|
14
|
+
}
|
|
15
|
+
const data = {};
|
|
16
|
+
for (let i = 1; i < lines.length; i++) {
|
|
17
|
+
const stripped = lines[i].trim();
|
|
18
|
+
if (stripped === '---') {
|
|
19
|
+
return { filePath, found: true, data };
|
|
20
|
+
}
|
|
21
|
+
if (stripped.includes(':')) {
|
|
22
|
+
const colonIdx = stripped.indexOf(':');
|
|
23
|
+
const key = stripped.slice(0, colonIdx).trim();
|
|
24
|
+
let val = stripped.slice(colonIdx + 1).trim();
|
|
25
|
+
// Strip surrounding quotes (single and double)
|
|
26
|
+
if (val.length >= 2 &&
|
|
27
|
+
((val.startsWith("'") && val.endsWith("'")) ||
|
|
28
|
+
(val.startsWith('"') && val.endsWith('"')))) {
|
|
29
|
+
val = val.slice(1, -1);
|
|
30
|
+
}
|
|
31
|
+
if (key) {
|
|
32
|
+
data[key] = val;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
// Reached end of file without closing ---
|
|
37
|
+
return empty;
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return empty;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=frontmatterParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frontmatterParser.js","sourceRoot":"","sources":["../../../src/introspection/parsers/frontmatterParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,QAAgB;IACrD,MAAM,KAAK,GAAsB,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IAEtE,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAElC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,KAAK,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,IAAI,GAA2B,EAAE,CAAC;QACxC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,E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
|
+
* Parse the Future Work section from a slice plan document.
|
|
4
|
+
* Items with explicit `(NNN)` index use that index; unnumbered items get sequential indices.
|
|
5
|
+
* Never throws — returns empty result on error.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseFutureWork(filePath: string, nextIndex?: number): Promise<FutureWorkResult>;
|
|
8
|
+
//# sourceMappingURL=futureWorkParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"futureWorkParser.d.ts","sourceRoot":"","sources":["../../../src/introspection/parsers/futureWorkParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA4BpE;;;;GAIG;AACH,wBAAsB,eAAe,CACnC,QAAQ,EAAE,MAAM,EAChB,SAAS,GAAE,MAAU,GACpB,OAAO,CAAC,gBAAgB,CAAC,CAoD3B"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
/** Numbered checkbox items: `N. [ ] text` (from parse.py _FW_ITEM_RE) */
|
|
3
|
+
const FW_ITEM_RE = /^\d+\.\s+\[([ xX])\]\s+(.+)$/;
|
|
4
|
+
/** Explicit index in text: `(NNN) ...` (from parse.py _FW_INDEX_RE) */
|
|
5
|
+
const FW_INDEX_RE = /^\((\d+)\)\s*/;
|
|
6
|
+
/** Heading pattern: #, ##, ### */
|
|
7
|
+
const HEADING_RE = /^#{1,3}\s+/;
|
|
8
|
+
/** Future Work heading pattern */
|
|
9
|
+
const FUTURE_WORK_HEADING_RE = /^#{1,3}\s+Future Work/i;
|
|
10
|
+
/**
|
|
11
|
+
* Extract short title from a future work item (text before em-dash or colon).
|
|
12
|
+
* Ported from parse.py _fw_title().
|
|
13
|
+
*/
|
|
14
|
+
function extractTitle(text) {
|
|
15
|
+
for (const sep of [' — ', ': ']) {
|
|
16
|
+
const pos = text.indexOf(sep);
|
|
17
|
+
if (pos > 0) {
|
|
18
|
+
return text.slice(0, pos).trim();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return text;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Parse the Future Work section from a slice plan document.
|
|
25
|
+
* Items with explicit `(NNN)` index use that index; unnumbered items get sequential indices.
|
|
26
|
+
* Never throws — returns empty result on error.
|
|
27
|
+
*/
|
|
28
|
+
export async function parseFutureWork(filePath, nextIndex = 0) {
|
|
29
|
+
const empty = { filePath, items: [] };
|
|
30
|
+
try {
|
|
31
|
+
const content = await readFile(filePath, 'utf-8');
|
|
32
|
+
const items = [];
|
|
33
|
+
let inSection = false;
|
|
34
|
+
let autoIdx = nextIndex;
|
|
35
|
+
for (const line of content.split('\n')) {
|
|
36
|
+
const stripped = line.trim();
|
|
37
|
+
if (FUTURE_WORK_HEADING_RE.test(stripped)) {
|
|
38
|
+
inSection = true;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
// Next heading ends the section
|
|
42
|
+
if (inSection && HEADING_RE.test(stripped)) {
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
if (!inSection)
|
|
46
|
+
continue;
|
|
47
|
+
const m = FW_ITEM_RE.exec(stripped);
|
|
48
|
+
if (!m)
|
|
49
|
+
continue;
|
|
50
|
+
const done = m[1].toLowerCase() === 'x';
|
|
51
|
+
let text = m[2].trim();
|
|
52
|
+
// Strip leading " — " that sometimes follows an index
|
|
53
|
+
text = text.replace(/^—\s*/, '');
|
|
54
|
+
// Check for explicit index like "(780) Config System..."
|
|
55
|
+
const idxMatch = FW_INDEX_RE.exec(text);
|
|
56
|
+
let index;
|
|
57
|
+
if (idxMatch) {
|
|
58
|
+
index = idxMatch[1];
|
|
59
|
+
text = text.slice(idxMatch[0].length).replace(/^[\s—-]+/, '');
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
index = autoIdx > 0 ? String(autoIdx) : '?';
|
|
63
|
+
if (autoIdx > 0)
|
|
64
|
+
autoIdx++;
|
|
65
|
+
}
|
|
66
|
+
const name = extractTitle(text);
|
|
67
|
+
items.push({ index, name, done });
|
|
68
|
+
}
|
|
69
|
+
return { filePath, items };
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return empty;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=futureWorkParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"futureWorkParser.js","sourceRoot":"","sources":["../../../src/introspection/parsers/futureWorkParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,yEAAyE;AACzE,MAAM,UAAU,GAAG,8BAA8B,CAAC;AAElD,uEAAuE;AACvE,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC,kCAAkC;AAClC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,kCAAkC;AAClC,MAAM,sBAAsB,GAAG,wBAAwB,CAAC;AAExD;;;GAGG;AACH,SAAS,YAAY,CAAC,IAAY;IAChC,KAAK,MAAM,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,CAAC;QAChC,MAAM,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC;YACZ,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;QACnC,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,QAAgB,EAChB,YAAoB,CAAC;IAErB,MAAM,KAAK,GAAqB,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;IAExD,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClD,MAAM,KAAK,GAAqB,EAAE,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C,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;gBAC5C,IAAI,OAAO,GAAG,CAAC;oBAAE,OAAO,EAAE,CAAC;YAC7B,CAAC;YAED,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;YAChC,KAAK,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACpC,CAAC;QAED,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;IAC7B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { SlicePlanResult } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Parse a slice plan document and extract entries with completion state.
|
|
4
|
+
* Section-aware: skips entries under Future Work, Implementation Order, Notes, Parent Document.
|
|
5
|
+
* Never throws — returns empty result on error.
|
|
6
|
+
*/
|
|
7
|
+
export declare function parseSlicePlan(filePath: string): Promise<SlicePlanResult>;
|
|
8
|
+
//# sourceMappingURL=slicePlanParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slicePlanParser.d.ts","sourceRoot":"","sources":["../../../src/introspection/parsers/slicePlanParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,aAAa,CAAC;AAWnE;;;;GAIG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAyC/E"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
/** Matches `N. [ ] **(NNN) Slice Name**` (from parse.py) */
|
|
3
|
+
const PLAN_SLICE_RE = /^\d+\.\s+\[([ xX])\]\s+\*\*\((\d+)\)\s+(.+?)\*\*/;
|
|
4
|
+
/** Matches headings: #, ##, ### */
|
|
5
|
+
const HEADING_RE = /^#{1,3}\s+/;
|
|
6
|
+
/** Headings that do NOT contain slice entries (from parse.py) */
|
|
7
|
+
const NON_SLICE_HEADINGS = ['future work', 'implementation order', 'notes', 'parent document'];
|
|
8
|
+
/**
|
|
9
|
+
* Parse a slice plan document and extract entries with completion state.
|
|
10
|
+
* Section-aware: skips entries under Future Work, Implementation Order, Notes, Parent Document.
|
|
11
|
+
* Never throws — returns empty result on error.
|
|
12
|
+
*/
|
|
13
|
+
export async function parseSlicePlan(filePath) {
|
|
14
|
+
const empty = { filePath, entries: [], totalSlices: 0, completedSlices: 0 };
|
|
15
|
+
try {
|
|
16
|
+
const content = await readFile(filePath, 'utf-8');
|
|
17
|
+
const entries = [];
|
|
18
|
+
let inSliceSection = true; // Assume slice sections until a non-slice heading
|
|
19
|
+
for (const line of content.split('\n')) {
|
|
20
|
+
const stripped = line.trim();
|
|
21
|
+
if (HEADING_RE.test(stripped)) {
|
|
22
|
+
const heading = stripped.replace(/^#+\s+/, '').toLowerCase();
|
|
23
|
+
inSliceSection = !NON_SLICE_HEADINGS.some((ns) => heading.includes(ns));
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (!inSliceSection)
|
|
27
|
+
continue;
|
|
28
|
+
const m = PLAN_SLICE_RE.exec(stripped);
|
|
29
|
+
if (!m)
|
|
30
|
+
continue;
|
|
31
|
+
const isChecked = m[1].toLowerCase() === 'x';
|
|
32
|
+
entries.push({
|
|
33
|
+
index: parseInt(m[2], 10),
|
|
34
|
+
name: m[3].trim(),
|
|
35
|
+
status: isChecked ? 'complete' : 'not-started',
|
|
36
|
+
isChecked,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const completedSlices = entries.filter((e) => e.isChecked).length;
|
|
40
|
+
return {
|
|
41
|
+
filePath,
|
|
42
|
+
entries,
|
|
43
|
+
totalSlices: entries.length,
|
|
44
|
+
completedSlices,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return empty;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=slicePlanParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slicePlanParser.js","sourceRoot":"","sources":["../../../src/introspection/parsers/slicePlanParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,4DAA4D;AAC5D,MAAM,aAAa,GAAG,kDAAkD,CAAC;AAEzE,mCAAmC;AACnC,MAAM,UAAU,GAAG,YAAY,CAAC;AAEhC,iEAAiE;AACjE,MAAM,kBAAkB,GAAG,CAAC,aAAa,EAAE,sBAAsB,EAAE,OAAO,EAAE,iBAAiB,CAAC,CAAC;AAE/F;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAgB;IACnD,MAAM,KAAK,GAAoB,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAE,CAAC;IAE7F,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClD,MAAM,OAAO,GAAqB,EAAE,CAAC;QACrC,IAAI,cAAc,GAAG,IAAI,CAAC,CAAC,kDAAkD;QAE7E,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC;YAE7B,IAAI,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC9B,MAAM,OAAO,GAAG,QAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC;gBAC7D,cAAc,GAAG,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,CAAC;gBACxE,SAAS;YACX,CAAC;YAED,IAAI,CAAC,cAAc;gBAAE,SAAS;YAE9B,MAAM,CAAC,GAAG,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YACvC,IAAI,CAAC,CAAC;gBAAE,SAAS;YAEjB,MAAM,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,KAAK,GAAG,CAAC;YAC7C,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;gBACzB,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE;gBACjB,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,aAAa;gBAC9C,SAAS;aACV,CAAC,CAAC;QACL,CAAC;QAED,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC;QAClE,OAAO;YACL,QAAQ;YACR,OAAO;YACP,WAAW,EAAE,OAAO,CAAC,MAAM;YAC3B,eAAe;SAChB,CAAC;IACJ,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusNormalizer.d.ts","sourceRoot":"","sources":["../../../src/introspection/parsers/statusNormalizer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAoBpD,mEAAmE;AACnE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,gBAAgB,CAGhF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Maps variant status spellings to normalized values (ported from parse.py _STATUS) */
|
|
2
|
+
const STATUS_MAP = {
|
|
3
|
+
complete: 'complete',
|
|
4
|
+
completed: 'complete',
|
|
5
|
+
done: 'complete',
|
|
6
|
+
in_progress: 'in-progress',
|
|
7
|
+
'in-progress': 'in-progress',
|
|
8
|
+
'in progress': 'in-progress',
|
|
9
|
+
active: 'in-progress',
|
|
10
|
+
not_started: 'not-started',
|
|
11
|
+
'not-started': 'not-started',
|
|
12
|
+
'not started': 'not-started',
|
|
13
|
+
ready: 'not-started',
|
|
14
|
+
pending: 'not-started',
|
|
15
|
+
planned: 'not-started',
|
|
16
|
+
deprecated: 'deprecated',
|
|
17
|
+
};
|
|
18
|
+
/** Normalize a raw status string to one of the canonical values */
|
|
19
|
+
export function normalizeStatus(raw) {
|
|
20
|
+
const key = (raw ?? '').toLowerCase().trim();
|
|
21
|
+
return STATUS_MAP[key] ?? 'not-started';
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=statusNormalizer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statusNormalizer.js","sourceRoot":"","sources":["../../../src/introspection/parsers/statusNormalizer.ts"],"names":[],"mappings":"AAEA,wFAAwF;AACxF,MAAM,UAAU,GAAqC;IACnD,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,UAAU;IACrB,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,MAAM,EAAE,aAAa;IACrB,WAAW,EAAE,aAAa;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,KAAK,EAAE,aAAa;IACpB,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,YAAY;CACzB,CAAC;AAEF,mEAAmE;AACnE,MAAM,UAAU,eAAe,CAAC,GAA8B;IAC5D,MAAM,GAAG,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,IAAI,EAAE,CAAC;IAC7C,OAAO,UAAU,CAAC,GAAG,CAAC,IAAI,aAAa,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TaskItem, TaskFileResult } from '../types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Extract checkbox items from a single task file.
|
|
4
|
+
* Never throws — returns empty array on error.
|
|
5
|
+
*/
|
|
6
|
+
export declare function parseTaskItems(filePath: string): Promise<TaskItem[]>;
|
|
7
|
+
/**
|
|
8
|
+
* Parse one or more task files, merge items, compute counts and inferred status.
|
|
9
|
+
* For multiple files (split support): merge items in path order, use first file's path.
|
|
10
|
+
* Never throws — returns empty result on error.
|
|
11
|
+
*/
|
|
12
|
+
export declare function parseTaskFile(filePaths: string | string[]): Promise<TaskFileResult>;
|
|
13
|
+
//# sourceMappingURL=taskFileParser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskFileParser.d.ts","sourceRoot":"","sources":["../../../src/introspection/parsers/taskFileParser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAQ5D;;;GAGG;AACH,wBAAsB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAkB1E;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,cAAc,CAAC,CA+BzF"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
/** Matches `- [ ] text` and `- [x] text` at any indentation level (from parse.py) */
|
|
3
|
+
const CHECKBOX_RE = /^(?:\s*)-\s+\[([ xX])\]\s+(.+)$/;
|
|
4
|
+
/** Maximum task name length before truncation (matching parse.py) */
|
|
5
|
+
const MAX_NAME_LENGTH = 120;
|
|
6
|
+
/**
|
|
7
|
+
* Extract checkbox items from a single task file.
|
|
8
|
+
* Never throws — returns empty array on error.
|
|
9
|
+
*/
|
|
10
|
+
export async function parseTaskItems(filePath) {
|
|
11
|
+
const items = [];
|
|
12
|
+
try {
|
|
13
|
+
const content = await readFile(filePath, 'utf-8');
|
|
14
|
+
for (const line of content.split('\n')) {
|
|
15
|
+
const m = CHECKBOX_RE.exec(line);
|
|
16
|
+
if (m) {
|
|
17
|
+
let name = m[2].trim();
|
|
18
|
+
if (name.length > MAX_NAME_LENGTH) {
|
|
19
|
+
name = name.slice(0, MAX_NAME_LENGTH - 3) + '...';
|
|
20
|
+
}
|
|
21
|
+
items.push({ name, done: m[1].toLowerCase() === 'x' });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
catch {
|
|
26
|
+
// Missing/unreadable file: return empty
|
|
27
|
+
}
|
|
28
|
+
return items;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parse one or more task files, merge items, compute counts and inferred status.
|
|
32
|
+
* For multiple files (split support): merge items in path order, use first file's path.
|
|
33
|
+
* Never throws — returns empty result on error.
|
|
34
|
+
*/
|
|
35
|
+
export async function parseTaskFile(filePaths) {
|
|
36
|
+
const paths = Array.isArray(filePaths) ? filePaths : [filePaths];
|
|
37
|
+
const primaryPath = paths[0] ?? '';
|
|
38
|
+
const allItems = [];
|
|
39
|
+
for (const p of paths) {
|
|
40
|
+
const items = await parseTaskItems(p);
|
|
41
|
+
allItems.push(...items);
|
|
42
|
+
}
|
|
43
|
+
const totalTasks = allItems.length;
|
|
44
|
+
const completedTasks = allItems.filter((item) => item.done).length;
|
|
45
|
+
let inferredStatus;
|
|
46
|
+
if (totalTasks === 0) {
|
|
47
|
+
inferredStatus = 'not-started';
|
|
48
|
+
}
|
|
49
|
+
else if (completedTasks === totalTasks) {
|
|
50
|
+
inferredStatus = 'complete';
|
|
51
|
+
}
|
|
52
|
+
else if (completedTasks > 0) {
|
|
53
|
+
inferredStatus = 'in-progress';
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
inferredStatus = 'not-started';
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
filePath: primaryPath,
|
|
60
|
+
items: allItems,
|
|
61
|
+
totalTasks,
|
|
62
|
+
completedTasks,
|
|
63
|
+
inferredStatus,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=taskFileParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"taskFileParser.js","sourceRoot":"","sources":["../../../src/introspection/parsers/taskFileParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,qFAAqF;AACrF,MAAM,WAAW,GAAG,iCAAiC,CAAC;AAEtD,qEAAqE;AACrE,MAAM,eAAe,GAAG,GAAG,CAAC;AAE5B;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAgB;IACnD,MAAM,KAAK,GAAe,EAAE,CAAC;IAC7B,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAClD,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;YACvC,MAAM,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,CAAC,EAAE,CAAC;gBACN,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;gBACvB,IAAI,IAAI,CAAC,MAAM,GAAG,eAAe,EAAE,CAAC;oBAClC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;gBACpD,CAAC;gBACD,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CA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KACf,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/** Normalized status values used across introspection results */
|
|
2
|
+
export type NormalizedStatus = 'complete' | 'in-progress' | 'not-started' | 'deprecated';
|
|
3
|
+
/** Result of parsing a single slice plan entry */
|
|
4
|
+
export interface SlicePlanEntry {
|
|
5
|
+
index: number;
|
|
6
|
+
name: string;
|
|
7
|
+
status: NormalizedStatus;
|
|
8
|
+
isChecked: boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Result of parsing a slice plan document */
|
|
11
|
+
export interface SlicePlanResult {
|
|
12
|
+
filePath: string;
|
|
13
|
+
entries: SlicePlanEntry[];
|
|
14
|
+
totalSlices: number;
|
|
15
|
+
completedSlices: number;
|
|
16
|
+
}
|
|
17
|
+
/** A single task checkbox item */
|
|
18
|
+
export interface TaskItem {
|
|
19
|
+
name: string;
|
|
20
|
+
done: boolean;
|
|
21
|
+
}
|
|
22
|
+
/** Result of parsing a task file (or merged split files) */
|
|
23
|
+
export interface TaskFileResult {
|
|
24
|
+
filePath: string;
|
|
25
|
+
items: TaskItem[];
|
|
26
|
+
totalTasks: number;
|
|
27
|
+
completedTasks: number;
|
|
28
|
+
/** Inferred status based on checkbox state */
|
|
29
|
+
inferredStatus: 'complete' | 'in-progress' | 'not-started';
|
|
30
|
+
}
|
|
31
|
+
/** Extracted YAML frontmatter fields */
|
|
32
|
+
export interface FrontmatterData {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
}
|
|
35
|
+
/** Result of frontmatter extraction */
|
|
36
|
+
export interface FrontmatterResult {
|
|
37
|
+
filePath: string;
|
|
38
|
+
found: boolean;
|
|
39
|
+
data: FrontmatterData;
|
|
40
|
+
}
|
|
41
|
+
/** A single future work item */
|
|
42
|
+
export interface FutureWorkItem {
|
|
43
|
+
index: string;
|
|
44
|
+
name: string;
|
|
45
|
+
done: boolean;
|
|
46
|
+
}
|
|
47
|
+
/** Result of future work section parsing */
|
|
48
|
+
export interface FutureWorkResult {
|
|
49
|
+
filePath: string;
|
|
50
|
+
items: FutureWorkItem[];
|
|
51
|
+
}
|
|
52
|
+
/** Result of checking what documents exist for a given slice index */
|
|
53
|
+
export interface DocumentDetectionResult {
|
|
54
|
+
sliceDesign: string | null;
|
|
55
|
+
taskFile: string[] | null;
|
|
56
|
+
architecture: string | null;
|
|
57
|
+
slicePlan: string | null;
|
|
58
|
+
}
|
|
59
|
+
/** Base document shape produced by _d() in parse.py */
|
|
60
|
+
export interface DocSummary {
|
|
61
|
+
index: string;
|
|
62
|
+
name: string;
|
|
63
|
+
status: string;
|
|
64
|
+
dateCreated?: string;
|
|
65
|
+
dateUpdated?: string;
|
|
66
|
+
}
|
|
67
|
+
/** Foundation band entry (index 000-009) */
|
|
68
|
+
export interface FoundationEntry extends DocSummary {
|
|
69
|
+
type: string;
|
|
70
|
+
}
|
|
71
|
+
/** Project architecture band entry (index 050-099) */
|
|
72
|
+
export interface ArchEntry extends DocSummary {
|
|
73
|
+
type: 'arch' | 'hld';
|
|
74
|
+
}
|
|
75
|
+
/** Task block within a slice */
|
|
76
|
+
export interface TaskModelEntry {
|
|
77
|
+
index: string;
|
|
78
|
+
name: string;
|
|
79
|
+
status: string;
|
|
80
|
+
taskCount: number;
|
|
81
|
+
completedTasks: number;
|
|
82
|
+
dateCreated?: string;
|
|
83
|
+
dateUpdated?: string;
|
|
84
|
+
items?: TaskItem[];
|
|
85
|
+
}
|
|
86
|
+
/** Slice within an initiative */
|
|
87
|
+
export interface SliceModelEntry extends DocSummary {
|
|
88
|
+
tasks?: TaskModelEntry;
|
|
89
|
+
features?: DocSummary[];
|
|
90
|
+
planned?: true;
|
|
91
|
+
}
|
|
92
|
+
/** Slice plan block with future work items */
|
|
93
|
+
export interface SlicePlanBlock extends DocSummary {
|
|
94
|
+
filepath?: string;
|
|
95
|
+
entries?: SlicePlanEntry[];
|
|
96
|
+
futureWork: FutureWorkItem[];
|
|
97
|
+
}
|
|
98
|
+
/** An initiative (base index in 100-799 with arch/slices doc) */
|
|
99
|
+
export interface Initiative {
|
|
100
|
+
name: string;
|
|
101
|
+
slices: SliceModelEntry[];
|
|
102
|
+
features: DocSummary[];
|
|
103
|
+
arch?: DocSummary;
|
|
104
|
+
slicePlan?: SlicePlanBlock;
|
|
105
|
+
}
|
|
106
|
+
/** Standalone feature not claimed by any slice */
|
|
107
|
+
export interface FutureSliceEntry extends DocSummary {
|
|
108
|
+
parent?: string;
|
|
109
|
+
}
|
|
110
|
+
/** Maintenance task entry (900+) */
|
|
111
|
+
export interface MaintenanceEntry extends DocSummary {
|
|
112
|
+
taskCount?: number;
|
|
113
|
+
completedTasks?: number;
|
|
114
|
+
}
|
|
115
|
+
/** Full project model — top-level output of buildModel() */
|
|
116
|
+
export interface ProjectModel {
|
|
117
|
+
name: string;
|
|
118
|
+
description: string;
|
|
119
|
+
foundation: FoundationEntry[];
|
|
120
|
+
projectArchitecture: ArchEntry[];
|
|
121
|
+
initiatives: Record<string, Initiative>;
|
|
122
|
+
futureSlices: FutureSliceEntry[];
|
|
123
|
+
quality: DocSummary[];
|
|
124
|
+
investigation: DocSummary[];
|
|
125
|
+
maintenance: MaintenanceEntry[];
|
|
126
|
+
devlog: boolean;
|
|
127
|
+
}
|
|
128
|
+
/** A single future work item with source attribution */
|
|
129
|
+
export interface CollectedFutureWorkItem {
|
|
130
|
+
index: string;
|
|
131
|
+
name: string;
|
|
132
|
+
done: boolean;
|
|
133
|
+
sourceFile: string;
|
|
134
|
+
sourceInitiativeIndex: string;
|
|
135
|
+
sourceInitiativeName: string;
|
|
136
|
+
}
|
|
137
|
+
/** Future work grouped by source initiative */
|
|
138
|
+
export interface FutureWorkGroup {
|
|
139
|
+
initiativeIndex: string;
|
|
140
|
+
initiativeName: string;
|
|
141
|
+
sourceFile: string;
|
|
142
|
+
items: CollectedFutureWorkItem[];
|
|
143
|
+
totalItems: number;
|
|
144
|
+
pendingItems: number;
|
|
145
|
+
completedItems: number;
|
|
146
|
+
}
|
|
147
|
+
/** Top-level result from FutureWorkCollector.collect() / workflow_future */
|
|
148
|
+
export interface FutureWorkCollectorResult {
|
|
149
|
+
projectPath: string;
|
|
150
|
+
groups: FutureWorkGroup[];
|
|
151
|
+
totalItems: number;
|
|
152
|
+
pendingItems: number;
|
|
153
|
+
completedItems: number;
|
|
154
|
+
markdown: string;
|
|
155
|
+
}
|
|
156
|
+
/** Introspection summary suitable for enriching project_get */
|
|
157
|
+
export interface IntrospectionSummary {
|
|
158
|
+
slicePlan?: {
|
|
159
|
+
totalSlices: number;
|
|
160
|
+
completedSlices: number;
|
|
161
|
+
summary: string;
|
|
162
|
+
};
|
|
163
|
+
currentTasks?: {
|
|
164
|
+
totalTasks: number;
|
|
165
|
+
completedTasks: number;
|
|
166
|
+
inferredStatus: NormalizedStatus;
|
|
167
|
+
summary: string;
|
|
168
|
+
};
|
|
169
|
+
artifacts: {
|
|
170
|
+
hasSlicePlan: boolean;
|
|
171
|
+
hasHLD: boolean;
|
|
172
|
+
hasArch: boolean;
|
|
173
|
+
hasSpec: boolean;
|
|
174
|
+
hasCurrentSliceDesign: boolean;
|
|
175
|
+
hasCurrentTaskFile: boolean;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/introspection/types.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,YAAY,CAAC;AAEzF,kDAAkD;AAClD,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,gBAAgB,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,8CAA8C;AAC9C,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,cAAc,E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,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,+DAA+D;AAC/D,MAAM,WAAW,oBAAoB;IACnC,SAAS,CAAC,EAAE;QACV,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,CAAC;QACxB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,YAAY,CAAC,EAAE;QACb,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,cAAc,EAAE,gBAAgB,CAAC;QACjC,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,SAAS,EAAE;QACT,YAAY,EAAE,OAAO,CAAC;QACtB,MAAM,EAAE,OAAO,CAAC;QAChB,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,EAAE,OAAO,CAAC;QACjB,qBAAqB,EAAE,OAAO,CAAC;QAC/B,kBAAkB,EAAE,OAAO,CAAC;KAC7B,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/introspection/types.ts"],"names":[],"mappings":""}
|
package/dist/node.d.ts
CHANGED
|
@@ -3,4 +3,15 @@ export { SystemPromptParser } from './services/SystemPromptParser.js';
|
|
|
3
3
|
export { ProjectPathService } from './services/ProjectPathService.js';
|
|
4
4
|
export { createContextPipeline } from './services/CoreServiceFactory.js';
|
|
5
5
|
export * from './storage/index.js';
|
|
6
|
+
export * from './config/index.js';
|
|
7
|
+
export * from './guides/index.js';
|
|
8
|
+
export { resolveFileByIndex } from './schema/resolveFileByIndex.js';
|
|
9
|
+
export { ArtifactIntrospector } from './introspection/ArtifactIntrospector.js';
|
|
10
|
+
export { parseFrontmatter } from './introspection/parsers/frontmatterParser.js';
|
|
11
|
+
export { parseSlicePlan } from './introspection/parsers/slicePlanParser.js';
|
|
12
|
+
export { parseTaskItems, parseTaskFile } from './introspection/parsers/taskFileParser.js';
|
|
13
|
+
export { parseFutureWork } from './introspection/parsers/futureWorkParser.js';
|
|
14
|
+
export { detectDocuments, checkFileExists } from './introspection/parsers/documentDetector.js';
|
|
15
|
+
export { buildModel, scanDirectory } from './introspection/ProjectModelBuilder.js';
|
|
16
|
+
export { FutureWorkCollector } from './introspection/FutureWorkCollector.js';
|
|
6
17
|
//# sourceMappingURL=node.d.ts.map
|