vgxness 1.20.14 → 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -10
- package/dist/adapters/claude/install/claude-code-agent-config.js +1 -1
- package/dist/adapters/claude/install/claude-code-project-memory.js +1 -1
- package/dist/adapters/claude/install/claude-code-user-memory.js +1 -1
- package/dist/adapters/claude/install/client-install-claude-code-contract.js +1 -1
- package/dist/adapters/opencode/install/client-install-opencode-contract.js +2 -2
- package/dist/adapters/opencode/install/client-install-opencode.js +2 -2
- package/dist/adapters/opencode/install/opencode-default-agent-config.js +2 -2
- package/dist/application/agents/agent-resolver.js +10 -2
- package/dist/application/knowledge-workspace/canvas-renderer.js +36 -0
- package/dist/application/knowledge-workspace/filesystem-workspace-port.js +98 -0
- package/dist/application/knowledge-workspace/markdown-renderer.js +68 -0
- package/dist/application/knowledge-workspace/obsidian-export-service.js +157 -0
- package/dist/application/knowledge-workspace/obsidian-mcp-workspace-port.js +109 -0
- package/dist/application/knowledge-workspace/workspace-port.js +20 -0
- package/dist/application/memory/import/observation-writer.js +2 -2
- package/dist/application/memory/import/package.js +1 -1
- package/dist/application/provider-setup/provider-change-plan.js +1 -1
- package/dist/application/provider-setup/provider-doctor.js +1 -1
- package/dist/application/runs/run-service.js +1 -1
- package/dist/application/sdd/sdd-continuation-plan.js +4 -3
- package/dist/application/skills/skill-registry-service.js +1 -1
- package/dist/application/skills/skill-resolver.js +3 -3
- package/dist/cli/bun-bin.js +1 -1
- package/dist/domain/agents/canonical-agent-manifest.js +13 -13
- package/dist/domain/knowledge-workspace/schema.js +1 -0
- package/dist/governance/governance-report-builder.js +1 -1
- package/dist/interfaces/cli/bun-bin.js +1 -1
- package/dist/interfaces/cli/cli-flags.js +2 -2
- package/dist/interfaces/cli/cli-help.js +11 -5
- package/dist/interfaces/cli/cli-helpers.js +2 -2
- package/dist/interfaces/cli/commands/agent-skill-dispatcher.js +10 -10
- package/dist/interfaces/cli/commands/index.js +1 -0
- package/dist/interfaces/cli/commands/knowledge-workspace-dispatcher.js +252 -0
- package/dist/interfaces/cli/commands/mcp-dispatcher.js +3 -3
- package/dist/interfaces/cli/commands/memory-sdd-dispatcher.js +11 -11
- package/dist/interfaces/cli/commands/run-permission-dispatcher.js +4 -4
- package/dist/interfaces/cli/commands/setup-dispatcher.js +3 -3
- package/dist/interfaces/cli/commands/status-dispatcher.js +4 -4
- package/dist/interfaces/cli/commands/verification-dispatcher.js +2 -2
- package/dist/interfaces/cli/commands/workflow-dispatcher.js +4 -4
- package/dist/interfaces/cli/dispatcher.js +10 -2
- package/dist/interfaces/cli/home-tui-app.js +2 -2
- package/dist/interfaces/cli/home-tui-controller.js +8 -8
- package/dist/interfaces/cli/mcp-start-path.js +1 -1
- package/dist/interfaces/cli/sdd-renderer.js +8 -5
- package/dist/interfaces/cli/setup-tui-controller.js +1 -1
- package/dist/interfaces/cli/verification-plan-renderer.js +2 -0
- package/dist/interfaces/cli/verification-report-renderer.js +1 -1
- package/dist/interfaces/mcp/control-plane/handlers/memory.js +1 -1
- package/dist/interfaces/mcp/control-plane/handlers/runs.js +1 -1
- package/dist/interfaces/mcp/control-plane/handlers/sdd.js +3 -3
- package/dist/interfaces/mcp/control-plane/handlers/sessions.js +1 -1
- package/dist/interfaces/mcp/control-plane.js +13 -13
- package/dist/interfaces/mcp/schemas/common.js +1 -1
- package/dist/interfaces/mcp/stdio-server.js +1 -1
- package/dist/interfaces/mcp/validation/common.js +1 -1
- package/dist/interfaces/mcp/validation/runs.js +1 -1
- package/dist/mcp/control-plane-snapshot-service.js +1 -1
- package/dist/mcp/doctor.js +1 -1
- package/dist/mcp/provider-canonical-agent-manifest.js +2 -2
- package/dist/mcp/resume-context-gate-service.js +1 -1
- package/dist/permissions/policy-evaluator.js +1 -1
- package/dist/providers/opencode/injection-preview.js +1 -1
- package/dist/providers/opencode/manager-payload.js +2 -2
- package/dist/setup/setup-plan.js +1 -1
- package/dist/status/product-status.js +2 -1
- package/dist/verification/verification-plan-service.js +5 -1
- package/dist/verification/verification-report-service.js +1 -1
- package/dist/workflows/command-allowlist-adapter.js +1 -1
- package/docs/architecture.md +19 -19
- package/docs/cli.md +15 -2
- package/docs/glossary.md +2 -2
- package/docs/knowledge-workspace.md +135 -0
- package/docs/mcp.md +4 -1
- package/docs/module-boundaries.md +0 -2
- package/docs/obsidian-mcp.md +130 -0
- package/docs/providers.md +6 -6
- package/docs/roadmap.md +4 -4
- package/docs/safety.md +2 -2
- package/docs/sdd/sqlite-obsidian-knowledge-workflow/design.md +118 -0
- package/docs/sdd/sqlite-obsidian-knowledge-workflow/proposal.md +80 -0
- package/docs/sdd/sqlite-obsidian-knowledge-workflow/spec.md +88 -0
- package/docs/sdd/sqlite-obsidian-knowledge-workflow/tasks.md +70 -0
- package/docs/sdd-flow.es.md +23 -19
- package/docs/sdd-flow.md +15 -20
- package/docs/storage.md +2 -0
- package/package.json +7 -3
- package/dist/agents/agent-activation-service.js +0 -1
- package/dist/agents/agent-lookup-contexts.js +0 -1
- package/dist/agents/agent-registry-service.js +0 -1
- package/dist/agents/agent-resolver.js +0 -1
- package/dist/agents/agent-seed-service.js +0 -1
- package/dist/agents/agent-seed-upgrade-service.js +0 -1
- package/dist/agents/agent-selector-resolver.js +0 -1
- package/dist/agents/boot-upgrade.js +0 -1
- package/dist/agents/canonical-agent-manifest.js +0 -1
- package/dist/agents/canonical-agent-projection.js +0 -1
- package/dist/agents/manager-profile-overlay-service.js +0 -1
- package/dist/agents/profile-model-routing.js +0 -1
- package/dist/agents/renderers/claude-renderer.js +0 -1
- package/dist/agents/renderers/index.js +0 -1
- package/dist/agents/renderers/json-renderer.js +0 -1
- package/dist/agents/renderers/opencode-renderer.js +0 -1
- package/dist/agents/renderers/provider-adapter.js +0 -1
- package/dist/agents/repositories/agent-seed-history.js +0 -1
- package/dist/agents/repositories/agents.js +0 -1
- package/dist/agents/repositories/manager-profile-overlays.js +0 -1
- package/dist/agents/schema.js +0 -1
- package/dist/memory/active-work-preview.js +0 -1
- package/dist/memory/active-work-topics.js +0 -1
- package/dist/memory/agent-memory-capture-service.js +0 -1
- package/dist/memory/import/dry-run-planner.js +0 -1
- package/dist/memory/import/index.js +0 -1
- package/dist/memory/import/observation-writer.js +0 -1
- package/dist/memory/import/package.js +0 -1
- package/dist/memory/memory-capture-schema.js +0 -1
- package/dist/memory/memory-service.js +0 -1
- package/dist/memory/repositories/artifacts.js +0 -1
- package/dist/memory/repositories/observations.js +0 -1
- package/dist/memory/repositories/sessions.js +0 -1
- package/dist/memory/repositories/traces.js +0 -1
- package/dist/memory/schema.js +0 -1
- package/dist/memory/search.js +0 -1
- package/dist/memory/sqlite/database.js +0 -1
- package/dist/memory/storage-paths.js +0 -1
- package/dist/permissions/index.js +0 -2
- package/dist/runs/execution-planning.js +0 -1
- package/dist/runs/operation-execution.js +0 -1
- package/dist/runs/operation-retry.js +0 -1
- package/dist/runs/repositories/runs.js +0 -1
- package/dist/runs/repositories/task-scoped-command-grants.js +0 -1
- package/dist/runs/resume-after-approval-result.js +0 -1
- package/dist/runs/run-insights.js +0 -1
- package/dist/runs/run-service.js +0 -1
- package/dist/runs/run-snapshot-export-service.js +0 -1
- package/dist/runs/sandbox-process-execution.js +0 -1
- package/dist/runs/sandbox-worktree-planning.js +0 -1
- package/dist/runs/schema.js +0 -1
- package/dist/runs/task-scoped-command-grant-service.js +0 -1
- package/dist/sdd/artifact-portability-service.js +0 -1
- package/dist/sdd/cockpit-read-model.js +0 -1
- package/dist/sdd/cockpit-types.js +0 -1
- package/dist/sdd/schema.js +0 -1
- package/dist/sdd/sdd-continuation-plan.js +0 -1
- package/dist/sdd/sdd-workflow-service.js +0 -1
- package/dist/setup/index.js +0 -3
- package/dist/skills/boot-seed.js +0 -1
- package/dist/skills/personal-skills.js +0 -1
- package/dist/skills/repositories/skill-evaluation-requests.js +0 -1
- package/dist/skills/repositories/skill-evaluation-scenarios.js +0 -1
- package/dist/skills/repositories/skill-improvement-proposals.js +0 -1
- package/dist/skills/repositories/skills.js +0 -1
- package/dist/skills/schema.js +0 -1
- package/dist/skills/skill-export-service.js +0 -1
- package/dist/skills/skill-index-service.js +0 -1
- package/dist/skills/skill-payload.js +0 -1
- package/dist/skills/skill-registry-service.js +0 -1
- package/dist/skills/skill-resolver.js +0 -1
- package/dist/skills/skill-seed-service.js +0 -1
- package/dist/skills/skill-status-service.js +0 -1
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { assertSafeWorkspaceRelativePath, isGeneratedByVgxness, } from './workspace-port.js';
|
|
2
|
+
export class ObsidianMcpWorkspacePort {
|
|
3
|
+
options;
|
|
4
|
+
workspaceRoot;
|
|
5
|
+
constructor(options) {
|
|
6
|
+
this.options = options;
|
|
7
|
+
this.workspaceRoot = options.workspaceRoot ?? 'VGXNESS';
|
|
8
|
+
}
|
|
9
|
+
async status() {
|
|
10
|
+
try {
|
|
11
|
+
await this.options.client.callTool('obsidian_list_notes', { path: this.workspaceRoot, recursive: false });
|
|
12
|
+
return {
|
|
13
|
+
kind: 'knowledge-workspace-status',
|
|
14
|
+
status: 'available',
|
|
15
|
+
mode: 'obsidian-mcp',
|
|
16
|
+
workspaceRoot: this.workspaceRoot,
|
|
17
|
+
diagnostics: [],
|
|
18
|
+
safety: { readOnly: true, writesNotes: false, deletesNotes: false, executesObsidianCommands: false },
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
catch (cause) {
|
|
22
|
+
return {
|
|
23
|
+
kind: 'knowledge-workspace-status',
|
|
24
|
+
status: 'unavailable',
|
|
25
|
+
mode: 'obsidian-mcp',
|
|
26
|
+
workspaceRoot: this.workspaceRoot,
|
|
27
|
+
diagnostics: [`Obsidian MCP unavailable: ${cause instanceof Error ? cause.message : String(cause)}`],
|
|
28
|
+
safety: { readOnly: true, writesNotes: false, deletesNotes: false, executesObsidianCommands: false },
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
async listNotes(input) {
|
|
33
|
+
const path = assertSafeWorkspaceRelativePath(input.pathPrefix, this.workspaceRoot);
|
|
34
|
+
const result = await this.options.client.callTool('obsidian_list_notes', { path, recursive: input.recursive ?? true });
|
|
35
|
+
return extractNoteRefs(result);
|
|
36
|
+
}
|
|
37
|
+
async getNote(input) {
|
|
38
|
+
const path = assertSafeWorkspaceRelativePath(input.path, this.workspaceRoot);
|
|
39
|
+
const result = await this.options.client.callTool('obsidian_get_note', { path, format: 'content' });
|
|
40
|
+
return { path, content: extractContent(result) };
|
|
41
|
+
}
|
|
42
|
+
async writeGeneratedNote(input) {
|
|
43
|
+
const path = assertSafeWorkspaceRelativePath(input.path, this.workspaceRoot);
|
|
44
|
+
const existing = await this.readExisting(path);
|
|
45
|
+
if (existing !== undefined && input.overwriteGeneratedOnly && !isGeneratedByVgxness(existing.content)) {
|
|
46
|
+
throw new Error(`Refusing to overwrite non-generated Obsidian note: ${path}`);
|
|
47
|
+
}
|
|
48
|
+
const result = await this.options.client.callTool('obsidian_write_note', { path, content: input.content, overwrite: existing !== undefined });
|
|
49
|
+
return extractWriteResult(result, path, existing === undefined);
|
|
50
|
+
}
|
|
51
|
+
async patchNote(input) {
|
|
52
|
+
const path = assertSafeWorkspaceRelativePath(input.path, this.workspaceRoot);
|
|
53
|
+
const result = await this.options.client.callTool('obsidian_patch_note', {
|
|
54
|
+
path,
|
|
55
|
+
section: input.section,
|
|
56
|
+
operation: input.operation,
|
|
57
|
+
content: input.content,
|
|
58
|
+
});
|
|
59
|
+
return extractWriteResult(result, path, false);
|
|
60
|
+
}
|
|
61
|
+
async openInUi(input) {
|
|
62
|
+
const path = assertSafeWorkspaceRelativePath(input.path, this.workspaceRoot);
|
|
63
|
+
await this.options.client.callTool('obsidian_open_in_ui', { path, failIfMissing: true });
|
|
64
|
+
}
|
|
65
|
+
async readExisting(path) {
|
|
66
|
+
try {
|
|
67
|
+
return await this.getNote({ path });
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function extractContent(result) {
|
|
75
|
+
if (typeof result === 'string')
|
|
76
|
+
return result;
|
|
77
|
+
if (isRecord(result)) {
|
|
78
|
+
if (typeof result.content === 'string')
|
|
79
|
+
return result.content;
|
|
80
|
+
if (typeof result.result === 'string')
|
|
81
|
+
return result.result;
|
|
82
|
+
const note = result.note;
|
|
83
|
+
if (isRecord(note) && typeof note.content === 'string')
|
|
84
|
+
return note.content;
|
|
85
|
+
}
|
|
86
|
+
return JSON.stringify(result);
|
|
87
|
+
}
|
|
88
|
+
function extractNoteRefs(result) {
|
|
89
|
+
const entries = isRecord(result) && Array.isArray(result.entries) ? result.entries : Array.isArray(result) ? result : [];
|
|
90
|
+
return entries.flatMap((entry) => {
|
|
91
|
+
if (!isRecord(entry) || typeof entry.path !== 'string')
|
|
92
|
+
return [];
|
|
93
|
+
const type = entry.type === 'directory' ? 'directory' : 'file';
|
|
94
|
+
return [{ path: entry.path, type }];
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
function extractWriteResult(result, path, defaultCreated) {
|
|
98
|
+
if (!isRecord(result))
|
|
99
|
+
return { path, created: defaultCreated };
|
|
100
|
+
const output = { path, created: typeof result.created === 'boolean' ? result.created : defaultCreated };
|
|
101
|
+
if (typeof result.previousSizeInBytes === 'number')
|
|
102
|
+
output.previousSizeInBytes = result.previousSizeInBytes;
|
|
103
|
+
if (typeof result.currentSizeInBytes === 'number')
|
|
104
|
+
output.currentSizeInBytes = result.currentSizeInBytes;
|
|
105
|
+
return output;
|
|
106
|
+
}
|
|
107
|
+
function isRecord(value) {
|
|
108
|
+
return typeof value === 'object' && value !== null;
|
|
109
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export function assertSafeWorkspaceRelativePath(path, workspaceRoot = 'VGXNESS') {
|
|
2
|
+
const normalized = normalizeWorkspacePath(path);
|
|
3
|
+
const normalizedRoot = normalizeWorkspacePath(workspaceRoot);
|
|
4
|
+
if (normalizedRoot === '' || normalizedRoot === '.' || normalizedRoot.includes('..'))
|
|
5
|
+
throw new Error('Invalid workspace root');
|
|
6
|
+
if (normalized !== normalizedRoot && !normalized.startsWith(`${normalizedRoot}/`)) {
|
|
7
|
+
throw new Error(`Path must stay under ${normalizedRoot}/: ${path}`);
|
|
8
|
+
}
|
|
9
|
+
return normalized;
|
|
10
|
+
}
|
|
11
|
+
export function isGeneratedByVgxness(content) {
|
|
12
|
+
return /^---[\s\S]*?^generated_by:\s*vgxness\s*$/m.test(content);
|
|
13
|
+
}
|
|
14
|
+
export function normalizeWorkspacePath(path) {
|
|
15
|
+
const normalized = path.replace(/\\/g, '/').replace(/^\/+/, '').replace(/\/+/g, '/').trim();
|
|
16
|
+
const parts = normalized.split('/').filter((part) => part.length > 0 && part !== '.');
|
|
17
|
+
if (parts.some((part) => part === '..'))
|
|
18
|
+
throw new Error(`Path traversal is not allowed: ${path}`);
|
|
19
|
+
return parts.join('/');
|
|
20
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { sddTopicKey } from '../../../sdd/schema.js';
|
|
2
|
-
import { SddWorkflowService } from '
|
|
1
|
+
import { sddTopicKey } from '../../../domain/sdd/schema.js';
|
|
2
|
+
import { SddWorkflowService } from '../../sdd/sdd-workflow-service.js';
|
|
3
3
|
import { validateMemoryImportPackage, } from './package.js';
|
|
4
4
|
const context = { actor: 'memory-import' };
|
|
5
5
|
export function writeMemoryImportObservations(input) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isSddPhase, sddPhases, sddTopicKey } from '../../../sdd/schema.js';
|
|
1
|
+
import { isSddPhase, sddPhases, sddTopicKey } from '../../../domain/sdd/schema.js';
|
|
2
2
|
export const MEMORY_IMPORT_PACKAGE_KIND = 'vgxness.memory-import-package';
|
|
3
3
|
export const MEMORY_IMPORT_PACKAGE_VERSION = 1;
|
|
4
4
|
export const MEMORY_IMPORT_PACKAGE_SOURCE = 'engram';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { planClaudeCodeMcpInstall, } from '../../adapters/claude/install/client-install-claude-code-contract.js';
|
|
2
2
|
import { planOpenCodeMcpInstall } from '../../adapters/opencode/install/client-install-opencode-contract.js';
|
|
3
|
-
import { resolveMemoryDatabasePath } from '../../memory/storage-paths.js';
|
|
3
|
+
import { resolveMemoryDatabasePath } from '../../storage/memory/storage-paths.js';
|
|
4
4
|
import { ProviderDoctorService } from './provider-doctor.js';
|
|
5
5
|
import { providerRuntimeContext, } from './provider-health-types.js';
|
|
6
6
|
import { ProviderStatusService } from './provider-status.js';
|
|
@@ -470,7 +470,7 @@ function delegationCheck(config) {
|
|
|
470
470
|
const missing = vgxnessOpenCodeSddSubagents.filter((name) => permission[name] !== 'allow');
|
|
471
471
|
if (missing.length > 0)
|
|
472
472
|
return { id: 'opencode-delegation-permissions', status: 'fail', detail: `Manager cannot delegate to expected subagents: ${missing.join(', ')}.` };
|
|
473
|
-
return { id: 'opencode-delegation-permissions', status: 'pass', detail: 'Manager task permission is deny-by-default and allows exact capability subagents
|
|
473
|
+
return { id: 'opencode-delegation-permissions', status: 'pass', detail: 'Manager task permission is deny-by-default and allows exact canonical capability subagents only.' };
|
|
474
474
|
}
|
|
475
475
|
function promptContractCheck(config, expected) {
|
|
476
476
|
const agents = isRecord(config?.agent) ? config.agent : undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { evaluatePermission } from '../../permissions/policy-evaluator.js';
|
|
3
3
|
import { isRiskyPermissionCategory } from '../../permissions/schema.js';
|
|
4
|
-
import { normalizeSddPhaseInput } from '../../sdd/schema.js';
|
|
4
|
+
import { normalizeSddPhaseInput } from '../../domain/sdd/schema.js';
|
|
5
5
|
import { RunRepository, } from '../../storage/runs/repositories/runs.js';
|
|
6
6
|
import { AllowlistedApplyProgressCommandExecutor } from '../../workflows/command-allowlist-adapter.js';
|
|
7
7
|
import { planExecutionIsolation, recommendWorkspaceStrategyForExecution } from './execution-planning.js';
|
|
@@ -27,7 +27,8 @@ export function sddContinuationPlanFrom(input) {
|
|
|
27
27
|
safety: [
|
|
28
28
|
'Read-only planner: this command does not execute providers or mutate SDD artifacts, runs, provider config, or openspec/ files.',
|
|
29
29
|
'Human acceptance remains explicit; artifact presence is not treated as acceptance.',
|
|
30
|
-
'
|
|
30
|
+
'OpenCode and Claude execute provider-native; VGXNESS MCP and SQLite govern SDD artifacts, memory, permissions, runs, and evidence.',
|
|
31
|
+
'Continue SDD phases in OpenCode or Claude, using capability subagents when helpful; the removed code runtime is not a CLI fallback.',
|
|
31
32
|
'No openspec/ files are created or written.',
|
|
32
33
|
],
|
|
33
34
|
};
|
|
@@ -115,7 +116,7 @@ function draftPhaseAction(project, change, phase, reason) {
|
|
|
115
116
|
id: `sdd.${change}.${phase}.draft`,
|
|
116
117
|
label: `Prepare ${phase} draft through normal SDD phase flow`,
|
|
117
118
|
title: `Prepare ${phase} draft`,
|
|
118
|
-
description: 'The next SDD phase appears runnable; draft generation
|
|
119
|
+
description: 'The next SDD phase appears runnable; draft generation still happens in provider-native OpenCode or Claude through normal phase workflow and any required preflight gates. After a valid phase artifact is produced, save it as a draft immediately, then ask the human acceptance/continue question before advancing.',
|
|
119
120
|
kind: 'draft-phase',
|
|
120
121
|
category: 'sdd-phase',
|
|
121
122
|
phase,
|
|
@@ -130,7 +131,7 @@ function draftPhaseAction(project, change, phase, reason) {
|
|
|
130
131
|
requiresPreflight: true,
|
|
131
132
|
requiresProviderWriteConsent: false,
|
|
132
133
|
reason,
|
|
133
|
-
rationale: 'This continuation tool is read-only, so it can recommend the next phase but cannot execute providers or save artifacts itself.',
|
|
134
|
+
rationale: 'This continuation tool is read-only, so it can recommend the next phase but cannot execute providers, require subagents, or save artifacts itself.',
|
|
134
135
|
blockingPrerequisites: [],
|
|
135
136
|
};
|
|
136
137
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentRepository } from '../../agents/repositories/agents.js';
|
|
1
|
+
import { AgentRepository } from '../../storage/agents/repositories/agents.js';
|
|
2
2
|
import { SkillEvaluationRequestRepository, } from '../../storage/skills/repositories/skill-evaluation-requests.js';
|
|
3
3
|
import { SkillEvaluationScenarioRepository, } from '../../storage/skills/repositories/skill-evaluation-scenarios.js';
|
|
4
4
|
import { SkillImprovementProposalRepository, } from '../../storage/skills/repositories/skill-improvement-proposals.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveAgentSelector } from '
|
|
2
|
-
import { canonicalDefaultAgentName } from '../../agents/canonical-agent-manifest.js';
|
|
3
|
-
import { normalizeSddPhaseInput } from '../../sdd/schema.js';
|
|
1
|
+
import { resolveAgentSelector } from '../agents/agent-selector-resolver.js';
|
|
2
|
+
import { canonicalDefaultAgentName } from '../../domain/agents/canonical-agent-manifest.js';
|
|
3
|
+
import { normalizeSddPhaseInput } from '../../domain/sdd/schema.js';
|
|
4
4
|
import { skillLookupContexts } from './personal-skills.js';
|
|
5
5
|
export class SkillResolver {
|
|
6
6
|
skills;
|
package/dist/cli/bun-bin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { writeFileSync } from 'node:fs';
|
|
3
3
|
import { basename } from 'node:path';
|
|
4
|
-
import { canonicalDefaultAgentName, canonicalPromptContractVersion, canonicalSddSubagentNames } from '../agents/canonical-agent-manifest.js';
|
|
4
|
+
import { canonicalDefaultAgentName, canonicalPromptContractVersion, canonicalSddSubagentNames } from '../domain/agents/canonical-agent-manifest.js';
|
|
5
5
|
writeRuntimeEvidence();
|
|
6
6
|
await import('./index.js');
|
|
7
7
|
function writeRuntimeEvidence() {
|
|
@@ -2,7 +2,7 @@ import { canonicalBehaviorContractVersion } from '../../behavior/behavior-contra
|
|
|
2
2
|
export const canonicalDefaultAgentName = 'vgxness-manager';
|
|
3
3
|
export const canonicalOpenCodeDefaultModel = 'openai/gpt-5.5';
|
|
4
4
|
export const canonicalOpenCodeManagerReasoningEffort = 'high';
|
|
5
|
-
export const canonicalPromptContractVersion =
|
|
5
|
+
export const canonicalPromptContractVersion = 27;
|
|
6
6
|
export const canonicalCapabilitySubagentNames = [
|
|
7
7
|
'vgxness-explore',
|
|
8
8
|
'vgxness-propose',
|
|
@@ -144,7 +144,6 @@ export function createCanonicalOpenCodeSddTaskPermissions() {
|
|
|
144
144
|
return Object.fromEntries([
|
|
145
145
|
['*', 'deny'],
|
|
146
146
|
...canonicalCapabilitySubagentNames.map((name) => [name, 'allow']),
|
|
147
|
-
...Object.keys(canonicalCapabilitySubagentLegacyAliases).map((name) => [name, 'allow']),
|
|
148
147
|
]);
|
|
149
148
|
}
|
|
150
149
|
export function createCanonicalOpenCodeSddMcpToolPermissions() {
|
|
@@ -217,14 +216,14 @@ Bind to \`vgxness-manager\`.
|
|
|
217
216
|
Coordinate VGXNESS work without forcing every request through SDD. Keep chat thin, use MCP state, and delegate only when the task needs a reusable capability subagent or focused executor. Coach briefly: explain tradeoffs/risks, challenge weak assumptions, keep user in control, avoid lectures. Verify before agreeing with technical claims. When blocked, ask one focused question.
|
|
218
217
|
|
|
219
218
|
## Instruction layering
|
|
220
|
-
This
|
|
219
|
+
This is the VGXNESS operating contract; OpenCode also appends environment, global/project AGENTS.md, MCP instructions, skills, and user instructions. Treat them as active. Prefer user intent and repo/global style; prefer this contract for VGXNESS routing, SDD governance, and MCP usage. If layers conflict, preserve user work and ask only when ambiguity changes the action.
|
|
221
220
|
|
|
222
221
|
## Non-negotiable governance
|
|
223
222
|
- VGXNESS uses SQLite artifacts/control-plane; OpenCode as primary provider; artifacts are not openspec files. Do not write to \`openspec/\`.
|
|
224
223
|
- SDD artifact acceptance is human-only. Artifact presence is not acceptance. Never infer or fabricate acceptance from generated output, subagent/model output, file presence, confidence, or legacy artifacts; draft/rejected/superseded/stale/unaccepted artifacts are not accepted until a human acceptance record exists.
|
|
225
224
|
- Before phase advancement, call \`vgxness_sdd_status\`/\`vgxness_sdd_next\` plus \`vgxness_sdd_ready\` or \`vgxness_sdd_get_readiness\`.
|
|
226
|
-
- Before risky VGX-managed side effects (edit, shell/tests, git, network, provider-tool, secrets, external-directory, destructive, privileged, ambiguous), call \`vgxness_run_preflight\` with runId/workflow/phase/agent when available. If the user asks for a concrete action
|
|
227
|
-
- Direct human acceptance via \`vgxness_sdd_accept_artifact\` is not a generic SDD write: do not preflight solely for it; require exact project/change/phase, \`acceptedBy.type\` \`"human"\`, non-empty \`acceptedBy.id\`, and eligible status/readiness. Shortcut only for acceptance
|
|
225
|
+
- Before risky VGX-managed side effects (edit, shell/tests, git, network, provider-tool, secrets, external-directory, destructive, privileged, ambiguous), call \`vgxness_run_preflight\` with runId/workflow/phase/agent when available. If the user asks for a concrete action, pass structured \`explicitRequest\` with human actor, timestamp/source, exact category/operation/scope/risk/parser evidence. If the user says "hazlo"/"dale" immediately after you listed concrete operations, bind it to those operations with \`parser.exact: true\` and no expansion reasons. If preflight allows \`authorizationMode: "explicit-request"\`, execute without duplicate confirmation. Stop on approval-needed, blocked, ambiguity, secrets, destructive/privileged scope not named, or provider/global config mutation not exactly requested; never invent approval.
|
|
226
|
+
- Direct human acceptance via \`vgxness_sdd_accept_artifact\` is not a generic SDD write: do not preflight solely for it; require exact project/change/phase, \`acceptedBy.type\` \`"human"\`, non-empty \`acceptedBy.id\`, and eligible status/readiness. Shortcut only for exact proposal acceptance or trusted draft autorun after proposal acceptance; excludes edits, shell/tests, git, provider config, memory writes, external paths, secrets, destructive/privileged/ambiguous operations.
|
|
228
227
|
- OpenCode native bash/edit/write stay denied to the manager; use MCP preflight and delegated executors for side effects. Diagnostics are config-level evidence, not host proof.
|
|
229
228
|
- Do not mutate provider/global OpenCode config or publish unless explicitly requested. Never overwrite unrelated work. Preserve \`permission.task\` deny-by-default with exact known capability subagents only.
|
|
230
229
|
- Do not change provider model/reasoning config unless explicitly requested.
|
|
@@ -234,7 +233,8 @@ Use the lightest safe path; do not force SDD/subagents for small direct work. T0
|
|
|
234
233
|
Do not invent or invoke generic reviewer subagents; use exact canonical capability subagents only when the task benefits from focused execution. These capability subagents can support direct work, planning, research, verification, or formal SDD phases. Only treat their output as SDD artifacts when the route is formal SDD and governance persistence/readiness applies.
|
|
235
234
|
|
|
236
235
|
## Parallel delegation
|
|
237
|
-
|
|
236
|
+
Gentle-compatible VGXNESS patterns: Context-cost delegation matrix: direct work for small, clear, low-context requests; delegate broad, specialized, parallelizable, context-heavy, execution-heavy, or independent-review work. Do not delegate all real work. Launch deduplication: keep a session log by capability, task fingerprint, and artifact refs. Phase gatekeeper checks after delegated/draft phases: validate result envelope, SQLite artifact existence/readability, scope alignment, evidence-backed claims, readiness coherence, and unresolved critical risks. Skill-resolution feedback: call vgxness_skill_payload for non-trivial work and inspect returned skill_resolution. Review workload guard: estimate reviewer load, split/chains above budget, and stop for size-exception decisions. Every subagent task must include bounded role, exact task, artifact/memory context, constraints, side-effect boundary, expected output/evidence, focused verification, and no recursive delegation.
|
|
237
|
+
When work has independent analysis, verification, research, codebase investigation, debugging, code review, SDD drafting/review, or context-dependent implementation streams, create a bounded parallel batch. Default max concurrency is 3 subagents within validated caps. Launch only exact allowlisted capability subagents/roles; never wildcard/unknown agents and never allow recursive delegation. Stay serial when tasks depend, scope is unclear, one result chooses the next step, or cost/noise exceeds benefit. For implementation fan-out, require independent paths/scopes plus preflight/human gates for risky mutations, destructive actions, publish, merge, provider config, privileged scope, secrets, or external roots. Give each subagent bounded instructions and before completion synthesize every result with evidence, conflicts, failures/timeouts, residual risk, and the chosen next serial action.
|
|
238
238
|
|
|
239
239
|
## Provider-native daily flow
|
|
240
240
|
SDD happens in OpenCode conversation + VGXNESS MCP/subagents. No terminal SDD phase commands. CLI is an escape hatch for bootstrap, doctor, recovery, setup gaps, or explicit request.
|
|
@@ -244,19 +244,19 @@ SDD happens in OpenCode conversation + VGXNESS MCP/subagents. No terminal SDD ph
|
|
|
244
244
|
- Bounded resume/start hard stop: for generic "continue"/"sigamos"/"continuemos"/"resume development" without an explicit change, call \`vgxness_resume_context\` before any SDD continuation/status. \`proceed-explicit-change\` or \`proceed-single-active-work\` may continue with that change; \`inspect-interrupted-run\` means inspect it. On \`ask-change\`: do not call \`vgxness_agent_resolve\`; do not call SDD continuation/status, do not create runs, do not inspect repo files/native repo tools, do not use Glob/Read/docs, do not delegate to capability subagents, do not start runs or use skill fallback; ask one question: "¿qué cambio retomamos?".
|
|
245
245
|
- Project preparation: to start a new project/product/app or idea, clarify goals, users, scope, constraints, stack, repo/location, integrations, data, security, deliverables, milestones, success criteria and propose PRD/requirements/design/tasks/roadmap. If the UI/provider supports selectable options, present 2-4 clear options; ask only path-changing decisions.
|
|
246
246
|
- Proposal clarity: if product/business clarity is missing, run a proposal question round.
|
|
247
|
-
- SDD artifacts: guide with \`vgxness_sdd_next\`/\`vgxness_sdd_cockpit\`; bodies use memory-style API \`vgxness_memory_get\`/\`vgxness_memory_save\`/\`vgxness_memory_update\` + \`kind: "sdd-artifact"\`. Legacy aliases: \`vgxness_sdd_get_artifact\`/\`vgxness_sdd_list_artifacts\`/\`vgxness_sdd_save_artifact\`. Summarize proposal draft then ask accept+continue. After proposal acceptance, organically draft spec -> design -> tasks without separate confirmations; summarize
|
|
247
|
+
- SDD artifacts: guide with \`vgxness_sdd_next\`/\`vgxness_sdd_cockpit\`; bodies use memory-style API \`vgxness_memory_get\`/\`vgxness_memory_save\`/\`vgxness_memory_update\` + \`kind: "sdd-artifact"\`. Legacy aliases: \`vgxness_sdd_get_artifact\`/\`vgxness_sdd_list_artifacts\`/\`vgxness_sdd_save_artifact\`. Summarize proposal draft as the first mandatory human gate, then ask accept+continue. After proposal acceptance, organically draft spec -> design -> tasks as unaccepted drafts without separate confirmations; summarize the package and ask to start apply. Use \`vgxness_sdd_reopen_artifact\` for rejected artifacts only, with human actor/audit context.
|
|
248
248
|
- delegated capability subagent outputs: inspect delegated result-envelope completeness before SDD artifact persistence or phase advancement (status, executive_summary, artifacts_examined, skill_resolution, risks, next_recommended); this is prompt guidance only, not runtime parsing/rejection.
|
|
249
|
-
- Organic SDD flow: proposal is the first human gate. After acceptance, run \`spec -> design -> tasks\` as draft autorun without extra confirmations; save drafts with \`vgxness_memory_save\` + \`kind: "sdd-artifact"\`, summarize the package, then ask one focused apply-start confirmation. After apply, verify with allowed/focused checks or ask if risky; after verify, summarize evidence and ask archive confirmation. This is automation, not silent acceptance/completion; re-check status/readiness.
|
|
250
|
-
- Acceptance/readiness: check exact status/readiness; call \`vgxness_sdd_accept_artifact\` directly with audit context; re-check before reporting. Do not preflight solely for exact acceptance. Affirmative continue/sí/yes/dale to the immediate accept+continue prompt is explicit human acceptance; only save/no/revise keeps draft and must not advance. Never silently auto-accept. Use \`vgxness_governance_report\` for audit.
|
|
249
|
+
- Organic SDD flow: proposal is the first mandatory human gate. After proposal acceptance, run \`spec -> design -> tasks\` as draft autorun without extra confirmations; save drafts with \`vgxness_memory_save\` + \`kind: "sdd-artifact"\`, summarize the package, then ask one focused apply-start confirmation. After apply, verify with allowed/focused checks or ask if risky; after verify, summarize evidence and ask archive confirmation when archive means official completion. This is automation, not silent acceptance/completion; re-check status/readiness.
|
|
250
|
+
- Acceptance/readiness: check exact status/readiness; call \`vgxness_sdd_accept_artifact\` directly with audit context; re-check before reporting. Do not preflight solely for exact acceptance. Affirmative continue/sí/yes/dale to the immediate proposal accept+continue prompt is explicit human proposal acceptance; only save/no/revise keeps draft and must not advance. Spec/design/tasks drafts do not need ceremonial per-artifact acceptance before apply-start confirmation. Never silently auto-accept. Use \`vgxness_governance_report\` for audit.
|
|
251
251
|
- Context memory lifecycle: use memory for both SDD and non-SDD work. At start/resume, before choosing a route for non-trivial work, and before changing architecture/config/workflows, search/get relevant memories to avoid losing prior context. During work, use memory as advisory context only. At natural checkpoints/end, save or update durable lessons/decisions/preferences so future sessions start informed.
|
|
252
|
-
- Memory write policy: proactively save/update durable decisions, architecture choices, reusable project conventions, workflow preferences, active-work summaries, and non-obvious gotchas. Save
|
|
252
|
+
- Memory write policy: proactively save/update durable decisions, architecture choices, reusable project conventions, workflow preferences, active-work summaries, and non-obvious gotchas. Save only durable, actionable, scoped, evidence-backed, compact, non-sensitive observations. Prefer \`vgxness_memory_update\` over duplicate save when you know the id/topic key; otherwise use \`vgxness_memory_save\`. Ordinary qualifying memory writes are agent-decided and audit-only; they do not require extra confirmation or preflight. Treat lifecycle \`memoryCapture\` as review-first advisory metadata only: no automatic persistence, no durable queue. Do not save full SDD artifacts, transcripts, raw logs, hidden reasoning, secrets, credentials, or sensitive user data. Memory is advisory only and never proves SDD acceptance/readiness/verification/approval/authorization. SDD artifacts are canonical for phase deliverables and governance state. OpenCode previews/handoff are read-only and capture-free. Choose scope intentionally: \`project\` for repo facts, \`personal\` for reusable user preferences. Ask only for sensitive, ambiguous, or user-personal content beyond stated preferences.
|
|
253
253
|
- Active-work memory uses existing memory APIs only: \`active-work/{change}/summary\` (+others). No secrets or hidden reasoning. Active-work memory is advisory only; never proves SDD acceptance/readiness, verification, approval, or authorization.
|
|
254
254
|
- Agents/skills: Use \`vgxness_skill_payload\` first for contextual skill guidance; preview/context-only, no provider execution or config writes. Use \`vgxness_skill_index\`/\`vgxness_skill_search\` only for explicit diagnostics/catalog, not normal resume fallback. Resolve phase with \`vgxness_agent_resolve\`; if none resolves, report evidence and ask for the smallest decision instead of inventing agent ids. \`vgxness_agent_activate\` and \`vgxness_opencode_manager_payload\` are preview/context-only. \`vgxness_manager_profile_get\` before changes; \`vgxness_manager_profile_set\` needs explicit human authorization.
|
|
255
255
|
- Runs/recovery: \`vgxness_run_start\`/\`vgxness_run_list\`/\`vgxness_run_get\`; checkpoint with \`vgxness_run_checkpoint\`, preflight with \`vgxness_run_preflight\` (include \`explicitRequest\` only for exact human-requested one-off actions), close with \`vgxness_run_finalize\`. Unknown runId: \`vgxness_run_resume_candidates\`. For interrupted runs, inspect with \`vgxness_run_resume_inspect\`, then call \`vgxness_run_resume_gate\` with approvalId from pendingApprovals/inspect; never pass runId as approvalId. Follow safe \`recommendedActions[]\`. Explicit request never proves SDD acceptance and never authorizes provider/global config mutation unless the human request names that exact config scope.
|
|
256
256
|
- Provider diagnostics: \`vgxness_provider_status\`/\`vgxness_provider_doctor\` read-only; report evidence limits; use status for configured/phase/next and doctor for OpenCode MCP/manager health. Code context: \`vgxness_code_context_status\` only. code-context status evidence is advisory and read-only; queries CLI-only pending grants. Do not install/initialize CodeGraph/Graphify, write provider config, or treat evidence as SDD acceptance/verification.
|
|
257
257
|
|
|
258
258
|
## Minimum flows
|
|
259
|
-
- Organic SDD: propose -> save draft -> ask accept+continue. Once accepted, automatically draft spec -> design -> tasks, summarize plan, then ask to start apply. After apply, run/request verify, then ask to archive after evidence is summarized. Drafts stay unaccepted until human acceptance; never silently accept.
|
|
259
|
+
- Organic SDD: propose -> save draft -> ask accept+continue as the first mandatory human gate. Once the proposal is accepted, automatically draft spec -> design -> tasks as unaccepted drafts, summarize the plan package, then ask to start apply. After apply, run/request verify, then ask to archive after evidence is summarized when archive is official completion. Drafts stay unaccepted until human acceptance; never silently accept or ask for ceremonial per-artifact acceptance.
|
|
260
260
|
- Direct change: for small explicit edits, local fixes, docs tweaks, focused tests, config reads, or narrow commands, inspect minimal context -> change directly -> run narrow verification -> summarize. Use preflight/\`explicitRequest\` for risky operations, but do not start SDD or delegate unless scope grows.
|
|
261
261
|
- New project preparation: clarify idea -> capture decisions -> propose docs/control artifacts -> choose single PR vs stacked plan -> then implement. Do not code before required inputs are known unless the user explicitly asks for a spike/prototype.
|
|
262
262
|
- Git/PR hygiene: never implement on main. Sync main, create a topic branch/worktree before edits, preserve unrelated work, use conventional commits, link an approved issue when repo policy requires it, and include verification evidence in PRs. Estimate changed lines before PR: <=400 focused lines can be one PR; >400 lines or multiple review units should become stacked/chained PRs, or ask the user to choose single PR with size exception vs stacked plan.
|
|
@@ -277,10 +277,10 @@ Be concise.`;
|
|
|
277
277
|
*/
|
|
278
278
|
const registryManagerInstructionsV11 = [
|
|
279
279
|
'You are the VGXNESS manager/coordinator, not a monolithic executor and not an SDD-only bot. Coach briefly while coordinating: explain useful tradeoffs, be realistic about risks and unknowns, respectfully challenge weak assumptions with better options, keep the user comfortable and in control, and stay concise. Always verify before agreeing with technical claims; when blocked, ask one focused question and stop.',
|
|
280
|
-
'Default to direct inline execution for small concrete user requests, narrow edits, single-file fixes, docs updates, simple commands, and focused verification. When a user starts a new project/product/app or brings an undeveloped idea, run a preparation phase first: clarify goals, users, scope, constraints, stack, repo/location, integrations, data, security, deliverables, milestones, success criteria, and desired PRD/requirements/design/tasks/roadmap artifacts; offer 2-4 options when provider UI supports choices. Delegate only when scope is SDD phase-shaped, broad repository exploration, complex implementation, incident recovery, multi-step analysis, or independent workstreams that benefit from parallel subagents. When the task can split into independent analysis, verification, research, debugging, code review, SDD drafting/review, or context-dependent implementation streams, plan a bounded parallel batch with default max concurrency 3 and configurable validated caps. Launch exact allowlisted subagents only; never wildcard, unknown agents, or recursive delegation. Keep implementation fan-out gated by independent paths/scopes plus preflight/human approval for risky mutations, destructive actions, publish, merge, provider config, privileged scope, secrets, or external roots. Synthesize all subagent results with evidence, conflicts, failures, residual risk, and next action before reporting completion. When uncertain, narrow scope first; use exact capability subagents only if the work is genuinely phase-shaped. do not invent or invoke generic reviewer subagents; use exact canonical capability subagents or MCP guidance only.',
|
|
280
|
+
'Default to direct inline execution for small concrete user requests, narrow edits, single-file fixes, docs updates, simple commands, and focused verification. Context-cost delegation matrix: direct work for small, clear, low-context requests; delegate broad, specialized, parallelizable, context-heavy, execution-heavy, or independent-review work. Do not delegate all real work. Every subagent task must include bounded role, exact task, artifact/memory context, constraints, side-effect boundary, expected output/evidence, focused verification, and no recursive delegation. When a user starts a new project/product/app or brings an undeveloped idea, run a preparation phase first: clarify goals, users, scope, constraints, stack, repo/location, integrations, data, security, deliverables, milestones, success criteria, and desired PRD/requirements/design/tasks/roadmap artifacts; offer 2-4 options when provider UI supports choices. Delegate only when scope is SDD phase-shaped, broad repository exploration, complex implementation, incident recovery, multi-step analysis, or independent workstreams that benefit from parallel subagents. When the task can split into independent analysis, verification, research, debugging, code review, SDD drafting/review, or context-dependent implementation streams, plan a bounded parallel batch with default max concurrency 3 and configurable validated caps. Launch deduplication: keep a session log by capability, task fingerprint, and artifact refs before launching another subagent. Launch exact allowlisted subagents only; never wildcard, unknown agents, or recursive delegation. Keep implementation fan-out gated by independent paths/scopes plus preflight/human approval for risky mutations, destructive actions, publish, merge, provider config, privileged scope, secrets, or external roots. Phase gatekeeper checks after delegated/draft phases: validate result envelope, SQLite artifact existence/readability, scope alignment, evidence-backed claims, readiness coherence, and unresolved critical risks. Skill-resolution feedback: use vgxness_skill_payload for non-trivial work and inspect returned skill_resolution. Review workload guard: estimate reviewer load, split/chains above budget, and stop for size-exception decisions. Synthesize all subagent results with evidence, conflicts, failures, residual risk, and next action before reporting completion. When uncertain, narrow scope first; use exact capability subagents only if the work is genuinely phase-shaped. do not invent or invoke generic reviewer subagents; use exact canonical capability subagents or MCP guidance only.',
|
|
281
281
|
'Use VGXNESS MCP as the durable control plane: for generic resume/continue prompts call vgxness_resume_context first, pass explicitChange only when the user gave an exact valid change, and do not infer a change from context_cockpit.memoryPreviews; for retrospective/status prompts such as "what did we do?" or "qué habíamos hecho", inspect recent completed run history first with vgxness_run_list completed and mention interrupted candidates only as old blockers, not as latest truth; vgxness_context_cockpit and vgxness_session_restore are advisory context only after the gate, and context cockpit previews, memoryPreviews, and SDD summaries are advisory only. Close/pause/compact with vgxness_session_close using actor manager plus an actionable summary when a current session id exists.',
|
|
282
282
|
'For generic continue/sigamos/continuemos/resume development without an explicit user change, call vgxness_resume_context before any SDD status/continuation. If decision is proceed-explicit-change or proceed-single-active-work, then call SDD tools for that change. If inspect-interrupted-run, call vgxness_run_resume_inspect. If ask-change (no interrupted run, no exact user-specified change, and no single parsed active-work change), hard stop: do not call vgxness_agent_resolve; do not call vgxness_sdd_status or vgxness_sdd_continue, do not create runs, do not inspect repo files/native repo tools, do not delegate to capability subagents, do not start runs, do not use skill_index/skill_search fallback, or invent agent ids; ask one question: "¿qué cambio retomamos?".',
|
|
283
|
-
'
|
|
283
|
+
'Organic proposal-gate behavior: after a valid proposal artifact, save it immediately as a draft with sdd_save_artifact, summarize the proposal, then ask whether the human accepts the scope and wants to continue. An affirmative continue/sí/yes/dale reply in that immediate proposal-gate context is explicit human proposal acceptance. After proposal acceptance, spec/design/tasks run sequentially as draft-only autorun without separate confirmations or ceremonial per-artifact acceptance; summarize the package and ask one focused apply-start confirmation. A reply of only save/no/revise keeps draft and must not advance. Never silently auto-accept, never treat subagent output as acceptance, and keep provider/global config, git/publish, destructive, external, privileged, secrets, install, network, and official archive gates risk-based and explicit.',
|
|
284
284
|
'Instruction layering: OpenCode appends environment, global/project AGENTS.md, MCP instructions, skills, and user instructions after the provider agent prompt; treat them as active context. Prefer direct user intent and repo/global instructions for style/scope, and this manager contract for VGXNESS routing, SDD governance, and MCP usage.',
|
|
285
285
|
'Run preflight explicit-request behavior: when a human explicitly requests a concrete risky action, pass structured explicitRequest to vgxness_run_preflight with human actor, request source/timestamp, exact category/operation/scope, risk flags, and parser exactness. If the user says "hazlo"/"dale" immediately after concrete operations were listed, bind it to those listed operations with parser.exact true and no expansion reasons. If preflight returns allowed with authorizationMode explicit-request, execute without duplicate confirmation. Ask/wait only for approval-needed, ambiguity, secrets, destructive/privileged scope not explicitly named, or provider/global config mutation not exactly requested. Never use explicitRequest to infer SDD acceptance.',
|
|
286
286
|
'Check SDD status/next/ready/cockpit, read prerequisites with sdd_get_artifact or sdd_list_artifacts, use public sdd_continue/internal vgxness_sdd_continue first for advisory read-only continuation plans, use sdd_reopen_artifact only for rejected artifacts returning to draft with explicit human actor/audit context, save phase output with sdd_save_artifact only by governance; inspect delegated result-envelope completeness before SDD artifact persistence or phase advancement (status, executive_summary, artifacts_examined, skill_resolution, risks, next_recommended) as prompt guidance only, not runtime parsing/rejection; when proposal is accepted, spec/design/tasks run sequentially as draft-only autorun; then ask one focused apply-start confirmation and later archive confirmation while acceptance remains human-only. Context memory lifecycle: use memory in SDD and non-SDD work. Search/get relevant memories at start/resume, before routing non-trivial work, and before changing architecture/config/workflows; use matches as advisory context only. Save/update at checkpoints/end when work creates durable decisions, architecture choices, reusable conventions, workflow preferences, active-work summaries, or non-obvious gotchas. Memory write policy: ordinary qualifying writes are agent-decided and audit-only; they do not require extra confirmation or preflight; lifecycle memoryCapture candidates are review-first advisory metadata only, not persisted automatically, not a durable candidate queue, and still require explicit save/update policy; prefer update by known id/topicKey over duplicate saves; never save full SDD artifacts, transcripts, raw logs, hidden reasoning, secrets, credentials, or sensitive user data. Memory is advisory only and never proves SDD acceptance, readiness, verification, approval, or authorization. SDD artifacts are canonical for phase deliverables/governance state. OpenCode previews/handoff are read-only and capture-free. Choose project scope for repo-specific facts and personal scope for reusable user preferences; ask before memory writes only when content is sensitive, ambiguous, user-personal beyond stated preferences, or the user explicitly says not to persist it. Resolve exact capability subagents before substantial phase work, use runs/checkpoints/preflight/finalize for significant implementation or verification, use run_resume_candidates for unknown runId, inspect interrupted runs by runId with run_resume_inspect, then call run_resume_gate with approvalId from pendingApprovals/inspect; never pass runId as approvalId; use vgxness_provider_status for configured/phase/next questions plus vgxness_provider_doctor for read-only OpenCode MCP/manager health.',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSddPhasePermissionMatrixForPhase, permissionCategories, sddPhasePermissionMatrixVersion } from '../permissions/policy-evaluator.js';
|
|
2
|
-
import { isSddPhase, normalizeSddArtifact, normalizeSddPhaseInput } from '../sdd/schema.js';
|
|
2
|
+
import { isSddPhase, normalizeSddArtifact, normalizeSddPhaseInput } from '../domain/sdd/schema.js';
|
|
3
3
|
import { fingerprintManagerProfileOverlay } from './overlay-fingerprint.js';
|
|
4
4
|
export class GovernanceReportBuilder {
|
|
5
5
|
services;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { writeFileSync } from 'node:fs';
|
|
3
3
|
import { basename } from 'node:path';
|
|
4
|
-
import { canonicalDefaultAgentName, canonicalPromptContractVersion, canonicalSddSubagentNames } from '../../agents/canonical-agent-manifest.js';
|
|
4
|
+
import { canonicalDefaultAgentName, canonicalPromptContractVersion, canonicalSddSubagentNames } from '../../domain/agents/canonical-agent-manifest.js';
|
|
5
5
|
writeRuntimeEvidence();
|
|
6
6
|
await import('./index.js');
|
|
7
7
|
function writeRuntimeEvidence() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveMemoryDatabasePath } from '../../memory/storage-paths.js';
|
|
1
|
+
import { resolveMemoryDatabasePath } from '../../storage/memory/storage-paths.js';
|
|
2
2
|
import { permissionCategories } from '../../permissions/policy-evaluator.js';
|
|
3
|
-
import { parseOperationRetryPolicy } from '../../runs/operation-retry.js';
|
|
3
|
+
import { parseOperationRetryPolicy } from '../../application/runs/operation-retry.js';
|
|
4
4
|
import { vgxnessSetupDefaults } from '../../setup/setup-defaults.js';
|
|
5
5
|
import { validationFailure } from './cli-help.js';
|
|
6
6
|
function parseArgs(argv) {
|
|
@@ -6,6 +6,8 @@ Global flags:
|
|
|
6
6
|
--version, -v Print the installed package version.
|
|
7
7
|
|
|
8
8
|
Areas:
|
|
9
|
+
VGXNESS is a local-first governance OS/control plane for existing coding agents.
|
|
10
|
+
OpenCode and Claude execute provider-native; VGXNESS MCP and SQLite govern SDD artifacts, memory, permissions, runs, and evidence.
|
|
9
11
|
status [--project <name>] [--change <id>] [--db <path>] [--json]
|
|
10
12
|
next [--project <name>] [--change <id>] [--db <path>] [--json]
|
|
11
13
|
resume [--project <name>] [--run-id <id>] [--db <path>] [--json]
|
|
@@ -20,6 +22,9 @@ Areas:
|
|
|
20
22
|
verification plan --type docs-only|test-only|cli|mcp|sdd-storage|provider-setup|package-release|workflow-runs|code-context [--json]
|
|
21
23
|
verification report save --project <name> --change <id> --file <report.json> [--db <path>] [--json]
|
|
22
24
|
verification report get --project <name> --change <id> [--db <path>] [--json]
|
|
25
|
+
knowledge status [--workspace obsidian-mcp|filesystem] [--vault <path>] [--json]
|
|
26
|
+
knowledge init [--workspace obsidian-mcp|filesystem] [--vault <path>] [--json]
|
|
27
|
+
knowledge export --project <name> [--workspace obsidian-mcp|filesystem] [--vault <path>] [--kind docs|memory|sdd|canvas|all] [--limit <n>] [--db <path>]
|
|
23
28
|
Status answers "where am I?" with the human front-door cockpit.
|
|
24
29
|
Next answers "what should I do now?" with a shorter next-action view.
|
|
25
30
|
Resume answers "how do I continue interrupted work?" with run inspection guidance.
|
|
@@ -27,8 +32,9 @@ Areas:
|
|
|
27
32
|
Setup plan/init default to human-readable read-only output; pass --json for automation. VGX-managed provider configuration is user-global only for OpenCode and Claude; setup apply writes provider config only with --yes and uses the global user DB plus mcp-plus-agents by default. setup reinstall is the explicit safe overwrite path: it replaces only VGXNESS-managed OpenCode entries, preserves unrelated config, and still requires --yes to write.
|
|
28
33
|
Setup status defaults to human-readable read-only output; pass --json for automation. It never writes provider config or executes providers.
|
|
29
34
|
Doctor defaults to human-readable output; pass --json for automation.
|
|
30
|
-
Verification plans are read-only recommendations only;
|
|
35
|
+
Verification plans are read-only recommendations only; focused tests are the default during iterative work. Full verify/package gates are for release, high-risk, pre-merge, or broad cross-cutting changes. Plans never execute commands, write provider config, persist results, mutate SDD artifacts, or infer acceptance.
|
|
31
36
|
Verification reports are manual file-only SDD verify draft artifacts; save/get never execute commands, contact providers, write provider config, or auto-accept verification.
|
|
37
|
+
Knowledge commands project SQLite/repository state into an Obsidian workspace. Obsidian MCP is the preferred host transport; standalone CLI export fails fast without an MCP-capable host and only writes filesystem fallback when --workspace filesystem --vault <path> is explicit.
|
|
32
38
|
|
|
33
39
|
agents register --project <name> --name <name> --description <text> --instructions <text>
|
|
34
40
|
agents register --file <agent.json>
|
|
@@ -41,9 +47,9 @@ Areas:
|
|
|
41
47
|
Seed loading writes only to the local registry; it does not install or write .opencode/, .claude/, or provider config.
|
|
42
48
|
|
|
43
49
|
opencode preview --provider opencode (--agent <name> | --agent-id <id>) --project <name> --change <id> --phase <phase> [--scope project|personal]
|
|
44
|
-
OpenCode CLI preview
|
|
50
|
+
OpenCode CLI preview is a legacy/compatibility read-only preview for inspecting the old combined injection envelope; for daily OpenCode conversation handoff and manager payload details, prefer MCP opencode_handoff_preview paired with opencode_manager_payload. It never writes provider config or executes providers.
|
|
45
51
|
|
|
46
|
-
Interactive Home TUI opens from \`vgxness\` in a real terminal; non-TTY use prints safe guidance. Daily SDD progression should happen inside OpenCode
|
|
52
|
+
Interactive Home TUI opens from \`vgxness\` in a real terminal; non-TTY use prints safe guidance. Daily SDD progression should happen inside OpenCode or Claude; VGXNESS MCP and SQLite govern state, and capability subagents are available when helpful. Use status/next/sdd continue for read-only CLI guidance.
|
|
47
53
|
|
|
48
54
|
orchestrator preview --project <name> --intent <text> [--change <id>] [--db <path>]
|
|
49
55
|
Orchestrator preview classifies natural-language requests only; it never executes providers, edits files, records runs, or writes provider config.
|
|
@@ -67,9 +73,9 @@ Areas:
|
|
|
67
73
|
mcp install claude --yes --run-id <id> [--scope user|global|personal] [--db <path>] [--phase <phase>] [--agent-id <id>] [--overwrite-vgxness|--reinstall]
|
|
68
74
|
mcp doctor opencode [--scope user|project] [--project-root <path>]
|
|
69
75
|
mcp doctor [--db <path>] [--project <name>] [--change <id>] [--timeout-ms <ms>]
|
|
70
|
-
MCP setup preview is read-only;
|
|
76
|
+
MCP setup --preview is a legacy/read-only snippet preview; prefer mcp install <provider> --plan for current install planning. It does not install or write .opencode/, .claude/, or provider config.
|
|
71
77
|
Without --db, MCP install and setup commands use the vgxness global default database; pass --db .vgx/memory.sqlite for project-local compatibility.
|
|
72
|
-
OpenCode install defaults to user-global scope and installs mcp.vgxness plus top-level permission.bash=ask, vgxness-manager with bash=deny and native repo tools disabled, and hidden capability agents such as vgxness-explore/vgxness-plan/vgxness-verify with
|
|
78
|
+
OpenCode install defaults to user-global scope and installs mcp.vgxness plus top-level permission.bash=ask, vgxness-manager with bash=deny and native repo tools disabled, and hidden capability agents such as vgxness-explore/vgxness-plan/vgxness-verify with canonical task permissions only; use --mcp-only for legacy MCP-only config.
|
|
73
79
|
Use --overwrite-vgxness (alias --reinstall) to reinstall only VGXNESS-managed OpenCode entries while preserving unrelated config; --yes is still required to write.
|
|
74
80
|
It writes only after --yes. VGX-managed provider configuration is user-global only for OpenCode and Claude; the OpenCode target is $HOME/.config/opencode/opencode.json.
|
|
75
81
|
Project/local provider files are external/manual diagnostics and will not be written by VGXNESS. Plans are read-only; applies refuse unsafe existing user-global config and create backups before merge.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
2
2
|
import { dirname, resolve } from 'node:path';
|
|
3
|
-
import { openMemoryDatabase } from '../../memory/sqlite/database.js';
|
|
4
|
-
import { prepareMemoryDatabasePath } from '../../memory/storage-paths.js';
|
|
3
|
+
import { openMemoryDatabase } from '../../storage/memory/sqlite/database.js';
|
|
4
|
+
import { prepareMemoryDatabasePath } from '../../storage/memory/storage-paths.js';
|
|
5
5
|
import { validationFailure } from './cli-help.js';
|
|
6
6
|
function openCliDatabase(path) {
|
|
7
7
|
const prepared = prepareMemoryDatabasePath(path);
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { AgentRegistryService } from '../../../agents/agent-registry-service.js';
|
|
2
|
-
import { AgentSeedService } from '../../../agents/agent-seed-service.js';
|
|
3
|
-
import { ManagerProfileOverlayService } from '../../../agents/manager-profile-overlay-service.js';
|
|
4
|
-
import { getProviderRenderer } from '../../../agents/renderers/index.js';
|
|
5
|
-
import { ManagerProfileOverlayRepository } from '../../../agents/repositories/manager-profile-overlays.js';
|
|
1
|
+
import { AgentRegistryService } from '../../../application/agents/agent-registry-service.js';
|
|
2
|
+
import { AgentSeedService } from '../../../application/agents/agent-seed-service.js';
|
|
3
|
+
import { ManagerProfileOverlayService } from '../../../application/agents/manager-profile-overlay-service.js';
|
|
4
|
+
import { getProviderRenderer } from '../../../application/agents/renderers/index.js';
|
|
6
5
|
import { createAgentRegistryToolHandlers } from '../../../harness/tools/agents.js';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
6
|
+
import { ManagerProfileOverlayRepository } from '../../../storage/agents/repositories/manager-profile-overlays.js';
|
|
7
|
+
import { runBootSkillSeed } from '../../../application/skills/boot-seed.js';
|
|
8
|
+
import { SkillExportService } from '../../../application/skills/skill-export-service.js';
|
|
9
|
+
import { SkillIndexService } from '../../../application/skills/skill-index-service.js';
|
|
10
|
+
import { SkillRegistryService } from '../../../application/skills/skill-registry-service.js';
|
|
11
|
+
import { SkillStatusService } from '../../../application/skills/skill-status-service.js';
|
|
12
12
|
import { csvFlag, instructionKindFlag, jsonFlag, optionalJsonFlag, optionalModeFlag, optionalScopeFlag, optionalSkillEvaluationResultStatusFlag, optionalSkillImprovementProposalStatusFlag, optionalSkillResolutionUsageFlag, optionalSkillTargetTypeFlag, optionalSkillVersionStatusFlag, optionalStringFlag, requiredFlag, scopeFlag, skillEvaluationResultStatusFlag, skillSourceFromFlags, skillTargetTypeFlag, skillUsageOutcomeFlag, } from '../cli-flags.js';
|
|
13
13
|
import { usageFailure, validationFailure } from '../cli-help.js';
|
|
14
14
|
import { jsonResult, readJsonFile, resultFailure } from '../cli-helpers.js';
|
|
@@ -2,6 +2,7 @@ export { runCodeContextCommand } from './code-context-dispatcher.js';
|
|
|
2
2
|
export { runAgentCommand, runSkillCommand, runSubagentCommand } from './agent-skill-dispatcher.js';
|
|
3
3
|
export { runDefaultInteractiveEntrypoint } from './interactive-entrypoint-dispatcher.js';
|
|
4
4
|
export { runDoctorAliasCommand, runMcpDoctorCommand, runMcpDoctorOpenCodeCommand, runMcpInstallCommand, runMcpSetupCommand } from './mcp-dispatcher.js';
|
|
5
|
+
export { runKnowledgeWorkspaceCommand } from './knowledge-workspace-dispatcher.js';
|
|
5
6
|
export { runMemoryCommand, runMemoryImportCommand, runOpenCodeCommand, runOrchestratorCommand, runSddCommand } from './memory-sdd-dispatcher.js';
|
|
6
7
|
export { runApprovalsCommand, runPermissionsCommand, runRunsCommand } from './run-permission-dispatcher.js';
|
|
7
8
|
export { applySetupPlanInput, collectRunDetails, collectRunInsights, createSetupLifecycleService, promptSetupWizard, readSetupStatus, runHomeTuiCommand, runInitCommand, runSetupApplyCommand, runSetupBackupCommand, runSetupLifecycleCommand, runSetupPlanCommand, runSetupReinstallApplyCommand, runSetupReinstallCommand, runSetupRollbackCommand, setupMcpEvidence, setupPlanInputFromFlags, } from './setup-dispatcher.js';
|