@sixsevenai/ai-dlc 1.2.0 → 1.2.3
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.mjs +57 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -136,7 +136,9 @@ function generateSessionId(name = "session") {
|
|
|
136
136
|
return `${slug}-${dateStr}-001`;
|
|
137
137
|
}
|
|
138
138
|
function generateWorkflowId(sessionId) {
|
|
139
|
-
|
|
139
|
+
const hasSequence = /\d{8}-\d{3}$/.test(sessionId);
|
|
140
|
+
const normalizedId = hasSequence ? sessionId : `${sessionId}-001`;
|
|
141
|
+
return `wf-${normalizedId}`;
|
|
140
142
|
}
|
|
141
143
|
function extractSessionIdFromWorkflowId(workflowId) {
|
|
142
144
|
if (!workflowId.startsWith("wf-")) return null;
|
|
@@ -45662,7 +45664,7 @@ __export(core_exports, {
|
|
|
45662
45664
|
validateWorkflowId: () => validateWorkflowId
|
|
45663
45665
|
});
|
|
45664
45666
|
function getVersion() {
|
|
45665
|
-
return true ? "1.2.
|
|
45667
|
+
return true ? "1.2.3" : "0.0.0-dev";
|
|
45666
45668
|
}
|
|
45667
45669
|
var VERSION;
|
|
45668
45670
|
var init_core = __esm({
|
|
@@ -49762,11 +49764,61 @@ async function handleSpecSpecify(args) {
|
|
|
49762
49764
|
const traceId = chronicle.startTrace();
|
|
49763
49765
|
const startTime = Date.now();
|
|
49764
49766
|
const forceFlag = args.includes("--force");
|
|
49765
|
-
const
|
|
49767
|
+
const offlineFlag = args.includes("--offline");
|
|
49768
|
+
const filteredArgs = args.filter((a) => a !== "--force" && a !== "--offline");
|
|
49766
49769
|
const featureName = filteredArgs[0];
|
|
49767
49770
|
const featureDescription = filteredArgs.slice(1).join(" ");
|
|
49768
49771
|
if (!featureName) {
|
|
49769
|
-
outputError('Usage: spec specify <feature-name> [description] [--force]\n\nThe feature name should be a short slug (e.g., "user-auth", "report-filter").\nUse --force to archive existing session and start fresh.');
|
|
49772
|
+
outputError('Usage: spec specify <feature-name> [description] [--force] [--offline]\n\nThe feature name should be a short slug (e.g., "user-auth", "report-filter").\nUse --force to archive existing session and start fresh.\nUse --offline to create a standalone spec without session management.');
|
|
49773
|
+
return;
|
|
49774
|
+
}
|
|
49775
|
+
if (offlineFlag) {
|
|
49776
|
+
const sessionId = generateSessionId(featureName);
|
|
49777
|
+
const featureDir = ArtifactPaths.specFeatureDir(sessionId);
|
|
49778
|
+
const specFile = ArtifactPaths.specSpec(sessionId);
|
|
49779
|
+
const fullFeatureDir = path109.join(basePath, featureDir);
|
|
49780
|
+
if (!fs107.existsSync(fullFeatureDir)) {
|
|
49781
|
+
createFeatureDirectory(featureDir, basePath);
|
|
49782
|
+
}
|
|
49783
|
+
chronicle.record({
|
|
49784
|
+
correlationId: traceId,
|
|
49785
|
+
type: "spec:command:prepare",
|
|
49786
|
+
command: "spec:specify",
|
|
49787
|
+
featureName,
|
|
49788
|
+
featureDir,
|
|
49789
|
+
payload: { args, outputPath: specFile, offline: true },
|
|
49790
|
+
status: "started"
|
|
49791
|
+
});
|
|
49792
|
+
const output2 = {
|
|
49793
|
+
command: "spec:specify",
|
|
49794
|
+
featureName,
|
|
49795
|
+
sessionId,
|
|
49796
|
+
featureDir,
|
|
49797
|
+
specFile,
|
|
49798
|
+
canProceed: true,
|
|
49799
|
+
offline: true,
|
|
49800
|
+
validation: { valid: true, blocked: false, errors: [], warnings: [] },
|
|
49801
|
+
traceId
|
|
49802
|
+
};
|
|
49803
|
+
if (featureDescription) {
|
|
49804
|
+
output2.featureDescription = featureDescription;
|
|
49805
|
+
}
|
|
49806
|
+
output2.agentInstructions = `Write the specification to: ${specFile}`;
|
|
49807
|
+
output2.FEATURE_NAME = featureName;
|
|
49808
|
+
output2.SESSION_ID = sessionId;
|
|
49809
|
+
output2.FEATURE_DIR = featureDir;
|
|
49810
|
+
output2.SPEC_FILE = specFile;
|
|
49811
|
+
outputJson(output2);
|
|
49812
|
+
chronicle.record({
|
|
49813
|
+
correlationId: traceId,
|
|
49814
|
+
type: "spec:artifact:verified",
|
|
49815
|
+
command: "spec:specify",
|
|
49816
|
+
featureName,
|
|
49817
|
+
featureDir,
|
|
49818
|
+
duration: Date.now() - startTime,
|
|
49819
|
+
payload: { artifactPath: specFile, offline: true },
|
|
49820
|
+
status: "completed"
|
|
49821
|
+
});
|
|
49770
49822
|
return;
|
|
49771
49823
|
}
|
|
49772
49824
|
let contextResult = await getFeatureContext(basePath);
|
|
@@ -50342,7 +50394,7 @@ Spec subcommands:
|
|
|
50342
50394
|
session end End and archive spec session
|
|
50343
50395
|
list List available spec commands
|
|
50344
50396
|
specify Create feature specification
|
|
50345
|
-
|
|
50397
|
+
plan Create implementation plan
|
|
50346
50398
|
research Document technical research
|
|
50347
50399
|
data-model Define data models
|
|
50348
50400
|
tasks Create task breakdown
|