@moreih29/nexus-core 0.12.0 → 0.13.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 +48 -63
- package/assets/agents/architect/body.ko.md +177 -0
- package/{agents → assets/agents}/architect/body.md +16 -0
- package/assets/agents/designer/body.ko.md +125 -0
- package/{agents → assets/agents}/designer/body.md +16 -0
- package/assets/agents/engineer/body.ko.md +106 -0
- package/{agents → assets/agents}/engineer/body.md +14 -0
- package/assets/agents/lead/body.ko.md +70 -0
- package/assets/agents/lead/body.md +70 -0
- package/assets/agents/postdoc/body.ko.md +122 -0
- package/{agents → assets/agents}/postdoc/body.md +16 -0
- package/assets/agents/researcher/body.ko.md +137 -0
- package/{agents → assets/agents}/researcher/body.md +15 -0
- package/assets/agents/reviewer/body.ko.md +138 -0
- package/{agents → assets/agents}/reviewer/body.md +15 -0
- package/assets/agents/strategist/body.ko.md +116 -0
- package/{agents → assets/agents}/strategist/body.md +16 -0
- package/assets/agents/tester/body.ko.md +195 -0
- package/{agents → assets/agents}/tester/body.md +15 -0
- package/assets/agents/writer/body.ko.md +122 -0
- package/{agents → assets/agents}/writer/body.md +14 -0
- package/assets/capability-matrix.yml +198 -0
- package/assets/hooks/agent-bootstrap/handler.test.ts +368 -0
- package/assets/hooks/agent-bootstrap/handler.ts +119 -0
- package/assets/hooks/agent-bootstrap/meta.yml +10 -0
- package/assets/hooks/agent-finalize/handler.test.ts +368 -0
- package/assets/hooks/agent-finalize/handler.ts +76 -0
- package/assets/hooks/agent-finalize/meta.yml +10 -0
- package/assets/hooks/capability-matrix.yml +313 -0
- package/assets/hooks/post-tool-telemetry/handler.test.ts +302 -0
- package/assets/hooks/post-tool-telemetry/handler.ts +49 -0
- package/assets/hooks/post-tool-telemetry/meta.yml +11 -0
- package/assets/hooks/prompt-router/handler.test.ts +801 -0
- package/assets/hooks/prompt-router/handler.ts +261 -0
- package/assets/hooks/prompt-router/meta.yml +11 -0
- package/assets/hooks/session-init/handler.test.ts +274 -0
- package/assets/hooks/session-init/handler.ts +30 -0
- package/assets/hooks/session-init/meta.yml +9 -0
- package/assets/lsp-servers.json +55 -0
- package/assets/schema/lsp-servers.schema.json +67 -0
- package/assets/skills/nx-init/body.ko.md +197 -0
- package/{skills → assets/skills}/nx-init/body.md +11 -0
- package/assets/skills/nx-plan/body.ko.md +361 -0
- package/{skills → assets/skills}/nx-plan/body.md +13 -0
- package/assets/skills/nx-run/body.ko.md +161 -0
- package/{skills → assets/skills}/nx-run/body.md +11 -0
- package/assets/skills/nx-sync/body.ko.md +92 -0
- package/{skills → assets/skills}/nx-sync/body.md +10 -0
- package/assets/tools/tool-name-map.yml +353 -0
- package/dist/hooks/opencode-mount.d.ts +35 -0
- package/dist/hooks/opencode-mount.d.ts.map +1 -0
- package/dist/hooks/opencode-mount.js +332 -0
- package/dist/hooks/opencode-mount.js.map +1 -0
- package/dist/hooks/runtime.d.ts +37 -0
- package/dist/hooks/runtime.d.ts.map +1 -0
- package/dist/hooks/runtime.js +274 -0
- package/dist/hooks/runtime.js.map +1 -0
- package/dist/hooks/types.d.ts +196 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +85 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/lsp/cache.d.ts +9 -0
- package/dist/lsp/cache.d.ts.map +1 -0
- package/dist/lsp/cache.js +216 -0
- package/dist/lsp/cache.js.map +1 -0
- package/dist/lsp/client.d.ts +24 -0
- package/dist/lsp/client.d.ts.map +1 -0
- package/dist/lsp/client.js +166 -0
- package/dist/lsp/client.js.map +1 -0
- package/dist/lsp/detect.d.ts +77 -0
- package/dist/lsp/detect.d.ts.map +1 -0
- package/dist/lsp/detect.js +116 -0
- package/dist/lsp/detect.js.map +1 -0
- package/dist/mcp/server.d.ts +5 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +34 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/artifact.d.ts +4 -0
- package/dist/mcp/tools/artifact.d.ts.map +1 -0
- package/dist/mcp/tools/artifact.js +36 -0
- package/dist/mcp/tools/artifact.js.map +1 -0
- package/dist/mcp/tools/history.d.ts +3 -0
- package/dist/mcp/tools/history.d.ts.map +1 -0
- package/dist/mcp/tools/history.js +29 -0
- package/dist/mcp/tools/history.js.map +1 -0
- package/dist/mcp/tools/lsp.d.ts +13 -0
- package/dist/mcp/tools/lsp.d.ts.map +1 -0
- package/dist/mcp/tools/lsp.js +225 -0
- package/dist/mcp/tools/lsp.js.map +1 -0
- package/dist/mcp/tools/plan.d.ts +3 -0
- package/dist/mcp/tools/plan.d.ts.map +1 -0
- package/dist/mcp/tools/plan.js +317 -0
- package/dist/mcp/tools/plan.js.map +1 -0
- package/dist/mcp/tools/task.d.ts +3 -0
- package/dist/mcp/tools/task.d.ts.map +1 -0
- package/dist/mcp/tools/task.js +252 -0
- package/dist/mcp/tools/task.js.map +1 -0
- package/dist/shared/invocations.d.ts +74 -0
- package/dist/shared/invocations.d.ts.map +1 -0
- package/dist/shared/invocations.js +247 -0
- package/dist/shared/invocations.js.map +1 -0
- package/dist/shared/json-store.d.ts +37 -0
- package/dist/shared/json-store.d.ts.map +1 -0
- package/dist/shared/json-store.js +163 -0
- package/dist/shared/json-store.js.map +1 -0
- package/dist/shared/mcp-utils.d.ts +3 -0
- package/dist/shared/mcp-utils.d.ts.map +1 -0
- package/dist/shared/mcp-utils.js +6 -0
- package/dist/shared/mcp-utils.js.map +1 -0
- package/dist/shared/paths.d.ts +21 -0
- package/dist/shared/paths.d.ts.map +1 -0
- package/dist/shared/paths.js +81 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/tool-log.d.ts +8 -0
- package/dist/shared/tool-log.d.ts.map +1 -0
- package/dist/shared/tool-log.js +22 -0
- package/dist/shared/tool-log.js.map +1 -0
- package/dist/types/state.d.ts +862 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/state.js +66 -0
- package/dist/types/state.js.map +1 -0
- package/docs/consuming/codex-lead-merge.md +106 -0
- package/docs/plugin-guide.md +360 -0
- package/docs/plugin-template/claude/.github/workflows/build.yml +60 -0
- package/docs/plugin-template/claude/README.md +110 -0
- package/docs/plugin-template/claude/package.json +16 -0
- package/docs/plugin-template/codex/.github/workflows/build.yml +51 -0
- package/docs/plugin-template/codex/README.md +147 -0
- package/docs/plugin-template/codex/package.json +17 -0
- package/docs/plugin-template/opencode/.github/workflows/build.yml +61 -0
- package/docs/plugin-template/opencode/README.md +121 -0
- package/docs/plugin-template/opencode/package.json +25 -0
- package/package.json +21 -21
- package/scripts/build-agents.test.ts +1279 -0
- package/scripts/build-agents.ts +978 -0
- package/scripts/build-hooks.test.ts +1385 -0
- package/scripts/build-hooks.ts +584 -0
- package/scripts/cli.test.ts +367 -0
- package/scripts/cli.ts +547 -0
- package/agents/architect/meta.yml +0 -13
- package/agents/designer/meta.yml +0 -13
- package/agents/engineer/meta.yml +0 -11
- package/agents/postdoc/meta.yml +0 -13
- package/agents/researcher/meta.yml +0 -12
- package/agents/reviewer/meta.yml +0 -12
- package/agents/strategist/meta.yml +0 -13
- package/agents/tester/meta.yml +0 -12
- package/agents/writer/meta.yml +0 -11
- package/conformance/README.md +0 -311
- package/conformance/examples/plan.extension.schema.example.json +0 -25
- package/conformance/lifecycle/README.md +0 -48
- package/conformance/lifecycle/agent-complete.json +0 -44
- package/conformance/lifecycle/agent-resume.json +0 -43
- package/conformance/lifecycle/agent-spawn.json +0 -36
- package/conformance/lifecycle/memory-access-record.json +0 -27
- package/conformance/lifecycle/session-end.json +0 -48
- package/conformance/scenarios/full-plan-cycle.json +0 -147
- package/conformance/scenarios/task-deps-ordering.json +0 -95
- package/conformance/schema/fixture.schema.json +0 -354
- package/conformance/state-schemas/agent-tracker.schema.json +0 -63
- package/conformance/state-schemas/history.schema.json +0 -134
- package/conformance/state-schemas/memory-access.schema.json +0 -36
- package/conformance/state-schemas/plan.schema.json +0 -77
- package/conformance/state-schemas/tasks.schema.json +0 -98
- package/conformance/tools/artifact-write.json +0 -97
- package/conformance/tools/context.json +0 -172
- package/conformance/tools/history-search.json +0 -219
- package/conformance/tools/plan-decide.json +0 -139
- package/conformance/tools/plan-start.json +0 -81
- package/conformance/tools/plan-status.json +0 -127
- package/conformance/tools/plan-update.json +0 -341
- package/conformance/tools/task-add.json +0 -156
- package/conformance/tools/task-close.json +0 -161
- package/conformance/tools/task-list.json +0 -177
- package/conformance/tools/task-update.json +0 -167
- package/docs/behavioral-contracts.md +0 -145
- package/docs/consumer-implementation-guide.md +0 -840
- package/docs/memory-lifecycle-contract.md +0 -119
- package/docs/nexus-layout.md +0 -224
- package/docs/nexus-outputs-contract.md +0 -344
- package/docs/nexus-state-overview.md +0 -170
- package/docs/nexus-tools-contract.md +0 -438
- package/manifest.json +0 -448
- package/schema/README.md +0 -69
- package/schema/agent.schema.json +0 -23
- package/schema/common.schema.json +0 -17
- package/schema/manifest.schema.json +0 -78
- package/schema/memory-policy.schema.json +0 -98
- package/schema/skill.schema.json +0 -54
- package/schema/task-exceptions.schema.json +0 -40
- package/schema/vocabulary.schema.json +0 -167
- package/scripts/.gitkeep +0 -0
- package/scripts/conformance-coverage.ts +0 -466
- package/scripts/import-from-claude-nexus.ts +0 -403
- package/scripts/lib/frontmatter.ts +0 -71
- package/scripts/lib/lint.ts +0 -348
- package/scripts/lib/structure.ts +0 -159
- package/scripts/lib/validate.ts +0 -796
- package/scripts/validate.ts +0 -90
- package/skills/nx-init/meta.yml +0 -8
- package/skills/nx-plan/meta.yml +0 -10
- package/skills/nx-run/meta.yml +0 -8
- package/skills/nx-sync/meta.yml +0 -7
- package/vocabulary/capabilities.yml +0 -65
- package/vocabulary/categories.yml +0 -11
- package/vocabulary/invocations.yml +0 -147
- package/vocabulary/memory_policy.yml +0 -88
- package/vocabulary/resume-tiers.yml +0 -11
- package/vocabulary/tags.yml +0 -60
- package/vocabulary/task-exceptions.yml +0 -29
package/scripts/validate.ts
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bun
|
|
2
|
-
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import {
|
|
5
|
-
loadSchemas,
|
|
6
|
-
runAll as runSchemaAndIntegrity,
|
|
7
|
-
type ValidationResult,
|
|
8
|
-
} from './lib/validate.ts';
|
|
9
|
-
import {
|
|
10
|
-
checkHarnessSpecific,
|
|
11
|
-
checkConcreteModel,
|
|
12
|
-
checkPromptOnly,
|
|
13
|
-
checkTagTriggerConsistency,
|
|
14
|
-
} from './lib/lint.ts';
|
|
15
|
-
import {
|
|
16
|
-
checkDirectoryStrict,
|
|
17
|
-
checkIdMatch,
|
|
18
|
-
} from './lib/structure.ts';
|
|
19
|
-
|
|
20
|
-
const IS_GITHUB_ACTIONS = process.env.GITHUB_ACTIONS === 'true';
|
|
21
|
-
|
|
22
|
-
async function main(): Promise<void> {
|
|
23
|
-
const root = process.cwd();
|
|
24
|
-
const allResults: ValidationResult[] = [];
|
|
25
|
-
|
|
26
|
-
// Gate 1-5: schema + referential integrity + manifest generation
|
|
27
|
-
// (runAll internally does per-file fail-forward and generates manifest on success)
|
|
28
|
-
await loadSchemas(root);
|
|
29
|
-
const schemaResults = await runSchemaAndIntegrity(root);
|
|
30
|
-
allResults.push(...schemaResults);
|
|
31
|
-
|
|
32
|
-
// Gate 6: harness-specific tool names
|
|
33
|
-
const harnessResults = await checkHarnessSpecific(root);
|
|
34
|
-
allResults.push(...harnessResults);
|
|
35
|
-
|
|
36
|
-
// Gate 7: concrete model names
|
|
37
|
-
const modelResults = await checkConcreteModel(root);
|
|
38
|
-
allResults.push(...modelResults);
|
|
39
|
-
|
|
40
|
-
// Gate 8: prompt-only enforcement
|
|
41
|
-
const promptOnlyResults = await checkPromptOnly(root);
|
|
42
|
-
allResults.push(...promptOnlyResults);
|
|
43
|
-
|
|
44
|
-
// Gate 9: directory strict
|
|
45
|
-
const dirResults = await checkDirectoryStrict(root);
|
|
46
|
-
allResults.push(...dirResults);
|
|
47
|
-
|
|
48
|
-
// Gate 10: id ↔ directory name + kebab pattern
|
|
49
|
-
const idResults = await checkIdMatch(root);
|
|
50
|
-
allResults.push(...idResults);
|
|
51
|
-
|
|
52
|
-
// Gate 11: tag trigger consistency
|
|
53
|
-
const tagTriggerResults = await checkTagTriggerConsistency(root);
|
|
54
|
-
allResults.push(...tagTriggerResults);
|
|
55
|
-
|
|
56
|
-
// Report
|
|
57
|
-
const errors = allResults.filter((r) => r.severity === 'error');
|
|
58
|
-
const warnings = allResults.filter((r) => r.severity === 'warning');
|
|
59
|
-
|
|
60
|
-
if (allResults.length === 0) {
|
|
61
|
-
console.log('All 11 validation gates passed.');
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (IS_GITHUB_ACTIONS) {
|
|
66
|
-
// GitHub annotations format
|
|
67
|
-
for (const r of allResults) {
|
|
68
|
-
const level = r.severity === 'error' ? 'error' : 'warning';
|
|
69
|
-
const lineAttr = r.line ? `,line=${r.line}` : '';
|
|
70
|
-
console.log(`::${level} file=${r.file}${lineAttr}::[${r.gate}] ${r.message}`);
|
|
71
|
-
}
|
|
72
|
-
} else {
|
|
73
|
-
// Human-readable format
|
|
74
|
-
for (const r of allResults) {
|
|
75
|
-
const loc = r.line ? `${r.file}:${r.line}` : r.file;
|
|
76
|
-
console.log(`${loc} [${r.gate}] ${r.severity.toUpperCase()}: ${r.message}`);
|
|
77
|
-
}
|
|
78
|
-
console.log('');
|
|
79
|
-
console.log(`Summary: ${errors.length} error(s), ${warnings.length} warning(s)`);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (errors.length > 0) {
|
|
83
|
-
process.exit(1);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
main().catch((err) => {
|
|
88
|
-
console.error('Fatal error in validate.ts:', err);
|
|
89
|
-
process.exit(2);
|
|
90
|
-
});
|
package/skills/nx-init/meta.yml
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
name: nx-init
|
|
2
|
-
description: Project onboarding — scan, mission, essentials, context generation
|
|
3
|
-
summary: "Project onboarding — scan, mission, essentials, context generation"
|
|
4
|
-
manual_only: true
|
|
5
|
-
harness_docs_refs:
|
|
6
|
-
- instruction_file
|
|
7
|
-
- slash_command_display
|
|
8
|
-
id: nx-init
|
package/skills/nx-plan/meta.yml
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
name: nx-plan
|
|
2
|
-
description: Structured multi-perspective analysis to decompose issues, align on
|
|
3
|
-
decisions, and produce an enriched plan before execution. Plan only — does not
|
|
4
|
-
execute.
|
|
5
|
-
summary: "Structured planning — subagent-based analysis, deliberate decisions, produce execution plan"
|
|
6
|
-
triggers:
|
|
7
|
-
- plan
|
|
8
|
-
harness_docs_refs:
|
|
9
|
-
- resume_invocation
|
|
10
|
-
id: nx-plan
|
package/skills/nx-run/meta.yml
DELETED
package/skills/nx-sync/meta.yml
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
# Harness-neutral capability definitions.
|
|
2
|
-
# Each entry describes WHAT is denied in semantic terms.
|
|
3
|
-
# Consumers (claude-nexus, opencode-nexus) maintain their own
|
|
4
|
-
# local map from these ids/classes to concrete tool names in their own repo.
|
|
5
|
-
# nexus-core does not and must not know those tool names.
|
|
6
|
-
|
|
7
|
-
capabilities:
|
|
8
|
-
- id: no_file_edit
|
|
9
|
-
description: "Agent cannot create, modify, or delete files in the user's workspace."
|
|
10
|
-
intent: workspace_write_denial
|
|
11
|
-
blocks_semantic_classes:
|
|
12
|
-
- file_creation
|
|
13
|
-
- file_modification
|
|
14
|
-
- file_deletion
|
|
15
|
-
- partial_file_edit
|
|
16
|
-
- structured_document_edit
|
|
17
|
-
prose_guidance: |
|
|
18
|
-
Block any tool whose primary effect is to alter content at a workspace
|
|
19
|
-
file path. This includes: creating new files at arbitrary paths, rewriting
|
|
20
|
-
whole file contents, applying partial edits (diffs, patches, find-replace,
|
|
21
|
-
multi-edit batches), deleting or truncating files, and cell-level edits in
|
|
22
|
-
structured documents such as notebooks.
|
|
23
|
-
Read-only operations are NOT blocked: reading file contents, querying
|
|
24
|
-
metadata, listing directories, and running code-intelligence queries that
|
|
25
|
-
do not mutate files.
|
|
26
|
-
|
|
27
|
-
- id: no_task_create
|
|
28
|
-
description: "Agent cannot create new tasks in the Nexus task pipeline."
|
|
29
|
-
intent: task_pipeline_append_denial
|
|
30
|
-
blocks_semantic_classes:
|
|
31
|
-
- nexus_task_creation
|
|
32
|
-
prose_guidance: |
|
|
33
|
-
Block any tool that appends a new task to the Nexus task pipeline (the
|
|
34
|
-
mechanism by which Lead-owned work is enqueued for execution). Tools that
|
|
35
|
-
read, list, or query existing tasks are NOT blocked. Tools that modify
|
|
36
|
-
existing task state belong to a separate capability (no_task_update) and
|
|
37
|
-
are not governed here.
|
|
38
|
-
|
|
39
|
-
- id: no_task_update
|
|
40
|
-
description: "Agent cannot update the state of existing Nexus tasks."
|
|
41
|
-
intent: task_pipeline_mutate_denial
|
|
42
|
-
blocks_semantic_classes:
|
|
43
|
-
- nexus_task_state_transition
|
|
44
|
-
- nexus_task_metadata_modification
|
|
45
|
-
prose_guidance: |
|
|
46
|
-
Block any tool that mutates an existing Nexus task: changing its status,
|
|
47
|
-
editing its description, reassigning ownership, closing it, or modifying
|
|
48
|
-
any field on its record. Tools that read, list, or query tasks are NOT
|
|
49
|
-
blocked. Creation of new tasks is governed by no_task_create, not here.
|
|
50
|
-
|
|
51
|
-
- id: no_shell_exec
|
|
52
|
-
description: "Agent cannot execute arbitrary shell commands or spawn subprocesses."
|
|
53
|
-
intent: shell_execution_denial
|
|
54
|
-
blocks_semantic_classes:
|
|
55
|
-
- shell_command_exec
|
|
56
|
-
- subprocess_spawn
|
|
57
|
-
- interactive_shell_session
|
|
58
|
-
prose_guidance: |
|
|
59
|
-
Block any tool whose primary effect is to run a command-line invocation,
|
|
60
|
-
shell script, or spawn a subprocess on the user's machine. This includes
|
|
61
|
-
general-purpose shell runners, background process managers, shell output
|
|
62
|
-
readers, and shell-session kill operations. Tools that read files, query
|
|
63
|
-
metadata, or call specialized non-shell APIs (HTTP, language-server
|
|
64
|
-
queries, sandboxed code evaluators that do not spawn user-machine
|
|
65
|
-
processes) are NOT blocked.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Agent role categories. Determined by reasoning surface vs artifact surface.
|
|
2
|
-
|
|
3
|
-
categories:
|
|
4
|
-
- id: how
|
|
5
|
-
description: "분석·자문. 깊은 맥락 유지가 핵심 자산. architect, designer, postdoc, strategist."
|
|
6
|
-
|
|
7
|
-
- id: do
|
|
8
|
-
description: "실행. 산출물(artifact) 단위로 작업하고 종료. engineer, writer, researcher."
|
|
9
|
-
|
|
10
|
-
- id: check
|
|
11
|
-
description: "검증. 항상 fresh한 관점에서 독립적으로 검사. tester, reviewer."
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
# Harness-neutral invocation semantic definitions.
|
|
2
|
-
# Each entry describes WHAT is invoked and what params are semantically required.
|
|
3
|
-
# Consumers (claude-nexus, opencode-nexus) maintain their own
|
|
4
|
-
# local map from these semantic primitives to concrete tool call syntax in their own repo.
|
|
5
|
-
# nexus-core does not and must not know those tool names.
|
|
6
|
-
#
|
|
7
|
-
# body.md uses macro syntax: {{primitive_id key1=val1 key2=val2}}
|
|
8
|
-
# See Spec γ (plan session #4, Issue #2) for macro grammar.
|
|
9
|
-
|
|
10
|
-
invocations:
|
|
11
|
-
- id: skill_activation
|
|
12
|
-
description: "Activate another skill within the current conversation."
|
|
13
|
-
intent: skill_entry_dispatch
|
|
14
|
-
semantic_params:
|
|
15
|
-
- name: skill
|
|
16
|
-
description: "Canonical skill id from manifest.json skills list."
|
|
17
|
-
required: true
|
|
18
|
-
- name: mode
|
|
19
|
-
description: "Activation mode (e.g., 'auto' for non-interactive)."
|
|
20
|
-
required: false
|
|
21
|
-
prose_guidance: |
|
|
22
|
-
Invoke a skill whose logic should be inlined into the current session.
|
|
23
|
-
The target skill must exist in the current harness's skill registry.
|
|
24
|
-
The invocation transfers execution context to the named skill; the
|
|
25
|
-
calling skill yields until the activated skill completes or signals
|
|
26
|
-
a return. Optional mode parameters modify activation behavior (e.g.,
|
|
27
|
-
bypassing interactive prompts for fully autonomous execution).
|
|
28
|
-
Only skill ids that appear in manifest.json are valid targets.
|
|
29
|
-
fallback_behavior: |
|
|
30
|
-
If the harness lacks a live skill activation primitive, re-emit the
|
|
31
|
-
skill's trigger tag (e.g., '[plan:auto]') as a self-dispatch signal,
|
|
32
|
-
relying on tag detection to re-enter the skill. The skill id must be
|
|
33
|
-
mapped to its canonical trigger tag by the harness's own docs.
|
|
34
|
-
|
|
35
|
-
- id: subagent_spawn
|
|
36
|
-
description: "Spawn a new subagent session with a specific role and prompt."
|
|
37
|
-
intent: subagent_session_create
|
|
38
|
-
semantic_params:
|
|
39
|
-
- name: target_role
|
|
40
|
-
description: "Canonical agent id from manifest.json agents list (e.g., 'writer', 'engineer')."
|
|
41
|
-
required: true
|
|
42
|
-
- name: prompt
|
|
43
|
-
description: "Structured task prompt. May be multiline (heredoc in body.md)."
|
|
44
|
-
required: true
|
|
45
|
-
- name: name
|
|
46
|
-
description: "Optional instance label for this subagent session."
|
|
47
|
-
required: false
|
|
48
|
-
- name: resume_tier_hint
|
|
49
|
-
description: "Optional hint from vocabulary/resume-tiers.yml (e.g., 'bounded', 'ephemeral')."
|
|
50
|
-
required: false
|
|
51
|
-
prose_guidance: |
|
|
52
|
-
Delegates a bounded unit of work to an agent with the given role.
|
|
53
|
-
The target_role must match an id in manifest.json agents list; the
|
|
54
|
-
harness resolves this to a concrete session or thread configuration.
|
|
55
|
-
The prompt provides the complete task specification for the subagent,
|
|
56
|
-
including all context the agent needs — do not rely on ambient session
|
|
57
|
-
state unless the resume_tier_hint indicates persistent context.
|
|
58
|
-
resume_tier_hint is advisory: harnesses may override based on their
|
|
59
|
-
own session management constraints.
|
|
60
|
-
fallback_behavior: |
|
|
61
|
-
If the harness lacks an explicit subagent spawn primitive (e.g.,
|
|
62
|
-
hooks-based implicit routing), inject the target_role as a routing
|
|
63
|
-
hint and structure the prompt so the harness's own delegation rules
|
|
64
|
-
catch it. A harness that cannot spawn agents must document this
|
|
65
|
-
limitation and treat the invocation as a no-op with a warning.
|
|
66
|
-
|
|
67
|
-
- id: task_register
|
|
68
|
-
description: "Register a task for user-visible progress tracking."
|
|
69
|
-
intent: execution_visibility_register
|
|
70
|
-
semantic_params:
|
|
71
|
-
- name: label
|
|
72
|
-
description: "Short human-readable task label."
|
|
73
|
-
required: true
|
|
74
|
-
- name: state
|
|
75
|
-
description: "Current state (pending / in_progress / completed)."
|
|
76
|
-
required: true
|
|
77
|
-
prose_guidance: |
|
|
78
|
-
Primarily for TUI progress rendering — allows the user to see which
|
|
79
|
-
work items are active, pending, or done during multi-step execution.
|
|
80
|
-
The label should be concise enough to display in a progress panel.
|
|
81
|
-
The state values are constrained to a three-state lifecycle: pending
|
|
82
|
-
(enqueued but not started), in_progress (currently executing), and
|
|
83
|
-
completed (done). Harnesses without TUI progress support may silently
|
|
84
|
-
no-op this primitive; failure must not block execution flow.
|
|
85
|
-
fallback_behavior: |
|
|
86
|
-
If the harness has no TUI task tracker, omit the call entirely. This
|
|
87
|
-
primitive is best-effort — failure or absence must not block
|
|
88
|
-
execution. Logging the label and state to the conversation transcript
|
|
89
|
-
is acceptable as a degraded fallback for auditability.
|
|
90
|
-
|
|
91
|
-
- id: user_question
|
|
92
|
-
description: "Ask the user a structured question with selectable options."
|
|
93
|
-
intent: structured_user_prompt
|
|
94
|
-
semantic_params:
|
|
95
|
-
- name: question
|
|
96
|
-
description: "The question text shown to the user."
|
|
97
|
-
required: true
|
|
98
|
-
- name: options
|
|
99
|
-
description: "Array of option objects, each with 'label' and 'description'. If empty, free-form response is expected."
|
|
100
|
-
required: true
|
|
101
|
-
prose_guidance: |
|
|
102
|
-
Presents the user with a structured decision point. When options is
|
|
103
|
-
non-empty, the user is expected to select one of the provided choices;
|
|
104
|
-
when empty, the user provides a free-form text response. The harness
|
|
105
|
-
is responsible for rendering options in a way appropriate to its UI
|
|
106
|
-
(e.g., numbered list, interactive picker, inline buttons). The LLM
|
|
107
|
-
should not proceed with execution until a response is received.
|
|
108
|
-
Use this primitive for branch points that require explicit user input,
|
|
109
|
-
not for informational messages or confirmations that could be inferred
|
|
110
|
-
from context.
|
|
111
|
-
fallback_behavior: |
|
|
112
|
-
If the harness lacks a structured question tool (e.g., opencode-nexus),
|
|
113
|
-
present the question as prose followed by the options enumerated as a
|
|
114
|
-
numbered list, then await the user's free-form reply. The LLM is
|
|
115
|
-
expected to map the reply to the most appropriate option or treat it
|
|
116
|
-
as a free-form answer if no options were given.
|
|
117
|
-
|
|
118
|
-
- id: memory_read_observation
|
|
119
|
-
description: >
|
|
120
|
-
Harness-local observation of an agent reading a file under .nexus/memory/.
|
|
121
|
-
This invocation captures the moment a memory file's content is loaded into
|
|
122
|
-
an agent's context. It is not the read action itself — the read is performed
|
|
123
|
-
by the harness's file-read primitive — but the observation event emitted by
|
|
124
|
-
the harness after the read completes.
|
|
125
|
-
intent: memory_read_observation
|
|
126
|
-
semantic_params:
|
|
127
|
-
- name: file_path
|
|
128
|
-
description: Absolute or project-relative path to the memory file that was read.
|
|
129
|
-
required: true
|
|
130
|
-
- name: reader_identity
|
|
131
|
-
description: Opaque identifier of the agent or subject that performed the read.
|
|
132
|
-
required: true
|
|
133
|
-
- name: observed_at
|
|
134
|
-
description: ISO 8601 timestamp of the observation event.
|
|
135
|
-
required: true
|
|
136
|
-
prose_guidance: >
|
|
137
|
-
Harnesses that wish to track memory access to support informed gc decisions
|
|
138
|
-
should implement this observation by hooking into their filesystem read
|
|
139
|
-
primitive and emitting the event after a read under .nexus/memory/ completes.
|
|
140
|
-
Writes and directory scans are excluded. The accumulated records are persisted
|
|
141
|
-
per conformance/state-schemas/memory-access.schema.json at
|
|
142
|
-
.nexus/state/{harness_id}/memory-access.jsonl.
|
|
143
|
-
fallback_behavior: >
|
|
144
|
-
If the harness cannot observe file-read events (no equivalent hook), memory
|
|
145
|
-
access tracking is unavailable and forgetting decisions must rely on manual
|
|
146
|
-
inspection via the [m:gc] tag. Automatic deletion policies requiring access
|
|
147
|
-
metadata are consequently not enabled in such harnesses.
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
# Canonical memory policy vocabulary for .nexus/memory/.
|
|
2
|
-
# Defines categories, naming conventions, access tracking semantics,
|
|
3
|
-
# forgetting policy, and merge preference.
|
|
4
|
-
# Consumers (claude-nexus, opencode-nexus) read this file; specific thresholds
|
|
5
|
-
# and enforcement mechanics are consumer-local.
|
|
6
|
-
|
|
7
|
-
categories:
|
|
8
|
-
- id: empirical
|
|
9
|
-
prefix: empirical-
|
|
10
|
-
description: >
|
|
11
|
-
Empirically verified findings — observations and measurements that the
|
|
12
|
-
project has confirmed through its own experimentation. Examples include
|
|
13
|
-
runtime behavior observations, testing-derived structural facts, and
|
|
14
|
-
operational measurements that cannot be inferred from documentation alone.
|
|
15
|
-
- id: external
|
|
16
|
-
prefix: external-
|
|
17
|
-
description: >
|
|
18
|
-
External constraints and references — requirements imposed by upstream
|
|
19
|
-
dependencies, third-party API limits, vendor documentation quotations, and
|
|
20
|
-
any knowledge that originates outside the project. May become stale if
|
|
21
|
-
the upstream source changes.
|
|
22
|
-
- id: pattern
|
|
23
|
-
prefix: pattern-
|
|
24
|
-
description: >
|
|
25
|
-
Tactical operational patterns — recurring cycle-level recipes, routing
|
|
26
|
-
heuristics, and procedural knowledge developed through work on the project.
|
|
27
|
-
Architectural or design-level patterns belong in .nexus/context/, not here.
|
|
28
|
-
|
|
29
|
-
naming:
|
|
30
|
-
pattern: "^[a-z0-9][a-z0-9-]*\\.md$"
|
|
31
|
-
description: >
|
|
32
|
-
Memory filenames are lowercase kebab-case .md files. The name should be a
|
|
33
|
-
descriptive topic of 2–4 words. An optional category prefix from the
|
|
34
|
-
categories section above may precede the topic. Version numbers and dates
|
|
35
|
-
must not appear in filenames — temporal information belongs inside the file.
|
|
36
|
-
optional_prefix: true
|
|
37
|
-
|
|
38
|
-
access_tracking:
|
|
39
|
-
observation_primitive: file_read
|
|
40
|
-
scope: .nexus/memory/
|
|
41
|
-
description: >
|
|
42
|
-
Harnesses observe the moment an agent reads a memory file. Save events,
|
|
43
|
-
directory scans (glob, grep), and mentions of the path in prose are not
|
|
44
|
-
observation events. The set of events observed determines the accumulated
|
|
45
|
-
access record.
|
|
46
|
-
information_accumulated:
|
|
47
|
-
- name: last_access_timestamp
|
|
48
|
-
meaning: >
|
|
49
|
-
Wall-clock time of the most recent read event. Field name is harness-local;
|
|
50
|
-
the canonical schema for storage is conformance/state-schemas/memory-access.schema.json.
|
|
51
|
-
- name: access_count
|
|
52
|
-
meaning: >
|
|
53
|
-
Cumulative count of read events observed for this file since tracking began.
|
|
54
|
-
- name: last_reader_identity
|
|
55
|
-
meaning: >
|
|
56
|
-
Identifier of the most recent reader (agent id or equivalent). Harness-local
|
|
57
|
-
value domain.
|
|
58
|
-
storage_contract_reference: conformance/state-schemas/memory-access.schema.json
|
|
59
|
-
|
|
60
|
-
forgetting:
|
|
61
|
-
manual_gate_default: true
|
|
62
|
-
description: >
|
|
63
|
-
Manual gc (triggered by the [m:gc] tag) is the default forgetting path.
|
|
64
|
-
Automatic deletion is opt-in per consumer and never runs without explicit
|
|
65
|
-
enablement.
|
|
66
|
-
automatic_deletion_structure:
|
|
67
|
-
principle: minimum_three_signal_intersection
|
|
68
|
-
description: >
|
|
69
|
-
If a consumer enables automatic deletion, the policy must require the
|
|
70
|
-
simultaneous satisfaction of at least three independent signals — for
|
|
71
|
-
example, elapsed time since last access, cycles since last read, and
|
|
72
|
-
cumulative access count. Single-signal automatic deletion is prohibited.
|
|
73
|
-
The specific signal thresholds are consumer-local and must be set to
|
|
74
|
-
match the project's cycle cadence.
|
|
75
|
-
recoverable_deletion_requirement: git_commit
|
|
76
|
-
recoverable_deletion_description: >
|
|
77
|
-
Every memory file deletion must be recorded as a git commit. The commit
|
|
78
|
-
message should include a recovery path that allows the file to be
|
|
79
|
-
reconstructed via git history. Specific commit message format is
|
|
80
|
-
consumer-local.
|
|
81
|
-
|
|
82
|
-
merge:
|
|
83
|
-
principle: merge_before_create
|
|
84
|
-
description: >
|
|
85
|
-
When a new memory save candidate substantively overlaps an existing file
|
|
86
|
-
in topic and category, merging the new content into the existing file is
|
|
87
|
-
preferred over creating a new file. Specific overlap-detection criteria
|
|
88
|
-
(for example, keyword match thresholds) are consumer-local.
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
# Agent session resumability tiers. Reflects what kind of surface the agent produces.
|
|
2
|
-
|
|
3
|
-
resume_tiers:
|
|
4
|
-
- id: persistent
|
|
5
|
-
description: "세션 전체를 지속한다. HOW 카테고리 에이전트와 researcher. 맥락 누적이 핵심 자산."
|
|
6
|
-
|
|
7
|
-
- id: bounded
|
|
8
|
-
description: "artifact 단위로 지속한다. engineer, writer. 특정 산출물 완성 후 종료."
|
|
9
|
-
|
|
10
|
-
- id: ephemeral
|
|
11
|
-
description: "항상 새로 시작한다. tester, reviewer. 이전 맥락 없이 독립 검증해야 하기 때문."
|
package/vocabulary/tags.yml
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Canonical definition of all Nexus tag triggers.
|
|
2
|
-
# Slash command triggers are NOT stored here — each harness resolves them
|
|
3
|
-
# in its own command namespace.
|
|
4
|
-
# variants field is valid for both skill and inline_action types.
|
|
5
|
-
|
|
6
|
-
tags:
|
|
7
|
-
# skill tags (3 entries, 4 triggers)
|
|
8
|
-
- id: plan
|
|
9
|
-
trigger: "[plan]"
|
|
10
|
-
type: skill
|
|
11
|
-
skill: nx-plan
|
|
12
|
-
description: "Activates nx-plan skill for structured multi-perspective analysis and decision recording"
|
|
13
|
-
variants: ["auto"] # [plan:auto] for autonomous mode
|
|
14
|
-
|
|
15
|
-
- id: run
|
|
16
|
-
trigger: "[run]"
|
|
17
|
-
type: skill
|
|
18
|
-
skill: nx-run
|
|
19
|
-
description: "Activates nx-run skill for task execution with subagent composition"
|
|
20
|
-
|
|
21
|
-
- id: sync
|
|
22
|
-
trigger: "[sync]"
|
|
23
|
-
type: skill
|
|
24
|
-
skill: nx-sync
|
|
25
|
-
description: "Activates nx-sync skill for .nexus/context/ knowledge synchronization"
|
|
26
|
-
|
|
27
|
-
# inline action tags (4 entries, 5 triggers)
|
|
28
|
-
- id: d
|
|
29
|
-
trigger: "[d]"
|
|
30
|
-
type: inline_action
|
|
31
|
-
handler: nx_plan_decide
|
|
32
|
-
description: "Records a decision during an active plan session"
|
|
33
|
-
|
|
34
|
-
- id: m
|
|
35
|
-
trigger: "[m]"
|
|
36
|
-
type: inline_action
|
|
37
|
-
handler: memory_store
|
|
38
|
-
description: "Stores a lesson or reference to .nexus/memory/"
|
|
39
|
-
prose_guidance: >
|
|
40
|
-
저장 admission 기준 — 코드/웹에서 다시 얻을 수 없는 정보만 저장한다.
|
|
41
|
-
memory 파일의 naming, category, lifecycle 운영 정책은
|
|
42
|
-
vocabulary/memory_policy.yml과 docs/memory-lifecycle-contract.md를
|
|
43
|
-
canonical source로 참조한다.
|
|
44
|
-
|
|
45
|
-
- id: m-gc
|
|
46
|
-
trigger: "[m:gc]"
|
|
47
|
-
type: inline_action
|
|
48
|
-
handler: memory_gc
|
|
49
|
-
description: "Garbage-collects .nexus/memory/ by merging or removing stale entries"
|
|
50
|
-
prose_guidance: >
|
|
51
|
-
gc 트리거 조건 평가, merge 판단, forgetting policy 집행은
|
|
52
|
-
vocabulary/memory_policy.yml에 정의된 원칙을 따르고
|
|
53
|
-
구체 임계값은 consumer-local 설정으로 결정한다.
|
|
54
|
-
|
|
55
|
-
- id: rule
|
|
56
|
-
trigger: "[rule]"
|
|
57
|
-
type: inline_action
|
|
58
|
-
handler: rule_store
|
|
59
|
-
description: "Stores a project rule to .nexus/rules/. [rule:*] supports tag parameter."
|
|
60
|
-
variants: ["*"] # [rule:any-tag] for parameterized variants
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Canonical exception rules for task decomposition and counting.
|
|
2
|
-
# Each entry defines a condition under which standard task decomposition rules
|
|
3
|
-
# are suspended or modified, along with the alternative treatment to apply.
|
|
4
|
-
# Consumers apply these exceptions during nx-plan task synthesis.
|
|
5
|
-
|
|
6
|
-
task_exceptions:
|
|
7
|
-
- id: docs_only.coherent
|
|
8
|
-
description: "A batch of documentation files that all address the same scheme, decision, or structural change and should be treated as a single coherent unit."
|
|
9
|
-
applies_when: "all changed files are .md or frontmatter-only, and share one common scheme, decision, or structural change"
|
|
10
|
-
treatment: "bundle into 1 writer task + 1 reviewer pair; file count / line count thresholds waived; state coherence claim in task approach field"
|
|
11
|
-
rationale: "e.g., updating agent frontmatter files after a new field is introduced; files share the same change intent"
|
|
12
|
-
|
|
13
|
-
- id: docs_only.independent
|
|
14
|
-
description: "A set of documentation files where each file addresses a distinct topic with no cross-reference dependency."
|
|
15
|
-
applies_when: "each .md file addresses a distinct topic with no cross-reference dependency"
|
|
16
|
-
treatment: "N parallel writer tasks (one per file), each paired with 1 reviewer task; file count threshold waived per-task"
|
|
17
|
-
rationale: "e.g., separate proposal drafts; each file is independently consumed"
|
|
18
|
-
|
|
19
|
-
- id: same_file_bundle
|
|
20
|
-
description: "Two or more decomposed sub-tasks that would each modify the same target file, requiring merger to avoid conflicts."
|
|
21
|
-
applies_when: "two or more sub-tasks in the decomposition would each modify the same target file"
|
|
22
|
-
treatment: "merge sub-tasks into a single task under one owner with a structured prompt listing each sub-task's requirements; the merged task counts as 1 task and 1 artifact cluster; does not apply when sub-tasks are sequenced (A's output feeds B) — those remain separate with a deps relationship"
|
|
23
|
-
rationale: "parallel subagents targeting the same file cause merge conflicts"
|
|
24
|
-
|
|
25
|
-
- id: generated_artifacts
|
|
26
|
-
description: "Files that are build output and do not represent independent authoring decisions."
|
|
27
|
-
applies_when: "files are build output (e.g., paths declared as build outputs in the harness's build configuration)"
|
|
28
|
-
treatment: "excluded from task count, artifact cluster file count, and line count calculations; committed as part of the task that triggers their generation"
|
|
29
|
-
rationale: "generated files do not represent independent authoring decisions"
|