@moreih29/nexus-core 0.1.2 → 0.2.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.
Files changed (43) hide show
  1. package/README.md +3 -3
  2. package/agents/architect/body.md +7 -6
  3. package/agents/designer/body.md +3 -3
  4. package/agents/engineer/body.md +8 -8
  5. package/agents/postdoc/body.md +4 -4
  6. package/agents/researcher/body.md +4 -4
  7. package/agents/reviewer/body.md +2 -2
  8. package/agents/strategist/body.md +4 -4
  9. package/agents/tester/body.md +2 -2
  10. package/agents/writer/body.md +1 -1
  11. package/conformance/README.md +125 -0
  12. package/conformance/scenarios/full-plan-cycle.json +132 -0
  13. package/conformance/scenarios/task-deps-ordering.json +83 -0
  14. package/conformance/schema/fixture.schema.json +224 -0
  15. package/conformance/state-schemas/agent-tracker.schema.json +58 -0
  16. package/conformance/state-schemas/history.schema.json +124 -0
  17. package/conformance/state-schemas/plan.schema.json +72 -0
  18. package/conformance/state-schemas/runtime.schema.json +25 -0
  19. package/conformance/state-schemas/tasks.schema.json +93 -0
  20. package/conformance/tools/plan-decide.json +70 -0
  21. package/conformance/tools/plan-start.json +67 -0
  22. package/conformance/tools/task-add.json +73 -0
  23. package/conformance/tools/task-close.json +98 -0
  24. package/docs/behavioral-contracts.md +145 -0
  25. package/docs/consumer-implementation-guide.md +844 -0
  26. package/docs/nexus-layout.md +234 -0
  27. package/docs/nexus-state-overview.md +185 -0
  28. package/docs/nexus-tools-contract.md +427 -0
  29. package/manifest.json +126 -113
  30. package/package.json +5 -1
  31. package/schema/common.schema.json +0 -4
  32. package/schema/skill.schema.json +16 -1
  33. package/schema/vocabulary.schema.json +14 -9
  34. package/skills/nx-init/body.md +6 -9
  35. package/skills/nx-init/meta.yml +1 -0
  36. package/skills/nx-plan/body.md +14 -11
  37. package/skills/nx-plan/meta.yml +3 -0
  38. package/skills/nx-run/body.md +4 -4
  39. package/skills/nx-run/meta.yml +3 -0
  40. package/skills/nx-setup/body.md +9 -9
  41. package/skills/nx-setup/meta.yml +1 -0
  42. package/skills/nx-sync/meta.yml +1 -0
  43. package/vocabulary/capabilities.yml +58 -25
@@ -1,10 +1,10 @@
1
1
  ## Role
2
2
 
3
- Interactive project setup wizard — configure Nexus for a new project with minimal token cost. Every step is a concrete choice via `AskUserQuestion`, with no open-ended exploration.
3
+ Interactive project setup wizard — configure Nexus for a new project with minimal token cost. Every step is a concrete choice via `prompt_user`, with no open-ended exploration.
4
4
 
5
5
  ## Constraints
6
6
 
7
- - NEVER accept free-text input — every step must use `AskUserQuestion` with explicit options.
7
+ - NEVER accept free-text input — every step must use `prompt_user` with explicit options.
8
8
  - NEVER skip the "Skip" option — all steps are optional.
9
9
  - NEVER modify files outside the selected scope without explicit user confirmation.
10
10
  - NEVER overwrite an existing `statusLine` field in settings.json without explicit user confirmation.
@@ -21,7 +21,7 @@ Interactive project setup wizard — configure Nexus for a new project with mini
21
21
  ### Step 1: Scope Selection
22
22
 
23
23
  ```
24
- AskUserQuestion({
24
+ prompt_user({
25
25
  questions: [{
26
26
  question: "Where should the Nexus configuration be applied?",
27
27
  header: "Scope",
@@ -41,7 +41,7 @@ All file write paths for subsequent steps are determined by this selection:
41
41
  ### Step 2: Statusline
42
42
 
43
43
  ```
44
- AskUserQuestion({
44
+ prompt_user({
45
45
  questions: [{
46
46
  question: "Enable the Nexus statusline? (model, branch, context usage, rate limits)",
47
47
  header: "Statusline",
@@ -97,7 +97,7 @@ Specifically, treat an existing statusline setting as detected if any of the fol
97
97
  If detected:
98
98
 
99
99
  ```
100
- AskUserQuestion({
100
+ prompt_user({
101
101
  questions: [{
102
102
  question: "An existing statusline configuration was detected. Replace it with the Nexus statusline?",
103
103
  header: "Statusline",
@@ -129,7 +129,7 @@ Notify and skip:
129
129
  **Not installed:**
130
130
 
131
131
  ```
132
- AskUserQuestion({
132
+ prompt_user({
133
133
  questions: [{
134
134
  question: "Install the context7 plugin? It enables agents to look up library docs in real time.",
135
135
  header: "Plugin",
@@ -158,7 +158,7 @@ Note: Once added to `enabledPlugins`, Claude Code automatically installs the plu
158
158
  ### Step 4: Knowledge Init
159
159
 
160
160
  ```
161
- AskUserQuestion({
161
+ prompt_user({
162
162
  questions: [{
163
163
  question: "Auto-generate project core knowledge?",
164
164
  header: "Init",
@@ -185,12 +185,12 @@ Output a setup completion message:
185
185
 
186
186
  ## Key Principles
187
187
 
188
- 1. **Every step uses AskUserQuestion** — no free-text input
188
+ 1. **Every step uses prompt_user** — no free-text input
189
189
  2. **Minimize tokens** — limit each step to concrete choices to prevent unnecessary exploration
190
190
  3. **Always provide a Skip option** — nothing is forced
191
191
  4. **Extensible structure** — includes recommended plugin step, expandable to additional categories in the future
192
192
 
193
193
  ## State Management
194
194
 
195
- Setup operates via sequential AskUserQuestion calls with no state file.
195
+ Setup operates via sequential prompt_user calls with no state file.
196
196
  Configuration results are written to the scope-appropriate settings file at each step.
@@ -1,4 +1,5 @@
1
1
  name: nx-setup
2
2
  description: Interactive project setup wizard for Nexus configuration.
3
+ summary: "Interactive Nexus configuration wizard"
3
4
  manual_only: true
4
5
  id: nx-setup
@@ -1,6 +1,7 @@
1
1
  name: nx-sync
2
2
  description: Context knowledge synchronization — scans project state and updates
3
3
  .nexus/context/ design documents
4
+ summary: "Context knowledge synchronization"
4
5
  triggers:
5
6
  - sync
6
7
  id: nx-sync
@@ -1,32 +1,65 @@
1
- # Capabilities restrict an agent's access to harness-provided tools.
2
- # NOT constraints on nexus-core's own scripts/ or tooling.
1
+ # Harness-neutral capability definitions.
2
+ # Each entry describes WHAT is denied in semantic terms.
3
+ # Consumers (claude-nexus, opencode-nexus, nexus-code) 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.
3
6
 
4
7
  capabilities:
5
8
  - id: no_file_edit
6
- description: "Agent cannot create or modify files in the user's workspace"
7
- harness_mapping:
8
- claude_code:
9
- - Edit
10
- - Write
11
- - NotebookEdit
12
- opencode:
13
- - edit
14
- - write
15
- - patch
16
- - multiedit
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.
17
26
 
18
27
  - id: no_task_create
19
- description: "Agent cannot create new tasks in the Nexus task pipeline"
20
- harness_mapping:
21
- claude_code:
22
- - mcp__plugin_claude-nexus_nx__nx_task_add
23
- opencode:
24
- - nx_task_add
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.
25
38
 
26
39
  - id: no_task_update
27
- description: "Agent cannot update the state of existing Nexus tasks"
28
- harness_mapping:
29
- claude_code:
30
- - mcp__plugin_claude-nexus_nx__nx_task_update
31
- opencode:
32
- - nx_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.