devworkspace 0.3.1 → 0.3.2
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/CHANGELOG.md +18 -1
- package/README.md +3 -1
- package/dist/cli/args.d.ts +42 -0
- package/dist/cli/args.js +12 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/help.js +52 -5
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/render.d.ts +10 -0
- package/dist/cli/render.js +167 -0
- package/dist/cli/render.js.map +1 -1
- package/dist/cli/run.js +84 -4
- package/dist/cli/run.js.map +1 -1
- package/dist/config/schemas.d.ts +6 -0
- package/dist/config/schemas.js +6 -0
- package/dist/config/schemas.js.map +1 -1
- package/dist/core/version.d.ts +7 -0
- package/dist/core/version.js +13 -0
- package/dist/core/version.js.map +1 -1
- package/dist/core/workspace.d.ts +1 -0
- package/dist/core/workspace.js +1 -0
- package/dist/core/workspace.js.map +1 -1
- package/dist/discovery/commands.d.ts +1 -0
- package/dist/discovery/commands.js +3 -1
- package/dist/discovery/commands.js.map +1 -1
- package/dist/features/schema.d.ts +3 -0
- package/dist/features/schema.js +79 -0
- package/dist/features/schema.js.map +1 -0
- package/dist/features/types.d.ts +77 -0
- package/dist/features/types.js +2 -0
- package/dist/features/types.js.map +1 -0
- package/dist/features/validate.d.ts +14 -0
- package/dist/features/validate.js +124 -0
- package/dist/features/validate.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/services/doctor.js +34 -0
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/drift.d.ts +21 -0
- package/dist/services/drift.js +89 -0
- package/dist/services/drift.js.map +1 -0
- package/dist/services/features.d.ts +22 -0
- package/dist/services/features.js +105 -0
- package/dist/services/features.js.map +1 -0
- package/dist/services/graph.d.ts +97 -0
- package/dist/services/graph.js +342 -0
- package/dist/services/graph.js.map +1 -0
- package/dist/services/refresh.js +15 -0
- package/dist/services/refresh.js.map +1 -1
- package/dist/services/setup.d.ts +56 -0
- package/dist/services/setup.js +116 -0
- package/dist/services/setup.js.map +1 -0
- package/dist/services/status.d.ts +6 -0
- package/dist/services/status.js +16 -0
- package/dist/services/status.js.map +1 -1
- package/dist/services/verify.d.ts +11 -0
- package/dist/services/verify.js +64 -2
- package/dist/services/verify.js.map +1 -1
- package/docs/architecture-report/01-executive-summary.md +168 -0
- package/docs/architecture-report/02-system-architecture.md +356 -0
- package/docs/architecture-report/03-tools-and-technologies.md +112 -0
- package/docs/architecture-report/04-execution-flows.md +257 -0
- package/docs/architecture-report/05-codebase-map.md +150 -0
- package/docs/architecture-report/06-command-reference.md +446 -0
- package/docs/architecture-report/07-data-flow-and-integrations.md +268 -0
- package/docs/architecture-report/08-build-test-deployment.md +185 -0
- package/docs/architecture-report/09-security-and-reliability.md +165 -0
- package/docs/architecture-report/10-feature-status.md +110 -0
- package/docs/architecture-report/11-glossary.md +97 -0
- package/docs/architecture-report/README.md +103 -0
- package/docs/architecture-report/diagrams.md +446 -0
- package/docs/getting-started.md +38 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,9 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes are documented here. This project follows [Semantic Versioning](https://semver.org/). Workspace schema changes are called out under **Breaking**.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [0.3.2] - 2026-11-02
|
|
6
6
|
|
|
7
7
|
### Added
|
|
8
|
+
- **Single-Command Repository Setup (`devworkspace setup`)**:
|
|
9
|
+
- One-command onboarding workflow inspecting project structure, initializing `.devworkspace/`, discovering verification contracts, checking integration status, and validating overall health.
|
|
10
|
+
- Automatically verifies command contracts against real package manifests and execution directories (`cwd`), reporting drift before task execution.
|
|
11
|
+
- Safe and idempotent; preserves existing project UUID, user overrides, and custom commands across repeated executions.
|
|
12
|
+
- **Feature-Level Knowledge Map & Verification (`devworkspace feature`)**:
|
|
13
|
+
- Introduced typed, backward-compatible feature schema in `.devworkspace/context/features.json` connecting frontend entry points, API routes, backend services, database models, and unit tests.
|
|
14
|
+
- Added `devworkspace feature list`, `devworkspace feature show <id>`, `devworkspace feature add`, and `devworkspace feature validate`.
|
|
15
|
+
- Feature validator inspects real repository files and code symbols on disk, distinguishing verified facts from inferred entries and flagging broken references.
|
|
16
|
+
- **Bounded Graphify Knowledge Graph Tracing (`devworkspace graph`)**:
|
|
17
|
+
- Added `devworkspace graph status` and `devworkspace graph trace [--from <node|path>] [--depth <n>]` supporting Graphify's output format (`graphify-out/graph.json`).
|
|
18
|
+
- Traversal is bounded by BFS depth limits with cycle protection and edge deduplication.
|
|
19
|
+
- Verifies graph nodes against real repository files and code symbols, tagging unverified nodes or references as hypotheses (`[hypothesis]`).
|
|
20
|
+
- **Verification Integrity & Contract Drift Prevention**:
|
|
21
|
+
- Prevents vacuous test passes: detects zero-test executions (`0 passed, 0 failed`) and flags them as unverified rather than false successes.
|
|
22
|
+
- Reports command-contract drift in `devworkspace doctor` when configured checks reference missing npm scripts or non-existent working directories.
|
|
23
|
+
- **CLI Provenance & Version Diagnostics**:
|
|
24
|
+
- Reports exact CLI version, executable path, and execution mode (`source-checkout`, `installed-package`, `npx-cache`) in `setup` and `doctor`.
|
|
8
25
|
- **Agent-Agnostic Architecture & Multi-Agent Compatibility**:
|
|
9
26
|
- Introduced typed `AgentAdapter` interface and shared section-merging engine in `src/agents/` to decouple DevWorkspace from Claude-specific assumptions.
|
|
10
27
|
- Implemented typed adapters for **Claude Code** (`claude`), **OpenAI Codex / open agent standard** (`codex` / `agents` via `AGENTS.md`), **Cursor** (`cursor` via modern `.cursor/rules/devworkspace.mdc` and legacy `.cursorrules`), and **GitHub Copilot** (`copilot` via `.github/copilot-instructions.md`).
|
package/README.md
CHANGED
|
@@ -91,7 +91,7 @@ devworkspace doctor # check workspace, integrations, security, portabilit
|
|
|
91
91
|
| Command | Purpose |
|
|
92
92
|
| --- | --- |
|
|
93
93
|
| `init` | Create `.devworkspace/` (idempotent, never touches source) |
|
|
94
|
-
| `setup
|
|
94
|
+
| `setup` | One-command setup: initialize workspace, discover commands, verify diagnostics, optionally install integrations (`--integrations`) |
|
|
95
95
|
| `integrations` | `status` (observed, never assumed) and `repair` |
|
|
96
96
|
| `analyze` | Deterministic discovery; writes `discovery.json`, testing contract, onboarding prompt |
|
|
97
97
|
| `agent install` | Add managed instruction blocks for your coding agent (`--agent claude\|codex\|cursor\|copilot\|all`) |
|
|
@@ -101,6 +101,8 @@ devworkspace doctor # check workspace, integrations, security, portabilit
|
|
|
101
101
|
| `refresh` | Incremental staleness check; writes a refresh prompt when AI re-validation is needed |
|
|
102
102
|
| `context` | Show stored knowledge (`--topic` filters facts and the testing contract; safety rules are always shown; `--full`) |
|
|
103
103
|
| `fact` | `add` / `verify` / `remove` / `list` project knowledge with provenance |
|
|
104
|
+
| `feature` | `list` / `show` / `validate` / `add` feature-level map connecting frontend, backend, database and tests |
|
|
105
|
+
| `graph` | `status` and `trace` bounded knowledge-graph navigation with node and edge verification |
|
|
104
106
|
| `task` | `new` / `list` / `show` / `status` / `update` / `run` / `verify` / `tests` / `attest` with a package-aware completion gate |
|
|
105
107
|
| `testenv` | `declare` / `list` / `revoke` a test environment so database-touching checks may run (local, never committed) |
|
|
106
108
|
| `decision` | Append-only, human-readable decision records |
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -223,6 +223,48 @@ export declare const OPTIONS: {
|
|
|
223
223
|
readonly deep: {
|
|
224
224
|
readonly type: "boolean";
|
|
225
225
|
};
|
|
226
|
+
readonly id: {
|
|
227
|
+
readonly type: "string";
|
|
228
|
+
};
|
|
229
|
+
readonly name: {
|
|
230
|
+
readonly type: "string";
|
|
231
|
+
};
|
|
232
|
+
readonly description: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
};
|
|
235
|
+
readonly symbol: {
|
|
236
|
+
readonly type: "string";
|
|
237
|
+
};
|
|
238
|
+
readonly entry: {
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
readonly multiple: true;
|
|
241
|
+
};
|
|
242
|
+
readonly route: {
|
|
243
|
+
readonly type: "string";
|
|
244
|
+
readonly multiple: true;
|
|
245
|
+
};
|
|
246
|
+
readonly service: {
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
readonly multiple: true;
|
|
249
|
+
};
|
|
250
|
+
readonly model: {
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
readonly multiple: true;
|
|
253
|
+
};
|
|
254
|
+
readonly test: {
|
|
255
|
+
readonly type: "string";
|
|
256
|
+
readonly multiple: true;
|
|
257
|
+
};
|
|
258
|
+
readonly tag: {
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
readonly multiple: true;
|
|
261
|
+
};
|
|
262
|
+
readonly from: {
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
};
|
|
265
|
+
readonly depth: {
|
|
266
|
+
readonly type: "string";
|
|
267
|
+
};
|
|
226
268
|
};
|
|
227
269
|
export interface ParsedArgs {
|
|
228
270
|
positionals: string[];
|
package/dist/cli/args.js
CHANGED
|
@@ -71,6 +71,18 @@ export const OPTIONS = {
|
|
|
71
71
|
target: { type: 'string' },
|
|
72
72
|
timeout: { type: 'string' },
|
|
73
73
|
deep: { type: 'boolean' },
|
|
74
|
+
id: { type: 'string' },
|
|
75
|
+
name: { type: 'string' },
|
|
76
|
+
description: { type: 'string' },
|
|
77
|
+
symbol: { type: 'string' },
|
|
78
|
+
entry: { type: 'string', multiple: true },
|
|
79
|
+
route: { type: 'string', multiple: true },
|
|
80
|
+
service: { type: 'string', multiple: true },
|
|
81
|
+
model: { type: 'string', multiple: true },
|
|
82
|
+
test: { type: 'string', multiple: true },
|
|
83
|
+
tag: { type: 'string', multiple: true },
|
|
84
|
+
from: { type: 'string' },
|
|
85
|
+
depth: { type: 'string' },
|
|
74
86
|
};
|
|
75
87
|
export function parseCli(argv) {
|
|
76
88
|
try {
|
package/dist/cli/args.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.js","sourceRo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,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAuB,EAAE,CAAS;IACpD,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAC1G,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["import { parseArgs } from 'node:util';\nimport { DevWorkspaceError } from '../errors/index.js';\n\ntype OptionSpec = { type: 'boolean' | 'string'; short?: string; multiple?: boolean };\n\n/** Every flag the CLI understands. Unknown flags are rejected so typos never silently do nothing. */\nexport const OPTIONS = {\n help: { type: 'boolean', short: 'h' },\n version: { type: 'boolean', short: 'v' },\n json: { type: 'boolean' },\n debug: { type: 'boolean' },\n 'no-color': { type: 'boolean' },\n ascii: { type: 'boolean' },\n 'dry-run': { type: 'boolean' },\n yes: { type: 'boolean', short: 'y' },\n 'include-agent-files': { type: 'boolean' },\n integrations: { type: 'boolean' },\n 'with-integrations': { type: 'boolean' },\n only: { type: 'string', multiple: true },\n scope: { type: 'string' },\n restarted: { type: 'boolean' },\n quick: { type: 'boolean' },\n cwd: { type: 'string' },\n root: { type: 'string' },\n fix: { type: 'boolean' },\n strict: { type: 'boolean' },\n out: { type: 'string', short: 'o' },\n overwrite: { type: 'boolean' },\n 'allow-different-project': { type: 'boolean' },\n topic: { type: 'string' },\n full: { type: 'boolean' },\n all: { type: 'boolean' },\n agent: { type: 'string' },\n type: { type: 'string' },\n title: { type: 'string' },\n key: { type: 'string' },\n value: { type: 'string' },\n source: { type: 'string' },\n 'source-type': { type: 'string' },\n file: { type: 'string', multiple: true },\n confidence: { type: 'string' },\n status: { type: 'string' },\n reason: { type: 'string' },\n detail: { type: 'string' },\n note: { type: 'string' },\n phase: { type: 'string' },\n passed: { type: 'string' },\n failed: { type: 'string' },\n criteria: { type: 'string', multiple: true },\n plan: { type: 'string', multiple: true },\n area: { type: 'string', multiple: true },\n 'decision-note': { type: 'string', multiple: true },\n summary: { type: 'string' },\n blocker: { type: 'string', multiple: true },\n 'clear-blockers': { type: 'boolean' },\n require: { type: 'string', multiple: true },\n 'user-work-intact': { type: 'boolean' },\n 'knowledge-reviewed': { type: 'boolean' },\n 'final-state-inspected': { type: 'boolean' },\n context: { type: 'string' },\n for: { type: 'string' },\n decision: { type: 'string' },\n consequences: { type: 'string' },\n supersedes: { type: 'string' },\n goal: { type: 'string' },\n done: { type: 'string', multiple: true },\n 'tests-run': { type: 'string', multiple: true },\n remaining: { type: 'string', multiple: true },\n next: { type: 'string' },\n task: { type: 'string' },\n limit: { type: 'string' },\n package: { type: 'string' },\n check: { type: 'string', multiple: true },\n target: { type: 'string' },\n timeout: { type: 'string' },\n deep: { type: 'boolean' },\n} as const satisfies Record<string, OptionSpec>;\n\nexport interface ParsedArgs {\n positionals: string[];\n values: Record<string, string | boolean | string[] | undefined>;\n}\n\nexport function parseCli(argv: string[]): ParsedArgs {\n try {\n const { values, positionals } = parseArgs({ args: argv, options: OPTIONS, allowPositionals: true, strict: true });\n return { positionals, values: values as ParsedArgs['values'] };\n } catch (e) {\n throw new DevWorkspaceError('USAGE', (e as Error).message.replace(/^Unknown option/, 'Unknown option'), {\n hint: 'Run \"devworkspace --help\" or \"devworkspace <command> --help\".',\n });\n }\n}\n\nexport function str(v: ParsedArgs['values'], k: string): string | undefined {\n const x = v[k];\n return typeof x === 'string' ? x : undefined;\n}\n\nexport function bool(v: ParsedArgs['values'], k: string): boolean {\n return v[k] === true;\n}\n\nexport function list(v: ParsedArgs['values'], k: string): string[] {\n const x = v[k];\n return Array.isArray(x) ? x : [];\n}\n\nexport function int(v: ParsedArgs['values'], k: string): number | undefined {\n const s = str(v, k);\n if (s === undefined) return undefined;\n const n = Number(s);\n if (!Number.isInteger(n)) throw new DevWorkspaceError('USAGE', `--${k} must be an integer (got \"${s}\").`);\n return n;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"args.js","sourceRoot":"","sources":["../../src/cli/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAIvD,qGAAqG;AACrG,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACrC,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACxC,IAAI,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACzB,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1B,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC9B,GAAG,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,EAAE;IACpC,qBAAqB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IAC1C,YAAY,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACjC,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACxC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC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C,CAAuB,EAAE,CAAS;IACpD,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACtC,MAAM,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IACpB,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;QAAE,MAAM,IAAI,iBAAiB,CAAC,OAAO,EAAE,KAAK,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC;IAC1G,OAAO,CAAC,CAAC;AACX,CAAC","sourcesContent":["import { parseArgs } from 'node:util';\nimport { DevWorkspaceError } from '../errors/index.js';\n\ntype OptionSpec = { type: 'boolean' | 'string'; short?: string; multiple?: boolean };\n\n/** Every flag the CLI understands. Unknown flags are rejected so typos never silently do nothing. */\nexport const OPTIONS = {\n help: { type: 'boolean', short: 'h' },\n version: { type: 'boolean', short: 'v' },\n json: { type: 'boolean' },\n debug: { type: 'boolean' },\n 'no-color': { type: 'boolean' },\n ascii: { type: 'boolean' },\n 'dry-run': { type: 'boolean' },\n yes: { type: 'boolean', short: 'y' },\n 'include-agent-files': { type: 'boolean' },\n integrations: { type: 'boolean' },\n 'with-integrations': { type: 'boolean' },\n only: { type: 'string', multiple: true },\n scope: { type: 'string' },\n restarted: { type: 'boolean' },\n quick: { type: 'boolean' },\n cwd: { type: 'string' },\n root: { type: 'string' },\n fix: { type: 'boolean' },\n strict: { type: 'boolean' },\n out: { type: 'string', short: 'o' },\n overwrite: { type: 'boolean' },\n 'allow-different-project': { type: 'boolean' },\n topic: { type: 'string' },\n full: { type: 'boolean' },\n all: { type: 'boolean' },\n agent: { type: 'string' },\n type: { type: 'string' },\n title: { type: 'string' },\n key: { type: 'string' },\n value: { type: 'string' },\n source: { type: 'string' },\n 'source-type': { type: 'string' },\n file: { type: 'string', multiple: true },\n confidence: { type: 'string' },\n status: { type: 'string' },\n reason: { type: 'string' },\n detail: { type: 'string' },\n note: { type: 'string' },\n phase: { type: 'string' },\n passed: { type: 'string' },\n failed: { type: 'string' },\n criteria: { type: 'string', multiple: true },\n plan: { type: 'string', multiple: true },\n area: { type: 'string', multiple: true },\n 'decision-note': { type: 'string', multiple: true },\n summary: { type: 'string' },\n blocker: { type: 'string', multiple: true },\n 'clear-blockers': { type: 'boolean' },\n require: { type: 'string', multiple: true },\n 'user-work-intact': { type: 'boolean' },\n 'knowledge-reviewed': { type: 'boolean' },\n 'final-state-inspected': { type: 'boolean' },\n context: { type: 'string' },\n for: { type: 'string' },\n decision: { type: 'string' },\n consequences: { type: 'string' },\n supersedes: { type: 'string' },\n goal: { type: 'string' },\n done: { type: 'string', multiple: true },\n 'tests-run': { type: 'string', multiple: true },\n remaining: { type: 'string', multiple: true },\n next: { type: 'string' },\n task: { type: 'string' },\n limit: { type: 'string' },\n package: { type: 'string' },\n check: { type: 'string', multiple: true },\n target: { type: 'string' },\n timeout: { type: 'string' },\n deep: { type: 'boolean' },\n id: { type: 'string' },\n name: { type: 'string' },\n description: { type: 'string' },\n symbol: { type: 'string' },\n entry: { type: 'string', multiple: true },\n route: { type: 'string', multiple: true },\n service: { type: 'string', multiple: true },\n model: { type: 'string', multiple: true },\n test: { type: 'string', multiple: true },\n tag: { type: 'string', multiple: true },\n from: { type: 'string' },\n depth: { type: 'string' },\n} as const satisfies Record<string, OptionSpec>;\n\nexport interface ParsedArgs {\n positionals: string[];\n values: Record<string, string | boolean | string[] | undefined>;\n}\n\nexport function parseCli(argv: string[]): ParsedArgs {\n try {\n const { values, positionals } = parseArgs({ args: argv, options: OPTIONS, allowPositionals: true, strict: true });\n return { positionals, values: values as ParsedArgs['values'] };\n } catch (e) {\n throw new DevWorkspaceError('USAGE', (e as Error).message.replace(/^Unknown option/, 'Unknown option'), {\n hint: 'Run \"devworkspace --help\" or \"devworkspace <command> --help\".',\n });\n }\n}\n\nexport function str(v: ParsedArgs['values'], k: string): string | undefined {\n const x = v[k];\n return typeof x === 'string' ? x : undefined;\n}\n\nexport function bool(v: ParsedArgs['values'], k: string): boolean {\n return v[k] === true;\n}\n\nexport function list(v: ParsedArgs['values'], k: string): string[] {\n const x = v[k];\n return Array.isArray(x) ? x : [];\n}\n\nexport function int(v: ParsedArgs['values'], k: string): number | undefined {\n const s = str(v, k);\n if (s === undefined) return undefined;\n const n = Number(s);\n if (!Number.isInteger(n)) throw new DevWorkspaceError('USAGE', `--${k} must be an integer (got \"${s}\").`);\n return n;\n}\n"]}
|
package/dist/cli/help.js
CHANGED
|
@@ -19,17 +19,20 @@ export const COMMANDS = [
|
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
name: 'setup',
|
|
22
|
-
summary: '
|
|
23
|
-
usage: [
|
|
22
|
+
summary: 'Single-command repository setup (inspect, initialize, discover contract & validate)',
|
|
23
|
+
usage: [
|
|
24
|
+
'devworkspace setup',
|
|
25
|
+
'devworkspace setup --integrations [--yes] [--dry-run] [--scope project|user] [--only graphify,agent-skills,ponytail]',
|
|
26
|
+
],
|
|
24
27
|
options: [
|
|
25
|
-
['--integrations', 'set up
|
|
28
|
+
['--integrations', 'set up external integrations (Graphify, Agent Skills, Ponytail)'],
|
|
26
29
|
['--dry-run', 'show exactly what would run; changes nothing'],
|
|
27
|
-
['--yes', '
|
|
30
|
+
['--yes', 'with --integrations: approve machine-level and third-party installs'],
|
|
28
31
|
['--scope project|user', 'where to install (default: project; user needs --yes)'],
|
|
29
32
|
['--only <ids>', 'comma-separated: graphify, agent-skills, ponytail'],
|
|
30
33
|
...COMMON,
|
|
31
34
|
],
|
|
32
|
-
examples: ['devworkspace setup
|
|
35
|
+
examples: ['devworkspace setup', 'devworkspace setup --json', 'devworkspace setup --integrations --yes'],
|
|
33
36
|
},
|
|
34
37
|
{
|
|
35
38
|
name: 'integrations',
|
|
@@ -98,6 +101,50 @@ export const COMMANDS = [
|
|
|
98
101
|
],
|
|
99
102
|
examples: ['devworkspace fact add --key auth.sessions --value "Sessions live in Redis" --source "src/auth/session.ts" --file src/auth/session.ts --source-type ai --confidence HIGH --status VERIFIED'],
|
|
100
103
|
},
|
|
104
|
+
{
|
|
105
|
+
name: 'feature',
|
|
106
|
+
summary: 'Manage feature-level knowledge and end-to-end component traces',
|
|
107
|
+
usage: [
|
|
108
|
+
'devworkspace feature list',
|
|
109
|
+
'devworkspace feature show <id>',
|
|
110
|
+
'devworkspace feature validate',
|
|
111
|
+
'devworkspace feature add --id <id> --name <name> [--entry <path>...] [--route <path>...] [--service <path>...] [--model <path>...] [--test <path>...] [--symbol <sym>]',
|
|
112
|
+
],
|
|
113
|
+
options: [
|
|
114
|
+
['--id <id>', 'unique feature identifier, e.g. auth.login'],
|
|
115
|
+
['--name <name>', 'human-readable name for the feature'],
|
|
116
|
+
['--entry <path>', 'frontend entry point path (repeatable)'],
|
|
117
|
+
['--route <path>', 'backend route/controller path (repeatable)'],
|
|
118
|
+
['--service <path>', 'backend service path (repeatable)'],
|
|
119
|
+
['--model <path>', 'database model/schema path (repeatable)'],
|
|
120
|
+
['--test <path>', 'test file path (repeatable)'],
|
|
121
|
+
['--symbol <sym>', 'symbol name (function, class, endpoint) to verify in component files'],
|
|
122
|
+
...COMMON,
|
|
123
|
+
],
|
|
124
|
+
examples: [
|
|
125
|
+
'devworkspace feature list',
|
|
126
|
+
'devworkspace feature show auth.login',
|
|
127
|
+
'devworkspace feature validate',
|
|
128
|
+
'devworkspace feature add --id auth.login --name "User Authentication" --entry frontend/src/pages/Login.tsx --route backend/src/routes/auth.ts --symbol authRoutes',
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
name: 'graph',
|
|
133
|
+
summary: 'Inspect and trace Graphify knowledge graphs',
|
|
134
|
+
usage: [
|
|
135
|
+
'devworkspace graph status',
|
|
136
|
+
'devworkspace graph trace [--from <path|query>] [--depth <n>]',
|
|
137
|
+
],
|
|
138
|
+
options: [
|
|
139
|
+
['--from <path|query>', 'starting node file path or symbol name to trace from'],
|
|
140
|
+
['--depth <n>', 'maximum traversal depth (1-10, default 2)'],
|
|
141
|
+
...COMMON,
|
|
142
|
+
],
|
|
143
|
+
examples: [
|
|
144
|
+
'devworkspace graph status',
|
|
145
|
+
'devworkspace graph trace --from src/api.ts --depth 3',
|
|
146
|
+
],
|
|
147
|
+
},
|
|
101
148
|
{
|
|
102
149
|
name: 'task',
|
|
103
150
|
summary: 'Track engineering tasks with a completion gate',
|
package/dist/cli/help.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,GAAuB;IACjC,CAAC,QAAQ,EAAE,yBAAyB,CAAC;IACrC,CAAC,aAAa,EAAE,4BAA4B,CAAC;IAC7C,CAAC,SAAS,EAAE,kCAAkC,CAAC;CAChD,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAkB;IACrC;QACE,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE,+DAA+D;QACxE,KAAK,EAAE,CAAC,mGAAmG,CAAC;QAC5G,OAAO,EAAE;YACP,CAAC,cAAc,EAAE,4DAA4D,CAAC;YAC9E,CAAC,WAAW,EAAE,4BAA4B,CAAC;YAC3C,CAAC,qBAAqB,EAAE,4EAA4E,CAAC;YACrG,CAAC,OAAO,EAAE,0EAA0E,CAAC;YACrF,GAAG,MAAM;SACV;QACD,QAAQ,EAAE,CAAC,uBAAuB,EAAE,iDAAiD,CAAC;KACvF;IACD;QACE,IAAI,EAAE,OAAO;QACb,OAAO,EAAE,wDAAwD;QACjE,KAAK,EAAE,CAAC,+HAA+H,CAAC;QACxI,OAAO,EAAE;YACP,CAAC,gBAAgB,EAAE,2EAA2E,CAAC;YAC/F,CAAC,WAAW,EAAE,8CAA8C,CAAC;YAC7D,CAAC,OAAO,EAAE,sKAAsK,CAAC;YACjL,CAAC,sBAAsB,EAAE,uDAAuD,CAAC;YACjF,CAAC,cAAc,EAAE,mDAAmD,CAAC;YACrE,GAA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AAK,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;QAC/D,EAAE;QACF,cAAc;QACd,iBAAiB;QACjB,yBAAyB;QACzB,4BAA4B;QAC5B,wEAAwE;QACxE,EAAE;QACF,sFAAsF;QACtF,+FAA+F;QAC/F,oJAAoJ;QACpJ,kDAAkD;KACnD,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,CAAc;IACxC,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;IACxD,OAAO;QACL,gBAAgB,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC,OAAO,EAAE;QACvC,EAAE;QACF,QAAQ;QACR,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;QAC/B,EAAE;QACF,UAAU;QACV,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACxD,EAAE;QACF,WAAW;QACX,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;KACnC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["export interface CommandHelp {\n name: string;\n summary: string;\n usage: string[];\n options: [string, string][];\n examples: string[];\n}\n\nconst COMMON: [string, string][] = [\n ['--json', 'machine-readable output'],\n ['--cwd <dir>', 'run as if started in <dir>'],\n ['--debug', 'show stack traces and debug logs'],\n];\n\nexport const COMMANDS: CommandHelp[] = [\n {\n name: 'init',\n summary: 'Create .devworkspace/ in the current project (safe to re-run)',\n usage: ['devworkspace init [--root <dir>] [--dry-run] [--with-integrations [--yes] [--scope project|user]]'],\n options: [\n ['--root <dir>', 'project root (default: Git top-level or current directory)'],\n ['--dry-run', 'show what would be created'],\n ['--with-integrations', 'then run the same integration setup as \"devworkspace setup --integrations\"'],\n ['--yes', 'with --with-integrations: approve machine-level and third-party installs'],\n ...COMMON,\n ],\n examples: ['npx devworkspace init', 'npx devworkspace init --with-integrations --yes'],\n },\n {\n name: 'setup',\n summary: 'Install and verify Graphify, Agent Skills and Ponytail',\n usage: ['devworkspace setup --integrations [--yes] [--dry-run] [--scope project|user] [--only graphify,agent-skills,ponytail] [--json]'],\n options: [\n ['--integrations', 'set up the integrations (required: it is the only thing setup does today)'],\n ['--dry-run', 'show exactly what would run; changes nothing'],\n ['--yes', 'approve steps that install a tool for your user account, change user-level Claude Code settings, or run a registry package. Without it only project-local steps run.'],\n ['--scope project|user', 'where to install (default: project; user needs --yes)'],\n ['--only <ids>', 'comma-separated: graphify, agent-skills, ponytail'],\n ...COMMON,\n ],\n examples: ['devworkspace setup --integrations --dry-run', 'devworkspace setup --integrations --yes', 'devworkspace setup --integrations --only ponytail --yes --json'],\n },\n {\n name: 'integrations',\n summary: 'Show or repair the integration installation (observed, not assumed)',\n usage: [\n 'devworkspace integrations status [--quick] [--restarted] [--strict]',\n 'devworkspace integrations repair [--yes] [--dry-run] [--only <ids>] [--scope project|user]',\n ],\n options: [\n ['--quick', 'only look at files and PATH (fast, but nothing can show VERIFIED)'],\n ['--restarted', 'record that you restarted Claude Code, clearing RESTART_REQUIRED'],\n ['--strict', 'exit 3 unless every required integration is VERIFIED'],\n ...COMMON,\n ],\n examples: ['devworkspace integrations status', 'devworkspace integrations repair --yes'],\n },\n {\n name: 'analyze',\n summary: 'Deterministic repository discovery + generate the Claude onboarding prompt',\n usage: ['devworkspace analyze [--dry-run]'],\n options: [['--dry-run', 'discover and report without writing files'], ...COMMON],\n examples: ['devworkspace analyze', 'devworkspace analyze --json'],\n },\n {\n name: 'status',\n summary: 'Concise overview: health, Git, knowledge, tasks, integrations, verification',\n usage: ['devworkspace status [--strict] [--deep] (read-only)'],\n options: [['--strict', 'exit 3 when anything needs attention'], ['--deep', 'also run the integration health checks (what doctor does)'], ...COMMON],\n examples: ['devworkspace status', 'devworkspace status --json'],\n },\n {\n name: 'doctor',\n summary: 'Check the workspace, integrations, security and portability',\n usage: ['devworkspace doctor [--fix] [--strict] (core workspace and integrations are reported separately)'],\n options: [['--fix', 'safely create missing folders/ignore rules (never deletes)'], ['--strict', 'exit 3 when there are warnings'], ...COMMON],\n examples: ['devworkspace doctor', 'devworkspace doctor --json --strict'],\n },\n {\n name: 'refresh',\n summary: 'Re-derive deterministic facts and mark knowledge stale when its evidence changed',\n usage: ['devworkspace refresh [--dry-run] (writes discovery files and detector facts; --dry-run writes nothing)'],\n options: [['--dry-run', 'report stale knowledge without writing'], ...COMMON],\n examples: ['devworkspace refresh'],\n },\n {\n name: 'context',\n summary: 'Show what DevWorkspace believes about the project',\n usage: ['devworkspace context [--for <request>] [--topic <prefix>] [--full]'],\n options: [['--for <request>', 'task-aware context: only what this request needs, each item with the reason it is included (safety rules are always shown)'], ['--topic <text>', 'only facts and testing-contract entries that match <text> (safety rules are always shown)'], ['--full', 'also print .devworkspace/context/*.md'], ...COMMON],\n examples: ['devworkspace context --topic auth', 'devworkspace context --for \"fix the invoice total rounding bug\"'],\n },\n {\n name: 'fact',\n summary: 'Record, verify or remove a piece of project knowledge',\n usage: [\n 'devworkspace fact add --key <key> --value <text> --source <desc> [--file <rel path>]... [--source-type ai|user|file|git] [--confidence HIGH|MEDIUM|LOW] [--status VERIFIED|INFERRED|UNKNOWN]',\n 'devworkspace fact verify <key>',\n 'devworkspace fact remove <key>',\n 'devworkspace fact list',\n ],\n options: [\n ['--key', 'lowercase dotted key, e.g. auth.session-store'],\n ['--value', 'one concise sentence (no secrets, no absolute paths)'],\n ['--file <path>', 'repository file that evidences the fact (repeatable); used for staleness'],\n ...COMMON,\n ],\n examples: ['devworkspace fact add --key auth.sessions --value \"Sessions live in Redis\" --source \"src/auth/session.ts\" --file src/auth/session.ts --source-type ai --confidence HIGH --status VERIFIED'],\n },\n {\n name: 'task',\n summary: 'Track engineering tasks with a completion gate',\n usage: [\n 'devworkspace task new \"<request>\" [--type BUG|FEATURE|...]',\n 'devworkspace task list [--all] (alias: devworkspace tasks)',\n 'devworkspace task show <id>',\n 'devworkspace task status <id> <STATUS> [--note <text>]',\n 'devworkspace task update <id> [--title ..] [--criteria ..]... [--plan ..]... [--area ..]... [--blocker ..]... [--require <check>]... [--summary ..]',\n 'devworkspace task run <id> <check> [--package <dir>] [--timeout <seconds>] (executes the contract command; read-only checks only)',\n 'devworkspace task verify <id> <check> pass|fail|skip|pending [--package <dir>] [--reason user-override] [--detail <text>] (records a report, not an executed result)',\n 'devworkspace task tests <id> --phase baseline|after --passed <n> --failed <n>',\n 'devworkspace task attest <id> [--user-work-intact] [--knowledge-reviewed] [--final-state-inspected]',\n ],\n options: [\n ['--all', 'include completed tasks'],\n ['--package <dir>', 'with run/verify: the package the result belongs to (default: every changed package / the root)'],\n ['--timeout <seconds>', 'with run: per-command time limit (default 600)'],\n ...COMMON,\n ],\n examples: ['devworkspace task run T-20260101-ab12 typecheck', 'devworkspace task new \"Fix the quotation email bug\"', 'devworkspace task status T-20260101-ab12 COMPLETED'],\n },\n {\n name: 'testenv',\n summary: 'Declare a test environment so database-touching checks may run (local, never committed)',\n usage: [\n 'devworkspace testenv declare --package <dir> --check integration|security|e2e|unit [--check ...] --target \"<description>\" --yes',\n 'devworkspace testenv list',\n 'devworkspace testenv revoke --package <dir>',\n ],\n options: [\n ['--package <dir>', 'package directory the declaration covers'],\n ['--check <id>', 'check the declaration allows (repeatable)'],\n ['--target <text>', 'words describing the environment, never a connection string'],\n ['--yes', 'confirm that running those checks there is safe'],\n ...COMMON,\n ],\n examples: ['devworkspace testenv declare --package backend --check integration --target \"disposable docker compose stack\" --yes'],\n },\n {\n name: 'decision',\n summary: 'Record architectural/project decisions (append-only, human-readable)',\n usage: [\n 'devworkspace decision add --title <t> --context <c> --decision <d> --consequences <q> [--supersedes <n>]',\n 'devworkspace decision list',\n 'devworkspace decision show <n>',\n ],\n options: COMMON,\n examples: ['devworkspace decision list'],\n },\n {\n name: 'session',\n summary: 'Save or list short session summaries (never transcripts)',\n usage: [\n 'devworkspace session save --goal <g> [--done <x>]... [--area <a>]... [--tests-run <t>]... [--decision-note <d>]... [--remaining <r>]... [--next <n>] [--task <id>]',\n 'devworkspace session list',\n ],\n options: COMMON,\n examples: ['devworkspace session save --goal \"Fix login bug\" --done \"Added regression test\" --next \"Run e2e\"'],\n },\n {\n name: 'agent',\n summary: 'Manage coding agent integrations (claude, codex, cursor, copilot)',\n usage: [\n 'devworkspace agent install [--agent claude|codex|cursor|copilot|all] [--dry-run]',\n 'devworkspace agent list',\n ],\n options: [\n ['--agent <id>', 'agent adapter: claude, codex, cursor, copilot, or all (default: claude)'],\n ['--dry-run', 'preview the files that would change'],\n ...COMMON,\n ],\n examples: ['devworkspace agent install --agent cursor', 'devworkspace agent install --agent all --dry-run', 'devworkspace agent list'],\n },\n {\n name: 'export',\n summary: 'Export portable project knowledge to a JSON bundle',\n usage: ['devworkspace export [--out <file>] [--dry-run]'],\n options: [['--out <file>', 'output path (default: devworkspace-export-<date>.json)'], ...COMMON],\n examples: ['devworkspace export --out knowledge.json'],\n },\n {\n name: 'import',\n summary: 'Safely import an export bundle (validated; never silently overwrites)',\n usage: ['devworkspace import <file> [--dry-run] [--overwrite] [--allow-different-project]'],\n options: [['--overwrite', 'replace differing local files (backups are kept)'], ['--dry-run', 'show what would change'], ...COMMON],\n examples: ['devworkspace import knowledge.json --dry-run'],\n },\n {\n name: 'reset',\n summary: 'Delete .devworkspace/ so you can start again with init (shows a plan unless --yes)',\n usage: ['devworkspace reset [--include-agent-files] [--yes]'],\n options: [\n ['--yes', 'actually delete (without it, reset only shows what it would remove)'],\n ['--include-agent-files', 'also remove managed DevWorkspace blocks and skills from agent instruction files'],\n ['--dry-run', 'show the plan only'],\n ...COMMON,\n ],\n examples: ['devworkspace reset', 'devworkspace reset --yes', 'devworkspace reset --yes --include-agent-files && devworkspace init'],\n },\n {\n name: 'migrate',\n summary: 'Upgrade workspace files to the current schema (with backups)',\n usage: ['devworkspace migrate [--dry-run]'],\n options: [['--dry-run', 'list what would be migrated'], ...COMMON],\n examples: ['devworkspace migrate'],\n },\n];\n\nexport function topHelp(version: string): string {\n const w = Math.max(...COMMANDS.map((c) => c.name.length));\n return [\n `devworkspace ${version} - project-local AI engineering workspace`,\n '',\n 'Usage: devworkspace <command> [options]',\n '',\n 'Commands:',\n ...COMMANDS.map((c) => ` ${c.name.padEnd(w + 2)}${c.summary}`),\n '',\n 'Quick start:',\n ' cd my-project',\n ' npx devworkspace init',\n ' npx devworkspace analyze',\n ' # paste .devworkspace/analysis/onboarding-prompt.md into Claude Code',\n '',\n 'Global options: --json --cwd <dir> --debug --no-color --ascii --help --version',\n '(DevWorkspace never prompts interactively; destructive commands such as reset require --yes.)',\n 'Exit codes: 0 ok · 1 failure · 2 usage error or approval needed · 3 warnings (--strict) or setup finished but not fully verified · 130 interrupted',\n 'Run \"devworkspace <command> --help\" for details.',\n ].join('\\n');\n}\n\nexport function commandHelp(c: CommandHelp): string {\n const w = Math.max(...c.options.map(([o]) => o.length));\n return [\n `devworkspace ${c.name} - ${c.summary}`,\n '',\n 'Usage:',\n ...c.usage.map((u) => ` ${u}`),\n '',\n 'Options:',\n ...c.options.map(([o, d]) => ` ${o.padEnd(w + 2)}${d}`),\n '',\n 'Examples:',\n ...c.examples.map((e) => ` ${e}`),\n ].join('\\n');\n}\n"]}
|
|
1
|
+
{"version":3,"file":"help.js","sourceRoot":"","sources":["../../src/cli/help.ts"],"names":[],"mappings":"AAQA,MAAM,M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AAU;QACV,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;QACxD,EAAE;QACF,WAAW;QACX,GAAG,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;KACnC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC","sourcesContent":["export interface CommandHelp {\n name: string;\n summary: string;\n usage: string[];\n options: [string, string][];\n examples: string[];\n}\n\nconst COMMON: [string, string][] = [\n ['--json', 'machine-readable output'],\n ['--cwd <dir>', 'run as if started in <dir>'],\n ['--debug', 'show stack traces and debug logs'],\n];\n\nexport const COMMANDS: CommandHelp[] = [\n {\n name: 'init',\n summary: 'Create .devworkspace/ in the current project (safe to re-run)',\n usage: ['devworkspace init [--root <dir>] [--dry-run] [--with-integrations [--yes] [--scope project|user]]'],\n options: [\n ['--root <dir>', 'project root (default: Git top-level or current directory)'],\n ['--dry-run', 'show what would be created'],\n ['--with-integrations', 'then run the same integration setup as \"devworkspace setup --integrations\"'],\n ['--yes', 'with --with-integrations: approve machine-level and third-party installs'],\n ...COMMON,\n ],\n examples: ['npx devworkspace init', 'npx devworkspace init --with-integrations --yes'],\n },\n {\n name: 'setup',\n summary: 'Single-command repository setup (inspect, initialize, discover contract & validate)',\n usage: [\n 'devworkspace setup',\n 'devworkspace setup --integrations [--yes] [--dry-run] [--scope project|user] [--only graphify,agent-skills,ponytail]',\n ],\n options: [\n ['--integrations', 'set up external integrations (Graphify, Agent Skills, Ponytail)'],\n ['--dry-run', 'show exactly what would run; changes nothing'],\n ['--yes', 'with --integrations: approve machine-level and third-party installs'],\n ['--scope project|user', 'where to install (default: project; user needs --yes)'],\n ['--only <ids>', 'comma-separated: graphify, agent-skills, ponytail'],\n ...COMMON,\n ],\n examples: ['devworkspace setup', 'devworkspace setup --json', 'devworkspace setup --integrations --yes'],\n },\n {\n name: 'integrations',\n summary: 'Show or repair the integration installation (observed, not assumed)',\n usage: [\n 'devworkspace integrations status [--quick] [--restarted] [--strict]',\n 'devworkspace integrations repair [--yes] [--dry-run] [--only <ids>] [--scope project|user]',\n ],\n options: [\n ['--quick', 'only look at files and PATH (fast, but nothing can show VERIFIED)'],\n ['--restarted', 'record that you restarted Claude Code, clearing RESTART_REQUIRED'],\n ['--strict', 'exit 3 unless every required integration is VERIFIED'],\n ...COMMON,\n ],\n examples: ['devworkspace integrations status', 'devworkspace integrations repair --yes'],\n },\n {\n name: 'analyze',\n summary: 'Deterministic repository discovery + generate the Claude onboarding prompt',\n usage: ['devworkspace analyze [--dry-run]'],\n options: [['--dry-run', 'discover and report without writing files'], ...COMMON],\n examples: ['devworkspace analyze', 'devworkspace analyze --json'],\n },\n {\n name: 'status',\n summary: 'Concise overview: health, Git, knowledge, tasks, integrations, verification',\n usage: ['devworkspace status [--strict] [--deep] (read-only)'],\n options: [['--strict', 'exit 3 when anything needs attention'], ['--deep', 'also run the integration health checks (what doctor does)'], ...COMMON],\n examples: ['devworkspace status', 'devworkspace status --json'],\n },\n {\n name: 'doctor',\n summary: 'Check the workspace, integrations, security and portability',\n usage: ['devworkspace doctor [--fix] [--strict] (core workspace and integrations are reported separately)'],\n options: [['--fix', 'safely create missing folders/ignore rules (never deletes)'], ['--strict', 'exit 3 when there are warnings'], ...COMMON],\n examples: ['devworkspace doctor', 'devworkspace doctor --json --strict'],\n },\n {\n name: 'refresh',\n summary: 'Re-derive deterministic facts and mark knowledge stale when its evidence changed',\n usage: ['devworkspace refresh [--dry-run] (writes discovery files and detector facts; --dry-run writes nothing)'],\n options: [['--dry-run', 'report stale knowledge without writing'], ...COMMON],\n examples: ['devworkspace refresh'],\n },\n {\n name: 'context',\n summary: 'Show what DevWorkspace believes about the project',\n usage: ['devworkspace context [--for <request>] [--topic <prefix>] [--full]'],\n options: [['--for <request>', 'task-aware context: only what this request needs, each item with the reason it is included (safety rules are always shown)'], ['--topic <text>', 'only facts and testing-contract entries that match <text> (safety rules are always shown)'], ['--full', 'also print .devworkspace/context/*.md'], ...COMMON],\n examples: ['devworkspace context --topic auth', 'devworkspace context --for \"fix the invoice total rounding bug\"'],\n },\n {\n name: 'fact',\n summary: 'Record, verify or remove a piece of project knowledge',\n usage: [\n 'devworkspace fact add --key <key> --value <text> --source <desc> [--file <rel path>]... [--source-type ai|user|file|git] [--confidence HIGH|MEDIUM|LOW] [--status VERIFIED|INFERRED|UNKNOWN]',\n 'devworkspace fact verify <key>',\n 'devworkspace fact remove <key>',\n 'devworkspace fact list',\n ],\n options: [\n ['--key', 'lowercase dotted key, e.g. auth.session-store'],\n ['--value', 'one concise sentence (no secrets, no absolute paths)'],\n ['--file <path>', 'repository file that evidences the fact (repeatable); used for staleness'],\n ...COMMON,\n ],\n examples: ['devworkspace fact add --key auth.sessions --value \"Sessions live in Redis\" --source \"src/auth/session.ts\" --file src/auth/session.ts --source-type ai --confidence HIGH --status VERIFIED'],\n },\n {\n name: 'feature',\n summary: 'Manage feature-level knowledge and end-to-end component traces',\n usage: [\n 'devworkspace feature list',\n 'devworkspace feature show <id>',\n 'devworkspace feature validate',\n 'devworkspace feature add --id <id> --name <name> [--entry <path>...] [--route <path>...] [--service <path>...] [--model <path>...] [--test <path>...] [--symbol <sym>]',\n ],\n options: [\n ['--id <id>', 'unique feature identifier, e.g. auth.login'],\n ['--name <name>', 'human-readable name for the feature'],\n ['--entry <path>', 'frontend entry point path (repeatable)'],\n ['--route <path>', 'backend route/controller path (repeatable)'],\n ['--service <path>', 'backend service path (repeatable)'],\n ['--model <path>', 'database model/schema path (repeatable)'],\n ['--test <path>', 'test file path (repeatable)'],\n ['--symbol <sym>', 'symbol name (function, class, endpoint) to verify in component files'],\n ...COMMON,\n ],\n examples: [\n 'devworkspace feature list',\n 'devworkspace feature show auth.login',\n 'devworkspace feature validate',\n 'devworkspace feature add --id auth.login --name \"User Authentication\" --entry frontend/src/pages/Login.tsx --route backend/src/routes/auth.ts --symbol authRoutes',\n ],\n },\n {\n name: 'graph',\n summary: 'Inspect and trace Graphify knowledge graphs',\n usage: [\n 'devworkspace graph status',\n 'devworkspace graph trace [--from <path|query>] [--depth <n>]',\n ],\n options: [\n ['--from <path|query>', 'starting node file path or symbol name to trace from'],\n ['--depth <n>', 'maximum traversal depth (1-10, default 2)'],\n ...COMMON,\n ],\n examples: [\n 'devworkspace graph status',\n 'devworkspace graph trace --from src/api.ts --depth 3',\n ],\n },\n {\n name: 'task',\n summary: 'Track engineering tasks with a completion gate',\n usage: [\n 'devworkspace task new \"<request>\" [--type BUG|FEATURE|...]',\n 'devworkspace task list [--all] (alias: devworkspace tasks)',\n 'devworkspace task show <id>',\n 'devworkspace task status <id> <STATUS> [--note <text>]',\n 'devworkspace task update <id> [--title ..] [--criteria ..]... [--plan ..]... [--area ..]... [--blocker ..]... [--require <check>]... [--summary ..]',\n 'devworkspace task run <id> <check> [--package <dir>] [--timeout <seconds>] (executes the contract command; read-only checks only)',\n 'devworkspace task verify <id> <check> pass|fail|skip|pending [--package <dir>] [--reason user-override] [--detail <text>] (records a report, not an executed result)',\n 'devworkspace task tests <id> --phase baseline|after --passed <n> --failed <n>',\n 'devworkspace task attest <id> [--user-work-intact] [--knowledge-reviewed] [--final-state-inspected]',\n ],\n options: [\n ['--all', 'include completed tasks'],\n ['--package <dir>', 'with run/verify: the package the result belongs to (default: every changed package / the root)'],\n ['--timeout <seconds>', 'with run: per-command time limit (default 600)'],\n ...COMMON,\n ],\n examples: ['devworkspace task run T-20260101-ab12 typecheck', 'devworkspace task new \"Fix the quotation email bug\"', 'devworkspace task status T-20260101-ab12 COMPLETED'],\n },\n {\n name: 'testenv',\n summary: 'Declare a test environment so database-touching checks may run (local, never committed)',\n usage: [\n 'devworkspace testenv declare --package <dir> --check integration|security|e2e|unit [--check ...] --target \"<description>\" --yes',\n 'devworkspace testenv list',\n 'devworkspace testenv revoke --package <dir>',\n ],\n options: [\n ['--package <dir>', 'package directory the declaration covers'],\n ['--check <id>', 'check the declaration allows (repeatable)'],\n ['--target <text>', 'words describing the environment, never a connection string'],\n ['--yes', 'confirm that running those checks there is safe'],\n ...COMMON,\n ],\n examples: ['devworkspace testenv declare --package backend --check integration --target \"disposable docker compose stack\" --yes'],\n },\n {\n name: 'decision',\n summary: 'Record architectural/project decisions (append-only, human-readable)',\n usage: [\n 'devworkspace decision add --title <t> --context <c> --decision <d> --consequences <q> [--supersedes <n>]',\n 'devworkspace decision list',\n 'devworkspace decision show <n>',\n ],\n options: COMMON,\n examples: ['devworkspace decision list'],\n },\n {\n name: 'session',\n summary: 'Save or list short session summaries (never transcripts)',\n usage: [\n 'devworkspace session save --goal <g> [--done <x>]... [--area <a>]... [--tests-run <t>]... [--decision-note <d>]... [--remaining <r>]... [--next <n>] [--task <id>]',\n 'devworkspace session list',\n ],\n options: COMMON,\n examples: ['devworkspace session save --goal \"Fix login bug\" --done \"Added regression test\" --next \"Run e2e\"'],\n },\n {\n name: 'agent',\n summary: 'Manage coding agent integrations (claude, codex, cursor, copilot)',\n usage: [\n 'devworkspace agent install [--agent claude|codex|cursor|copilot|all] [--dry-run]',\n 'devworkspace agent list',\n ],\n options: [\n ['--agent <id>', 'agent adapter: claude, codex, cursor, copilot, or all (default: claude)'],\n ['--dry-run', 'preview the files that would change'],\n ...COMMON,\n ],\n examples: ['devworkspace agent install --agent cursor', 'devworkspace agent install --agent all --dry-run', 'devworkspace agent list'],\n },\n {\n name: 'export',\n summary: 'Export portable project knowledge to a JSON bundle',\n usage: ['devworkspace export [--out <file>] [--dry-run]'],\n options: [['--out <file>', 'output path (default: devworkspace-export-<date>.json)'], ...COMMON],\n examples: ['devworkspace export --out knowledge.json'],\n },\n {\n name: 'import',\n summary: 'Safely import an export bundle (validated; never silently overwrites)',\n usage: ['devworkspace import <file> [--dry-run] [--overwrite] [--allow-different-project]'],\n options: [['--overwrite', 'replace differing local files (backups are kept)'], ['--dry-run', 'show what would change'], ...COMMON],\n examples: ['devworkspace import knowledge.json --dry-run'],\n },\n {\n name: 'reset',\n summary: 'Delete .devworkspace/ so you can start again with init (shows a plan unless --yes)',\n usage: ['devworkspace reset [--include-agent-files] [--yes]'],\n options: [\n ['--yes', 'actually delete (without it, reset only shows what it would remove)'],\n ['--include-agent-files', 'also remove managed DevWorkspace blocks and skills from agent instruction files'],\n ['--dry-run', 'show the plan only'],\n ...COMMON,\n ],\n examples: ['devworkspace reset', 'devworkspace reset --yes', 'devworkspace reset --yes --include-agent-files && devworkspace init'],\n },\n {\n name: 'migrate',\n summary: 'Upgrade workspace files to the current schema (with backups)',\n usage: ['devworkspace migrate [--dry-run]'],\n options: [['--dry-run', 'list what would be migrated'], ...COMMON],\n examples: ['devworkspace migrate'],\n },\n];\n\nexport function topHelp(version: string): string {\n const w = Math.max(...COMMANDS.map((c) => c.name.length));\n return [\n `devworkspace ${version} - project-local AI engineering workspace`,\n '',\n 'Usage: devworkspace <command> [options]',\n '',\n 'Commands:',\n ...COMMANDS.map((c) => ` ${c.name.padEnd(w + 2)}${c.summary}`),\n '',\n 'Quick start:',\n ' cd my-project',\n ' npx devworkspace init',\n ' npx devworkspace analyze',\n ' # paste .devworkspace/analysis/onboarding-prompt.md into Claude Code',\n '',\n 'Global options: --json --cwd <dir> --debug --no-color --ascii --help --version',\n '(DevWorkspace never prompts interactively; destructive commands such as reset require --yes.)',\n 'Exit codes: 0 ok · 1 failure · 2 usage error or approval needed · 3 warnings (--strict) or setup finished but not fully verified · 130 interrupted',\n 'Run \"devworkspace <command> --help\" for details.',\n ].join('\\n');\n}\n\nexport function commandHelp(c: CommandHelp): string {\n const w = Math.max(...c.options.map(([o]) => o.length));\n return [\n `devworkspace ${c.name} - ${c.summary}`,\n '',\n 'Usage:',\n ...c.usage.map((u) => ` ${u}`),\n '',\n 'Options:',\n ...c.options.map(([o, d]) => ` ${o.padEnd(w + 2)}${d}`),\n '',\n 'Examples:',\n ...c.examples.map((e) => ` ${e}`),\n ].join('\\n');\n}\n"]}
|
package/dist/cli/render.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ import type { ResetResult } from '../services/reset.js';
|
|
|
14
14
|
import type { IntegrationReport } from '../integrations/types.js';
|
|
15
15
|
import type { SetupResult } from '../integrations/manager.js';
|
|
16
16
|
import type { IntegrationsStatus } from '../services/integrations.js';
|
|
17
|
+
import type { FeatureItem, FeatureValidationReport } from '../features/types.js';
|
|
18
|
+
import type { FeatureSummary } from '../services/features.js';
|
|
19
|
+
import type { ProjectSetupResult } from '../services/setup.js';
|
|
20
|
+
import type { GraphStatusResult, GraphTraceResult } from '../services/graph.js';
|
|
17
21
|
export interface Style {
|
|
18
22
|
ok(s: string): string;
|
|
19
23
|
warn(s: string): string;
|
|
@@ -55,3 +59,9 @@ export declare function renderReset(s: Style, r: ResetResult): string;
|
|
|
55
59
|
export declare function renderMigrate(s: Style, r: MigrateResult): string;
|
|
56
60
|
export declare function renderSetup(s: Style, r: SetupResult): string;
|
|
57
61
|
export declare function renderIntegrationsStatus(s: Style, r: IntegrationsStatus): string;
|
|
62
|
+
export declare function renderFeature(s: Style, f: FeatureItem): string;
|
|
63
|
+
export declare function renderFeatureList(s: Style, features: FeatureSummary[]): string;
|
|
64
|
+
export declare function renderFeatureValidation(s: Style, rep: FeatureValidationReport): string;
|
|
65
|
+
export declare function renderProjectSetup(s: Style, r: ProjectSetupResult): string;
|
|
66
|
+
export declare function renderGraphStatus(s: Style, res: GraphStatusResult): string;
|
|
67
|
+
export declare function renderGraphTrace(s: Style, trace: GraphTraceResult): string;
|
package/dist/cli/render.js
CHANGED
|
@@ -403,4 +403,171 @@ export function renderIntegrationsStatus(s, r) {
|
|
|
403
403
|
L.push('', r.summary.complete ? `${s.ok(s.sym.ok)} All required integrations are verified.` : `${s.warn(s.sym.warn)} ${r.summary.verified} of ${r.summary.required} required integrations verified.`);
|
|
404
404
|
return L.join('\n');
|
|
405
405
|
}
|
|
406
|
+
export function renderFeature(s, f) {
|
|
407
|
+
const L = [];
|
|
408
|
+
const statusColor = f.status === 'verified' ? s.ok(`[${f.status}]`) : f.status === 'inferred' ? s.warn(`[${f.status}]`) : s.dim(`[${f.status}]`);
|
|
409
|
+
L.push(`${s.bold(f.name)} (${f.id}) ${statusColor}`);
|
|
410
|
+
if (f.description)
|
|
411
|
+
L.push(` ${f.description}`);
|
|
412
|
+
if (f.tags?.length)
|
|
413
|
+
L.push(` Tags: ${f.tags.join(', ')}`);
|
|
414
|
+
L.push(` Updated: ${f.updatedAt}`);
|
|
415
|
+
const renderGroup = (label, group) => {
|
|
416
|
+
if (!group)
|
|
417
|
+
return;
|
|
418
|
+
const entries = Object.entries(group).filter(([, comps]) => Array.isArray(comps) && comps.length > 0);
|
|
419
|
+
if (entries.length === 0)
|
|
420
|
+
return;
|
|
421
|
+
L.push('', ` ${s.bold(label)}:`);
|
|
422
|
+
for (const [type, comps] of entries) {
|
|
423
|
+
for (const c of comps) {
|
|
424
|
+
const mark = c.status === 'verified' ? s.ok(s.sym.ok) : c.status === 'inferred' ? s.warn('?') : s.fail(s.sym.fail);
|
|
425
|
+
const sym = c.symbol ? `:${c.symbol}` : '';
|
|
426
|
+
const det = c.detail ? ` (${c.detail})` : '';
|
|
427
|
+
L.push(` ${mark} [${type}] ${c.path}${sym}${det}`);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
renderGroup('Frontend', f.frontend);
|
|
432
|
+
renderGroup('Backend', f.backend);
|
|
433
|
+
renderGroup('Database & Migrations', f.database);
|
|
434
|
+
renderGroup('Tests', f.tests);
|
|
435
|
+
return L.join('\n');
|
|
436
|
+
}
|
|
437
|
+
export function renderFeatureList(s, features) {
|
|
438
|
+
if (features.length === 0) {
|
|
439
|
+
return 'No features mapped yet. Use "devworkspace feature add" or edit .devworkspace/context/features.json.';
|
|
440
|
+
}
|
|
441
|
+
const L = ['Mapped features:'];
|
|
442
|
+
for (const f of features) {
|
|
443
|
+
const mark = f.status === 'verified' ? s.ok(s.sym.ok) : f.status === 'inferred' ? s.warn('?') : s.fail(s.sym.fail);
|
|
444
|
+
L.push(` ${mark} ${f.id.padEnd(20)} ${f.status.padEnd(10)} ${f.name} (${f.componentsCount} components, ${f.testsCount} tests)`);
|
|
445
|
+
}
|
|
446
|
+
return L.join('\n');
|
|
447
|
+
}
|
|
448
|
+
export function renderFeatureValidation(s, rep) {
|
|
449
|
+
const L = [];
|
|
450
|
+
L.push(`Feature map validation: ${rep.total} total feature(s)`);
|
|
451
|
+
L.push(` ${s.ok(s.sym.ok)} Verified: ${rep.verified}`);
|
|
452
|
+
L.push(` ${s.warn('?')} Inferred: ${rep.inferred}`);
|
|
453
|
+
L.push(` ${s.fail(s.sym.fail)} Unknown / broken: ${rep.unknown}`);
|
|
454
|
+
for (const f of rep.features) {
|
|
455
|
+
if (!f.valid) {
|
|
456
|
+
L.push('', ` ${s.warn(s.sym.warn)} [${f.featureId}] ${f.name}:`);
|
|
457
|
+
for (const iss of f.issues) {
|
|
458
|
+
L.push(` - ${iss}`);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
return L.join('\n');
|
|
463
|
+
}
|
|
464
|
+
export function renderProjectSetup(s, r) {
|
|
465
|
+
const L = [];
|
|
466
|
+
L.push(s.bold(`DevWorkspace Setup: ${r.projectName}`));
|
|
467
|
+
L.push(` Repository root: ${r.root}`);
|
|
468
|
+
L.push(` Platform: ${r.os} | Node.js: ${r.nodeVersion}`);
|
|
469
|
+
const cliNote = r.cli.mode === 'source-checkout' ? ' (local source checkout)' : r.cli.mode === 'npx-cache' ? ' (npx cache)' : '';
|
|
470
|
+
L.push(` DevWorkspace CLI: v${r.cli.version}${cliNote} [${r.cli.path}]`);
|
|
471
|
+
L.push('');
|
|
472
|
+
L.push(s.bold('Workspace & Discovery:'));
|
|
473
|
+
L.push(` ${s.ok(s.sym.ok)} Workspace initialized: ${r.isFirstRun ? 'Created fresh .devworkspace/' : 'Existing workspace preserved'}`);
|
|
474
|
+
if (r.packages.length > 0) {
|
|
475
|
+
L.push(` ${s.ok(s.sym.ok)} Packages detected: ${r.packages.map((p) => `${p.path} (${p.ecosystem}${p.packageManager ? `, ${p.packageManager}` : ''})`).join(', ')}`);
|
|
476
|
+
}
|
|
477
|
+
if (r.frameworks.length > 0) {
|
|
478
|
+
L.push(` ${s.ok(s.sym.ok)} Frameworks: ${r.frameworks.join(', ')}`);
|
|
479
|
+
}
|
|
480
|
+
L.push('');
|
|
481
|
+
L.push(s.bold('Verification Contract:'));
|
|
482
|
+
L.push(` ${s.ok(s.sym.ok)} ${r.verification.available} verification command(s) available: ${r.verification.checks.join(', ') || 'none'}`);
|
|
483
|
+
if (r.verification.drift.length > 0) {
|
|
484
|
+
L.push(` ${s.warn(s.sym.warn)} Contract drift detected: ${r.verification.drift.length} issue(s) need attention`);
|
|
485
|
+
for (const d of r.verification.drift.slice(0, 3)) {
|
|
486
|
+
L.push(` - ${d.id}${d.cwd ? ` [${d.cwd}]` : ''}: ${d.message}`);
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
L.push(` ${s.ok(s.sym.ok)} Configured commands match repository manifests and working directories`);
|
|
491
|
+
}
|
|
492
|
+
L.push('');
|
|
493
|
+
if (r.features) {
|
|
494
|
+
L.push(s.bold('Feature-Level Knowledge:'));
|
|
495
|
+
L.push(` ${s.ok(s.sym.ok)} ${r.features.total} feature(s) mapped: ${r.features.verified} verified, ${r.features.unknown} unknown/broken`);
|
|
496
|
+
L.push('');
|
|
497
|
+
}
|
|
498
|
+
L.push(s.bold('Integrations:'));
|
|
499
|
+
for (const i of r.integrations) {
|
|
500
|
+
const mark = i.status === 'VERIFIED' ? s.ok(s.sym.ok) : i.status === 'NOT_INSTALLED' ? s.dim('-') : s.warn(s.sym.warn);
|
|
501
|
+
L.push(` ${mark} ${i.name.padEnd(16)} ${i.status} ${i.required ? '(recommended)' : '(optional)'}`);
|
|
502
|
+
}
|
|
503
|
+
L.push('');
|
|
504
|
+
L.push(s.bold('Readiness & Health:'));
|
|
505
|
+
const healthMark = r.doctor.healthy ? s.ok(s.sym.ok) : s.warn(s.sym.warn);
|
|
506
|
+
L.push(` ${healthMark} Doctor checks: ${r.doctor.passed} passed, ${r.doctor.warnings} warning(s), ${r.doctor.failures} failure(s)`);
|
|
507
|
+
L.push('');
|
|
508
|
+
L.push(s.bold('Next Steps:'));
|
|
509
|
+
for (const step of r.nextSteps) {
|
|
510
|
+
L.push(` ${s.sym.arrow} ${step}`);
|
|
511
|
+
}
|
|
512
|
+
return L.join('\n');
|
|
513
|
+
}
|
|
514
|
+
export function renderGraphStatus(s, res) {
|
|
515
|
+
const L = [];
|
|
516
|
+
L.push(s.bold('Graphify Knowledge Graph:'));
|
|
517
|
+
if (!res.available) {
|
|
518
|
+
L.push(` ${s.warn(s.sym.warn)} ${res.message}`);
|
|
519
|
+
if (res.hint)
|
|
520
|
+
L.push(` ${s.sym.arrow} Hint: ${res.hint}`);
|
|
521
|
+
return L.join('\n');
|
|
522
|
+
}
|
|
523
|
+
L.push(` ${s.ok(s.sym.ok)} Location: ${res.graphPath}`);
|
|
524
|
+
L.push(` ${s.ok(s.sym.ok)} Nodes: ${res.nodesCount} | Edges: ${res.edgesCount}`);
|
|
525
|
+
if (Object.keys(res.nodeTypes).length > 0) {
|
|
526
|
+
L.push('');
|
|
527
|
+
L.push(s.bold('Node Types:'));
|
|
528
|
+
for (const [t, count] of Object.entries(res.nodeTypes)) {
|
|
529
|
+
L.push(` - ${t.padEnd(14)}: ${count}`);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return L.join('\n');
|
|
533
|
+
}
|
|
534
|
+
export function renderGraphTrace(s, trace) {
|
|
535
|
+
const L = [];
|
|
536
|
+
L.push(s.bold(`Graph Trace: "${trace.query}" (depth: ${trace.depth})`));
|
|
537
|
+
if (!trace.available) {
|
|
538
|
+
L.push(` ${s.warn(s.sym.warn)} Graph not available. ${trace.warnings.join(' ')}`);
|
|
539
|
+
return L.join('\n');
|
|
540
|
+
}
|
|
541
|
+
if (!trace.matchedNode) {
|
|
542
|
+
L.push(` ${s.warn(s.sym.warn)} No start node matched "${trace.query}".`);
|
|
543
|
+
for (const w of trace.warnings)
|
|
544
|
+
L.push(` ${s.dim(w)}`);
|
|
545
|
+
return L.join('\n');
|
|
546
|
+
}
|
|
547
|
+
L.push(` Start node: ${s.bold(trace.matchedNode.id)} [${trace.matchedNode.status}]`);
|
|
548
|
+
L.push(` Traversed: ${trace.totalNodes} node(s) (${s.ok(`${trace.verifiedNodes} verified`)}, ${trace.hypothesisNodes > 0 ? s.warn(`${trace.hypothesisNodes} hypothesis`) : '0 hypothesis'})`);
|
|
549
|
+
L.push('');
|
|
550
|
+
L.push(s.bold('Traversed Nodes:'));
|
|
551
|
+
for (const n of trace.nodes) {
|
|
552
|
+
const indent = ' '.repeat(n.depth + 1);
|
|
553
|
+
const tag = n.status === 'verified' ? s.ok('[verified]') : s.warn('[hypothesis]');
|
|
554
|
+
const pathInfo = n.path ? s.dim(`(${n.path}${n.symbol ? `::${n.symbol}` : ''})`) : s.dim('(no file)');
|
|
555
|
+
const reason = n.reason ? ` - ${s.dim(n.reason)}` : '';
|
|
556
|
+
L.push(`${indent}${tag} ${n.id} ${pathInfo}${reason}`);
|
|
557
|
+
}
|
|
558
|
+
if (trace.edges.length > 0) {
|
|
559
|
+
L.push('');
|
|
560
|
+
L.push(s.bold('Relationships:'));
|
|
561
|
+
for (const e of trace.edges) {
|
|
562
|
+
const tag = e.status === 'verified' ? s.ok('[verified]') : s.warn('[hypothesis]');
|
|
563
|
+
L.push(` ${tag} ${e.source} --(${e.relation})--> ${e.target}`);
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
if (trace.warnings.length > 0) {
|
|
567
|
+
L.push('');
|
|
568
|
+
for (const w of trace.warnings)
|
|
569
|
+
L.push(` ${s.warn(s.sym.warn)} ${w}`);
|
|
570
|
+
}
|
|
571
|
+
return L.join('\n');
|
|
572
|
+
}
|
|
406
573
|
//# sourceMappingURL=render.js.map
|