@context-forge/core 0.19.18 → 0.19.20
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/adoption/adoptionInputs.d.ts +34 -0
- package/dist/adoption/adoptionInputs.d.ts.map +1 -0
- package/dist/adoption/adoptionInputs.js +62 -0
- package/dist/adoption/adoptionInputs.js.map +1 -0
- package/dist/adoption/adoptionLines.d.ts +16 -0
- package/dist/adoption/adoptionLines.d.ts.map +1 -0
- package/dist/adoption/adoptionLines.js +77 -0
- package/dist/adoption/adoptionLines.js.map +1 -0
- package/dist/adoption/adoptionOutcome.d.ts +29 -17
- package/dist/adoption/adoptionOutcome.d.ts.map +1 -1
- package/dist/adoption/adoptionOutcome.js +23 -15
- package/dist/adoption/adoptionOutcome.js.map +1 -1
- package/dist/adoption/adoptionState.d.ts +13 -6
- package/dist/adoption/adoptionState.d.ts.map +1 -1
- package/dist/adoption/adoptionState.js +22 -15
- package/dist/adoption/adoptionState.js.map +1 -1
- package/dist/adoption/contracts.d.ts +6 -18
- package/dist/adoption/contracts.d.ts.map +1 -1
- package/dist/adoption/contracts.js +8 -5
- package/dist/adoption/contracts.js.map +1 -1
- package/dist/adoption/detectionReport.d.ts +71 -0
- package/dist/adoption/detectionReport.d.ts.map +1 -0
- package/dist/adoption/detectionReport.js +63 -0
- package/dist/adoption/detectionReport.js.map +1 -0
- package/dist/adoption/index.d.ts +5 -3
- package/dist/adoption/index.d.ts.map +1 -1
- package/dist/adoption/index.js +5 -3
- package/dist/adoption/index.js.map +1 -1
- package/dist/adoption/planningFacts.d.ts +15 -0
- package/dist/adoption/planningFacts.d.ts.map +1 -0
- package/dist/adoption/planningFacts.js +24 -0
- package/dist/adoption/planningFacts.js.map +1 -0
- package/dist/adoption/projectDetection.d.ts +5 -0
- package/dist/adoption/projectDetection.d.ts.map +1 -0
- package/dist/adoption/projectDetection.js +94 -0
- package/dist/adoption/projectDetection.js.map +1 -0
- package/dist/config/ConfigKeys.d.ts +6 -2
- package/dist/config/ConfigKeys.d.ts.map +1 -1
- package/dist/config/ConfigKeys.js +9 -6
- package/dist/config/ConfigKeys.js.map +1 -1
- package/dist/config/index.d.ts +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/index.js +1 -1
- package/dist/config/index.js.map +1 -1
- package/dist/detection/index.d.ts +2 -4
- package/dist/detection/index.d.ts.map +1 -1
- package/dist/detection/index.js +2 -4
- package/dist/detection/index.js.map +1 -1
- package/dist/detection/planningArtifacts.d.ts.map +1 -1
- package/dist/detection/planningArtifacts.js +1 -2
- package/dist/detection/planningArtifacts.js.map +1 -1
- package/dist/detection/presentPaths.d.ts.map +1 -1
- package/dist/detection/presentPaths.js +4 -3
- package/dist/detection/presentPaths.js.map +1 -1
- package/dist/detection/sourceVolume.d.ts.map +1 -1
- package/dist/detection/sourceVolume.js +1 -3
- package/dist/detection/sourceVolume.js.map +1 -1
- package/dist/guides/GuideManager.d.ts +4 -0
- package/dist/guides/GuideManager.d.ts.map +1 -1
- package/dist/guides/GuideManager.js +8 -1
- package/dist/guides/GuideManager.js.map +1 -1
- package/dist/guides/guideMinimum.d.ts +1 -1
- package/dist/guides/guideMinimum.js +1 -1
- package/dist/guides/index.d.ts +1 -1
- package/dist/guides/index.d.ts.map +1 -1
- package/dist/guides/index.js +1 -1
- package/dist/guides/index.js.map +1 -1
- package/dist/introspection/ArtifactIntrospector.d.ts +2 -6
- package/dist/introspection/ArtifactIntrospector.d.ts.map +1 -1
- package/dist/introspection/ArtifactIntrospector.js +3 -22
- package/dist/introspection/ArtifactIntrospector.js.map +1 -1
- package/dist/introspection/WorkflowNavigator.d.ts +1 -8
- package/dist/introspection/WorkflowNavigator.d.ts.map +1 -1
- package/dist/introspection/WorkflowNavigator.js +7 -44
- package/dist/introspection/WorkflowNavigator.js.map +1 -1
- package/dist/introspection/adoptionNavigation.d.ts +8 -10
- package/dist/introspection/adoptionNavigation.d.ts.map +1 -1
- package/dist/introspection/adoptionNavigation.js +67 -71
- package/dist/introspection/adoptionNavigation.js.map +1 -1
- package/dist/introspection/parsers/projectGuideFile.d.ts +9 -0
- package/dist/introspection/parsers/projectGuideFile.d.ts.map +1 -0
- package/dist/introspection/parsers/projectGuideFile.js +24 -0
- package/dist/introspection/parsers/projectGuideFile.js.map +1 -0
- package/dist/node.js +1 -1
- package/dist/node.js.map +1 -1
- package/dist/onboarding/onboardRecipe.d.ts +4 -2
- package/dist/onboarding/onboardRecipe.d.ts.map +1 -1
- package/dist/onboarding/onboardRecipe.js +7 -2
- package/dist/onboarding/onboardRecipe.js.map +1 -1
- package/dist/schema/frontmatterSchema.d.ts +2 -0
- package/dist/schema/frontmatterSchema.d.ts.map +1 -1
- package/dist/schema/frontmatterSchema.js +4 -2
- package/dist/schema/frontmatterSchema.js.map +1 -1
- package/dist/services/ContextIntegrator.d.ts +1 -4
- package/dist/services/ContextIntegrator.d.ts.map +1 -1
- package/dist/services/ContextIntegrator.js +2 -20
- package/dist/services/ContextIntegrator.js.map +1 -1
- package/dist/services/ContextTemplateEngine.d.ts.map +1 -1
- package/dist/services/ContextTemplateEngine.js +0 -10
- package/dist/services/ContextTemplateEngine.js.map +1 -1
- package/dist/services/CoreServiceFactory.d.ts +1 -10
- package/dist/services/CoreServiceFactory.d.ts.map +1 -1
- package/dist/services/CoreServiceFactory.js +2 -11
- package/dist/services/CoreServiceFactory.js.map +1 -1
- package/dist/services/SectionBuilder.d.ts.map +1 -1
- package/dist/services/SectionBuilder.js +0 -3
- package/dist/services/SectionBuilder.js.map +1 -1
- package/dist/services/SystemPromptParser.d.ts +5 -0
- package/dist/services/SystemPromptParser.d.ts.map +1 -1
- package/dist/services/SystemPromptParser.js +19 -0
- package/dist/services/SystemPromptParser.js.map +1 -1
- package/dist/types/context.d.ts +0 -4
- package/dist/types/context.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/adoption/adoptionCompletion.d.ts +0 -16
- package/dist/adoption/adoptionCompletion.d.ts.map +0 -1
- package/dist/adoption/adoptionCompletion.js +0 -37
- package/dist/adoption/adoptionCompletion.js.map +0 -1
- package/dist/adoption/adoptionFacts.d.ts +0 -25
- package/dist/adoption/adoptionFacts.d.ts.map +0 -1
- package/dist/adoption/adoptionFacts.js +0 -149
- package/dist/adoption/adoptionFacts.js.map +0 -1
- package/dist/adoption/adoptionResolver.d.ts +0 -8
- package/dist/adoption/adoptionResolver.d.ts.map +0 -1
- package/dist/adoption/adoptionResolver.js +0 -152
- package/dist/adoption/adoptionResolver.js.map +0 -1
- package/dist/detection/squadronProbe.d.ts +0 -56
- package/dist/detection/squadronProbe.d.ts.map +0 -1
- package/dist/detection/squadronProbe.js +0 -103
- package/dist/detection/squadronProbe.js.map +0 -1
|
@@ -1,65 +1,61 @@
|
|
|
1
1
|
// Adoption-aware navigation for `cf next` (slice 264). Reads adoption.state (261) and the
|
|
2
2
|
// existing-state slice plan (263) and decides what the navigator recommends. Read-only (D3).
|
|
3
|
-
import { basename, join, resolve } from
|
|
4
|
-
import { readAdoptionState } from
|
|
5
|
-
import { pathPresent } from
|
|
6
|
-
import { fileIndexOf, findArchitectureArtifacts,
|
|
7
|
-
import { CONCEPT_PHASE, SLICE_PLANNING_PHASE, resolvePhaseValue } from
|
|
8
|
-
import { resolveArtifactPath } from
|
|
9
|
-
import { findExistingStatePlan } from
|
|
10
|
-
import { findFirstNotCompleteEntry } from
|
|
11
|
-
const DECLINE_COMMAND =
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
`To mark the project as new and silence this: ${DECLINE_COMMAND}`;
|
|
15
|
-
export const NO_EXISTING_STATE_PLAN_WARNING = 'adoption.state is complete, but no slice plan with retroactive entries was found. ' +
|
|
16
|
-
'To write it: cf config set adoption.state in_progress, then cf build. ' +
|
|
3
|
+
import { basename, join, resolve } from "path";
|
|
4
|
+
import { readAdoptionState } from "../adoption/adoptionState.js";
|
|
5
|
+
import { pathPresent } from "../detection/pathPresent.js";
|
|
6
|
+
import { fileIndexOf, findArchitectureArtifacts, } from "../detection/planningArtifacts.js";
|
|
7
|
+
import { CONCEPT_PHASE, SLICE_PLANNING_PHASE, resolvePhaseValue, } from "../schema/projectSchema.js";
|
|
8
|
+
import { resolveArtifactPath } from "../schema/resolveFileByIndex.js";
|
|
9
|
+
import { findExistingStatePlan } from "./parsers/existingStatePlan.js";
|
|
10
|
+
import { findFirstNotCompleteEntry } from "./statusDerivation.js";
|
|
11
|
+
const DECLINE_COMMAND = "cf config set adoption.state declined";
|
|
12
|
+
export const NO_EXISTING_STATE_PLAN_WARNING = "adoption.state is complete, but no slice plan with retroactive entries was found. " +
|
|
13
|
+
"To write it: cf config set adoption.state in_progress, then cf build. " +
|
|
17
14
|
`To treat the project as new: ${DECLINE_COMMAND}`;
|
|
18
15
|
export function outsideConceptPhaseWarning(instruction) {
|
|
19
16
|
return (`adoption.state is in_progress, but the instruction is '${instruction}'. ` +
|
|
20
|
-
|
|
17
|
+
"The brownfield adoption prompt runs only in Phase 0. " +
|
|
21
18
|
`To resume adoption: cf set phase '${CONCEPT_PHASE}'. To stop adopting: ${DECLINE_COMMAND}`);
|
|
22
19
|
}
|
|
23
|
-
const NOT_ADOPTING = { kind:
|
|
24
|
-
/** D2: only where today's advice would skip detection on a possibly existing codebase. */
|
|
25
|
-
function decideUnset(inputs) {
|
|
26
|
-
const detectionPending = inputs.conceptInstruction && inputs.conceptExists && !inputs.planningArtifactsExist;
|
|
27
|
-
return detectionPending ? { kind: 'warn', warning: UNSET_STATE_WARNING } : NOT_ADOPTING;
|
|
28
|
-
}
|
|
20
|
+
const NOT_ADOPTING = { kind: "not-adopting" };
|
|
29
21
|
/** D4 (the first matching row decides) and D5. */
|
|
30
22
|
function decideInProgress(inputs) {
|
|
31
23
|
if (!inputs.conceptInstruction)
|
|
32
|
-
return {
|
|
24
|
+
return {
|
|
25
|
+
kind: "warn",
|
|
26
|
+
warning: outsideConceptPhaseWarning(inputs.instruction),
|
|
27
|
+
};
|
|
33
28
|
if (inputs.existingStatePlanPath)
|
|
34
|
-
return { kind:
|
|
29
|
+
return { kind: "recommend", step: "record-completion" };
|
|
35
30
|
if (!inputs.conceptExists)
|
|
36
|
-
return { kind:
|
|
31
|
+
return { kind: "recommend", step: "concept" };
|
|
37
32
|
if (inputs.architecturePaths.length === 0)
|
|
38
|
-
return { kind:
|
|
39
|
-
return { kind:
|
|
33
|
+
return { kind: "recommend", step: "architecture" };
|
|
34
|
+
return { kind: "recommend", step: "existing-state-plan" };
|
|
40
35
|
}
|
|
41
36
|
/** D6 (the first matching row decides). */
|
|
42
37
|
function decideComplete(inputs) {
|
|
43
38
|
if (!inputs.existingStatePlanPath)
|
|
44
|
-
return { kind:
|
|
39
|
+
return { kind: "warn", warning: NO_EXISTING_STATE_PLAN_WARNING };
|
|
45
40
|
if (!inputs.registeredPlanPath)
|
|
46
|
-
return { kind:
|
|
47
|
-
const registeredIsExistingState = resolve(inputs.registeredPlanPath) ===
|
|
41
|
+
return { kind: "recommend", step: "register-plan" };
|
|
42
|
+
const registeredIsExistingState = resolve(inputs.registeredPlanPath) ===
|
|
43
|
+
resolve(inputs.existingStatePlanPath);
|
|
48
44
|
if (registeredIsExistingState && !inputs.registeredPlanHasOpenEntry) {
|
|
49
|
-
return { kind:
|
|
45
|
+
return { kind: "recommend", step: "plan-new-work" };
|
|
50
46
|
}
|
|
51
|
-
return { kind:
|
|
47
|
+
return { kind: "adopted" };
|
|
52
48
|
}
|
|
53
49
|
/** Pure: decides the adoption recommendation from gathered inputs. */
|
|
54
50
|
export function decideAdoptionNav(inputs) {
|
|
55
51
|
switch (inputs.state) {
|
|
56
|
-
|
|
52
|
+
// Unset carries no warning: the old one advised cf build to start adoption, which it no longer does (268).
|
|
53
|
+
case "declined":
|
|
54
|
+
case "":
|
|
57
55
|
return NOT_ADOPTING;
|
|
58
|
-
case
|
|
59
|
-
return decideUnset(inputs);
|
|
60
|
-
case 'in_progress':
|
|
56
|
+
case "in_progress":
|
|
61
57
|
return decideInProgress(inputs);
|
|
62
|
-
case
|
|
58
|
+
case "complete":
|
|
63
59
|
return decideComplete(inputs);
|
|
64
60
|
default: {
|
|
65
61
|
const unhandled = inputs.state;
|
|
@@ -67,41 +63,43 @@ export function decideAdoptionNav(inputs) {
|
|
|
67
63
|
}
|
|
68
64
|
}
|
|
69
65
|
}
|
|
70
|
-
const BUILD_COMMAND =
|
|
66
|
+
const BUILD_COMMAND = "cf build";
|
|
71
67
|
/** Shared by the four D4 steps: every one is `cf build`, which resumes from the artifacts present. */
|
|
72
|
-
const BUILD_RATIONALE =
|
|
68
|
+
const BUILD_RATIONALE = "cf build assembles the brownfield adoption prompt, which resumes from the artifacts that exist. " +
|
|
73
69
|
`To stop adopting: ${DECLINE_COMMAND}`;
|
|
74
70
|
const BUILD_STEP_RECOMMENDATIONS = {
|
|
75
|
-
concept:
|
|
76
|
-
architecture:
|
|
77
|
-
|
|
78
|
-
|
|
71
|
+
concept: "Next adoption step: baseline concept.",
|
|
72
|
+
architecture: "Next adoption step: architecture derived from the code.",
|
|
73
|
+
"existing-state-plan": "Next adoption step: existing-state slice plan.",
|
|
74
|
+
"record-completion": "The existing-state slice plan is written. Run cf build to record adoption as complete.",
|
|
79
75
|
};
|
|
80
76
|
function stem(path) {
|
|
81
|
-
return basename(path,
|
|
77
|
+
return basename(path, ".md");
|
|
82
78
|
}
|
|
83
79
|
function buildRegisterPlanAction(inputs) {
|
|
84
80
|
const plan = inputs.existingStatePlanPath;
|
|
85
81
|
if (!plan)
|
|
86
|
-
throw new Error(
|
|
82
|
+
throw new Error("register-plan requires an existing-state plan path");
|
|
87
83
|
const sameIndexArch = inputs.architecturePaths.find((path) => fileIndexOf(path) === fileIndexOf(plan));
|
|
88
|
-
const suggestedCommand = sameIndexArch
|
|
84
|
+
const suggestedCommand = sameIndexArch
|
|
85
|
+
? `cf set arch ${stem(sameIndexArch)}`
|
|
86
|
+
: `cf set plan ${stem(plan)}`;
|
|
89
87
|
return {
|
|
90
|
-
recommendation:
|
|
88
|
+
recommendation: "Adoption is complete. Register the derived architecture and existing-state slice plan.",
|
|
91
89
|
rationale: sameIndexArch
|
|
92
|
-
?
|
|
93
|
-
:
|
|
90
|
+
? "Setting the architecture also sets the slice plan that shares its index."
|
|
91
|
+
: "No architecture shares the plan index, so register the slice plan on its own.",
|
|
94
92
|
suggestedCommand,
|
|
95
|
-
summary:
|
|
93
|
+
summary: "Register the existing-state architecture and slice plan",
|
|
96
94
|
};
|
|
97
95
|
}
|
|
98
96
|
function buildPlanNewWorkAction(inputs) {
|
|
99
97
|
const plan = inputs.existingStatePlanPath;
|
|
100
98
|
if (!plan)
|
|
101
|
-
throw new Error(
|
|
99
|
+
throw new Error("plan-new-work requires an existing-state plan path");
|
|
102
100
|
return {
|
|
103
101
|
recommendation: `Adoption is complete. Every entry in ${stem(plan)} is recorded history. ` +
|
|
104
|
-
|
|
102
|
+
"Plan the first new work as entries after the retroactive ones.",
|
|
105
103
|
rationale: `Then run cf build to plan the new slices, or cf build alone if the phase is already ${SLICE_PLANNING_PHASE}.`,
|
|
106
104
|
suggestedCommand: `cf set phase '${SLICE_PLANNING_PHASE}'`,
|
|
107
105
|
summary: `Plan new work in ${stem(plan)}`,
|
|
@@ -110,19 +108,19 @@ function buildPlanNewWorkAction(inputs) {
|
|
|
110
108
|
/** Pure: the action for a recommended step. The navigator runs the D4 arch gate before using it (R6). */
|
|
111
109
|
export function buildAdoptionStepAction(step, inputs) {
|
|
112
110
|
switch (step) {
|
|
113
|
-
case
|
|
114
|
-
case
|
|
115
|
-
case
|
|
116
|
-
case
|
|
111
|
+
case "concept":
|
|
112
|
+
case "architecture":
|
|
113
|
+
case "existing-state-plan":
|
|
114
|
+
case "record-completion":
|
|
117
115
|
return {
|
|
118
116
|
recommendation: BUILD_STEP_RECOMMENDATIONS[step],
|
|
119
117
|
rationale: BUILD_RATIONALE,
|
|
120
118
|
suggestedCommand: BUILD_COMMAND,
|
|
121
119
|
summary: BUILD_STEP_RECOMMENDATIONS[step],
|
|
122
120
|
};
|
|
123
|
-
case
|
|
121
|
+
case "register-plan":
|
|
124
122
|
return buildRegisterPlanAction(inputs);
|
|
125
|
-
case
|
|
123
|
+
case "plan-new-work":
|
|
126
124
|
return buildPlanNewWorkAction(inputs);
|
|
127
125
|
default: {
|
|
128
126
|
const unhandled = step;
|
|
@@ -134,7 +132,7 @@ export function buildAdoptionStepAction(step, inputs) {
|
|
|
134
132
|
function resolveRegisteredPlan(project, projectPath) {
|
|
135
133
|
if (!project.fileSlicePlan)
|
|
136
134
|
return null;
|
|
137
|
-
const relative = resolveArtifactPath(
|
|
135
|
+
const relative = resolveArtifactPath("fileSlicePlan", project.fileSlicePlan);
|
|
138
136
|
if (relative === null)
|
|
139
137
|
return null;
|
|
140
138
|
const absolute = join(projectPath, relative);
|
|
@@ -147,37 +145,35 @@ function resolveRegisteredPlan(project, projectPath) {
|
|
|
147
145
|
export async function gatherAdoptionInputs(project, status, conceptExists) {
|
|
148
146
|
const projectPath = project.projectPath;
|
|
149
147
|
if (!projectPath)
|
|
150
|
-
throw new Error(
|
|
151
|
-
const instruction = project.instruction ??
|
|
148
|
+
throw new Error("gatherAdoptionInputs requires project.projectPath");
|
|
149
|
+
const instruction = project.instruction ?? "";
|
|
152
150
|
const inputs = {
|
|
153
151
|
state: await readAdoptionState(projectPath),
|
|
154
152
|
conceptInstruction: resolvePhaseValue(instruction) === CONCEPT_PHASE,
|
|
155
153
|
instruction,
|
|
156
154
|
conceptExists,
|
|
157
|
-
planningArtifactsExist: false,
|
|
158
155
|
architecturePaths: [],
|
|
159
156
|
existingStatePlanPath: null,
|
|
160
157
|
registeredPlanPath: null,
|
|
161
158
|
registeredPlanHasOpenEntry: false,
|
|
162
159
|
};
|
|
163
160
|
switch (inputs.state) {
|
|
164
|
-
case
|
|
165
|
-
|
|
166
|
-
case '':
|
|
167
|
-
if (inputs.conceptInstruction && conceptExists) {
|
|
168
|
-
inputs.planningArtifactsExist = (await findPlanningArtifacts(projectPath)).length > 0;
|
|
169
|
-
}
|
|
161
|
+
case "declined":
|
|
162
|
+
case "":
|
|
170
163
|
return inputs;
|
|
171
|
-
case
|
|
172
|
-
case
|
|
164
|
+
case "in_progress":
|
|
165
|
+
case "complete": {
|
|
173
166
|
inputs.architecturePaths = await findArchitectureArtifacts(projectPath);
|
|
174
167
|
inputs.existingStatePlanPath = await findExistingStatePlan(projectPath);
|
|
175
168
|
inputs.registeredPlanPath = resolveRegisteredPlan(project, projectPath);
|
|
176
169
|
const registeredIsExistingState = inputs.registeredPlanPath !== null &&
|
|
177
170
|
inputs.existingStatePlanPath !== null &&
|
|
178
|
-
resolve(inputs.registeredPlanPath) ===
|
|
171
|
+
resolve(inputs.registeredPlanPath) ===
|
|
172
|
+
resolve(inputs.existingStatePlanPath);
|
|
179
173
|
if (registeredIsExistingState) {
|
|
180
|
-
inputs.registeredPlanHasOpenEntry =
|
|
174
|
+
inputs.registeredPlanHasOpenEntry =
|
|
175
|
+
findFirstNotCompleteEntry(status.slicePlan?.entries ?? []) !==
|
|
176
|
+
undefined;
|
|
181
177
|
}
|
|
182
178
|
return inputs;
|
|
183
179
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adoptionNavigation.js","sourceRoot":"","sources":["../../src/introspection/adoptionNavigation.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,6FAA6F;AAC7F,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,OAAO,
|
|
1
|
+
{"version":3,"file":"adoptionNavigation.js","sourceRoot":"","sources":["../../src/introspection/adoptionNavigation.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,6FAA6F;AAC7F,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8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0B;oBAC/B,yBAAyB,CAAC,MAAM,CAAC,SAAS,EAAE,OAAO,IAAI,EAAE,CAAC;wBAC1D,SAAS,CAAC;YACd,CAAC;YACD,OAAO,MAAM,CAAC;QAChB,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,SAAS,GAAU,MAAM,CAAC,KAAK,CAAC;YACtC,MAAM,IAAI,KAAK,CAAC,6BAA6B,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QACpE,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Find the first file in the project's project-guides directory matching `pattern`. */
|
|
2
|
+
export declare function findProjectGuideFile(projectPath: string, pattern: RegExp): Promise<string | null>;
|
|
3
|
+
/**
|
|
4
|
+
* Locate the concept file for a project.
|
|
5
|
+
* Convention: project-documents/user/project-guides/000-concept.*.md
|
|
6
|
+
* Returns the full path, or null if not found.
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveConceptPath(projectPath: string): Promise<string | null>;
|
|
9
|
+
//# sourceMappingURL=projectGuideFile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectGuideFile.d.ts","sourceRoot":"","sources":["../../../src/introspection/parsers/projectGuideFile.ts"],"names":[],"mappings":"AAGA,wFAAwF;AACxF,wBAAsB,oBAAoB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAUvG;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAE9E"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { readdir } from 'node:fs/promises';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
/** Find the first file in the project's project-guides directory matching `pattern`. */
|
|
4
|
+
export async function findProjectGuideFile(projectPath, pattern) {
|
|
5
|
+
const guidesDir = join(projectPath, 'project-documents/user/project-guides');
|
|
6
|
+
try {
|
|
7
|
+
const files = await readdir(guidesDir);
|
|
8
|
+
const match = files.find((f) => pattern.test(f));
|
|
9
|
+
return match ? join(guidesDir, match) : null;
|
|
10
|
+
}
|
|
11
|
+
catch {
|
|
12
|
+
// Missing directory means the artifact has not been created yet
|
|
13
|
+
return null;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Locate the concept file for a project.
|
|
18
|
+
* Convention: project-documents/user/project-guides/000-concept.*.md
|
|
19
|
+
* Returns the full path, or null if not found.
|
|
20
|
+
*/
|
|
21
|
+
export function resolveConceptPath(projectPath) {
|
|
22
|
+
return findProjectGuideFile(projectPath, /^000-concept\..*\.md$/i);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=projectGuideFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"projectGuideFile.js","sourceRoot":"","sources":["../../../src/introspection/parsers/projectGuideFile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,wFAAwF;AACxF,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,WAAmB,EAAE,OAAe;IAC7E,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,EAAE,uCAAuC,CAAC,CAAC;IAC7E,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,CAAC;QACvC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,OAAO,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/C,CAAC;IAAC,MAAM,CAAC;QACP,gEAAgE;QAChE,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAmB;IACpD,OAAO,oBAAoB,CAAC,WAAW,EAAE,wBAAwB,CAAC,CAAC;AACrE,CAAC"}
|
package/dist/node.js
CHANGED
|
@@ -34,7 +34,7 @@ export { ConsistencyChecker } from './introspection/ConsistencyChecker.js';
|
|
|
34
34
|
export { updateCheckbox, updateFrontmatterField } from './introspection/writers/markdownWriter.js';
|
|
35
35
|
// Detection — project-folder facts (CI, build manifests); fs dependent
|
|
36
36
|
export * from './detection/index.js';
|
|
37
|
-
// Adoption — brownfield adoption state, outcome and
|
|
37
|
+
// Adoption — brownfield adoption state read, outcome and AdoptionError; fs dependent
|
|
38
38
|
export * from './adoption/index.js';
|
|
39
39
|
// Rule reconciliation — rule resolutions, project rule sources, managed markers; fs dependent
|
|
40
40
|
export * from './ruleReconciliation/index.js';
|
package/dist/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/node.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,oEAAoE;AACpE,uEAAuE;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AAEnF,0EAA0E;AAC1E,cAAc,oBAAoB,CAAC;AAEnC,8DAA8D;AAC9D,cAAc,mBAAmB,CAAC;AAElC,yDAAyD;AACzD,cAAc,mBAAmB,CAAC;AAElC,8DAA8D;AAC9D,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,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
|
@@ -14,9 +14,11 @@ export interface OnboardSurfaceProfile {
|
|
|
14
14
|
setupRun: string;
|
|
15
15
|
/** Step 2: what to do when `cf init` cannot be run (ends with the no-`git init` note). */
|
|
16
16
|
setupFallback: string;
|
|
17
|
-
/** Step 3: how to run the
|
|
17
|
+
/** Step 3: how to run the codebase detection on this surface. */
|
|
18
|
+
detectionRun: string;
|
|
19
|
+
/** Step 4: how to run the build on this surface. */
|
|
18
20
|
buildHandoff: string;
|
|
19
|
-
/** Step
|
|
21
|
+
/** Step 4: how this surface refers to the "what next" command. */
|
|
20
22
|
nextHint: string;
|
|
21
23
|
/** Closing note on tool failure, or '' for none. */
|
|
22
24
|
failureNote: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboardRecipe.d.ts","sourceRoot":"","sources":["../../src/onboarding/onboardRecipe.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,aAAa,GAAG,UAAU,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,eAAe,EAAE,OAAO,CAAC;IACzB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,aAAa,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,6IAC+G,CAAC;AAmB7I,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,cAAc,EAAE,qBAAqB,
|
|
1
|
+
{"version":3,"file":"onboardRecipe.d.ts","sourceRoot":"","sources":["../../src/onboarding/onboardRecipe.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,cAAc,GAAG,gBAAgB,GAAG,aAAa,GAAG,UAAU,CAAC;AAE3E,MAAM,WAAW,qBAAqB;IACpC,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,eAAe,EAAE,OAAO,CAAC;IACzB,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,QAAQ,EAAE,MAAM,CAAC;IACjB,0FAA0F;IAC1F,aAAa,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,YAAY,EAAE,MAAM,CAAC;IACrB,oDAAoD;IACpD,YAAY,EAAE,MAAM,CAAC;IACrB,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,sEAAsE;AACtE,eAAO,MAAM,gBAAgB,6IAC+G,CAAC;AAmB7I,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,cAAc,EAAE,qBAAqB,CA4C1E,CAAC;AAgBF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,CASnE"}
|
|
@@ -6,7 +6,7 @@ export const GENERATED_NOTICE = '<!-- Generated from @context-forge/core onboard
|
|
|
6
6
|
const CLAUDE_FRONTMATTER = `---
|
|
7
7
|
description: Guide a user through Context Forge project setup and into their first phase of work
|
|
8
8
|
argument-hint: [project-name]
|
|
9
|
-
allowed-tools: Bash(cf:*), mcp__context-forge__project_list, mcp__context-forge__project_create, mcp__context-forge__project_get, mcp__context-forge__guide_status, mcp__context-forge__guide_install, mcp__context-forge__context_build, mcp__context-forge__workflow_next
|
|
9
|
+
allowed-tools: Bash(cf:*), mcp__context-forge__project_list, mcp__context-forge__project_create, mcp__context-forge__project_get, mcp__context-forge__guide_status, mcp__context-forge__guide_install, mcp__context-forge__project_detect, mcp__context-forge__context_build, mcp__context-forge__workflow_next
|
|
10
10
|
---`;
|
|
11
11
|
const SKILL_FRONTMATTER = `---
|
|
12
12
|
name: cf-onboard
|
|
@@ -23,6 +23,7 @@ export const ONBOARD_SURFACES = {
|
|
|
23
23
|
nameProvided: 'If a project name argument\nwas provided with the command, use that.',
|
|
24
24
|
setupRun: '**Primary:** Run `cf init --name <name>` via the shell.',
|
|
25
25
|
setupFallback: `**MCP fallback** (if shell access is unavailable):\n${MCP_FALLBACK_STEPS}\n${NO_GIT_INIT_NOTE}`,
|
|
26
|
+
detectionRun: '**MCP:** Call `project_detect` with `path` set to the current directory.\n**CLI:** Run `cf detect --json`.',
|
|
26
27
|
buildHandoff: '**MCP:** Call `context_build`.\n**CLI:** Run `cf build`.',
|
|
27
28
|
nextHint: '`cf next` (or `/cf:next`)',
|
|
28
29
|
failureNote: 'If any MCP tool call fails, fall back to the CLI equivalent.',
|
|
@@ -35,6 +36,7 @@ export const ONBOARD_SURFACES = {
|
|
|
35
36
|
nameProvided: 'If they provided a name\nwith the request, use that.',
|
|
36
37
|
setupRun: 'Run `cf init --name <name>`.',
|
|
37
38
|
setupFallback: `If the Context Forge MCP server is configured and shell access is\nunavailable, fall back to its tools:\n${MCP_FALLBACK_STEPS}\n${NO_GIT_INIT_NOTE}`,
|
|
39
|
+
detectionRun: 'Run `cf detect --json`.',
|
|
38
40
|
buildHandoff: 'Run `cf build`.',
|
|
39
41
|
nextHint: '`cf next` (or the `cf-next` skill)',
|
|
40
42
|
failureNote: 'If an MCP tool call fails, fall back to the CLI equivalent.',
|
|
@@ -47,6 +49,7 @@ export const ONBOARD_SURFACES = {
|
|
|
47
49
|
nameProvided: 'If a project name argument\nwas provided, use that.',
|
|
48
50
|
setupRun: 'Run `cf init --name <name>` via the shell.',
|
|
49
51
|
setupFallback: `If shell access is unavailable, fall back to the MCP path:\n${MCP_FALLBACK_STEPS}\n${NO_GIT_INIT_NOTE}`,
|
|
52
|
+
detectionRun: 'Call `project_detect` with `path` set to the current directory.',
|
|
50
53
|
buildHandoff: 'Call `context_build`.',
|
|
51
54
|
nextHint: '`workflow_next` (or `cf next` on the CLI)',
|
|
52
55
|
failureNote: '',
|
|
@@ -58,7 +61,9 @@ function renderBody(profile) {
|
|
|
58
61
|
`## Step 1 — Detect existing project\n\nCheck whether a Context Forge project is already registered at the current\nworking directory.\n\n${profile.registrationCheck}\n\n- If a project exists at this path → skip to Step 3.\n- If no project exists → continue to Step 2.`,
|
|
59
62
|
// No example name here on purpose: an example would be used when the user gives none.
|
|
60
63
|
`## Step 2 — Set up the project\n\nAsk the user what they'd like to name their project. ${profile.nameProvided}\nIf the user declines to choose, use the current directory name.\n\n${profile.setupRun} This single command handles\neverything: git initialization, project registration, guide installation,\ncommand installation, and IDE setup.\n\n**Important:** Do not rely on environment context (like "Is a git repository")\nto determine git status — \`cf init\` checks the actual directory and handles\ngit initialization itself.\n\n${profile.setupFallback}`,
|
|
61
|
-
|
|
64
|
+
// The recipe holds no adoption wording and no example notice: the report's own `notices` are the message.
|
|
65
|
+
`## Step 3 — Check the codebase\n\nJudge the current directory before starting any concept conversation.\n\n${profile.detectionRun}\n\nThe result is a JSON report with an \`outcome\`, or an error object with an \`error\` field.\n\n- If \`outcome\` is \`brownfield\` or \`adoption-incomplete\` → print each entry of \`notices\` exactly as given, then stop. Do not build the context prompt and do not start a concept conversation.\n- If the result is an error object → show its \`message\` and stop.\n- Otherwise → continue to Step 4.`,
|
|
66
|
+
`## Step 4 — Hand off to the context prompt\n\nThe project is set up. Build the context prompt:\n\n${profile.buildHandoff}\n\nUse the returned prompt as your working context and follow it; it starts the\nconversation, so do not open with questions of your own.\n\nYou can run ${profile.nextHint} anytime to see what to do next. It adapts as\nyour project progresses.`,
|
|
62
67
|
];
|
|
63
68
|
if (profile.failureNote)
|
|
64
69
|
blocks.push(`## Notes\n\n- ${profile.failureNote}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"onboardRecipe.js","sourceRoot":"","sources":["../../src/onboarding/onboardRecipe.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,qFAAqF;AACrF,gEAAgE;
|
|
1
|
+
{"version":3,"file":"onboardRecipe.js","sourceRoot":"","sources":["../../src/onboarding/onboardRecipe.ts"],"names":[],"mappings":"AAAA,sFAAsF;AACtF,qFAAqF;AACrF,gEAAgE;AA6BhE,sEAAsE;AACtE,MAAM,CAAC,MAAM,gBAAgB,GAC3B,0IAA0I,CAAC;AAE7I,MAAM,kBAAkB,GAAG;;;;IAIvB,CAAC;AAEL,MAAM,iBAAiB,GAAG;;;IAGtB,CAAC;AAEL,MAAM,gBAAgB,GACpB,6IAA6I,CAAC;AAEhJ,MAAM,kBAAkB,GACtB,6HAA6H,CAAC;AAEhI,MAAM,CAAC,MAAM,gBAAgB,GAAkD;IAC7E,gBAAgB,EAAE;QAChB,WAAW,EAAE,kBAAkB;QAC/B,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,EAAE;QACX,iBAAiB,EACf,oKAAoK;QACtK,YAAY,EAAE,sEAAsE;QACpF,QAAQ,EAAE,yDAAyD;QACnE,aAAa,EAAE,uDAAuD,kBAAkB,KAAK,gBAAgB,EAAE;QAC/G,YAAY,EACV,4GAA4G;QAC9G,YAAY,EAAE,0DAA0D;QACxE,QAAQ,EAAE,2BAA2B;QACrC,WAAW,EAAE,8DAA8D;KAC5E;IACD,aAAa,EAAE;QACb,WAAW,EAAE,iBAAiB;QAC9B,eAAe,EAAE,IAAI;QACrB,OAAO,EAAE,yBAAyB;QAClC,iBAAiB,EACf,6CAA6C;QAC/C,YAAY,EAAE,sDAAsD;QACpE,QAAQ,EAAE,8BAA8B;QACxC,aAAa,EAAE,4GAA4G,kBAAkB,KAAK,gBAAgB,EAAE;QACpK,YAAY,EAAE,yBAAyB;QACvC,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AC,OAAO,CAAC,CAAC;IACpG,IAAI,IAAI,CAAC,MAAM;QAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9C,IAAI,OAAO,CAAC,OAAO;QAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAClD,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC;IACpC,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;AACpC,CAAC"}
|
|
@@ -27,6 +27,8 @@ export interface FrontmatterFinding {
|
|
|
27
27
|
}
|
|
28
28
|
/** Canonical valid status values across all docTypes. */
|
|
29
29
|
export declare const VALID_STATUSES: ("in_progress" | "complete" | "not_started" | "deprecated" | "deferred")[];
|
|
30
|
+
/** The architecture `provenance` value marking an architecture derived from an existing system. */
|
|
31
|
+
export declare const DERIVED_PROVENANCE = "derived";
|
|
30
32
|
/** Per-docType frontmatter schemas — required fields only. */
|
|
31
33
|
export declare const FRONTMATTER_SCHEMAS: Record<string, DocTypeSchema>;
|
|
32
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatterSchema.d.ts","sourceRoot":"","sources":["../../src/schema/frontmatterSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,8DAA8D;AAC9D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;CAC7C;AAED,oEAAoE;AACpE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,SAAS,GAAG,OAAO,CAAC;IAC9B,QA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AAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;CAC5D;AAED,yDAAyD;AACzD,eAAO,MAAM,cAAc,4EAAwB,CAAC;AAEpD,mGAAmG;AACnG,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,8DAA8D;AAC9D,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA8G7D,CAAC;AAgBF;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAKpE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAuB5E;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,OAAO,CAAC,EAAE;IAAE,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,GACjC,kBAAkB,EAAE,CA+FtB"}
|
|
@@ -7,6 +7,8 @@ import { STATUS } from '../introspection/types.js';
|
|
|
7
7
|
import { suggestStatus } from '../introspection/parsers/statusNormalizer.js';
|
|
8
8
|
/** Canonical valid status values across all docTypes. */
|
|
9
9
|
export const VALID_STATUSES = Object.values(STATUS);
|
|
10
|
+
/** The architecture `provenance` value marking an architecture derived from an existing system. */
|
|
11
|
+
export const DERIVED_PROVENANCE = 'derived';
|
|
10
12
|
/** Per-docType frontmatter schemas — required fields only. */
|
|
11
13
|
export const FRONTMATTER_SCHEMAS = {
|
|
12
14
|
concept: {
|
|
@@ -37,8 +39,8 @@ export const FRONTMATTER_SCHEMAS = {
|
|
|
37
39
|
dateCreated: { required: true },
|
|
38
40
|
dateUpdated: { required: true },
|
|
39
41
|
// Marks an architecture derived from an existing system (slice 263 D7).
|
|
40
|
-
//
|
|
41
|
-
provenance: { required: false, values: [
|
|
42
|
+
// Adoption detection reads it: a derived architecture with no retroactive plan is mid-adoption (slice 269 D4).
|
|
43
|
+
provenance: { required: false, values: [DERIVED_PROVENANCE] },
|
|
42
44
|
},
|
|
43
45
|
},
|
|
44
46
|
'slice-plan': {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"frontmatterSchema.js","sourceRoot":"","sources":["../../src/schema/frontmatterSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAC;AAuB7E,yDAAyD;AACzD,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAEpD,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAkC;IAChE,OAAO,EAAE;QACP,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,SAAS,CAAC,EAAE;YAChD,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC3B,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,cAAc,CAAC,EAAE;YACvD,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC/B,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;SAChC;KACF;IACD,iBAAiB,EAAE;QACjB,MAAM,EAAE;YACN,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,iBAAiB,CAAC,EAAE;YACxD,OAAO,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC3B,MAAM,EAAE,EAAE,QAAQ,EAAE,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C,aAAa,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACnF,MAAM,OAAO,GAAuB;gBAClC,IAAI,EAAE,oBAAoB;gBAC1B,QAAQ,EAAE,SAAS;gBACnB,QAAQ;gBACR,WAAW,EAAE,UAAU;oBACrB,CAAC,CAAC,kBAAkB,eAAe,gBAAgB,KAAK,iBAAiB,IAAI,CAAC,OAAO,gBAAgB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,UAAU,IAAI;oBAC1J,CAAC,CAAC,kBAAkB,eAAe,gBAAgB,KAAK,iBAAiB,IAAI,CAAC,OAAO,gBAAgB,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;aAChI,CAAC;YACF,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,CAAC,SAAS,GAAG,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;YAC/E,CAAC;YACD,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACzB,CAAC;IACH,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ProjectData } from '../types/project.js';
|
|
2
2
|
import { ContextTemplateEngine } from './ContextTemplateEngine.js';
|
|
3
|
-
import { type AdoptionResolver } from '../adoption/contracts.js';
|
|
4
3
|
/**
|
|
5
4
|
* Finds the slice's task file(s) on disk under a checkout and renders them for
|
|
6
5
|
* prompts. Returns undefined when none exist.
|
|
@@ -39,7 +38,6 @@ export declare class ContextIntegrator {
|
|
|
39
38
|
private resolveTaskFilesFn;
|
|
40
39
|
private resolveIntegrationBranchFn;
|
|
41
40
|
private resolvePermissivenessFn;
|
|
42
|
-
private resolveAdoptionFn;
|
|
43
41
|
/**
|
|
44
42
|
* @param engine Template engine for context generation
|
|
45
43
|
* @param enableNewEngine Toggle between new and legacy template systems
|
|
@@ -47,9 +45,8 @@ export declare class ContextIntegrator {
|
|
|
47
45
|
* @param resolveTaskFilesFn Optional on-disk task file lookup (Node.js only)
|
|
48
46
|
* @param resolveIntegrationBranchFn Optional per-checkout integration branch lookup (Node.js only)
|
|
49
47
|
* @param resolvePermissivenessFn Optional per-checkout permissiveness fragment lookup (Node.js only)
|
|
50
|
-
* @param resolveAdoptionFn Optional brownfield-adoption prompt selection (Node.js only)
|
|
51
48
|
*/
|
|
52
|
-
constructor(engine: ContextTemplateEngine, enableNewEngine?: boolean, readFileFn?: ((path: string) => string) | null, resolveTaskFilesFn?: TaskFilesResolver | null, resolveIntegrationBranchFn?: IntegrationBranchResolver | null, resolvePermissivenessFn?: PermissivenessResolver | null
|
|
49
|
+
constructor(engine: ContextTemplateEngine, enableNewEngine?: boolean, readFileFn?: ((path: string) => string) | null, resolveTaskFilesFn?: TaskFilesResolver | null, resolveIntegrationBranchFn?: IntegrationBranchResolver | null, resolvePermissivenessFn?: PermissivenessResolver | null);
|
|
53
50
|
/**
|
|
54
51
|
* Generates a complete context string from project data
|
|
55
52
|
* Main integration point - takes project data and returns formatted context
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextIntegrator.d.ts","sourceRoot":"","sources":["../../src/services/ContextIntegrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMnE
|
|
1
|
+
{"version":3,"file":"ContextIntegrator.d.ts","sourceRoot":"","sources":["../../src/services/ContextIntegrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAMnE;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,O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;IACH,OAAO,CAAC,2BAA2B;IA2CnC;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAwB7B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAoB3B;;;;OAIG;IACH,OAAO,CAAC,YAAY;IAapB;;;;;OAKG;IACH,OAAO,CAAC,eAAe;IAcvB;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;IAYjE;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAK5B;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,kBAAkB,IAAI,OAAO;IAI7B;;OAEG;IACH,mBAAmB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI;IAI3C;;;OAGG;IACH,kBAAkB,IAAI,MAAM;CAG7B"}
|
|
@@ -2,8 +2,6 @@ import { TemplateProcessor } from './TemplateProcessor.js';
|
|
|
2
2
|
import { ContextProfileParser } from './ContextProfileParser.js';
|
|
3
3
|
import { PROMPT_FILE_RELATIVE_PATH, STATEMENTS_FILE_RELATIVE_PATH, DEFAULT_TARGET_BRANCH } from './constants.js';
|
|
4
4
|
import { getFieldNamesByGroup } from '../schema/projectSchema.js';
|
|
5
|
-
// contracts.ts only (never adoption/index.ts): keeps services/ and adoption/ from importing each other's internals.
|
|
6
|
-
import { AdoptionError } from '../adoption/contracts.js';
|
|
7
5
|
/**
|
|
8
6
|
* Raised when workflow.permissiveness is set but its fragment cannot be loaded.
|
|
9
7
|
* generateContextFromProject rethrows it (every other error becomes an error
|
|
@@ -47,7 +45,6 @@ export class ContextIntegrator {
|
|
|
47
45
|
resolveTaskFilesFn;
|
|
48
46
|
resolveIntegrationBranchFn;
|
|
49
47
|
resolvePermissivenessFn;
|
|
50
|
-
resolveAdoptionFn;
|
|
51
48
|
/**
|
|
52
49
|
* @param engine Template engine for context generation
|
|
53
50
|
* @param enableNewEngine Toggle between new and legacy template systems
|
|
@@ -55,13 +52,11 @@ export class ContextIntegrator {
|
|
|
55
52
|
* @param resolveTaskFilesFn Optional on-disk task file lookup (Node.js only)
|
|
56
53
|
* @param resolveIntegrationBranchFn Optional per-checkout integration branch lookup (Node.js only)
|
|
57
54
|
* @param resolvePermissivenessFn Optional per-checkout permissiveness fragment lookup (Node.js only)
|
|
58
|
-
* @param resolveAdoptionFn Optional brownfield-adoption prompt selection (Node.js only)
|
|
59
55
|
*/
|
|
60
|
-
constructor(engine, enableNewEngine = true, readFileFn = null, resolveTaskFilesFn = null, resolveIntegrationBranchFn = null, resolvePermissivenessFn = null
|
|
56
|
+
constructor(engine, enableNewEngine = true, readFileFn = null, resolveTaskFilesFn = null, resolveIntegrationBranchFn = null, resolvePermissivenessFn = null) {
|
|
61
57
|
this.resolveTaskFilesFn = resolveTaskFilesFn;
|
|
62
58
|
this.resolveIntegrationBranchFn = resolveIntegrationBranchFn;
|
|
63
59
|
this.resolvePermissivenessFn = resolvePermissivenessFn;
|
|
64
|
-
this.resolveAdoptionFn = resolveAdoptionFn;
|
|
65
60
|
this.templateProcessor = new TemplateProcessor();
|
|
66
61
|
this.templateEngine = engine;
|
|
67
62
|
this.enableNewEngine = enableNewEngine;
|
|
@@ -87,9 +82,6 @@ export class ContextIntegrator {
|
|
|
87
82
|
// A configured permissiveness level that cannot be applied must fail the build.
|
|
88
83
|
if (error instanceof PermissivenessFragmentError)
|
|
89
84
|
throw error;
|
|
90
|
-
// Likewise an adoption failure: falling back to the concept prompt would mislead.
|
|
91
|
-
if (error instanceof AdoptionError)
|
|
92
|
-
throw error;
|
|
93
85
|
console.error('Error generating context from project:', error);
|
|
94
86
|
return this.getErrorContext(project, error);
|
|
95
87
|
}
|
|
@@ -109,18 +101,8 @@ export class ContextIntegrator {
|
|
|
109
101
|
// path when one is selected, else the project root.
|
|
110
102
|
const worktree = (project.worktrees ?? []).find((w) => w.id === worktreeId);
|
|
111
103
|
const checkoutPath = worktree?.worktreePath ?? project.projectPath;
|
|
112
|
-
// Adoption may replace the instruction, and profile filtering keys on it, so it
|
|
113
|
-
// runs before the project is mapped. Errors propagate.
|
|
114
|
-
const instruction = project.instruction || 'implementation';
|
|
115
|
-
const adoption = this.resolveAdoptionFn && project.projectPath && checkoutPath
|
|
116
|
-
? await this.resolveAdoptionFn(project.projectPath, checkoutPath, instruction)
|
|
117
|
-
: null;
|
|
118
104
|
// Map project data to enhanced context data
|
|
119
|
-
const enhancedData = this.mapProjectToEnhancedContext(
|
|
120
|
-
if (adoption?.selected)
|
|
121
|
-
enhancedData.adoptionFacts = adoption.facts;
|
|
122
|
-
if (adoption?.selected && adoption.fileComprehension)
|
|
123
|
-
enhancedData.fileComprehension = adoption.fileComprehension;
|
|
105
|
+
const enhancedData = this.mapProjectToEnhancedContext(project, worktreeId);
|
|
124
106
|
// Resolve the slice's real task file(s)
|
|
125
107
|
if (this.resolveTaskFilesFn && project.fileSlice && checkoutPath) {
|
|
126
108
|
enhancedData.taskFiles = await this.resolveTaskFilesFn(checkoutPath, project.fileSlice);
|