@moreih29/nexus-core 0.17.0 → 0.18.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +101 -67
- package/dist/cli/sync.d.ts +3 -0
- package/dist/cli/sync.d.ts.map +1 -0
- package/dist/cli/sync.js +59 -0
- package/dist/cli/sync.js.map +1 -0
- package/dist/generate/index.d.ts +3 -0
- package/dist/generate/index.d.ts.map +1 -0
- package/dist/generate/index.js +2 -0
- package/dist/generate/index.js.map +1 -0
- package/dist/generate/load-data.d.ts +8 -0
- package/dist/generate/load-data.d.ts.map +1 -0
- package/dist/generate/load-data.js +45 -0
- package/dist/generate/load-data.js.map +1 -0
- package/dist/generate/load-spec.d.ts +3 -0
- package/dist/generate/load-spec.d.ts.map +1 -0
- package/dist/generate/load-spec.js +48 -0
- package/dist/generate/load-spec.js.map +1 -0
- package/dist/generate/macros/expand.d.ts +3 -0
- package/dist/generate/macros/expand.d.ts.map +1 -0
- package/dist/generate/macros/expand.js +48 -0
- package/dist/generate/macros/expand.js.map +1 -0
- package/dist/generate/macros/parse.d.ts +4 -0
- package/dist/generate/macros/parse.d.ts.map +1 -0
- package/dist/generate/macros/parse.js +142 -0
- package/dist/generate/macros/parse.js.map +1 -0
- package/dist/generate/macros/validate.d.ts +3 -0
- package/dist/generate/macros/validate.d.ts.map +1 -0
- package/dist/generate/macros/validate.js +23 -0
- package/dist/generate/macros/validate.js.map +1 -0
- package/dist/generate/renderers/claude.d.ts +3 -0
- package/dist/generate/renderers/claude.d.ts.map +1 -0
- package/dist/generate/renderers/claude.js +48 -0
- package/dist/generate/renderers/claude.js.map +1 -0
- package/dist/generate/renderers/codex.d.ts +3 -0
- package/dist/generate/renderers/codex.d.ts.map +1 -0
- package/dist/generate/renderers/codex.js +79 -0
- package/dist/generate/renderers/codex.js.map +1 -0
- package/dist/generate/renderers/markdown.d.ts +2 -0
- package/dist/generate/renderers/markdown.d.ts.map +1 -0
- package/dist/generate/renderers/markdown.js +6 -0
- package/dist/generate/renderers/markdown.js.map +1 -0
- package/dist/generate/renderers/opencode.d.ts +3 -0
- package/dist/generate/renderers/opencode.d.ts.map +1 -0
- package/dist/generate/renderers/opencode.js +69 -0
- package/dist/generate/renderers/opencode.js.map +1 -0
- package/dist/generate/sync.d.ts +4 -0
- package/dist/generate/sync.d.ts.map +1 -0
- package/dist/generate/sync.js +60 -0
- package/dist/generate/sync.js.map +1 -0
- package/dist/generate/types.d.ts +74 -0
- package/dist/generate/types.d.ts.map +1 -0
- package/dist/generate/types.js +2 -0
- package/dist/generate/types.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/definitions/artifact.d.ts +20 -0
- package/dist/mcp/definitions/artifact.d.ts.map +1 -0
- package/dist/mcp/definitions/artifact.js +14 -0
- package/dist/mcp/definitions/artifact.js.map +1 -0
- package/dist/mcp/definitions/history.d.ts +20 -0
- package/dist/mcp/definitions/history.d.ts.map +1 -0
- package/dist/mcp/definitions/history.js +18 -0
- package/dist/mcp/definitions/history.js.map +1 -0
- package/dist/mcp/definitions/index.d.ts +276 -0
- package/dist/mcp/definitions/index.d.ts.map +1 -0
- package/dist/mcp/definitions/index.js +16 -0
- package/dist/mcp/definitions/index.js.map +1 -0
- package/dist/mcp/definitions/plan.d.ts +111 -0
- package/dist/mcp/definitions/plan.d.ts.map +1 -0
- package/dist/mcp/definitions/plan.js +89 -0
- package/dist/mcp/definitions/plan.js.map +1 -0
- package/dist/mcp/definitions/task.d.ts +138 -0
- package/dist/mcp/definitions/task.d.ts.map +1 -0
- package/dist/mcp/definitions/task.js +78 -0
- package/dist/mcp/definitions/task.js.map +1 -0
- package/dist/mcp/handlers/artifact.d.ts.map +1 -0
- package/dist/mcp/handlers/artifact.js +42 -0
- package/dist/mcp/handlers/artifact.js.map +1 -0
- package/dist/mcp/handlers/history.d.ts.map +1 -0
- package/dist/mcp/handlers/history.js +35 -0
- package/dist/mcp/handlers/history.js.map +1 -0
- package/dist/mcp/handlers/plan.d.ts.map +1 -0
- package/dist/mcp/handlers/plan.js +324 -0
- package/dist/mcp/handlers/plan.js.map +1 -0
- package/dist/mcp/handlers/task.d.ts.map +1 -0
- package/dist/mcp/handlers/task.js +216 -0
- package/dist/mcp/handlers/task.js.map +1 -0
- package/dist/{src/mcp → mcp}/server.d.ts +1 -1
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +58 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/shared/json-store.d.ts.map +1 -0
- package/dist/{src/shared → shared}/json-store.js +5 -4
- package/dist/shared/json-store.js.map +1 -0
- package/dist/shared/mcp-utils.d.ts.map +1 -0
- package/dist/shared/mcp-utils.js.map +1 -0
- package/dist/{src/shared → shared}/paths.d.ts +0 -6
- package/dist/shared/paths.d.ts.map +1 -0
- package/dist/shared/paths.js +62 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/register-tool.d.ts +20 -0
- package/dist/shared/register-tool.d.ts.map +1 -0
- package/dist/shared/register-tool.js +15 -0
- package/dist/shared/register-tool.js.map +1 -0
- package/dist/{src/types → types}/state.d.ts +65 -65
- package/dist/types/state.d.ts.map +1 -0
- package/dist/{src/types → types}/state.js +1 -1
- package/dist/types/state.js.map +1 -0
- package/harness/claude/agent-rules.yml +21 -0
- package/harness/claude/invocations.yml +11 -0
- package/harness/claude/layout.yml +3 -0
- package/harness/codex/agent-rules.yml +28 -0
- package/harness/codex/invocations.yml +13 -0
- package/harness/codex/layout.yml +3 -0
- package/harness/opencode/agent-rules.yml +18 -0
- package/harness/opencode/invocations.yml +12 -0
- package/harness/opencode/layout.yml +3 -0
- package/package.json +38 -43
- package/{assets → spec}/agents/architect/body.ko.md +92 -84
- package/spec/agents/architect/body.md +185 -0
- package/spec/agents/designer/body.ko.md +330 -0
- package/spec/agents/designer/body.md +330 -0
- package/spec/agents/engineer/body.ko.md +166 -0
- package/spec/agents/engineer/body.md +166 -0
- package/spec/agents/lead/body.ko.md +276 -0
- package/spec/agents/lead/body.md +276 -0
- package/{assets → spec}/agents/postdoc/body.ko.md +116 -46
- package/spec/agents/postdoc/body.md +192 -0
- package/{assets → spec}/agents/researcher/body.ko.md +131 -45
- package/spec/agents/researcher/body.md +223 -0
- package/spec/agents/reviewer/body.ko.md +219 -0
- package/spec/agents/reviewer/body.md +219 -0
- package/{assets → spec}/agents/strategist/body.ko.md +108 -35
- package/spec/agents/strategist/body.md +187 -0
- package/spec/agents/tester/body.ko.md +272 -0
- package/spec/agents/tester/body.md +272 -0
- package/{assets → spec}/agents/writer/body.ko.md +109 -33
- package/spec/agents/writer/body.md +198 -0
- package/spec/skills/nx-auto-plan/body.ko.md +150 -0
- package/spec/skills/nx-auto-plan/body.md +150 -0
- package/spec/skills/nx-plan/body.ko.md +159 -0
- package/spec/skills/nx-plan/body.md +159 -0
- package/spec/skills/nx-run/body.ko.md +132 -0
- package/spec/skills/nx-run/body.md +132 -0
- package/vocabulary/enums/task-register-state.yml +4 -0
- package/vocabulary/invocations.yml +43 -0
- package/assets/agents/architect/body.md +0 -177
- package/assets/agents/designer/body.ko.md +0 -125
- package/assets/agents/designer/body.md +0 -125
- package/assets/agents/engineer/body.ko.md +0 -106
- package/assets/agents/engineer/body.md +0 -106
- package/assets/agents/lead/body.ko.md +0 -70
- package/assets/agents/lead/body.md +0 -70
- package/assets/agents/postdoc/body.md +0 -122
- package/assets/agents/researcher/body.md +0 -137
- package/assets/agents/reviewer/body.ko.md +0 -138
- package/assets/agents/reviewer/body.md +0 -138
- package/assets/agents/strategist/body.md +0 -116
- package/assets/agents/tester/body.ko.md +0 -195
- package/assets/agents/tester/body.md +0 -195
- package/assets/agents/writer/body.md +0 -122
- package/assets/capability-matrix.yml +0 -200
- package/assets/hooks/agent-bootstrap/handler.test.ts +0 -369
- package/assets/hooks/agent-bootstrap/handler.ts +0 -132
- package/assets/hooks/agent-bootstrap/meta.yml +0 -10
- package/assets/hooks/agent-finalize/handler.test.ts +0 -368
- package/assets/hooks/agent-finalize/handler.ts +0 -76
- package/assets/hooks/agent-finalize/meta.yml +0 -10
- package/assets/hooks/capability-matrix.yml +0 -313
- package/assets/hooks/post-tool-telemetry/handler.test.ts +0 -302
- package/assets/hooks/post-tool-telemetry/handler.ts +0 -49
- package/assets/hooks/post-tool-telemetry/meta.yml +0 -10
- package/assets/hooks/prompt-router/handler.test.ts +0 -801
- package/assets/hooks/prompt-router/handler.ts +0 -272
- package/assets/hooks/prompt-router/meta.yml +0 -11
- package/assets/hooks/session-init/handler.test.ts +0 -274
- package/assets/hooks/session-init/handler.ts +0 -31
- package/assets/hooks/session-init/meta.yml +0 -9
- package/assets/lsp-servers.json +0 -55
- package/assets/schema/lsp-servers.schema.json +0 -67
- package/assets/skills/nx-init/body.ko.md +0 -197
- package/assets/skills/nx-init/body.md +0 -197
- package/assets/skills/nx-plan/body.ko.md +0 -361
- package/assets/skills/nx-plan/body.md +0 -361
- package/assets/skills/nx-run/body.ko.md +0 -161
- package/assets/skills/nx-run/body.md +0 -160
- package/assets/skills/nx-sync/body.ko.md +0 -92
- package/assets/skills/nx-sync/body.md +0 -92
- package/assets/tools/tool-name-map.yml +0 -353
- package/dist/assets/hooks/agent-bootstrap/handler.d.ts +0 -4
- package/dist/assets/hooks/agent-bootstrap/handler.d.ts.map +0 -1
- package/dist/assets/hooks/agent-bootstrap/handler.js +0 -114
- package/dist/assets/hooks/agent-bootstrap/handler.js.map +0 -1
- package/dist/assets/hooks/agent-finalize/handler.d.ts +0 -4
- package/dist/assets/hooks/agent-finalize/handler.d.ts.map +0 -1
- package/dist/assets/hooks/agent-finalize/handler.js +0 -63
- package/dist/assets/hooks/agent-finalize/handler.js.map +0 -1
- package/dist/assets/hooks/post-tool-telemetry/handler.d.ts +0 -4
- package/dist/assets/hooks/post-tool-telemetry/handler.d.ts.map +0 -1
- package/dist/assets/hooks/post-tool-telemetry/handler.js +0 -40
- package/dist/assets/hooks/post-tool-telemetry/handler.js.map +0 -1
- package/dist/assets/hooks/prompt-router/handler.d.ts +0 -4
- package/dist/assets/hooks/prompt-router/handler.d.ts.map +0 -1
- package/dist/assets/hooks/prompt-router/handler.js +0 -214
- package/dist/assets/hooks/prompt-router/handler.js.map +0 -1
- package/dist/assets/hooks/session-init/handler.d.ts +0 -4
- package/dist/assets/hooks/session-init/handler.d.ts.map +0 -1
- package/dist/assets/hooks/session-init/handler.js +0 -22
- package/dist/assets/hooks/session-init/handler.js.map +0 -1
- package/dist/claude/.claude-plugin/marketplace.json +0 -75
- package/dist/claude/.claude-plugin/plugin.json +0 -67
- package/dist/claude/agents/architect.md +0 -172
- package/dist/claude/agents/designer.md +0 -120
- package/dist/claude/agents/engineer.md +0 -98
- package/dist/claude/agents/lead.md +0 -59
- package/dist/claude/agents/postdoc.md +0 -117
- package/dist/claude/agents/researcher.md +0 -132
- package/dist/claude/agents/reviewer.md +0 -133
- package/dist/claude/agents/strategist.md +0 -111
- package/dist/claude/agents/tester.md +0 -190
- package/dist/claude/agents/writer.md +0 -114
- package/dist/claude/dist/hooks/agent-bootstrap.js +0 -238
- package/dist/claude/dist/hooks/agent-finalize.js +0 -180
- package/dist/claude/dist/hooks/post-tool-telemetry.js +0 -71
- package/dist/claude/dist/hooks/prompt-router.js +0 -7336
- package/dist/claude/dist/hooks/session-init.js +0 -50
- package/dist/claude/hooks/hooks.json +0 -64
- package/dist/claude/settings.json +0 -3
- package/dist/claude/skills/nx-init/SKILL.md +0 -189
- package/dist/claude/skills/nx-plan/SKILL.md +0 -353
- package/dist/claude/skills/nx-run/SKILL.md +0 -154
- package/dist/claude/skills/nx-sync/SKILL.md +0 -87
- package/dist/codex/agents/architect.toml +0 -175
- package/dist/codex/agents/designer.toml +0 -123
- package/dist/codex/agents/engineer.toml +0 -105
- package/dist/codex/agents/lead.toml +0 -64
- package/dist/codex/agents/postdoc.toml +0 -120
- package/dist/codex/agents/researcher.toml +0 -136
- package/dist/codex/agents/reviewer.toml +0 -137
- package/dist/codex/agents/strategist.toml +0 -114
- package/dist/codex/agents/tester.toml +0 -194
- package/dist/codex/agents/writer.toml +0 -121
- package/dist/codex/dist/hooks/agent-bootstrap.js +0 -238
- package/dist/codex/dist/hooks/agent-finalize.js +0 -180
- package/dist/codex/dist/hooks/prompt-router.js +0 -7336
- package/dist/codex/dist/hooks/session-init.js +0 -50
- package/dist/codex/hooks/hooks.json +0 -28
- package/dist/codex/install/AGENTS.fragment.md +0 -60
- package/dist/codex/install/config.fragment.toml +0 -5
- package/dist/codex/install/install.sh +0 -60
- package/dist/codex/package.json +0 -20
- package/dist/codex/plugin/.codex-plugin/plugin.json +0 -57
- package/dist/codex/plugin/skills/nx-init/SKILL.md +0 -189
- package/dist/codex/plugin/skills/nx-plan/SKILL.md +0 -353
- package/dist/codex/plugin/skills/nx-run/SKILL.md +0 -154
- package/dist/codex/plugin/skills/nx-sync/SKILL.md +0 -87
- package/dist/codex/prompts/architect.md +0 -166
- package/dist/codex/prompts/designer.md +0 -114
- package/dist/codex/prompts/engineer.md +0 -97
- package/dist/codex/prompts/lead.md +0 -60
- package/dist/codex/prompts/postdoc.md +0 -111
- package/dist/codex/prompts/researcher.md +0 -127
- package/dist/codex/prompts/reviewer.md +0 -128
- package/dist/codex/prompts/strategist.md +0 -105
- package/dist/codex/prompts/tester.md +0 -185
- package/dist/codex/prompts/writer.md +0 -113
- package/dist/hooks/agent-bootstrap.js +0 -238
- package/dist/hooks/agent-finalize.js +0 -180
- package/dist/hooks/post-tool-telemetry.js +0 -71
- package/dist/hooks/prompt-router.js +0 -7336
- package/dist/hooks/session-init.js +0 -50
- package/dist/manifests/claude-hooks.json +0 -64
- package/dist/manifests/codex-hooks.json +0 -28
- package/dist/manifests/opencode-manifest.json +0 -54
- package/dist/manifests/portability-report.json +0 -75
- package/dist/opencode/.opencode/skills/nx-init/SKILL.md +0 -189
- package/dist/opencode/.opencode/skills/nx-plan/SKILL.md +0 -353
- package/dist/opencode/.opencode/skills/nx-run/SKILL.md +0 -154
- package/dist/opencode/.opencode/skills/nx-sync/SKILL.md +0 -87
- package/dist/opencode/package.json +0 -23
- package/dist/opencode/src/agents/architect.ts +0 -176
- package/dist/opencode/src/agents/designer.ts +0 -124
- package/dist/opencode/src/agents/engineer.ts +0 -105
- package/dist/opencode/src/agents/lead.ts +0 -66
- package/dist/opencode/src/agents/postdoc.ts +0 -121
- package/dist/opencode/src/agents/researcher.ts +0 -136
- package/dist/opencode/src/agents/reviewer.ts +0 -137
- package/dist/opencode/src/agents/strategist.ts +0 -115
- package/dist/opencode/src/agents/tester.ts +0 -194
- package/dist/opencode/src/agents/writer.ts +0 -121
- package/dist/opencode/src/index.ts +0 -25
- package/dist/opencode/src/plugin.ts +0 -6
- package/dist/scripts/build-agents.d.ts +0 -170
- package/dist/scripts/build-agents.d.ts.map +0 -1
- package/dist/scripts/build-agents.js +0 -907
- package/dist/scripts/build-agents.js.map +0 -1
- package/dist/scripts/build-hooks.d.ts +0 -57
- package/dist/scripts/build-hooks.d.ts.map +0 -1
- package/dist/scripts/build-hooks.js +0 -562
- package/dist/scripts/build-hooks.js.map +0 -1
- package/dist/scripts/cli.d.ts +0 -54
- package/dist/scripts/cli.d.ts.map +0 -1
- package/dist/scripts/cli.js +0 -504
- package/dist/scripts/cli.js.map +0 -1
- package/dist/scripts/smoke/smoke-claude.d.ts +0 -2
- package/dist/scripts/smoke/smoke-claude.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-claude.js +0 -58
- package/dist/scripts/smoke/smoke-claude.js.map +0 -1
- package/dist/scripts/smoke/smoke-codex.d.ts +0 -2
- package/dist/scripts/smoke/smoke-codex.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-codex.js +0 -50
- package/dist/scripts/smoke/smoke-codex.js.map +0 -1
- package/dist/scripts/smoke/smoke-consumer.d.ts +0 -2
- package/dist/scripts/smoke/smoke-consumer.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-consumer.js +0 -230
- package/dist/scripts/smoke/smoke-consumer.js.map +0 -1
- package/dist/scripts/smoke/smoke-opencode.d.ts +0 -2
- package/dist/scripts/smoke/smoke-opencode.d.ts.map +0 -1
- package/dist/scripts/smoke/smoke-opencode.js +0 -99
- package/dist/scripts/smoke/smoke-opencode.js.map +0 -1
- package/dist/src/hooks/opencode-mount.d.ts +0 -35
- package/dist/src/hooks/opencode-mount.d.ts.map +0 -1
- package/dist/src/hooks/opencode-mount.js +0 -352
- package/dist/src/hooks/opencode-mount.js.map +0 -1
- package/dist/src/hooks/runtime.d.ts +0 -37
- package/dist/src/hooks/runtime.d.ts.map +0 -1
- package/dist/src/hooks/runtime.js +0 -274
- package/dist/src/hooks/runtime.js.map +0 -1
- package/dist/src/hooks/types.d.ts +0 -196
- package/dist/src/hooks/types.d.ts.map +0 -1
- package/dist/src/hooks/types.js +0 -85
- package/dist/src/hooks/types.js.map +0 -1
- package/dist/src/lsp/cache.d.ts +0 -9
- package/dist/src/lsp/cache.d.ts.map +0 -1
- package/dist/src/lsp/cache.js +0 -216
- package/dist/src/lsp/cache.js.map +0 -1
- package/dist/src/lsp/client.d.ts +0 -24
- package/dist/src/lsp/client.d.ts.map +0 -1
- package/dist/src/lsp/client.js +0 -166
- package/dist/src/lsp/client.js.map +0 -1
- package/dist/src/lsp/detect.d.ts +0 -77
- package/dist/src/lsp/detect.d.ts.map +0 -1
- package/dist/src/lsp/detect.js +0 -116
- package/dist/src/lsp/detect.js.map +0 -1
- package/dist/src/mcp/server.d.ts.map +0 -1
- package/dist/src/mcp/server.js +0 -34
- package/dist/src/mcp/server.js.map +0 -1
- package/dist/src/mcp/tools/artifact.d.ts.map +0 -1
- package/dist/src/mcp/tools/artifact.js +0 -36
- package/dist/src/mcp/tools/artifact.js.map +0 -1
- package/dist/src/mcp/tools/history.d.ts.map +0 -1
- package/dist/src/mcp/tools/history.js +0 -29
- package/dist/src/mcp/tools/history.js.map +0 -1
- package/dist/src/mcp/tools/lsp.d.ts +0 -13
- package/dist/src/mcp/tools/lsp.d.ts.map +0 -1
- package/dist/src/mcp/tools/lsp.js +0 -225
- package/dist/src/mcp/tools/lsp.js.map +0 -1
- package/dist/src/mcp/tools/plan.d.ts.map +0 -1
- package/dist/src/mcp/tools/plan.js +0 -317
- package/dist/src/mcp/tools/plan.js.map +0 -1
- package/dist/src/mcp/tools/task.d.ts.map +0 -1
- package/dist/src/mcp/tools/task.js +0 -252
- package/dist/src/mcp/tools/task.js.map +0 -1
- package/dist/src/shared/invocations.d.ts +0 -74
- package/dist/src/shared/invocations.d.ts.map +0 -1
- package/dist/src/shared/invocations.js +0 -247
- package/dist/src/shared/invocations.js.map +0 -1
- package/dist/src/shared/json-store.d.ts.map +0 -1
- package/dist/src/shared/json-store.js.map +0 -1
- package/dist/src/shared/mcp-utils.d.ts.map +0 -1
- package/dist/src/shared/mcp-utils.js.map +0 -1
- package/dist/src/shared/package-root.d.ts +0 -6
- package/dist/src/shared/package-root.d.ts.map +0 -1
- package/dist/src/shared/package-root.js +0 -19
- package/dist/src/shared/package-root.js.map +0 -1
- package/dist/src/shared/paths.d.ts.map +0 -1
- package/dist/src/shared/paths.js +0 -117
- package/dist/src/shared/paths.js.map +0 -1
- package/dist/src/shared/tool-log.d.ts +0 -8
- package/dist/src/shared/tool-log.d.ts.map +0 -1
- package/dist/src/shared/tool-log.js +0 -22
- package/dist/src/shared/tool-log.js.map +0 -1
- package/dist/src/types/agent-config.d.ts +0 -22
- package/dist/src/types/agent-config.d.ts.map +0 -1
- package/dist/src/types/agent-config.js +0 -2
- package/dist/src/types/agent-config.js.map +0 -1
- package/dist/src/types/index.d.ts +0 -2
- package/dist/src/types/index.d.ts.map +0 -1
- package/dist/src/types/index.js +0 -2
- package/dist/src/types/index.js.map +0 -1
- package/dist/src/types/state.d.ts.map +0 -1
- package/dist/src/types/state.js.map +0 -1
- package/docs/consuming/codex-lead-merge.md +0 -106
- package/docs/contract/harness-io.md +0 -333
- package/docs/plugin-guide.md +0 -355
- package/docs/plugin-template/claude/.github/workflows/build.yml +0 -60
- package/docs/plugin-template/claude/README.md +0 -110
- package/docs/plugin-template/claude/package.json +0 -16
- package/docs/plugin-template/codex/.github/workflows/build.yml +0 -51
- package/docs/plugin-template/codex/README.md +0 -147
- package/docs/plugin-template/codex/install/install.sh +0 -60
- package/docs/plugin-template/codex/package.json +0 -17
- package/docs/plugin-template/opencode/.github/workflows/build.yml +0 -61
- package/docs/plugin-template/opencode/README.md +0 -121
- package/docs/plugin-template/opencode/package.json +0 -25
- package/docs/plugin-template/opencode/src/plugin.ts +0 -6
- /package/dist/{src/mcp/tools → mcp/handlers}/artifact.d.ts +0 -0
- /package/dist/{src/mcp/tools → mcp/handlers}/history.d.ts +0 -0
- /package/dist/{src/mcp/tools → mcp/handlers}/plan.d.ts +0 -0
- /package/dist/{src/mcp/tools → mcp/handlers}/task.d.ts +0 -0
- /package/dist/{src/shared → shared}/json-store.d.ts +0 -0
- /package/dist/{src/shared → shared}/mcp-utils.d.ts +0 -0
- /package/dist/{src/shared → shared}/mcp-utils.js +0 -0
|
@@ -1,361 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nx-plan
|
|
3
|
-
description: Structured multi-perspective analysis to decompose issues, align on
|
|
4
|
-
decisions, and produce an enriched plan before execution. Plan only — does not
|
|
5
|
-
execute.
|
|
6
|
-
summary: "Structured planning — subagent-based analysis, deliberate decisions, produce execution plan"
|
|
7
|
-
triggers:
|
|
8
|
-
- plan
|
|
9
|
-
harness_docs_refs:
|
|
10
|
-
- resume_invocation
|
|
11
|
-
id: nx-plan
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Role
|
|
15
|
-
|
|
16
|
-
Facilitate structured multi-perspective analysis using subagents to decompose issues, deliberate on options, and align on decisions. Lead acts as synthesizer AND active participant — orchestrates subagent research/analysis AND contributes its own position. Does not execute — planning only. Transition to execution is the user's decision.
|
|
17
|
-
|
|
18
|
-
## Constraints
|
|
19
|
-
|
|
20
|
-
- NEVER execute — this skill is planning only; transition to execution is the user's decision
|
|
21
|
-
- NEVER call `nx_plan_start` before research is complete (research_summary is required)
|
|
22
|
-
- NEVER present multiple issues at once — one issue at a time only
|
|
23
|
-
- NEVER ask groundless questions — always research code/knowledge/decisions first
|
|
24
|
-
- NEVER use the harness's team creation primitive. Inter-agent messaging for resume is permitted ONLY for resuming completed subagents whose `resume_tier` is `persistent` or `bounded`, and ONLY within the constraints of the Resume Policy section below. Direct inter-agent communication to running teammates remains forbidden in plan sessions.
|
|
25
|
-
- MUST record all decisions with `[d]` tag so they are not scattered across turns
|
|
26
|
-
- MUST call `nx_plan_decide` when recording `[d]`
|
|
27
|
-
- MUST check for existing plan.json before starting a new session
|
|
28
|
-
- `[d]` without an active plan.json is BLOCKED — "[d]는 plan 세션 안에서만 유효합니다."
|
|
29
|
-
- MUST present a comparison table before asking for a decision — never present options as prose only. Format:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
| | A: {title} | B: {title} |
|
|
33
|
-
|---|---|---|
|
|
34
|
-
| Pros | ... | ... |
|
|
35
|
-
| Cons | ... | ... |
|
|
36
|
-
| Pick | | **(Recommended)** |
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
## Guidelines
|
|
40
|
-
|
|
41
|
-
## Trigger
|
|
42
|
-
|
|
43
|
-
- Explicit tag: `[plan]` — continue existing session if plan.json exists, otherwise start new
|
|
44
|
-
- Additional analysis needed mid-session: spawn HOW subagents independently via the harness's subagent spawn primitive
|
|
45
|
-
- Continuing conversation without a tag → continue existing session
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Auto Mode (`[plan:auto]`)
|
|
50
|
-
|
|
51
|
-
When triggered with `[plan:auto]` or invoked via `{{skill_activation skill=nx-plan mode=auto}}`, run the full planning process **without user interaction**:
|
|
52
|
-
|
|
53
|
-
1. **Research** — spawn researcher+Explore subagents (same as interactive)
|
|
54
|
-
2. **Issue derivation** — Lead identifies issues from research
|
|
55
|
-
3. **Auto-decide** — for each issue, Lead selects the recommended option without presenting choices. Each `nx_plan_decide(summary)` MUST include: selected approach + reason, AND rejected alternatives + why they were dismissed. No comparison table needed, but internal deliberation is mandatory.
|
|
56
|
-
4. **Decision briefing** — output a concise summary of all decisions before generating tasks:
|
|
57
|
-
```
|
|
58
|
-
[auto-plan complete] N issues, N decisions:
|
|
59
|
-
- #1: {selected} ({rejected alternative} — reason)
|
|
60
|
-
- #2: ...
|
|
61
|
-
```
|
|
62
|
-
Do not wait for user response — proceed immediately to task generation.
|
|
63
|
-
5. **Plan document** — generate tasks.json following Step 7 rules (including HOW-assisted decomposition if `how_agents` present in plan.json issues). Apply owner table and verification auto-pairing.
|
|
64
|
-
|
|
65
|
-
Key differences from interactive mode:
|
|
66
|
-
- No user prompts or comparison tables — Lead decides autonomously
|
|
67
|
-
- No dynamic agenda proposals — Lead handles all derived issues internally
|
|
68
|
-
- Output: tasks.json ready for `[run]` execution
|
|
69
|
-
|
|
70
|
-
**Scope by invocation context:**
|
|
71
|
-
- `[plan:auto]` standalone → auto-plan + briefing + tasks.json generation. Stops here.
|
|
72
|
-
- Invoked by `[run]` (tasks.json absent) → auto-plan + briefing + tasks.json generation + seamless execution transition. No pause between plan and run.
|
|
73
|
-
|
|
74
|
-
This mode is invoked internally by `[run]` when no tasks.json exists, or explicitly by the user with `[plan:auto]`.
|
|
75
|
-
|
|
76
|
-
---
|
|
77
|
-
|
|
78
|
-
## Procedure (Interactive Mode)
|
|
79
|
-
|
|
80
|
-
### Step 1: Intent Discovery
|
|
81
|
-
|
|
82
|
-
Determine planning depth and identify which HOW subagents to delegate analysis to, based on Progressive Depth.
|
|
83
|
-
|
|
84
|
-
| Level | Signal | Exploration Scope |
|
|
85
|
-
|-------|--------|-------------------|
|
|
86
|
-
| **Specific** | File path, function name, error message, or concrete target named | Focused on the relevant file/module |
|
|
87
|
-
| **Direction-setting** | Open-ended question, "it would be nice if ~", choice needed among approaches | Related area + external case research |
|
|
88
|
-
| **Abstract** | "I don't know how to approach this", goal itself unclear, fundamental direction | Full codebase + external research + comparable project comparison |
|
|
89
|
-
|
|
90
|
-
- Specific request → confirm intent with 1–2 questions, derive issues immediately
|
|
91
|
-
- Direction-setting → use hypothesis-based questions to understand intent
|
|
92
|
-
- Abstract/fundamental → actively interview to uncover root goals the user hasn't clarified
|
|
93
|
-
|
|
94
|
-
**HOW subagent selection rule:**
|
|
95
|
-
- User explicitly names agents → use as-is, propose additions if gaps detected
|
|
96
|
-
- User does not name agents → Lead proposes based on issue scope, confirm with user
|
|
97
|
-
- Additional HOW subagents can be spawned at any time during analysis (Lead's or user's discretion)
|
|
98
|
-
|
|
99
|
-
### Step 2: Research
|
|
100
|
-
|
|
101
|
-
Understand code, core knowledge, and prior decisions before forming a planning agenda.
|
|
102
|
-
|
|
103
|
-
**Start by checking existing knowledge**: before spawning any subagent, use file pattern search and file reading to scan `.nexus/memory/` and `.nexus/context/` for relevant memos and context files, and use `nx_history_search` to check for prior decisions on this topic. If the needed information is already there, use it directly and skip or narrow the subagent spawn. Only spawn subagents to fill gaps not covered by existing knowledge.
|
|
104
|
-
|
|
105
|
-
**Approach selection:**
|
|
106
|
-
|
|
107
|
-
| Scenario | Approach |
|
|
108
|
-
|----------|----------|
|
|
109
|
-
| Codebase orientation | `{{subagent_spawn target_role=explore prompt="<file/code search task>"}}` for codebase exploration |
|
|
110
|
-
| External research needed | `{{subagent_spawn target_role=researcher prompt="<research question>"}}` for web search |
|
|
111
|
-
| Both codebase and external | Spawn Explore + Researcher in parallel |
|
|
112
|
-
|
|
113
|
-
- NEVER call `nx_plan_start` before research is complete.
|
|
114
|
-
- `research_summary` parameter in `nx_plan_start` is required — forces research completion before session creation.
|
|
115
|
-
- Researcher subagents are spawned via the harness's subagent spawn primitive and return findings to Lead. They do not join the plan session.
|
|
116
|
-
|
|
117
|
-
**Existing session (plan.json present):**
|
|
118
|
-
- Check current state with `nx_plan_status`.
|
|
119
|
-
- If new topic or additional research needed → spawn researcher subagent accordingly.
|
|
120
|
-
- Do not proceed to next issue before research is complete.
|
|
121
|
-
|
|
122
|
-
### Step 3: Session Setup
|
|
123
|
-
|
|
124
|
-
Register the planning session.
|
|
125
|
-
|
|
126
|
-
1. **`nx_plan_start(topic, issues, research_summary)`** — register plan in plan.json; auto-archives any existing plan.json.
|
|
127
|
-
2. Show the issue list to the user and confirm before proceeding.
|
|
128
|
-
|
|
129
|
-
### Step 4: Analysis
|
|
130
|
-
|
|
131
|
-
**Always proceed one issue at a time.** Never present multiple issues simultaneously.
|
|
132
|
-
|
|
133
|
-
For each issue:
|
|
134
|
-
|
|
135
|
-
1. **Current State Analysis** — Lead summarizes the current state and problems, drawing on research.
|
|
136
|
-
2. **Subagent Analysis** — for complex issues, spawn HOW subagents (architect, strategist, etc.) in parallel via the harness's subagent spawn primitive. Each subagent independently analyzes the issue and returns findings.
|
|
137
|
-
- **Domain-Agent mapping** — match issue keywords to recommended HOW subagents:
|
|
138
|
-
|
|
139
|
-
| Domain keywords | Recommended HOW |
|
|
140
|
-
|----------------|-----------------|
|
|
141
|
-
| UI, UX, 디자인, 인터페이스, 사용자 경험, 레이아웃 | Designer |
|
|
142
|
-
| 아키텍처, 시스템 설계, 성능, 구조 변경, API, 스키마 | Architect |
|
|
143
|
-
| 비즈니스, 시장, 전략, 포지셔닝, 경쟁, 수익 | Strategist |
|
|
144
|
-
| 연구 방법론, 근거 평가, 문헌, 실험 설계 | Postdoc |
|
|
145
|
-
|
|
146
|
-
- **Opt-out default**: if the issue matches a domain in the mapping, spawning is the default. Multiple matches → multiple spawns. To skip, state "{Agent} not needed — reason: ..." in the analysis text.
|
|
147
|
-
- **No mapping match**: if no domain matches, Lead analyzes directly. When uncertain, spawn — the cost of an unnecessary spawn is lower than the cost of a shallow analysis.
|
|
148
|
-
- **Record HOW findings**: after HOW subagents return, include their agent names and key findings when recording the decision via `nx_plan_decide(how_agents=[...], how_summary={...})`. This data is stored in plan.json for Step 7 task generation.
|
|
149
|
-
3. **Present Options** — after synthesis, Lead presents a comparison:
|
|
150
|
-
|
|
151
|
-
```
|
|
152
|
-
| Item | A: {title} | B: {title} | C: {title} |
|
|
153
|
-
|------|-----------|-----------|-----------|
|
|
154
|
-
| Pros | ... | ... | ... |
|
|
155
|
-
| Cons | ... | ... | ... |
|
|
156
|
-
| Trade-offs | ... | ... | ... |
|
|
157
|
-
| Best for | ... | ... | ... |
|
|
158
|
-
|
|
159
|
-
**Recommendation: {X} ({title})**
|
|
160
|
-
|
|
161
|
-
- Option A falls short because {reason}
|
|
162
|
-
- Option B falls short because {reason}
|
|
163
|
-
- Option X overcomes {A/B limitations} → {core benefit}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
4. **Await user response** — receive free-form responses. Users may combine options, push back, or ask follow-up questions.
|
|
167
|
-
|
|
168
|
-
## Resume Policy
|
|
169
|
-
|
|
170
|
-
When the harness's resume mechanism is unavailable, ALL resume paths are disabled — force fresh spawn. Otherwise:
|
|
171
|
-
|
|
172
|
-
| resume_tier | Same-issue default | Cross-issue | Disqualifiers |
|
|
173
|
-
|---|---|---|---|
|
|
174
|
-
| persistent | resume by default | Lead opt-in only | counter-evidence / reversal / re-review issue → fresh |
|
|
175
|
-
| bounded | conditional (same artifact only) | forbidden | loop 3x / feedback cycle (REVISION_REQUIRED) → fresh |
|
|
176
|
-
| ephemeral | forbidden | forbidden | N/A (always fresh) |
|
|
177
|
-
|
|
178
|
-
Before resuming a `bounded` agent: include a "re-read target files before any modification" instruction in the prompt. Bounded resume without re-read is BLOCKED.
|
|
179
|
-
|
|
180
|
-
`resume_tier` is read from each agent's frontmatter (`agents/*.md`). If absent, treat as `ephemeral` (most conservative).
|
|
181
|
-
|
|
182
|
-
### Step 5: Record Decision
|
|
183
|
-
|
|
184
|
-
When the user decides, record with the `[d]` tag.
|
|
185
|
-
|
|
186
|
-
- gate.ts detects `[d]` and routes to `nx_plan_decide`.
|
|
187
|
-
- `nx_plan_decide(issue_id, summary)` — marks issue as `decided`, writes `decision` inline in plan.json.
|
|
188
|
-
- Decisions are NOT written to decisions.json — plan.json is the single source of truth.
|
|
189
|
-
- `[d]` without plan.json is blocked.
|
|
190
|
-
- **Progress anchoring**: immediately after recording, output one line: "Issue #N decided (M of K complete). Next: #X — {title}." This keeps the user oriented in multi-issue sessions.
|
|
191
|
-
|
|
192
|
-
**Immediately after each decision**, Lead checks: "Does this decision create follow-up questions or new issues?" If yes, propose adding via `nx_plan_update(action='add')` before moving to the next issue.
|
|
193
|
-
|
|
194
|
-
**Decision reversal**: if the user wants to reconsider a prior decision ("아까 결정 다시 생각해보자", "issue #N 번복"), Lead calls `nx_plan_update(action='reopen', issue_id=N)` to reopen the issue and returns to Step 4 analysis for that issue.
|
|
195
|
-
|
|
196
|
-
### Step 6: Dynamic Agenda + Wrap-up
|
|
197
|
-
|
|
198
|
-
After each decision, Lead automatically checks for derived issues.
|
|
199
|
-
|
|
200
|
-
- **Dynamic agenda proposal**: after a decision is recorded, Lead examines whether the decision implies follow-on questions or unresolved sub-issues. If found, propose adding them with `nx_plan_update(action='add', ...)` and confirm with the user before adding.
|
|
201
|
-
- Pending issues remain → naturally transition to the next issue.
|
|
202
|
-
- All issues decided → **Gap check**: compare original question/topic against the issue list.
|
|
203
|
-
- Gap found → register additional issues with `nx_plan_update(action='add', ...)`, return to Step 4.
|
|
204
|
-
- No gap → signal planning complete.
|
|
205
|
-
- Wrap-up: confirm all analysis threads have reported conclusions to Lead.
|
|
206
|
-
- Proceed to Step 7 automatically — do not ask whether to generate the plan document.
|
|
207
|
-
|
|
208
|
-
### Step 7: Plan Document Generation
|
|
209
|
-
|
|
210
|
-
All issues decided → generate the plan document (tasks.json) immediately:
|
|
211
|
-
|
|
212
|
-
1. **Collect decisions** — gather all `decided` issues from plan.json
|
|
213
|
-
2. **Derive tasks** — decompose decisions into concrete, actionable tasks
|
|
214
|
-
|
|
215
|
-
**HOW-assisted task decomposition**: check plan.json issues for `how_agents` field.
|
|
216
|
-
- If HOW agents participated in analysis → re-spawn those HOWs with the decided approach + their prior `how_summary` as context. Ask them to propose task decomposition and owner assignment for their domain.
|
|
217
|
-
- If no HOW agents participated → Lead decomposes alone using the owner table and auto-pairing rules above.
|
|
218
|
-
- This ensures task generation depth is proportional to plan analysis depth.
|
|
219
|
-
|
|
220
|
-
3. **Enrich each task** with:
|
|
221
|
-
- `approach` — implementation strategy derived from the decision rationale
|
|
222
|
-
- `acceptance` — definition of done, verifiable criteria
|
|
223
|
-
- `risk` — known risks or caveats from the analysis
|
|
224
|
-
- `deps` — task dependencies based on execution order
|
|
225
|
-
- `owner` — assign based on delegation analysis:
|
|
226
|
-
|
|
227
|
-
| Work type | owner | Criteria |
|
|
228
|
-
|-----------|-------|----------|
|
|
229
|
-
| Single file, small change | **lead** | Subagent overhead > task effort |
|
|
230
|
-
| Code implementation (.ts, .js, .py, etc.) | **engineer** | Source code creation/modification |
|
|
231
|
-
| Documentation/content (.md, non-code) | **writer** | .md files, README, docs, non-code content |
|
|
232
|
-
| Web research / external investigation | **researcher** | External information gathering needed |
|
|
233
|
-
| Design analysis / review | **architect** etc. HOW | Technical trade-off judgment |
|
|
234
|
-
| Sequential edits to same file | **lead** | Parallel subagents risk conflict |
|
|
235
|
-
|
|
236
|
-
**Primary metric — artifact-coherence**: a well-scoped task targets a single artifact or a tightly coupled artifact cluster and makes a single coherent change. A change is coherent when (a) it can be described in one sentence, (b) reverting it leaves all other artifacts consistent, and (c) its acceptance can be verified by inspecting its outputs alone.
|
|
237
|
-
|
|
238
|
-
**Verification auto-pairing (conditional)** — create a CHECK task only when the DO task's acceptance includes the appropriate verification trigger:
|
|
239
|
-
- `owner: "engineer"` + acceptance contains a runtime-behavior criterion → pair a **tester** task.
|
|
240
|
-
- `owner: "writer"` + acceptance contains a verifiable deliverable criterion → pair a **reviewer** task.
|
|
241
|
-
- Exclusions: pure refactor (behavior-preserving), type-only changes, docs-adjacent tasks (.md or frontmatter-only, classified under `docs_only` entries in `vocabulary/task-exceptions.yml`), and researcher tasks. Researcher tasks never receive an auto-paired CHECK — research outputs feed Lead or HOW agents directly, not tester or reviewer.
|
|
242
|
-
- Paired verification tasks are linked via `deps` to the original task.
|
|
243
|
-
|
|
244
|
-
**Exception catalog**: task decomposition exceptions are defined in `vocabulary/task-exceptions.yml` (`docs_only.coherent`, `docs_only.independent`, `same_file_bundle`, `generated_artifacts`). When an exception applies to a task, record its id in the task's `context` field so downstream tooling can trace the classification.
|
|
245
|
-
|
|
246
|
-
**Dedup Layer 1 (plan-time static merge)**: before finalizing the task list, scan draft tasks for overlapping target_files. Overlapping tasks are merged into a single owner task via the `same_file_bundle` exception from `vocabulary/task-exceptions.yml` to prevent parallel write conflicts during execution.
|
|
247
|
-
|
|
248
|
-
**DO/CHECK decomposition principle**: DO agents (engineer, writer, researcher) and CHECK agents (tester, reviewer) accumulate less per-task context than HOW agents. When a task involves multiple independent artifacts, decompose across multiple parallel DO/CHECK subagents rather than bundling. HOW agents benefit from consolidated context and should generally remain as single sessions. Parallel decomposition is worthwhile when there are at least three independent artifacts; below that, bundling under one owner is preferable to avoid parallelization overhead.
|
|
249
|
-
|
|
250
|
-
**HOW decomposition rule**: split HOW analysis across multiple subagents only when the issue crosses different rows of the domain-agent mapping table (architect vs designer vs strategist vs postdoc). Sub-concerns within a single domain row belong in one HOW session.
|
|
251
|
-
|
|
252
|
-
4. **Populate tasks.json** via `nx_task_add`:
|
|
253
|
-
- Set `goal` from the plan topic
|
|
254
|
-
- Set `decisions` from plan.json decided summaries
|
|
255
|
-
- Call `nx_task_add(plan_issue=N, approach, acceptance, risk, owner)` for each task
|
|
256
|
-
- If any decisions involve design or architecture changes, include a task (owner: `writer` or `lead`) to update the relevant files in `.nexus/context/` to reflect those decisions
|
|
257
|
-
5. **Present plan document** — show the user the generated tasks.json summary for review
|
|
258
|
-
6. **Present transition**: "Proceed with `[run]` to execute."
|
|
259
|
-
|
|
260
|
-
**Incremental mode**: if tasks.json already exists (e.g., after adding follow-up issues), only add tasks for new decisions. Check `plan_issue` field to avoid duplicating tasks for already-covered issues.
|
|
261
|
-
|
|
262
|
-
---
|
|
263
|
-
|
|
264
|
-
## plan → run Transition
|
|
265
|
-
|
|
266
|
-
tasks.json is already generated in Step 7. Plan's role ends here.
|
|
267
|
-
Proceed with `[run]` to execute.
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## Principles
|
|
272
|
-
|
|
273
|
-
1. **Active intent discovery** — actively uncover what the user hasn't clarified. Use interviewing to surface the root goal behind the words.
|
|
274
|
-
2. **Lead as synthesizer AND participant** — Lead does not merely relay subagent findings. Lead forms its own position, makes recommendations, and pushes back with evidence. Not a yes-man.
|
|
275
|
-
3. **Exploration first + proactive expansion** — research code/knowledge/external sources before planning starts. Never ask groundless questions.
|
|
276
|
-
4. **Hypothesis-based questions** — instead of empty questions, form hypotheses grounded in research and confirm with the user.
|
|
277
|
-
5. **Progressive Depth** — automatically adjust planning depth and HOW subagent composition based on request complexity.
|
|
278
|
-
6. **One at a time** — never present multiple issues at once. Reduce the user's cognitive load.
|
|
279
|
-
7. **Options must include pros/cons/trade-offs/recommendation** — when recommending, explain why other options fall short.
|
|
280
|
-
8. **Objective pushback** — even when the user arrives with strong conviction, Lead MUST independently analyze all viable options and present trade-offs the user may not have considered. The comparison table exists to surface what the user doesn't know, not to confirm what they already believe. Counter with evidence when better alternatives exist.
|
|
281
|
-
9. **Prose conversation by default** — free-form user responses (combinations, pushback, follow-up questions) are the core of planning quality.
|
|
282
|
-
10. **Dynamic agenda** — decisions create new questions. Lead proactively surfaces derived issues rather than waiting for the user to notice gaps.
|
|
283
|
-
|
|
284
|
-
---
|
|
285
|
-
|
|
286
|
-
## State Management
|
|
287
|
-
|
|
288
|
-
### plan.json
|
|
289
|
-
|
|
290
|
-
`.nexus/state/plan.json` — managed via MCP tools.
|
|
291
|
-
|
|
292
|
-
```json
|
|
293
|
-
{
|
|
294
|
-
"id": 1,
|
|
295
|
-
"topic": "topic name",
|
|
296
|
-
"issues": [
|
|
297
|
-
{
|
|
298
|
-
"id": 1,
|
|
299
|
-
"title": "issue title",
|
|
300
|
-
"status": "pending"
|
|
301
|
-
},
|
|
302
|
-
{
|
|
303
|
-
"id": 2,
|
|
304
|
-
"title": "issue title",
|
|
305
|
-
"status": "decided",
|
|
306
|
-
"decision": "decision summary",
|
|
307
|
-
"how_agents": ["architect", "designer"],
|
|
308
|
-
"how_summary": {
|
|
309
|
-
"architect": "key findings...",
|
|
310
|
-
"designer": "key findings..."
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
],
|
|
314
|
-
"research_summary": "...",
|
|
315
|
-
"created_at": "2026-01-01T00:00:00Z"
|
|
316
|
-
}
|
|
317
|
-
```
|
|
318
|
-
|
|
319
|
-
- **Create**: `nx_plan_start(topic, issues, research_summary)` — called in Step 3; auto-archives any existing plan.json
|
|
320
|
-
- **Status**: `nx_plan_status()` — check current issue state + decisions
|
|
321
|
-
- **Update**: `nx_plan_update(action, ...)` — add/remove/modify/reopen issues
|
|
322
|
-
- **Decide**: `nx_plan_decide(issue_id, summary)` — marks issue as `decided`, writes decision inline
|
|
323
|
-
- **File presence = session in progress**
|
|
324
|
-
|
|
325
|
-
### Topic Switching
|
|
326
|
-
|
|
327
|
-
- `[plan]` → continue existing plan.json if present; start new session if not
|
|
328
|
-
- Continue conversation without tag → continue existing session
|
|
329
|
-
- New `nx_plan_start` call → auto-archives current plan.json before creating new one
|
|
330
|
-
|
|
331
|
-
### Session Abort
|
|
332
|
-
|
|
333
|
-
To abort a session, archive current state via `nx_task_close`. Incomplete issues/tasks are recorded in history.json for future reference.
|
|
334
|
-
|
|
335
|
-
---
|
|
336
|
-
|
|
337
|
-
## Self-Reinforcing Loop
|
|
338
|
-
|
|
339
|
-
```
|
|
340
|
-
[plan] start → check/continue existing plan.json (start new if none)
|
|
341
|
-
↓
|
|
342
|
-
Intent discovery → research (parallel subagents) → nx_plan_start (register issues)
|
|
343
|
-
↓
|
|
344
|
-
Per-issue: HOW subagent analysis (parallel, independent) → Lead synthesis
|
|
345
|
-
→ options comparison → [d] → nx_plan_decide
|
|
346
|
-
→ dynamic agenda check → propose derived issues if found
|
|
347
|
-
↓
|
|
348
|
-
Next issue → ... → gap check → planning complete
|
|
349
|
-
↓
|
|
350
|
-
Proceed with `[run]` to execute.
|
|
351
|
-
↓
|
|
352
|
-
[run]: execution skill handles the full pipeline
|
|
353
|
-
↓
|
|
354
|
-
All done → nx_task_close (handled by run skill)
|
|
355
|
-
```
|
|
356
|
-
|
|
357
|
-
gate.ts detects `[d]` and routes to `nx_plan_decide` if plan.json exists; blocks otherwise.
|
|
358
|
-
|
|
359
|
-
## Deactivation
|
|
360
|
-
|
|
361
|
-
When transitioning to `[run]`, Plan's role ends. Execution is handled by the run skill.
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nx-run
|
|
3
|
-
description: Execution — user-directed agent composition.
|
|
4
|
-
summary: "Execution — user-directed agent composition"
|
|
5
|
-
triggers:
|
|
6
|
-
- run
|
|
7
|
-
harness_docs_refs:
|
|
8
|
-
- resume_invocation
|
|
9
|
-
id: nx-run
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Role
|
|
13
|
-
|
|
14
|
-
사용자가 [run] 태그를 호출할 때 Lead가 따르는 실행 규범이다. 사용자 지시에 따라 서브에이전트를 동적으로 조합하고, intake부터 완료까지 전체 실행 파이프라인을 구동한다.
|
|
15
|
-
|
|
16
|
-
## Constraints
|
|
17
|
-
|
|
18
|
-
- NEVER modify files via shell commands (sed, echo redirection, heredoc, tee, etc.) — harness의 전용 파일 편집 primitive를 항상 사용한다 (gate 강제)
|
|
19
|
-
- NEVER terminate while pending tasks remain (Gate Stop nonstop)
|
|
20
|
-
- NEVER spawn a new branch without checking for main/master first
|
|
21
|
-
- MUST check tasks.json before executing — 없으면 먼저 plan을 생성한다
|
|
22
|
-
- MUST spawn subagents per-task based on owner field — 태스크 수 ≥ 2 또는 대상 파일 ≥ 2인 경우 Lead 단독으로 처리하지 않는다
|
|
23
|
-
- MUST NOT spawn parallel Engineers if their target files overlap — 겹치면 직렬화한다
|
|
24
|
-
- MUST call nx_task_close before completing the cycle — plan+tasks를 history.json에 아카이브한다
|
|
25
|
-
|
|
26
|
-
## Guidelines
|
|
27
|
-
|
|
28
|
-
## Flow
|
|
29
|
-
|
|
30
|
-
### Step 1: Intake (Lead)
|
|
31
|
-
|
|
32
|
-
- **사용자가 에이전트/방향을 지정** → 지시를 그대로 따른다.
|
|
33
|
-
- **[run] only (방향 없음)** → 진행 전 사용자에게 방향을 확인한다.
|
|
34
|
-
- 사용자가 SCOPE와 구성을 결정한다. 명시되지 않은 부분은 Lead가 채운다.
|
|
35
|
-
- **Branch Guard**: main/master에 있으면 진행 전에 태스크 유형에 맞는 브랜치를 생성한다 (prefix: `feat/`, `fix/`, `chore/`, `research/` 등 — Lead의 판단). 사용자 확인 없이 자동 생성한다.
|
|
36
|
-
- `tasks.json` 확인:
|
|
37
|
-
- **존재** → 읽고 Step 2로 진행한다.
|
|
38
|
-
- **없음** → `{{skill_activation skill=nx-plan mode=auto}}`를 자동 호출하여 tasks.json을 생성한다. 묻지 않는다 — `[run]`은 실행 의도를 내포한다. plan 생성 후 Step 2로 진행한다.
|
|
39
|
-
- tasks.json이 존재하면 `nx_plan_status`로 기존 결정을 확인한다.
|
|
40
|
-
|
|
41
|
-
### Step 1.5: TUI Progress
|
|
42
|
-
|
|
43
|
-
시각적 진행 추적(Ctrl+T)을 위해 태스크를 등록한다:
|
|
44
|
-
|
|
45
|
-
- **태스크 ≤ 10개**: 태스크당 `{{task_register label="<per-task label>" state=pending}}`
|
|
46
|
-
- **태스크 > 10개**: `plan_issue`로 그룹화하여 그룹당 `{{task_register label="<group label>" state=pending}}`
|
|
47
|
-
- 실행이 진행됨에 따라 `{{task_register label="<label>" state=in_progress}}` / `{{task_register label="<label>" state=completed}}`로 등록 항목을 업데이트한다
|
|
48
|
-
- **건너뛰는 경우**: non-TTY 환경 (VSCode, headless)
|
|
49
|
-
- **Known issue**: auto-compact 중 TUI가 멈출 수 있다 (#27919) — 디스크의 태스크 데이터는 정확하게 유지된다
|
|
50
|
-
|
|
51
|
-
### Step 2: Execute
|
|
52
|
-
|
|
53
|
-
- **tasks.json을 사용자에게 제시한다** — owner, deps, approach 요약과 함께 태스크 목록을 보여준다. 확인을 묻지 않고 즉시 진행한다.
|
|
54
|
-
- `owner` 필드에 따라 태스크를 실행한다:
|
|
55
|
-
- `owner: "lead"` → Lead가 직접 처리한다
|
|
56
|
-
- `owner: "engineer"`, `"researcher"`, `"writer"` 등 → owner 역할에 맞는 서브에이전트를 스폰한다
|
|
57
|
-
- `owner: "architect"`, `"tester"`, `"reviewer"` 등 → 해당 HOW/CHECK 서브에이전트를 스폰한다
|
|
58
|
-
- 각 서브에이전트에게 태스크의 `context`, `approach`, `acceptance`를 프롬프트로 전달한다.
|
|
59
|
-
- **병렬 실행**: 독립적인 태스크(대상 파일이 겹치지 않고, deps 없음)는 병렬로 스폰할 수 있다. 대상 파일이 공유되는 태스크는 직렬화해야 한다.
|
|
60
|
-
- **SubagentStop 에스컬레이션 체인**: 서브에이전트가 미완성 상태로 종료되면:
|
|
61
|
-
1. **Do/Check 실패** → 해당 HOW 에이전트를 스폰하여 (예: Engineer 실패 → Architect) 실패를 진단하고, 접근법을 검토하며, 조정안을 제안하게 한다.
|
|
62
|
-
2. **재위임** → HOW의 조정된 접근법을 적용하여 새 Do/Check 에이전트에게 재위임한다.
|
|
63
|
-
3. **HOW도 실패** → Lead가 진단 내용과 함께 사용자에게 실패를 보고하고 방향을 요청한다.
|
|
64
|
-
- 최대: 태스크당 HOW 진단 1회 + 재위임 1회. 이후에는 사용자에게 에스컬레이션한다.
|
|
65
|
-
- 관련 HOW 매핑: Engineer→Architect, Writer→Strategist, Researcher→Postdoc, Tester→Architect.
|
|
66
|
-
|
|
67
|
-
### Resume Dispatch Rule
|
|
68
|
-
|
|
69
|
-
각 태스크에 대해 Lead는 `owner`의 `resume_tier`에 따라 새로 스폰할지 resume할지 결정한다:
|
|
70
|
-
|
|
71
|
-
1. `agents/{owner}.md` frontmatter에서 `resume_tier`를 조회한다 (없으면 → `ephemeral`로 처리).
|
|
72
|
-
2. `ephemeral`이면 → 새로 스폰한다. 종료.
|
|
73
|
-
3. `bounded`이면 → tasks.json 이력을 확인한다: 동일 `owner`가 겹치는 대상 파일에 이전에 작업했는가? 그렇고 다른 에이전트의 개입 편집이 없으면 → resume 후보. 아니면 새로 스폰. resume 프롬프트에는 항상 "수정 전 대상 파일을 다시 읽을 것" 지시를 포함한다.
|
|
74
|
-
4. `persistent`이면 → 이번 실행에서 동일 에이전트가 이전에 작업했으면 기본적으로 resume한다. 크로스 태스크 재사용 허용.
|
|
75
|
-
5. resume 시도 전 harness의 resume 메커니즘이 사용 가능한지 확인한다. 사용 불가이면 오류를 발생시키지 않고 조용히 새로 스폰으로 폴백한다.
|
|
76
|
-
|
|
77
|
-
### Step 3: Verify (Lead + Check subagents)
|
|
78
|
-
|
|
79
|
-
**Lead**: 빌드 + E2E 통과/실패 여부를 확인한다.
|
|
80
|
-
|
|
81
|
-
**Tester — acceptance criteria 검증**:
|
|
82
|
-
- Tester는 tasks.json에서 완료된 각 태스크의 `acceptance` 필드를 읽는다
|
|
83
|
-
- 각 기준을 PASS/FAIL로 판정한다
|
|
84
|
-
- 태스크를 완료로 간주하려면 모든 기준을 통과해야 한다
|
|
85
|
-
- 기준 하나라도 실패 → Step 2 재작업 (태스크 재개)
|
|
86
|
-
- Tester 스폰 조건 (하나라도 해당되면):
|
|
87
|
-
- tasks.json에 `acceptance` 필드가 있는 태스크가 1개 이상
|
|
88
|
-
- 변경된 파일이 3개 이상
|
|
89
|
-
- 기존 테스트 파일이 수정됨
|
|
90
|
-
- 외부 API/DB 접근 코드가 변경됨
|
|
91
|
-
- 해당 영역의 실패 이력이 memory에 존재
|
|
92
|
-
|
|
93
|
-
**Reviewer — writer 산출물 검증**:
|
|
94
|
-
- Step 2에서 Writer가 산출물을 생성한 경우, Reviewer가 반드시 검증해야 한다
|
|
95
|
-
- Writer → Reviewer는 선택이 아닌 필수 페어링이다
|
|
96
|
-
- Reviewer 확인 항목: 사실 정확성, 소스 일관성, 문법/형식
|
|
97
|
-
|
|
98
|
-
- 문제 발견 시: 코드 문제 → Step 2 재작업; 설계 문제 → 재실행 전 nx-plan을 다시 수행한다.
|
|
99
|
-
|
|
100
|
-
### Step 4: Complete
|
|
101
|
-
|
|
102
|
-
순서대로 실행한다:
|
|
103
|
-
|
|
104
|
-
1. **nx-sync**: 이번 사이클에 코드 변경이 있었으면 `{{skill_activation skill=nx-sync}}`를 호출한다. Best effort — 실패해도 사이클 완료를 막지 않는다.
|
|
105
|
-
2. **nx_task_close**: 호출하여 plan+tasks를 history.json에 아카이브한다. `.nexus/history.json`이 업데이트된다.
|
|
106
|
-
3. **git commit**: 소스 변경, 빌드 artifact (`bridge/`, `scripts/`), `.nexus/history.json`, 수정된 `.nexus/memory/` 또는 `.nexus/context/`를 스테이징하고 커밋한다. 명시적인 `git add`에 경로를 지정한다 (`git add -A` 사용 금지). `Co-Authored-By`가 포함된 HEREDOC 커밋 메시지를 사용한다. 이렇게 하면 사이클의 history 아카이브가 코드 변경과 같은 커밋에 포함되어 1:1 사이클-커밋 매핑이 보장된다.
|
|
107
|
-
4. **Report**: 사용자에게 요약 보고 — 변경된 파일, 적용된 핵심 결정, 권장 다음 단계. Merge/push는 사용자의 결정이며 이 스킬의 SCOPE 밖이다.
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Reference Framework
|
|
112
|
-
|
|
113
|
-
| Phase | Owner | Content |
|
|
114
|
-
|-------|-------|---------|
|
|
115
|
-
| 1. Intake | Lead | 의도 파악, 방향 확인, Branch Guard, tasks.json 확인 / 없으면 nx-plan 호출 |
|
|
116
|
-
| 2. Execute | Do subagents | owner별 태스크당 스폰, 위임 기준, 안전한 경우 병렬 실행 |
|
|
117
|
-
| 3. Verify | Lead + Check subagent | 빌드 확인, 품질 검증 |
|
|
118
|
-
| 4. Complete | Lead | nx-sync, nx_task_close, git commit, 보고 |
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
## Structured Delegation
|
|
123
|
-
|
|
124
|
-
Lead가 서브에이전트에게 태스크를 위임할 때, 다음 형식으로 프롬프트를 구성한다:
|
|
125
|
-
|
|
126
|
-
```
|
|
127
|
-
TASK: {specific deliverable}
|
|
128
|
-
|
|
129
|
-
CONTEXT:
|
|
130
|
-
- Current state: {relevant code/doc locations}
|
|
131
|
-
- Dependencies: {results from prior tasks}
|
|
132
|
-
- Prior decisions: {relevant decisions}
|
|
133
|
-
- Target files: {file path list}
|
|
134
|
-
|
|
135
|
-
CONSTRAINTS:
|
|
136
|
-
- {constraint 1}
|
|
137
|
-
- {constraint 2}
|
|
138
|
-
|
|
139
|
-
ACCEPTANCE:
|
|
140
|
-
- {completion criterion 1}
|
|
141
|
-
- {completion criterion 2}
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Key Principles
|
|
147
|
-
|
|
148
|
-
1. **Lead = 사용자 지시 해석 + 조율 + 태스크 직접 처리**
|
|
149
|
-
2. **사용자가 SCOPE와 구성을 결정한다**
|
|
150
|
-
3. **tasks.json이 상태의 단일 진실 소스** — nx-plan이 생성하고, Step 1에서 읽으며, 태스크가 완료됨에 따라 업데이트된다
|
|
151
|
-
4. **Do subagents = owner별 실행** — Lead는 `owner` 필드에 따라 태스크당 하나의 서브에이전트를 스폰한다. Engineer는 코드 변경에 집중한다. 문서 업데이트는 Step 4에서 Writer가 일괄 처리한다. Researcher는 즉시 reference/에 기록한다.
|
|
152
|
-
5. **Check subagents = 검증** — Lead의 판단 + 4가지 조건
|
|
153
|
-
6. **SubagentStop 에스컬레이션** — 서브에이전트가 미완성 상태로 종료되면 HOW 진단 → 재위임 → 사용자 보고 순으로 에스컬레이션한다. 태스크당 최대 1사이클.
|
|
154
|
-
7. **Gate Stop nonstop** — 미결 태스크가 존재하는 동안 종료할 수 없다
|
|
155
|
-
8. **Plan first** — tasks.json이 없으면 Step 2 전에 반드시 nx-plan을 실행한다
|
|
156
|
-
9. **shell 명령으로 파일 수정 금지** — sed, echo redirection, heredoc, tee 및 유사한 shell 기반 파일 편집은 금지된다. harness의 전용 파일 편집 primitive를 항상 사용한다 (gate 강제)
|
|
157
|
-
|
|
158
|
-
## State Management
|
|
159
|
-
|
|
160
|
-
`.nexus/state/tasks.json` — nx-plan이 생성하고 `nx_task_add`/`nx_task_update`로 관리한다. Gate Stop 강제.
|
|
161
|
-
사이클 종료 시 `nx_task_close`를 통해 plan+tasks를 `.nexus/history.json`에 아카이브한다.
|