@topogram/cli 0.3.72 → 0.3.73
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 +24 -195
- package/package.json +1 -1
- package/src/adoption/plan/index.js +2 -1
- package/src/agent-brief.js +46 -2
- package/src/archive/archive.js +1 -1
- package/src/archive/jsonl.js +18 -8
- package/src/archive/resolver-bridge.js +34 -1
- package/src/archive/schema.js +1 -1
- package/src/archive/unarchive.js +26 -0
- package/src/cli/command-parsers/sdlc.js +66 -0
- package/src/cli/commands/import/help.js +1 -0
- package/src/cli/commands/import/plan.js +9 -0
- package/src/cli/commands/import/workspace.js +3 -0
- package/src/cli/commands/query/definitions.js +11 -10
- package/src/cli/commands/query/workspace.js +23 -2
- package/src/cli/commands/sdlc.js +213 -5
- package/src/cli/dispatcher.js +8 -0
- package/src/cli/help.js +14 -2
- package/src/cli/options.js +1 -0
- package/src/generator/context/shared/domain-sdlc.js +27 -0
- package/src/generator/context/shared/relationships.js +2 -1
- package/src/generator/context/shared/types.d.ts +1 -0
- package/src/generator/context/shared.d.ts +2 -0
- package/src/generator/context/shared.js +2 -0
- package/src/generator/context/slice/core.js +3 -0
- package/src/generator/context/slice/sdlc.js +57 -2
- package/src/generator/context/task-mode.js +7 -0
- package/src/generator/sdlc/board.js +2 -0
- package/src/generator/sdlc/traceability-matrix.js +5 -1
- package/src/import/core/context.js +1 -1
- package/src/import/core/contracts.js +3 -3
- package/src/import/core/registry.js +3 -0
- package/src/import/core/runner/candidates.js +7 -0
- package/src/import/core/runner/reports.js +9 -1
- package/src/import/core/runner/tracks.js +3 -0
- package/src/import/extractors/cli/generic.js +340 -0
- package/src/new-project/project-files.js +10 -3
- package/src/resolver/enrich/task.js +3 -1
- package/src/resolver/index.js +6 -0
- package/src/resolver/normalize.js +31 -0
- package/src/resolver/projections-cli.js +158 -0
- package/src/sdlc/adopt.js +4 -1
- package/src/sdlc/check.js +24 -2
- package/src/sdlc/complete.js +47 -0
- package/src/sdlc/dod/index.js +2 -0
- package/src/sdlc/dod/plan.js +15 -0
- package/src/sdlc/dod/task.js +7 -3
- package/src/sdlc/explain.js +53 -1
- package/src/sdlc/gate.js +352 -0
- package/src/sdlc/history.d.ts +7 -0
- package/src/sdlc/history.js +50 -5
- package/src/sdlc/link.js +172 -0
- package/src/sdlc/paths.d.ts +4 -0
- package/src/sdlc/paths.js +8 -0
- package/src/sdlc/plan-steps.js +71 -0
- package/src/sdlc/plan.js +245 -0
- package/src/sdlc/policy.js +249 -0
- package/src/sdlc/prep.js +186 -0
- package/src/sdlc/scaffold.js +4 -2
- package/src/sdlc/status-filter.js +2 -0
- package/src/sdlc/transitions/index.js +3 -0
- package/src/sdlc/transitions/plan.js +32 -0
- package/src/validator/common.js +25 -4
- package/src/validator/index.js +10 -0
- package/src/validator/kinds.d.ts +7 -0
- package/src/validator/kinds.js +32 -0
- package/src/validator/per-kind/plan.js +128 -0
- package/src/validator/per-kind/task.js +19 -0
- package/src/validator/projections/cli.js +267 -0
- package/src/validator.d.ts +1 -0
- package/src/workflows/import-app/shared.js +1 -1
- package/src/workflows/reconcile/adoption-plan/build.js +3 -1
- package/src/workflows/reconcile/adoption-plan/reasons.js +5 -0
- package/src/workflows/reconcile/bundle-core/index.js +3 -0
- package/src/workflows/reconcile/candidate-model.js +15 -0
- package/src/workflows/reconcile/gap-report.js +4 -2
- package/src/workflows/reconcile/impacts/adoption-plan.js +13 -0
- package/src/workflows/reconcile/renderers.js +82 -0
- package/src/workflows/reconcile/summary.js +4 -0
- package/src/workflows/reconcile/workflow.js +2 -1
- package/src/workspace-paths.js +26 -2
package/src/workspace-paths.js
CHANGED
|
@@ -57,6 +57,11 @@ const WORKSPACE_SIGNAL_DIRS = new Set([
|
|
|
57
57
|
* @property {boolean} bootstrappedTopoRoot
|
|
58
58
|
*/
|
|
59
59
|
|
|
60
|
+
/**
|
|
61
|
+
* @typedef {Object} WorkspaceResolutionOptions
|
|
62
|
+
* @property {boolean} [ignoreAncestorConfig]
|
|
63
|
+
*/
|
|
64
|
+
|
|
60
65
|
/**
|
|
61
66
|
* @param {string} candidatePath
|
|
62
67
|
* @returns {boolean}
|
|
@@ -225,9 +230,10 @@ function signalWorkspaceCandidates(root) {
|
|
|
225
230
|
|
|
226
231
|
/**
|
|
227
232
|
* @param {string} inputPath
|
|
233
|
+
* @param {WorkspaceResolutionOptions} [options]
|
|
228
234
|
* @returns {WorkspaceResolution}
|
|
229
235
|
*/
|
|
230
|
-
export function resolveWorkspaceContext(inputPath = ".") {
|
|
236
|
+
export function resolveWorkspaceContext(inputPath = ".", options = {}) {
|
|
231
237
|
const absolute = path.resolve(inputPath || ".");
|
|
232
238
|
if (isDirectory(absolute) && path.basename(absolute) === LEGACY_WORKSPACE_FOLDER_NAME && isWorkspaceSignalRoot(absolute)) {
|
|
233
239
|
throw new Error("Legacy workspace folders are not supported. Use topo/ or configure topogram.project.json workspace to a non-legacy relative path.");
|
|
@@ -250,7 +256,25 @@ export function resolveWorkspaceContext(inputPath = ".") {
|
|
|
250
256
|
};
|
|
251
257
|
}
|
|
252
258
|
|
|
253
|
-
const
|
|
259
|
+
const directDefaultCandidate = path.join(absolute, DEFAULT_TOPO_FOLDER_NAME);
|
|
260
|
+
if (
|
|
261
|
+
isDirectory(absolute) &&
|
|
262
|
+
!fs.existsSync(path.join(absolute, PROJECT_CONFIG_FILE)) &&
|
|
263
|
+
isDirectory(directDefaultCandidate) &&
|
|
264
|
+
isWorkspaceSignalRoot(directDefaultCandidate)
|
|
265
|
+
) {
|
|
266
|
+
return {
|
|
267
|
+
inputRoot: absolute,
|
|
268
|
+
topoRoot: directDefaultCandidate,
|
|
269
|
+
projectRoot: absolute,
|
|
270
|
+
configPath: null,
|
|
271
|
+
fromConfig: false,
|
|
272
|
+
fromSignal: false,
|
|
273
|
+
bootstrappedTopoRoot: false
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const configInfo = options.ignoreAncestorConfig ? null : findProjectRoot(absolute);
|
|
254
278
|
if (configInfo) {
|
|
255
279
|
const topoRoot = resolveProjectWorkspace(configInfo.config, configInfo.configDir);
|
|
256
280
|
return {
|