@context-forge/core 0.10.7 → 0.11.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.
|
@@ -264,7 +264,7 @@ export class ConsistencyChecker {
|
|
|
264
264
|
severity: 'error',
|
|
265
265
|
location: sliceDesignFullPath,
|
|
266
266
|
description: `Frontmatter status is "complete" but tasks are incomplete (${taskResult.completedTasks}/${taskResult.totalTasks})`,
|
|
267
|
-
suggestedFix: 'Update frontmatter status to "
|
|
267
|
+
suggestedFix: 'Update frontmatter status to "in_progress"',
|
|
268
268
|
fixable: true,
|
|
269
269
|
fixAction: {
|
|
270
270
|
type: 'update-frontmatter',
|
|
@@ -297,7 +297,7 @@ export class ConsistencyChecker {
|
|
|
297
297
|
severity: 'warning',
|
|
298
298
|
location: sliceDesignFullPath,
|
|
299
299
|
description: `Frontmatter status is "not-started" but tasks are in progress (${taskResult.completedTasks}/${taskResult.totalTasks})`,
|
|
300
|
-
suggestedFix: 'Update frontmatter status to "
|
|
300
|
+
suggestedFix: 'Update frontmatter status to "in_progress"',
|
|
301
301
|
fixable: true,
|
|
302
302
|
fixAction: {
|
|
303
303
|
type: 'update-frontmatter',
|
|
@@ -551,7 +551,7 @@ export class ConsistencyChecker {
|
|
|
551
551
|
severity: 'warning',
|
|
552
552
|
location: slicePlanPath,
|
|
553
553
|
description: `Plan status is "complete" but only ${slicePlanResult.completedSlices}/${slicePlanResult.totalSlices} entries are checked`,
|
|
554
|
-
suggestedFix: 'Update plan frontmatter status to "
|
|
554
|
+
suggestedFix: 'Update plan frontmatter status to "in_progress"',
|
|
555
555
|
fixable: true,
|
|
556
556
|
fixAction: {
|
|
557
557
|
type: 'update-frontmatter',
|
|
@@ -631,7 +631,7 @@ export class ConsistencyChecker {
|
|
|
631
631
|
severity: 'warning',
|
|
632
632
|
location: archPath,
|
|
633
633
|
description: `${archLabel} status is "complete" but plan has unchecked entries (${slicePlanResult.completedSlices}/${slicePlanResult.totalSlices})`,
|
|
634
|
-
suggestedFix: `Update ${archLabel} frontmatter status to "
|
|
634
|
+
suggestedFix: `Update ${archLabel} frontmatter status to "in_progress"`,
|
|
635
635
|
fixable: true,
|
|
636
636
|
fixAction: {
|
|
637
637
|
type: 'update-frontmatter',
|
|
@@ -763,7 +763,7 @@ export class ConsistencyChecker {
|
|
|
763
763
|
severity: 'warning',
|
|
764
764
|
location: initiativePlanPath,
|
|
765
765
|
description: `Initiative plan status is "complete" but only ${initiativePlanResult.completedSlices}/${initiativePlanResult.totalSlices} entries are checked`,
|
|
766
|
-
suggestedFix: 'Update initiative plan frontmatter status to "
|
|
766
|
+
suggestedFix: 'Update initiative plan frontmatter status to "in_progress"',
|
|
767
767
|
fixable: true,
|
|
768
768
|
fixAction: {
|
|
769
769
|
type: 'update-frontmatter',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextEmbedder.d.ts","sourceRoot":"","sources":["../../src/services/ContextEmbedder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"ContextEmbedder.d.ts","sourceRoot":"","sources":["../../src/services/ContextEmbedder.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAwDvD;;;;;;;;;;;GAWG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,MAAM,CAAC,CA2CjB"}
|
|
@@ -14,6 +14,17 @@ const EMBEDDABLE_FIELDS = [
|
|
|
14
14
|
'fileSpec',
|
|
15
15
|
'fileConcept',
|
|
16
16
|
];
|
|
17
|
+
/**
|
|
18
|
+
* Conventions files in read-priority order. First match wins — embedding every
|
|
19
|
+
* match would duplicate near-identical always-on rules in a prompt whose entire
|
|
20
|
+
* reason for existing is that the model cannot read files itself.
|
|
21
|
+
*
|
|
22
|
+
* Deliberately not merged with the CLI's TARGETS table (packages/cli/src/commands/
|
|
23
|
+
* setup-ide.ts): that table is a write-ownership map keyed by IDE target; this is a
|
|
24
|
+
* read-priority list with no concept of IDE targets. Coupling them would force core
|
|
25
|
+
* to know about CLI target names just to answer "what are this project's conventions?"
|
|
26
|
+
*/
|
|
27
|
+
const CONVENTIONS_FILES = ['CLAUDE.md', 'AGENTS.md', '.github/copilot-instructions.md'];
|
|
17
28
|
async function resolveAndRead(field, stem, projectPath) {
|
|
18
29
|
const relPath = resolveArtifactPath(field, stem);
|
|
19
30
|
if (!relPath) {
|
|
@@ -58,14 +69,22 @@ export async function embedReferencedFiles(project, projectPath, contextString)
|
|
|
58
69
|
blocks.push(fencedBlock(result.relPath, result.content));
|
|
59
70
|
}
|
|
60
71
|
}
|
|
61
|
-
//
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
|
|
72
|
+
// Embed the project's conventions file — first match in CONVENTIONS_FILES wins
|
|
73
|
+
let conventionsFound = false;
|
|
74
|
+
for (const relPath of CONVENTIONS_FILES) {
|
|
75
|
+
const absPath = join(projectPath, ...relPath.split('/'));
|
|
76
|
+
try {
|
|
77
|
+
const content = await readFile(absPath, 'utf-8');
|
|
78
|
+
blocks.push(fencedBlock(relPath, content));
|
|
79
|
+
conventionsFound = true;
|
|
80
|
+
break;
|
|
81
|
+
}
|
|
82
|
+
catch {
|
|
83
|
+
continue;
|
|
84
|
+
}
|
|
66
85
|
}
|
|
67
|
-
|
|
68
|
-
|
|
86
|
+
if (!conventionsFound) {
|
|
87
|
+
warnings.push(`Warning: no conventions file found (looked for: ${CONVENTIONS_FILES.join(', ')}) — the embedded context has no project conventions`);
|
|
69
88
|
}
|
|
70
89
|
if (blocks.length === 0 && warnings.length === 0)
|
|
71
90
|
return contextString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextEmbedder.js","sourceRoot":"","sources":["../../src/services/ContextEmbedder.ts"],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