vgxness 1.5.1 → 1.5.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.
Files changed (42) hide show
  1. package/README.md +23 -2
  2. package/dist/agents/agent-seed-service.js +10 -0
  3. package/dist/agents/canonical-agent-manifest.js +177 -0
  4. package/dist/agents/canonical-agent-projection.js +146 -0
  5. package/dist/agents/renderers/claude-renderer.js +30 -52
  6. package/dist/cli/bun-bin.js +6 -0
  7. package/dist/cli/cli-help.js +3 -0
  8. package/dist/cli/commands/agent-skill-dispatcher.js +6 -5
  9. package/dist/cli/commands/mcp-dispatcher.js +65 -3
  10. package/dist/cli/index.js +1 -1
  11. package/dist/governance/governance-report-builder.js +45 -26
  12. package/dist/mcp/claude-code-agent-config.js +79 -0
  13. package/dist/mcp/claude-code-config.js +84 -0
  14. package/dist/mcp/client-install-claude-code-contract.js +86 -0
  15. package/dist/mcp/client-install-claude-code.js +85 -0
  16. package/dist/mcp/index.js +5 -0
  17. package/dist/mcp/opencode-default-agent-config.js +7 -113
  18. package/dist/mcp/provider-canonical-agent-manifest.js +39 -0
  19. package/dist/mcp/provider-change-plan.js +57 -1
  20. package/dist/mcp/provider-doctor.js +54 -0
  21. package/dist/mcp/provider-status.js +82 -2
  22. package/dist/mcp/schema.js +2 -2
  23. package/dist/mcp/validation.js +1 -1
  24. package/dist/memory/memory-service.js +4 -0
  25. package/dist/sdd/sdd-workflow-service.js +129 -59
  26. package/dist/setup/providers/claude-setup-adapter.js +7 -4
  27. package/docs/architecture.md +54 -112
  28. package/docs/cli.md +53 -0
  29. package/docs/code-runtime.md +218 -0
  30. package/docs/contributing.md +120 -0
  31. package/docs/glossary.md +211 -0
  32. package/docs/mcp.md +144 -0
  33. package/docs/prd.md +23 -26
  34. package/docs/providers.md +123 -0
  35. package/docs/roadmap.md +88 -0
  36. package/docs/safety.md +147 -0
  37. package/docs/storage.md +93 -0
  38. package/package.json +1 -1
  39. package/docs/funcionamiento-del-sistema.md +0 -865
  40. package/docs/harness-gap-analysis.md +0 -243
  41. package/docs/vgxcode.md +0 -87
  42. package/docs/vgxness-code.md +0 -48
@@ -0,0 +1,218 @@
1
+ # VGXNESS Code runtime (`vgxness code`)
2
+
3
+ `vgxness code` is the native VGXNESS coding CLI/runtime. It is not a wrapper around OpenCode, a fork, a compatibility layer, a config format, a prompt copy, or a branded re-skin. Provider adapters translate VGXNESS-native requests only.
4
+
5
+ `vgxcode` is the experimental OpenTUI shell that renders `vgxness code` runtime events. It is currently root-owned during development; promoted surfaces will move to the standard `vgxness`/`vgx` bins.
6
+
7
+ ## Commands
8
+
9
+ ```bash
10
+ vgxness code inspect "<question>" # read-only repository investigation
11
+ vgxness code plan "<task>" # read-only implementation planning
12
+ vgxness code craft-preview "<task>" # show the diff you would make
13
+ vgxness code craft "<task>" # bounded edit-capable work with approval gates
14
+ vgxness code sdd <change> <phase> # SDD-backed phase work
15
+ ```
16
+
17
+ Common flags across modes:
18
+
19
+ | Flag | Effect |
20
+ |---|---|
21
+ | `--provider <id>` | `openai-compatible` (default in real use) or `fake` (deterministic for tests). |
22
+ | `--model <id>` | Provider model id. |
23
+ | `--stream` | Emit JSONL runtime events as they happen. |
24
+ | `--json` | Final response as JSON. |
25
+ | `--max-source-bytes <bytes>` | Bound on sources loaded into the prompt. |
26
+ | `--approval-policy ask\|allow\|deny` | Default `ask`. |
27
+ | `--approval-channel stdio\|auto` | `stdio` reads decisions from stdin; `auto` uses the configured broker. |
28
+ | `--verification none\|suggest\|run\|repair` | Verification posture. Default `suggest`. |
29
+ | `--transcript off\|summary\|full` | Final summary contents. Default `summary`. |
30
+ | `--memory off\|ask\|auto` | Memory save posture. Default `off`. |
31
+ | `--events-jsonl` | Output only the JSONL event stream (used for piping into the OpenTUI shell). |
32
+
33
+ `vgxness code sdd <change> <phase>` accepts:
34
+
35
+ | Flag | Effect |
36
+ |---|---|
37
+ | `--save-artifact` | Persist the phase artifact when explicit persistence is intended. |
38
+ | `--change-id <id>` | Override change id. |
39
+ | `--approval-policy`, `--approval-channel`, `--memory` | Same as the other modes. |
40
+
41
+ ## Modes
42
+
43
+ ### `inspect`
44
+
45
+ Read-only repository investigation. The runtime exposes only the `read` tool group: `list_files`, `read_file`, `search_content`, `inspect_project`, `git_status`, `git_diff`, `git_log`. No mutations, no shell, no network, no git writes.
46
+
47
+ ### `plan`
48
+
49
+ Read-only implementation planning. Same read tool group as `inspect`. The runtime can summarize architecture, propose safe approaches, and produce implementation outlines without touching the workspace.
50
+
51
+ ### `craft-preview`
52
+
53
+ Show the diff the runtime would apply. The runtime may call read tools and run planning-style reasoning, but does not write. Output is a unified diff that the user can review before approving the actual mutation.
54
+
55
+ ### `craft`
56
+
57
+ Approval-gated, bounded edit-capable work. Adds the workspace mutation group (`apply_patch`, `create_file`, `update_file`, `delete_file`), the shell/verification group (`run_shell_command`, `run_verification_command`, `network_request`, `git_mutation`), and SDD persistence tools if `--save-artifact` is set. Each mutation routes through `evaluatePermission(...)`; the `ApprovalBroker` either auto-resolves per `--approval-policy` or surfaces a prompt through the configured `approval-channel`.
58
+
59
+ ## Tool groups (19 tools)
60
+
61
+ The runtime's tool set is defined in `src/code/tools/tool-definitions.ts` and is composed per mode.
62
+
63
+ ### Read-only (7)
64
+
65
+ | Tool | Category | Notes |
66
+ |---|---|---|
67
+ | `list_files` | `read` | Repository files within the workspace. |
68
+ | `read_file` | `read` | Bounded text read. |
69
+ | `search_content` | `read` | Text content search. |
70
+ | `inspect_project` | `read` | Project metadata: package scripts, config files. |
71
+ | `git_status` | `git` | Inspection only. |
72
+ | `git_diff` | `git` | Inspection only. |
73
+ | `git_log` | `git` | Inspection only. |
74
+
75
+ ### Workspace mutations (4, all confirm-gated)
76
+
77
+ | Tool | Tier | Notes |
78
+ |---|---|---|
79
+ | `apply_patch` | `confirm`, audit | Bounded unified patch inside the workspace. |
80
+ | `create_file` | `confirm`, audit | New file inside the workspace. |
81
+ | `update_file` | `confirm`, audit | Existing file update. |
82
+ | `delete_file` | `restricted`, audit | Destructive; tighter gate. |
83
+
84
+ ### Shell, verification, network, git mutation (4, confirm-gated)
85
+
86
+ | Tool | Category | Notes |
87
+ |---|---|---|
88
+ | `run_shell_command` | `shell` | Non-destructive commands; permission-gated. |
89
+ | `run_verification_command` | `shell` | Routed through the permission-aware shell executor. |
90
+ | `network_request` | `network` | Bounded; explicit approval required. |
91
+ | `git_mutation` | `git` | Denied by default unless policy explicitly allows it. |
92
+
93
+ ### SDD reads (5)
94
+
95
+ | Tool | Notes |
96
+ |---|---|
97
+ | `sdd_status` | Read SDD change status for the active change. |
98
+ | `sdd_get_readiness` | Read readiness for the active phase; does not mutate artifacts. |
99
+ | `sdd_read_artifact` | Read one artifact for the active change. |
100
+ | `sdd_next_phase` | Recommended next phase. |
101
+ | `governance_report` | Redacted SDD governance report snapshot. |
102
+
103
+ ### SDD persistence (3, confirm-gated)
104
+
105
+ | Tool | Notes |
106
+ |---|---|
107
+ | `sdd_save_artifact` | Saves only when explicit persistence was requested. |
108
+ | `sdd_mark_ready` | Marks the phase ready; only when explicit persistence was requested. |
109
+ | `sdd_accept_artifact` | Records human-only acceptance; agents must not auto-accept. |
110
+
111
+ The SDD tool set is composed per phase: `apply-progress` exposes edit + shell + verification + persistence; `verify` exposes verification shell tools; other phases stay read/artifact oriented.
112
+
113
+ ## Providers
114
+
115
+ The runtime is provider-neutral. Adapters implement `CodeProviderAdapter` (`src/code/providers/provider-adapter.ts`):
116
+
117
+ | Adapter | Status | Notes |
118
+ |---|---|---|
119
+ | `openai-compatible` | Real | Speaks to any OpenAI-compatible endpoint; credentials come from environment references, never embedded. |
120
+ | `fake` | Tests | Deterministic, offline; for unit tests and CI. |
121
+
122
+ There is no native Anthropic provider in the runtime as of v1.5.1. OpenCode exposes an OpenAI-compatible bridge for Claude models; users who want Claude through `vgxness code` go through that bridge. Adding a native Anthropic provider is tracked in [Roadmap](./roadmap.md).
123
+
124
+ ## Approval flow
125
+
126
+ `PolicyApprovalBroker`, `StdioApprovalBroker`, and `ConservativePermissionGateway` (in `src/code/runtime/approval-coordinator.ts`) wire approval decisions to the runtime event stream.
127
+
128
+ ```text
129
+ tool call requested
130
+
131
+
132
+ PolicyApprovalBroker ──► ConservativePermissionGateway.evaluate(...)
133
+ │ │
134
+ │ ├── allow → execute, record event
135
+ │ ├── ask → ApprovalPrompt
136
+ │ │ ├── stdio channel: read line from stdin
137
+ │ │ └── auto channel: call injected broker
138
+ │ └── deny → record blocked event, return error
139
+
140
+ CodeRuntimeEventSink (stream JSONL to consumer)
141
+ ```
142
+
143
+ The `vgxcode` OpenTUI shell is one consumer of the event sink. When `craft` requests approval, the shell renders the prompt and writes the human decision back through the live process.
144
+
145
+ ## Configuration and reporting
146
+
147
+ Safe defaults are local and conservative:
148
+
149
+ - Provider: `fake` for offline/CI smoke; `openai-compatible` for real use.
150
+ - Posture: read-only by default unless the mode is `craft` or `craft-preview` was previewed.
151
+ - Approval policy: `ask`.
152
+ - Verification: `suggest`.
153
+ - Transcript: `summary` (checkpoint labels/timestamps only).
154
+ - Memory: `off` (never auto-save learnings).
155
+ - Bounded prompt/context size; no repair loop unless explicitly enabled.
156
+
157
+ Transcript modes:
158
+
159
+ - `off` — no transcript in the final summary.
160
+ - `summary` — checkpoint labels/timestamps only.
161
+ - `full` — sanitized checkpoints and tool summaries; command stdout/stderr are omitted by default.
162
+
163
+ Memory modes:
164
+
165
+ - `off` — never save learnings.
166
+ - `ask` — prepare a sanitized memory-save checkpoint but do not persist.
167
+ - `auto` — save sanitized learnings only through a configured memory gateway.
168
+
169
+ Prompts, reports, checkpoints, transcripts, and memory saves redact secret-like values through `omitSensitiveCommandOutput`, `redactJson`, and `redactSecrets` (`src/code/reporting/redaction.ts`).
170
+
171
+ ## SDD mode
172
+
173
+ `vgxness code sdd <change> <phase>` loads existing artifacts for the requested change/phase and exposes phase-appropriate tools. Non-implementation phases stay read/artifact oriented. `apply-progress` may expose edit and shell tools. `verify` may expose verification shell tools. Artifact saves require explicit `--save-artifact` (or the equivalent runtime flag); passing it is the only way persistence is triggered.
174
+
175
+ ## Project detection
176
+
177
+ `detectProject()` (in `src/code/runtime/project-detection.ts`) reports repository root, stack hints, config files, and verification presets such as `npm run typecheck` or `npm run test` when package scripts exist. The fake provider is deterministic for local tests.
178
+
179
+ ## OpenTUI shell (`vgxcode`)
180
+
181
+ The shell reads newline-delimited `CodeRuntimeEvent` JSON from stdin. If stdin has events or parse errors, `vgxcode` renders that stream and does not spawn the CLI. If stdin is a TTY, the OpenTUI entrypoint opens the interactive prompt and uses `inspect` by default.
182
+
183
+ ```bash
184
+ bun src/cli/tui/opentui/code/index.ts
185
+ ```
186
+
187
+ Interactive controls: `Tab` toggles between `inspect` and `plan`; prefix with `/inspect`, `/plan`, `/craft-preview`, or `/craft` to switch. Press `Enter` to submit; `Ctrl+C` to exit. The prompt input is cleared after submit and the submitted prompt remains visible as `Last submitted`. The UI shows explicit `idle`, `running`, `completed`, and `error` states.
188
+
189
+ Replay real read-only runtime events without spawning the root CLI:
190
+
191
+ ```bash
192
+ bun run cli:bun -- code inspect "What is this project?" --events-jsonl | bun src/cli/tui/opentui/code/index.ts
193
+ ```
194
+
195
+ `vgxcode` does not own mutation policy. `inspect`, `plan`, and `craft-preview` are read-only/preview paths. `/craft` is approval-capable and may mutate only through the runtime and its explicit approval channel; the OpenTUI shell only renders pending approvals and writes approve/deny decisions to the live runtime process.
196
+
197
+ ## Safety model
198
+
199
+ `vgxness code` routes edits, shell, network, git mutation, SDD persistence, and memory saves through explicit policy decisions:
200
+
201
+ - External workspace edits are denied.
202
+ - Destructive commands require approval.
203
+ - Git mutation is blocked by default unless explicitly approved.
204
+ - Network access requires approval.
205
+ - Secret-like values are redacted from prompts, reports, checkpoints, transcripts, and memory saves.
206
+ - Unrelated user work is preserved (no glob expansion outside the workspace, no `.` rewrites, no recursive deletes without explicit operator intent).
207
+
208
+ The full contract — categories, approval flow, redactors, retry policy — is in [Safety model](./safety.md).
209
+
210
+ ## Rollout checklist
211
+
212
+ For projects adopting `vgxness code`:
213
+
214
+ - **Config**: safe defaults documented; transcript/memory/provider controls exposed (`--transcript`, `--memory`, `--provider`).
215
+ - **Safety**: external edits, destructive shell, git mutation, network, secrets, and unrelated user work are covered by tests under `test/code/`.
216
+ - **Verification**: detected presets reported by `detectProject()`; verification results are honest `pass`/`fail`/`skipped` evidence.
217
+ - **Reporting**: transcripts are configurable and sanitized; sensitive command output is omitted by default.
218
+ - **Provider behavior**: core runtime remains provider-neutral and native VGXNESS Code, not a wrapper around any specific provider.
@@ -0,0 +1,120 @@
1
+ # Contributing
2
+
3
+ VGXNESS is an alpha local-first control plane. The repository follows a few rules that keep the product safe, predictable, and reviewable. This document is for humans and AI assistants who want to change the code, the docs, or both.
4
+
5
+ ## Repository layout
6
+
7
+ ```
8
+ src/
9
+ agents/ # agent + subagent registry, resolver, canonical manifest
10
+ cli/ # CLI dispatch, command modules, TUI, OpenTUI
11
+ code/ # native code runtime (vgxness code)
12
+ export/ # redaction and export helpers
13
+ governance/ # governance report builder, overlay fingerprint
14
+ harness/ # harness-side tool handlers
15
+ mcp/ # MCP server, schemas, control plane, doctor, OpenCode install
16
+ memory/ # memory service, SQLite database, migrations
17
+ orchestrator/ # natural-language planner (preview only)
18
+ payload/ # payload summary helpers
19
+ permissions/ # policy evaluator, schemas
20
+ providers/ # OpenCode provider adapter
21
+ runs/ # run lifecycle, execution planning, retry, snapshot export
22
+ sdd/ # SDD workflow service, schema, artifact portability
23
+ setup/ # setup defaults, plan, lifecycle, backup-rollback
24
+ skills/ # skill registry, resolver, payload, improvement proposals
25
+ verification/ # verification plan + report services
26
+ workflows/ # workflow registry, executor, allowlist adapter
27
+
28
+ test/ # node:test files mirroring src/ structure
29
+ seeds/ # shipped skill/agent seed assets
30
+ scripts/ # repo-level helper scripts
31
+ docs/ # human-facing documentation
32
+ ```
33
+
34
+ ## Runtime and toolchain
35
+
36
+ - Bun `>= 1.3.14` is the installed CLI/MCP runtime and the canonical CI verification path. It is also the only supported storage runtime (`bun:sqlite`).
37
+ - Node.js `>= 22` is development/build/test tooling for TypeScript, `node:test`, and selected helper scripts.
38
+ - TypeScript is ESM/NodeNext and strict, with `noUncheckedIndexedAccess` and `exactOptionalPropertyTypes`. Prefer explicit `undefined` over loose optional properties.
39
+ - Tests use the built-in `node:test` runner with `node:assert/strict`, not Jest/Vitest.
40
+
41
+ Install dependencies with `bun install --frozen-lockfile` when reproducing CI. When `package.json` dependency specifiers change, refresh and review `bun.lock` intentionally. Use `bun run check:bun-lock` to detect drift without mutating `node_modules`.
42
+
43
+ ## Verification order
44
+
45
+ CI runs the verification chain in this order:
46
+
47
+ ```bash
48
+ bun install --frozen-lockfile
49
+ bun run check:bun-lock
50
+ bun run verify:typecheck
51
+ bun run verify:test
52
+ bun run verify:test:bun-storage
53
+ bun run verify:bun-sqlite
54
+ bun run verify:package # which is bun run package:bun:evidence
55
+ bun run package:bun:evidence -- --require-pass
56
+ ```
57
+
58
+ The full chain is wrapped in `bun run verify`. For release-readiness, the package evidence run must pass explicitly with `--require-pass`.
59
+
60
+ `bun run verify:bun-sqlite` is the SQLite runtime release gate. It copies the source migrations into a temporary directory, applies them against a temporary database, and checks foreign keys, busy timeout, FTS/search, transaction rollback, integrity, and cleanup.
61
+
62
+ ## Product boundaries
63
+
64
+ VGXNESS is a local-first CLI/MCP control plane. The same domain services should back CLI, TUI, and MCP. Avoid reimplementing workflow, setup, or storage rules in only one surface.
65
+
66
+ The configurator/setup plane (rendering/installing provider config) is separate from the runtime control plane (executing SDD phases, recording runs, gating approvals). They are wired by services, not by side effects.
67
+
68
+ ## Safety conventions
69
+
70
+ These rules are non-negotiable. The harness is loaded with capability; do not remove these guards.
71
+
72
+ - Read-only/preview commands must stay non-mutating. Setup plans, MCP setup previews, OpenCode previews, workflow previews, and status views must not write provider config or call providers.
73
+ - Provider config writes require explicit consent (`--yes` or equivalent confirmed flow) plus backup/rollback behavior.
74
+ - Do not create or write `openspec/`. SDD artifacts are stored through the local SQLite artifact service under canonical topic keys `sdd/{change}/{phase}`.
75
+ - Human acceptance is distinct from artifact presence. Do not infer acceptance from generated content or saved drafts. The runtime rejects `acceptedBy.type !== 'human'`.
76
+ - Workspace boundary denials cannot be relaxed by agent or subagent overrides. The policy evaluator uses `realpathSync` to defeat symlink escapes.
77
+ - Secrets and external directory access deny by default. Redaction helpers in `src/code/reporting/redaction.ts` and `src/export/redaction.ts` are the only place secret-shaped values should be stripped.
78
+
79
+ ## Style
80
+
81
+ - TypeScript strict, ESM/NodeNext, `noUncheckedIndexedAccess`, `exactOptionalPropertyTypes`.
82
+ - Prefer explicit `undefined` over loose optional properties. Use the existing `MemoryResult<T>` / `MemoryResult<...>` style for fallible operations instead of throwing across module boundaries.
83
+ - Domain entities live in their module's `schema.ts`. Tool-facing payloads live in `src/mcp/schema.ts` (or a sibling) and are validated with `zod` before dispatch.
84
+ - Tests are colocated by module under `test/`. Use `node:test` and `node:assert/strict`. Each test file should set up its own `MemoryDatabase` (see existing files for the pattern).
85
+ - Public CLI/setup language is English unless existing docs explicitly say otherwise.
86
+
87
+ ## Doc-sync discipline
88
+
89
+ The docs are the user-facing contract. When the code drifts, the docs must catch up — not the other way around.
90
+
91
+ - When you add, rename, or remove an MCP tool, update `SUPPORTED_VGX_MCP_TOOL_NAMES` in `src/mcp/schema.ts` and the table in [MCP tools](./mcp.md). They must stay in sync.
92
+ - When you add a new CLI command, document it in [CLI reference](./cli.md).
93
+ - When you change a permission category, default, or phase mode, update [Safety model](./safety.md).
94
+ - When you add a migration, append it to the table in [Storage](./storage.md).
95
+ - When you add or change a provider, update [Providers](./providers.md) and the [Code runtime](./code-runtime.md) tool list.
96
+
97
+ ## Pull request process
98
+
99
+ VGXNESS is shipped as a proprietary package. The npm publication step is a separate, explicit, human-approved process. PRs that change published artifacts must:
100
+
101
+ 1. Run `bun run verify` locally and confirm all steps pass.
102
+ 2. Include or update tests for any behavioral change.
103
+ 3. Update docs that reference the changed surface.
104
+ 4. Not change the publication path. `npm publish`, `bun publish`, registry dry-runs, provenance upload, release creation, and dist-tag mutation are not part of normal PR flow.
105
+ 5. Not change `engines.bun` or remove the `bin`/`files` whitelist without a separate, documented decision.
106
+
107
+ PRs that touch safety gates, permission categories, default policies, the run lifecycle, or the SDD acceptance gate are reviewed by a maintainer who can answer "does this still match the safety model?" without consulting the diff. If you are unsure, open the PR as a draft and ask.
108
+
109
+ ## Commit conventions
110
+
111
+ - Conventional Commits (`feat:`, `fix:`, `chore:`, `docs:`, `refactor:`, `test:`, `build:`, `ci:`).
112
+ - No `Co-Authored-By` lines for AI assistants. Do not add AI attribution to commits.
113
+ - One logical change per commit. Squash fixups locally before pushing.
114
+
115
+ ## AI assistants in this repo
116
+
117
+ `AGENTS.md` at the repository root carries the working instructions for AI assistants. The two non-negotiables are:
118
+
119
+ - Do not write to `openspec/`.
120
+ - Do not infer SDD acceptance from generated content. The runtime will reject it, but the rejection costs a run.
@@ -0,0 +1,211 @@
1
+ # Glossary
2
+
3
+ Terms used across the VGXNESS docs and codebase. The product surface is small enough that most of these are first-class concepts in `src/` rather than incidental vocabulary.
4
+
5
+ ## Acceptance
6
+
7
+ A human-only action that records explicit approval of a SDD phase artifact. `vgxness_sdd_accept_artifact` requires `acceptedBy.type === 'human'`; the runtime rejects agent or anonymous acceptance. Acceptance is distinct from artifact presence — saving a draft never implies acceptance.
8
+
9
+ ## Adapter
10
+
11
+ A translator between VGXNESS's provider-neutral domain and a specific provider. The control plane uses renderers (OpenCode, JSON, Claude preview). The code runtime uses `CodeProviderAdapter` implementations (`openai-compatible`, `fake`).
12
+
13
+ ## Agent
14
+
15
+ A provider-neutral definition of who executes work. Carries role, instructions, capabilities, model preference, permissions, and compatible workflows. Subagents are specialized agents intended for delegated, scoped work with constrained tools.
16
+
17
+ ## Approval record
18
+
19
+ A first-class record linked to a permission-decision event. Created when a permission request resolves to `ask`; resolved once as `approved`, `rejected`, or `cancelled` with actor, reason, and timestamp. Approvals drive `resumeApprovedOperation(...)`.
20
+
21
+ ## Attempt
22
+
23
+ A reserved operation execution linked to an approval. Attempts transition through `reserved` → `succeeded` | `failed` | `abandoned`. Multiple ordered attempts are allowed per approval, but only one is `reserved` at a time.
24
+
25
+ ## Blockers (SDD cockpit)
26
+
27
+ Aggregated reasons a SDD phase is not ready. Kinds: `missing-topic-key`, `unaccepted-phase`, `legacy-artifact`, `readiness`. Surfaced through `vgxness_sdd_cockpit`.
28
+
29
+ ## Bun
30
+
31
+ The canonical installed CLI/MCP runtime and verification path. Required `>= 1.3.14`. The only supported storage runtime (via `bun:sqlite`).
32
+
33
+ ## Canonical agent manifest
34
+
35
+ The built-in, validated manifest that defines the manager agent and the SDD subagents (`vgxness-sdd-explore`, `vgxness-sdd-propose`, `vgxness-sdd-spec`, `vgxness-sdd-design`, `vgxness-sdd-tasks`, `vgxness-sdd-apply`, `vgxness-sdd-verify`, `vgxness-sdd-archive`, plus `init` and `onboard`). Lives in `src/agents/canonical-agent-manifest.ts`. `promptContractVersion` increments on breaking contract changes.
36
+
37
+ ## Change (SDD)
38
+
39
+ The unit of SDD work. Identified by a project-scoped `change` id. Artifacts are stored under canonical topic keys `sdd/{change}/{phase}`.
40
+
41
+ ## Checkpoint
42
+
43
+ A labeled, ordered JSON blob attached to a run that lets work resume. Append through `vgxness_run_checkpoint`. Checkpoints are part of the run; they are not the same as memory observations.
44
+
45
+ ## Cockpit
46
+
47
+ A read-only SDD aggregate view. `vgxness_sdd_cockpit` returns per-phase status, blockers, and a recommended next action. The TUI should eventually mirror this surface.
48
+
49
+ ## Code runtime
50
+
51
+ The native workspace runtime exposed through `vgxness code` (`inspect` / `plan` / `craft-preview` / `craft` / `sdd`). Provider-neutral; speaks to any OpenAI-compatible endpoint through `openai-compatible-provider-adapter.ts`.
52
+
53
+ ## Configurator plane
54
+
55
+ The part of VGXNESS that renders provider-specific artifacts (OpenCode config, agent JSON) without mutating the registry. Separate from the runtime control plane.
56
+
57
+ ## Control plane
58
+
59
+ The part of VGXNESS that owns workflow state, runs, approvals, checkpoints, and audit evidence. Exposed through CLI, TUI, and MCP.
60
+
61
+ ## Decision
62
+
63
+ A permission resolution: `allow`, `ask`, or `deny`. For SDD-phase gating the matrix uses four modes: `allow`, `audit`, `require-preflight`, `deny`.
64
+
65
+ ## Dry-run
66
+
67
+ A read-only preview. Setup plans, MCP setup previews, OpenCode previews, workflow previews, and status views are dry-runs by contract — they must not write provider config or call providers.
68
+
69
+ ## Eval target
70
+
71
+ A testable property of the harness. The 11 eval targets live in [Architecture](./architecture.md) and are covered by `node:test` files under `test/`.
72
+
73
+ ## Execution isolation plan
74
+
75
+ A planned strategy for executing a reserved operation: `workspace`, `git-worktree`, or `process-sandbox`. Produced by `planExecutionIsolation(...)`. The actual executor is still test-only in v1.5.1.
76
+
77
+ ## Governance report
78
+
79
+ A redacted, structured report over SDD state, runs, and approvals. Surfaced through `vgxness_governance_report`. Useful for review before promotion.
80
+
81
+ ## MCP
82
+
83
+ Model Context Protocol. The agent-facing transport. VGXNESS exposes 38 typed tools over stdio through `vgxness mcp start`. The tool list lives in `SUPPORTED_VGX_MCP_TOOL_NAMES` (`src/mcp/schema.ts`) and is documented in [MCP tools](./mcp.md).
84
+
85
+ ## Memory observation
86
+
87
+ A durable record in the SQLite store. Identified by `id`; upserted by `topicKey`. Types: `architecture`, `decision`, `bugfix`, `pattern`, `config`, `discovery`, `learning`, `preference`, `manual`. Project or personal scope.
88
+
89
+ ## Natural-language planner
90
+
91
+ The provider-agnostic front-door classifier for operator text. Maps an intent to exactly one preview flow: `direct`, `plan`, `sdd`, or `diagnose`. Non-executing by design.
92
+
93
+ ## OpenCode
94
+
95
+ The primary supported provider for the control plane. The configurator renders OpenCode MCP config and manager/SDD agent definitions. Claude Code is preview/manual only.
96
+
97
+ ## Operation attempt
98
+
99
+ See **Attempt**.
100
+
101
+ ## Payload mode
102
+
103
+ A knob that controls how much context a payload returns. `compact` (default for the manager) keeps tokens bounded; `verbose` returns the full content. Applies to `vgxness_agent_activate`, `vgxness_skill_payload`, `vgxness_sdd_get_artifact`, `vgxness_sdd_list_artifacts`, `vgxness_governance_report`.
104
+
105
+ ## Pending approval
106
+
107
+ An approval record that has not been resolved yet. Created when a permission request resolves to `ask`. Visible in the run details.
108
+
109
+ ## Permission
110
+
111
+ A category of action. Categories: `read`, `edit`, `implementation-edit`, `spec-write`, `design-write`, `task-write`, `shell`, `test-run`, `install`, `network`, `git`, `git-write`, `memory`, `memory-write`, `external-directory`, `provider-tool`, `secrets`. See [Safety model](./safety.md).
112
+
113
+ ## Phase (SDD)
114
+
115
+ A canonical stage in the SDD lifecycle: `explore`, `proposal`, `spec`, `design`, `tasks`, `apply-progress`, `verify`, `archive`. Each phase has prerequisites and an acceptance requirement.
116
+
117
+ ## Policy evaluator
118
+
119
+ The function that resolves a permission request. Returns `allow`, `ask`, or `deny` with a reason. Conservative defaults; workspace boundary denials cannot be relaxed by agent overrides.
120
+
121
+ ## Preflight
122
+
123
+ A permission decision plus execution isolation plan produced before a reserved operation. `vgxness_run_preflight` may create a pending approval when the decision is `ask`.
124
+
125
+ ## Project (scope)
126
+
127
+ One of two memory scopes. `project` is repo-specific; `personal` is user-global. Scopes live in the same database, separated by columns.
128
+
129
+ ## Provider adapter
130
+
131
+ See **Adapter**.
132
+
133
+ ## Readiness
134
+
135
+ Whether a SDD phase can advance. Combines prerequisite artifacts, human acceptance of prerequisites, and aggregate blockers. Surfaced through `vgxness_sdd_ready`, `vgxness_sdd_get_readiness`, and `vgxness_sdd_cockpit`.
136
+
137
+ ## Redaction
138
+
139
+ Stripping secret-shaped values before they leave the runtime. `redactSecrets`, `redactJson`, and `omitSensitiveCommandOutput` live in `src/code/reporting/redaction.ts` and `src/export/redaction.ts`.
140
+
141
+ ## Reserved attempt
142
+
143
+ An operation attempt in the `reserved` state. Exclusive per approval. Finalized to `succeeded` or `failed` after the executor returns; recovery-only `abandoned` for stuck attempts.
144
+
145
+ ## Retry policy
146
+
147
+ The policy that decides whether a new attempt is allowed after a prior one. `never`, `after-abandoned`, `after-failure`, `after-failure-or-abandoned`. Default is `never`. Evaluated by `vgxness_run_resume_gate`.
148
+
149
+ ## Run
150
+
151
+ The auditable unit of execution. Has 8 statuses: `created`, `planned`, `running`, `needs-human`, `completed`, `failed`, `blocked`, `cancelled`. Carries events, checkpoints, approvals, and operation attempts.
152
+
153
+ ## Run snapshot export
154
+
155
+ A versioned JSON package containing the full run, its events, checkpoints, approvals, and attempts. Useful for review and debugging. `RunSnapshotPackageV1`.
156
+
157
+ ## Scope
158
+
159
+ `project` or `personal`. Memory, agents, skills, and manager profile overlays all carry a scope.
160
+
161
+ ## SDD
162
+
163
+ Spec-Driven Development. The canonical workflow `explore → proposal → spec → design → tasks → apply-progress → verify → archive`. See [PRD](./prd.md) for the principles and [Architecture](./architecture.md) for the engine.
164
+
165
+ ## Session
166
+
167
+ A scoped record of work in progress. Started with `vgxness_session_start`, appended to with `vgxness_session_append_activity`, closed with `vgxness_session_close`. The latest restorable session is read through `vgxness_session_restore` or, more reliably, `vgxness_context_cockpit`.
168
+
169
+ ## Skill
170
+
171
+ A versioned, reusable knowledge/procedure that can be attached to an agent, workflow, phase, or provider adapter. Skill improvement proposals must be approved by a human before activation.
172
+
173
+ ## Skill improvement proposal
174
+
175
+ A reviewable, versioned change to a skill. Goes through `draft` → `submitted` → `approved`/`rejected`/`cancelled` → `applied`. Only `approved` proposals can be applied.
176
+
177
+ ## SddCockpitBlocker
178
+
179
+ A typed blocker surfaced by the SDD cockpit. Kinds: `missing-topic-key`, `unaccepted-phase`, `legacy-artifact`, `readiness`. See [Safety model](./safety.md) and [Architecture](./architecture.md).
180
+
181
+ ## SddPrerequisiteBlocker
182
+
183
+ A typed blocker for a missing or unaccepted prerequisite phase. Reasons: `missing`, `draft`, `legacy`, `rejected`, `superseded`.
184
+
185
+ ## Subagent
186
+
187
+ See **Agent**.
188
+
189
+ ## Topic key
190
+
191
+ The durable upsert key for memory observations and SDD artifacts. For SDD, the canonical form is `sdd/{change}/{phase}`.
192
+
193
+ ## Trace event
194
+
195
+ A structured event in a run's timeline. Kinds: `timeline`, `evidence`, `memory-operation`, `artifact-reference`, `tool-call`, `permission-decision`, `execution-plan`, `operation-execution`, `approval`, `verification`.
196
+
197
+ ## TUI
198
+
199
+ Terminal UI. OpenTUI (`@opentui/core`) is the framework for the main menu and setup screens.
200
+
201
+ ## Verification plan
202
+
203
+ A recommended set of verification steps for a change type. `vgxness_verification_plan` takes a `changeType` (`docs-only`, `test-only`, `cli`, `mcp`, `sdd-storage`, `provider-setup`, `package-release`, `workflow-runs`) and returns the recommended plan.
204
+
205
+ ## Worktree (planned)
206
+
207
+ A planned execution isolation strategy. `git-worktree` plans produce a plan to mutate inside an isolated worktree; the actual worktree creation is follow-up.
208
+
209
+ ## Workspace boundary
210
+
211
+ The set of paths inside `workspaceRoot`. The policy evaluator uses `realpathSync` to defeat symlink escapes and refuses to relax boundary denials.