@evref-bl/dev-nexus 0.1.0-alpha.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 +677 -0
- package/dist/browserOpener.d.ts +9 -0
- package/dist/browserOpener.js +47 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +2374 -0
- package/dist/gitWorktreeService.d.ts +57 -0
- package/dist/gitWorktreeService.js +157 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +47 -0
- package/dist/nexusAgentMcpConfig.d.ts +30 -0
- package/dist/nexusAgentMcpConfig.js +228 -0
- package/dist/nexusAutomation.d.ts +103 -0
- package/dist/nexusAutomation.js +390 -0
- package/dist/nexusAutomationAgentLaunch.d.ts +148 -0
- package/dist/nexusAutomationAgentLaunch.js +855 -0
- package/dist/nexusAutomationAgentProfile.d.ts +39 -0
- package/dist/nexusAutomationAgentProfile.js +103 -0
- package/dist/nexusAutomationAgentSurface.d.ts +62 -0
- package/dist/nexusAutomationAgentSurface.js +90 -0
- package/dist/nexusAutomationCommandExecutor.d.ts +29 -0
- package/dist/nexusAutomationCommandExecutor.js +251 -0
- package/dist/nexusAutomationConfig.d.ts +114 -0
- package/dist/nexusAutomationConfig.js +547 -0
- package/dist/nexusAutomationEnqueue.d.ts +37 -0
- package/dist/nexusAutomationEnqueue.js +128 -0
- package/dist/nexusAutomationRunOnce.d.ts +91 -0
- package/dist/nexusAutomationRunOnce.js +586 -0
- package/dist/nexusAutomationScheduler.d.ts +50 -0
- package/dist/nexusAutomationScheduler.js +196 -0
- package/dist/nexusAutomationStatus.d.ts +55 -0
- package/dist/nexusAutomationStatus.js +462 -0
- package/dist/nexusAutomationTarget.d.ts +19 -0
- package/dist/nexusAutomationTarget.js +33 -0
- package/dist/nexusAutomationTargetCycle.d.ts +90 -0
- package/dist/nexusAutomationTargetCycle.js +282 -0
- package/dist/nexusAutomationTargetReport.d.ts +136 -0
- package/dist/nexusAutomationTargetReport.js +504 -0
- package/dist/nexusAutomationWorktreeSetup.d.ts +89 -0
- package/dist/nexusAutomationWorktreeSetup.js +661 -0
- package/dist/nexusCoordination.d.ts +198 -0
- package/dist/nexusCoordination.js +1018 -0
- package/dist/nexusExtension.d.ts +31 -0
- package/dist/nexusExtension.js +1 -0
- package/dist/nexusHomeConfig.d.ts +38 -0
- package/dist/nexusHomeConfig.js +133 -0
- package/dist/nexusMcpServer.d.ts +31 -0
- package/dist/nexusMcpServer.js +1036 -0
- package/dist/nexusPluginCapabilities.d.ts +197 -0
- package/dist/nexusPluginCapabilities.js +201 -0
- package/dist/nexusProjectConfig.d.ts +95 -0
- package/dist/nexusProjectConfig.js +880 -0
- package/dist/nexusProjectHomeService.d.ts +121 -0
- package/dist/nexusProjectHomeService.js +171 -0
- package/dist/nexusProjectLifecycle.d.ts +62 -0
- package/dist/nexusProjectLifecycle.js +205 -0
- package/dist/nexusProjectOperations.d.ts +101 -0
- package/dist/nexusProjectOperations.js +296 -0
- package/dist/nexusProjectRegistry.d.ts +42 -0
- package/dist/nexusProjectRegistry.js +91 -0
- package/dist/nexusProjectScaffold.d.ts +25 -0
- package/dist/nexusProjectScaffold.js +61 -0
- package/dist/nexusProjectTemplate.d.ts +34 -0
- package/dist/nexusProjectTemplate.js +354 -0
- package/dist/nexusSkills.d.ts +134 -0
- package/dist/nexusSkills.js +647 -0
- package/dist/nexusWorkerContextBundle.d.ts +142 -0
- package/dist/nexusWorkerContextBundle.js +375 -0
- package/dist/processSupervisor.d.ts +89 -0
- package/dist/processSupervisor.js +440 -0
- package/dist/vibeKanbanApi.d.ts +11 -0
- package/dist/vibeKanbanApi.js +14 -0
- package/dist/vibeKanbanAuth.d.ts +25 -0
- package/dist/vibeKanbanAuth.js +101 -0
- package/dist/vibeKanbanBoardAdapter.d.ts +36 -0
- package/dist/vibeKanbanBoardAdapter.js +196 -0
- package/dist/vibeKanbanMcpConfig.d.ts +36 -0
- package/dist/vibeKanbanMcpConfig.js +191 -0
- package/dist/vibeKanbanProjectAdapter.d.ts +39 -0
- package/dist/vibeKanbanProjectAdapter.js +113 -0
- package/dist/vibeKanbanWorkspaceSetup.d.ts +1 -0
- package/dist/vibeKanbanWorkspaceSetup.js +96 -0
- package/dist/workItemService.d.ts +60 -0
- package/dist/workItemService.js +163 -0
- package/dist/workTrackingGitHubProvider.d.ts +71 -0
- package/dist/workTrackingGitHubProvider.js +663 -0
- package/dist/workTrackingGitLabProvider.d.ts +62 -0
- package/dist/workTrackingGitLabProvider.js +523 -0
- package/dist/workTrackingJiraProvider.d.ts +67 -0
- package/dist/workTrackingJiraProvider.js +652 -0
- package/dist/workTrackingLocalProvider.d.ts +49 -0
- package/dist/workTrackingLocalProvider.js +463 -0
- package/dist/workTrackingProviderService.d.ts +21 -0
- package/dist/workTrackingProviderService.js +117 -0
- package/dist/workTrackingTypes.d.ts +202 -0
- package/dist/workTrackingTypes.js +1 -0
- package/dist/workTrackingVibeProvider.d.ts +35 -0
- package/dist/workTrackingVibeProvider.js +119 -0
- package/dist/worktreeExecutionMetadata.d.ts +76 -0
- package/dist/worktreeExecutionMetadata.js +239 -0
- package/package.json +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
# DevNexus
|
|
2
|
+
|
|
3
|
+
DevNexus is a generic development orchestration core.
|
|
4
|
+
|
|
5
|
+
It owns project and work tracking, local work items, agent launch
|
|
6
|
+
configuration, execution metadata, verification records, credential-aware forge
|
|
7
|
+
integration, and publication handoff across language ecosystems.
|
|
8
|
+
|
|
9
|
+
A DevNexus project is a managed orchestration context containing one or more
|
|
10
|
+
components. A component is the unit that points at a source root, optional Git
|
|
11
|
+
remote, worktree root, work-item service, verification hints, publication
|
|
12
|
+
hints, and relationships to other components. Component arity can be one or
|
|
13
|
+
many; a project with one component follows the same model as a project with
|
|
14
|
+
several components.
|
|
15
|
+
|
|
16
|
+
DevNexus is not the work-planning agent. It should not decide which work item
|
|
17
|
+
to implement, supervise the implementation, or plan parallel worktrees itself.
|
|
18
|
+
A user drives DevNexus by configuring projects, schedules, launch policies, and
|
|
19
|
+
agent commands. A user can be a human or an agent acting under human
|
|
20
|
+
instruction. DevNexus executes that infrastructure and schedule by launching a
|
|
21
|
+
configured agent such as Codex or Claude in a prepared project context. The
|
|
22
|
+
launched agent chooses the work item or items, creates and coordinates Git
|
|
23
|
+
worktrees when useful, verifies the result, and reports commits, publication,
|
|
24
|
+
blockers, and notes back through DevNexus-owned records. DevNexus can relaunch
|
|
25
|
+
the agent while eligible work remains when the user has configured that
|
|
26
|
+
behavior.
|
|
27
|
+
|
|
28
|
+
For example, a human can tell Codex to use DevNexus to work on a project until
|
|
29
|
+
no eligible issue remains. In that flow, Codex is the user of DevNexus under
|
|
30
|
+
human instruction; DevNexus supplies the configured launch gates, schedule,
|
|
31
|
+
component context, relaunch loop, and run records.
|
|
32
|
+
|
|
33
|
+
Language, runtime, framework, and toolchain-specific behavior belongs in
|
|
34
|
+
extensions or plugins. DevNexus provides the core contracts and hooks without
|
|
35
|
+
depending on any specific specialization. Plugins are additive capability
|
|
36
|
+
declarations: they can describe setup policy, projected skills, MCP servers
|
|
37
|
+
and tools, dependency projections, environment hints, cleanup hooks, worker
|
|
38
|
+
context or briefing fragments, and agent affordances, but they do not own the
|
|
39
|
+
project or replace the generic coordinator launch boundary.
|
|
40
|
+
|
|
41
|
+
## Project CLI
|
|
42
|
+
|
|
43
|
+
The package ships a generic `dev-nexus` CLI for initializing a DevNexus home
|
|
44
|
+
and managing generic project roots:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
dev-nexus home init <home-path>
|
|
48
|
+
dev-nexus project create <name> --home <home-path>
|
|
49
|
+
dev-nexus project import <source-root> --home <home-path> --name <name>
|
|
50
|
+
dev-nexus project list --home <home-path>
|
|
51
|
+
dev-nexus project status <project-id-or-root> --home <home-path>
|
|
52
|
+
dev-nexus project status <project-root>
|
|
53
|
+
dev-nexus project mcp refresh <project-root> --agent codex --agent claude
|
|
54
|
+
dev-nexus project tracker configure <project> --home <home-path> --provider local
|
|
55
|
+
dev-nexus project tracker link <project> --home <home-path> --tracker-project-id <id>
|
|
56
|
+
dev-nexus mcp-stdio
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Commands that need a registry use `--home`; when it is omitted they fall back
|
|
60
|
+
to `DEV_NEXUS_HOME` and then the default user home path. `project status` can
|
|
61
|
+
also inspect an initialized project root directly without a home registry,
|
|
62
|
+
which is useful for local smoke checks and generated worktrees.
|
|
63
|
+
|
|
64
|
+
## Project Template Shape
|
|
65
|
+
|
|
66
|
+
The generic project scaffold separates project-owned support state from
|
|
67
|
+
component source and local runtime records. A new or refreshed project writes a
|
|
68
|
+
generated `.dev-nexus/README.md` that describes the active layout in the same
|
|
69
|
+
terms used by the code:
|
|
70
|
+
|
|
71
|
+
| Area | Typical paths | Owner |
|
|
72
|
+
| --- | --- | --- |
|
|
73
|
+
| Component configuration | `dev-nexus.project.json`, component `sourceRoot` paths | User-authored source |
|
|
74
|
+
| Project state | `.dev-nexus/README.md`, component worktree roots under `<worktreesRoot>/<component-id>/` | Generated support or local runtime |
|
|
75
|
+
| Target state | `automation.target.statePath`, defaulting to `.dev-nexus/automation/target-state.md` | User-authored target memory, not overwritten by refresh |
|
|
76
|
+
| Skills | `.dev-nexus/skills/`, optional `.agents/skills/` or `.claude/skills/` projections | Generated from curated or extension skill definitions |
|
|
77
|
+
| Plugin capabilities | `dev-nexus.project.json` `plugins` records | User-authored additive capability metadata projected into agent context |
|
|
78
|
+
| Agent MCP projection | `.codex/config.toml`, `.mcp.json`, or configured agent target paths | Generated from `mcp.agentTargets` |
|
|
79
|
+
|
|
80
|
+
Component worktree roots are component-scoped even when a project has one
|
|
81
|
+
component, so arity one uses the same `<worktreesRoot>/<component-id>/` shape as
|
|
82
|
+
larger projects. Scaffold refreshes create missing component worktree
|
|
83
|
+
directories and seed a missing target-state file when automation is configured,
|
|
84
|
+
but existing target state is preserved.
|
|
85
|
+
|
|
86
|
+
Migration notes treat historical staging roots as migration-only evidence.
|
|
87
|
+
Production templates should not inherit source-specific paths, tracker ids,
|
|
88
|
+
component names, or launch commands from those roots. Generated support state
|
|
89
|
+
may be refreshed by DevNexus, user-authored state records durable project
|
|
90
|
+
intent, and local runtime state covers locks, ledgers, local tracker files,
|
|
91
|
+
agent launch records, and generated worktrees.
|
|
92
|
+
|
|
93
|
+
## MCP Server
|
|
94
|
+
|
|
95
|
+
DevNexus exposes a generic stdio Model Context Protocol (MCP) server for
|
|
96
|
+
agents:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
dev-nexus mcp-stdio
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Agent configuration should register that command as a project-local MCP server
|
|
103
|
+
when the agent needs direct DevNexus tools. The first native server slice
|
|
104
|
+
intentionally covers the core self-use loop: read project status, read
|
|
105
|
+
automation readiness and target context, and create/list/get/update/comment
|
|
106
|
+
work items through the configured work tracker. It can also record
|
|
107
|
+
caller-reported target cycle facts so the next launch can reason from durable
|
|
108
|
+
state instead of chat memory, then build a factual target report from those
|
|
109
|
+
records. It does not choose work or launch subagents itself; those decisions
|
|
110
|
+
remain with the human or launched coordinator agent.
|
|
111
|
+
|
|
112
|
+
The native MCP tools are:
|
|
113
|
+
|
|
114
|
+
```text
|
|
115
|
+
project_status
|
|
116
|
+
automation_status
|
|
117
|
+
eligible_work
|
|
118
|
+
agent_profiles
|
|
119
|
+
target_cycle_list
|
|
120
|
+
target_cycle_record
|
|
121
|
+
target_report
|
|
122
|
+
coordination_status
|
|
123
|
+
coordination_handoff
|
|
124
|
+
coordination_integrate
|
|
125
|
+
work_item_create
|
|
126
|
+
work_item_list
|
|
127
|
+
work_item_get
|
|
128
|
+
work_item_update
|
|
129
|
+
work_item_comment
|
|
130
|
+
work_item_set_status
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Work-item tools accept `componentId` when a project has multiple component
|
|
134
|
+
trackers. Omitting it preserves the compatibility behavior and uses the
|
|
135
|
+
primary component.
|
|
136
|
+
|
|
137
|
+
Projects can still use the CLI for the same boundaries. The MCP server exists
|
|
138
|
+
so agents can use DevNexus directly without depending on a specialization
|
|
139
|
+
adapter for generic project orchestration.
|
|
140
|
+
|
|
141
|
+
## Shared Coordination
|
|
142
|
+
|
|
143
|
+
DevNexus exposes advisory coordination tools for parallel agents working from
|
|
144
|
+
Git worktrees. The tools record durable handoff facts in the configured
|
|
145
|
+
component work-item service and read Git state, but they do not choose or
|
|
146
|
+
supervise implementation work.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
dev-nexus coordination status <project-root> --work-item local-1 --worktree <path>
|
|
150
|
+
dev-nexus coordination handoff <project-root> local-1 --status ready --worktree <path>
|
|
151
|
+
dev-nexus coordination integrate <project-root> --work-item local-1 --target-branch main --worktree <path>
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`coordination integrate` builds a read-only plan from related handoff branches,
|
|
155
|
+
recorded decisions, `git merge-base`, `git merge-tree`, changed files, and
|
|
156
|
+
range-diff output when useful. `--fetch` fetches the configured remote only
|
|
157
|
+
when project automation safety explicitly allows host mutation.
|
|
158
|
+
|
|
159
|
+
Project-local agent configuration can be generated with:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
dev-nexus project mcp refresh <project-root> --agent codex
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
or through project configuration:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"mcp": {
|
|
170
|
+
"agentTargets": [
|
|
171
|
+
{ "agent": "codex" },
|
|
172
|
+
{ "agent": "claude", "sourceControl": "source" }
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
The Codex target writes or updates `.codex/config.toml` with a
|
|
179
|
+
`dev_nexus` stdio server. The Claude target writes or updates project
|
|
180
|
+
`.mcp.json`. Generated support config is excluded from Git by default;
|
|
181
|
+
set `sourceControl` to `source` when the project should commit the agent MCP
|
|
182
|
+
configuration.
|
|
183
|
+
|
|
184
|
+
## Plugin Capabilities
|
|
185
|
+
|
|
186
|
+
`dev-nexus.project.json` can include a `plugins` array. A project may configure
|
|
187
|
+
more than one plugin, and each enabled plugin contributes additive capability
|
|
188
|
+
records. DevNexus core keeps those records generic and projects them into the
|
|
189
|
+
agent launch context plus the low-token `agent_profiles` MCP/CLI surface as
|
|
190
|
+
`pluginCapabilities`.
|
|
191
|
+
|
|
192
|
+
Supported capability record kinds are:
|
|
193
|
+
|
|
194
|
+
- `projected_skill`: a skill id and optional target agents.
|
|
195
|
+
- `mcp_server`: an MCP server name plus optional tool names and descriptions.
|
|
196
|
+
- `setup_obligation`: setup policy the coordinator should account for before work.
|
|
197
|
+
- `environment_hint`: environment variables or paths relevant to plugin tools.
|
|
198
|
+
- `cleanup_hook`: cleanup policy to consider after plugin-assisted work.
|
|
199
|
+
- `agent_affordance`: a concise capability or interaction the plugin makes available.
|
|
200
|
+
- `dependency_projection`: setup-only links from a component source root into a
|
|
201
|
+
generated worker worktree, such as already-reviewed toolchain dependencies.
|
|
202
|
+
- `worker_context_fragment`: bounded advisory context rendered into generated worker `context.json`.
|
|
203
|
+
- `worker_briefing_fragment`: bounded advisory Markdown rendered into generated worker `briefing.md`.
|
|
204
|
+
|
|
205
|
+
Example:
|
|
206
|
+
|
|
207
|
+
```json
|
|
208
|
+
{
|
|
209
|
+
"plugins": [
|
|
210
|
+
{
|
|
211
|
+
"id": "analysis-tools",
|
|
212
|
+
"name": "Analysis Tools",
|
|
213
|
+
"version": "0.1.0",
|
|
214
|
+
"capabilities": [
|
|
215
|
+
{
|
|
216
|
+
"kind": "projected_skill",
|
|
217
|
+
"id": "deep-review-skill",
|
|
218
|
+
"skillId": "deep-review",
|
|
219
|
+
"targetAgents": ["codex"]
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"kind": "mcp_server",
|
|
223
|
+
"id": "analysis-mcp",
|
|
224
|
+
"serverName": "analysis_tools",
|
|
225
|
+
"tools": [
|
|
226
|
+
{
|
|
227
|
+
"name": "inspect_facts",
|
|
228
|
+
"description": "Read plugin-supplied facts."
|
|
229
|
+
}
|
|
230
|
+
]
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "workspace-policy",
|
|
236
|
+
"capabilities": [
|
|
237
|
+
{
|
|
238
|
+
"kind": "setup_obligation",
|
|
239
|
+
"id": "review-local-docs",
|
|
240
|
+
"description": "Review project-local setup notes before editing.",
|
|
241
|
+
"required": true
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"kind": "cleanup_hook",
|
|
245
|
+
"id": "remove-temporary-cache",
|
|
246
|
+
"description": "Remove temporary cache files created by plugin tools.",
|
|
247
|
+
"trigger": "after_run"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"kind": "dependency_projection",
|
|
251
|
+
"id": "node-modules",
|
|
252
|
+
"source": "node_modules",
|
|
253
|
+
"target": "node_modules",
|
|
254
|
+
"required": false,
|
|
255
|
+
"sourceControl": "support",
|
|
256
|
+
"reason": "Resolve local npm binaries from generated worker worktrees."
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"kind": "worker_briefing_fragment",
|
|
260
|
+
"id": "review-workspace-policy",
|
|
261
|
+
"title": "Workspace Policy",
|
|
262
|
+
"body": "Read the workspace policy before using plugin-provided tools.",
|
|
263
|
+
"provenance": "workspace-policy plugin manifest",
|
|
264
|
+
"targetAgents": ["codex"],
|
|
265
|
+
"targetComponents": ["core"]
|
|
266
|
+
}
|
|
267
|
+
]
|
|
268
|
+
}
|
|
269
|
+
]
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Plugin records are not runners and do not select implementation work. They are
|
|
274
|
+
available capability and setup-policy facts for the launched coordinator. The
|
|
275
|
+
coordinator still chooses the work item batch, decides how many subagents to
|
|
276
|
+
run, assigns profiles, supervises implementation, and reports durable facts
|
|
277
|
+
back through DevNexus.
|
|
278
|
+
|
|
279
|
+
Worker fragment title, body, and provenance fields are bounded by the project
|
|
280
|
+
config schema so generated worker files stay concise. Enabled fragment
|
|
281
|
+
projection is deterministic: DevNexus filters component-targeted fragments to
|
|
282
|
+
the prepared worker component, filters agent-targeted fragments when the active
|
|
283
|
+
agent is known, and then orders fragments by plugin id, fragment id, kind, and
|
|
284
|
+
provenance. Duplicate fragment ids from different plugins are retained rather
|
|
285
|
+
than merged or overridden; each rendered fragment carries source plugin,
|
|
286
|
+
capability id, and provenance. Duplicate capability ids inside one plugin are
|
|
287
|
+
still rejected by project config validation.
|
|
288
|
+
|
|
289
|
+
## Project Components
|
|
290
|
+
|
|
291
|
+
`dev-nexus.project.json` stores `components` as a first-class list. Each
|
|
292
|
+
component has a stable `id`, display `name`, `role`, `kind`, source root,
|
|
293
|
+
worktree root, optional work tracking configuration, optional verification and
|
|
294
|
+
publication hints, and explicit relationships to other components.
|
|
295
|
+
|
|
296
|
+
The primary component is the compatibility anchor for legacy commands that can
|
|
297
|
+
operate on only one component. New automation and project status surfaces expose
|
|
298
|
+
all configured components, including each component's source root and whether
|
|
299
|
+
that root exists. Components with work tracking also expose raw provider
|
|
300
|
+
capability flags and an action-oriented `workTrackingCapabilityReport` so a
|
|
301
|
+
coordinator agent can see whether a component tracker can list, create, get,
|
|
302
|
+
update, comment, manage labels, manage assignees, use milestones, use a board,
|
|
303
|
+
or update board status before choosing a workflow. `boardStatus` means a
|
|
304
|
+
configured board or workflow status field can be synchronized; a provider can
|
|
305
|
+
still update neutral item status without claiming board-status support.
|
|
306
|
+
Component worktrees default under
|
|
307
|
+
`<project worktreesRoot>/<component-id>` so arity one is not a special
|
|
308
|
+
directory case.
|
|
309
|
+
|
|
310
|
+
Launched agents should treat each component as an independent source and
|
|
311
|
+
tracking boundary. The launch context reports the component `sourceRoot`,
|
|
312
|
+
`worktreesRoot`, Git defaults, relationships, and tracker capability flags so
|
|
313
|
+
an agent can decide whether to work in the active checkout or create its own
|
|
314
|
+
component worktree. When an agent takes work across components, it should keep
|
|
315
|
+
branches and generated worktrees component-scoped, check for unrelated dirty
|
|
316
|
+
state before editing, and report per-component progress through that
|
|
317
|
+
component's work-item service. In `agent_launch` mode DevNexus does not create
|
|
318
|
+
those implementation worktrees for the agent.
|
|
319
|
+
|
|
320
|
+
For parallel implementation work, coordinators should pick one component-owned
|
|
321
|
+
work item, inspect that component's `sourceRoot` for unrelated dirty state, and
|
|
322
|
+
then either work in that checkout or prepare a generated Git worktree under that
|
|
323
|
+
component's `worktreesRoot`. Prepared worktree records carry the component id,
|
|
324
|
+
source root, component worktrees root, generated worktree path, branch, base ref,
|
|
325
|
+
and owning work item id/title. A generated path is valid only when it resolves
|
|
326
|
+
inside the component `worktreesRoot`; path-like worktree names are rejected so a
|
|
327
|
+
parallel branch cannot escape into another component's tree. Agents should write
|
|
328
|
+
or update worktree execution metadata in the generated worktree as verification,
|
|
329
|
+
commit, and publication facts become known.
|
|
330
|
+
|
|
331
|
+
Work tracking is component-scoped. Older project-level `workTracking` remains
|
|
332
|
+
accepted for legacy configs and is normalized onto the generated primary
|
|
333
|
+
component, but explicit multi-component configs should put the work-item
|
|
334
|
+
service on the component that owns those items. A component can use a local
|
|
335
|
+
store, GitHub Issues, GitHub Projects, GitLab issues, Jira, or another
|
|
336
|
+
configured provider as those adapters become available.
|
|
337
|
+
|
|
338
|
+
CLI work-item commands accept `--component <component-id>` for component-owned
|
|
339
|
+
trackers and default to the primary component when the option is omitted.
|
|
340
|
+
|
|
341
|
+
Example:
|
|
342
|
+
|
|
343
|
+
```json
|
|
344
|
+
{
|
|
345
|
+
"version": 1,
|
|
346
|
+
"id": "example-suite",
|
|
347
|
+
"name": "Example Suite",
|
|
348
|
+
"repo": {
|
|
349
|
+
"kind": "local",
|
|
350
|
+
"remoteUrl": null,
|
|
351
|
+
"defaultBranch": null
|
|
352
|
+
},
|
|
353
|
+
"components": [
|
|
354
|
+
{
|
|
355
|
+
"id": "core",
|
|
356
|
+
"name": "Core",
|
|
357
|
+
"kind": "git",
|
|
358
|
+
"role": "primary",
|
|
359
|
+
"remoteUrl": "git@example.invalid:example/core.git",
|
|
360
|
+
"defaultBranch": "main",
|
|
361
|
+
"sourceRoot": "components/core",
|
|
362
|
+
"workTracking": {
|
|
363
|
+
"provider": "github",
|
|
364
|
+
"repository": {
|
|
365
|
+
"owner": "example",
|
|
366
|
+
"name": "core"
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
"relationships": []
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
"id": "addon",
|
|
373
|
+
"name": "Addon",
|
|
374
|
+
"kind": "git",
|
|
375
|
+
"role": "addon",
|
|
376
|
+
"remoteUrl": "git@example.invalid:example/addon.git",
|
|
377
|
+
"defaultBranch": "main",
|
|
378
|
+
"sourceRoot": "components/addon",
|
|
379
|
+
"workTracking": {
|
|
380
|
+
"provider": "jira",
|
|
381
|
+
"host": "example.atlassian.net",
|
|
382
|
+
"projectKey": "ADDON"
|
|
383
|
+
},
|
|
384
|
+
"relationships": [
|
|
385
|
+
{
|
|
386
|
+
"kind": "extends",
|
|
387
|
+
"componentId": "core"
|
|
388
|
+
}
|
|
389
|
+
]
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"worktreesRoot": "worktrees",
|
|
393
|
+
"kanban": {
|
|
394
|
+
"provider": "vibe-kanban",
|
|
395
|
+
"projectId": null
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
## Automation Foundation
|
|
401
|
+
|
|
402
|
+
Projects can opt into generic agent-launch automation through
|
|
403
|
+
`dev-nexus.project.json`. The core schema covers user-configured launch gates,
|
|
404
|
+
verification hints, run ledgers, stale-aware locks, retry backoff, safety
|
|
405
|
+
policy, and publication policy. These APIs model launch state and record what
|
|
406
|
+
the agent reports; execution adapters decide how to start agents and tools for
|
|
407
|
+
a project.
|
|
408
|
+
|
|
409
|
+
The configured automation selector is a user-authored launch gate and context
|
|
410
|
+
filter. It can decide whether the user's configured conditions for launching an
|
|
411
|
+
agent are met, but it is not a mandate for DevNexus to choose the task. The
|
|
412
|
+
launched agent must inspect the tracker context, choose the work item or items
|
|
413
|
+
to take, decide whether parallel Git worktrees are useful, and supervise
|
|
414
|
+
implementation through verification and publication.
|
|
415
|
+
|
|
416
|
+
`automation.mode: "agent_launch"` uses the launch-only boundary. DevNexus
|
|
417
|
+
checks the selector as an eligibility gate, writes an agent context file under
|
|
418
|
+
the project `.dev-nexus/automation` state directory, starts the configured
|
|
419
|
+
agent command, and records the result reported by the agent. The
|
|
420
|
+
agent receives `DEV_NEXUS_AGENT_CONTEXT_FILE` and
|
|
421
|
+
`DEV_NEXUS_AGENT_RESULT_FILE`. A successful agent command must write valid
|
|
422
|
+
JSON to that result path before exiting; otherwise DevNexus records the launch
|
|
423
|
+
as failed. The required fields are `status` and `summary`. Optional fields are
|
|
424
|
+
`commitIds`, `verification`, `publicationDecision`, and `error`.
|
|
425
|
+
The context also carries a `result` contract with the exact result file path,
|
|
426
|
+
required fields, optional fields, allowed launch statuses, verification
|
|
427
|
+
statuses, and publication decision types. The same required and optional field
|
|
428
|
+
lists are exposed in `DEV_NEXUS_AGENT_RESULT_REQUIRED_FIELDS` and
|
|
429
|
+
`DEV_NEXUS_AGENT_RESULT_OPTIONAL_FIELDS`.
|
|
430
|
+
|
|
431
|
+
```json
|
|
432
|
+
{
|
|
433
|
+
"status": "completed",
|
|
434
|
+
"summary": "Agent reported completion",
|
|
435
|
+
"commitIds": [],
|
|
436
|
+
"verification": [],
|
|
437
|
+
"publicationDecision": {
|
|
438
|
+
"type": "direct_integration",
|
|
439
|
+
"remote": "origin",
|
|
440
|
+
"targetBranch": "main",
|
|
441
|
+
"reason": "Published verified source change."
|
|
442
|
+
},
|
|
443
|
+
"error": null
|
|
444
|
+
}
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
The agent context includes `components` and `componentEligibleWorkItems`.
|
|
448
|
+
DevNexus groups eligible work items by component and does not collapse that
|
|
449
|
+
grouping into a decision. The launched agent can then decide which component
|
|
450
|
+
work items to take, how many subagents to launch, what model and reasoning
|
|
451
|
+
profile each subagent should use, and how to report progress back to each
|
|
452
|
+
component's work-item service.
|
|
453
|
+
|
|
454
|
+
The same context also includes the configured automation `target`, `agent`
|
|
455
|
+
policy, and enabled `pluginCapabilities`. `automation.target` carries the
|
|
456
|
+
user-requested objective, the project-relative target-state Markdown file,
|
|
457
|
+
optional cycle and work-item bounds, and the stop condition for no remaining
|
|
458
|
+
eligible work. Agents should keep that target-state file concise: retain
|
|
459
|
+
current direction, active decisions, blockers, and near-term risks, and drop
|
|
460
|
+
stale detail as the target evolves. `automation.agent.maxConcurrentSubagents`
|
|
461
|
+
caps parallel subagent work, and `automation.agent.profiles` names the
|
|
462
|
+
executor/model/version or variant/reasoning or intelligence/safety profiles
|
|
463
|
+
that a launched agent may assign to subagents.
|
|
464
|
+
`automation.agent.coordinatorProfileId` may name one of those profiles as the
|
|
465
|
+
coordinator launch profile. A profile can carry `command` and `args`; DevNexus
|
|
466
|
+
uses that executable template when no raw `automation.agent.command` or CLI
|
|
467
|
+
`--command` override is provided. A coordinator profile must be launch-capable:
|
|
468
|
+
its `intendedUse` must be `coordinator` or `any`, and it must include a
|
|
469
|
+
`command` when it is selected by `coordinatorProfileId`. `intendedUse` defaults
|
|
470
|
+
to `any` for existing profile configs. Profile `safety` overrides the project
|
|
471
|
+
automation safety posture for that profile only; otherwise profiles inherit
|
|
472
|
+
`automation.safety`. The profile and subagent cap settings still describe
|
|
473
|
+
infrastructure policy. DevNexus exposes the normalized policy to the launched
|
|
474
|
+
coordinator, but the coordinator remains responsible for reading the context,
|
|
475
|
+
choosing work, assigning subagent profiles, and reporting facts back to
|
|
476
|
+
DevNexus.
|
|
477
|
+
|
|
478
|
+
`automation.target.cycleLedgerPath` stores the target cycle ledger, defaulting
|
|
479
|
+
to `.dev-nexus/automation/target-cycles.json`. A launched coordinator agent
|
|
480
|
+
can record `started`, `dispatched`, `completed`, `blocked`, `failed`, or
|
|
481
|
+
`skipped` cycle facts through `target_cycle_record` or the CLI. These records
|
|
482
|
+
are factual caller reports: DevNexus stores the run id, target id, component
|
|
483
|
+
work item refs, per-item progress states, agent profile ids, bounded notes,
|
|
484
|
+
blockers, and summary, but it still does not decide which work should be
|
|
485
|
+
selected or supervise subagents. Work item progress states can be `selected`,
|
|
486
|
+
`dispatched`, `in_progress`, `completed`, `blocked`, or `skipped`; item and
|
|
487
|
+
cycle notes are capped at 1000 characters each so the durable ledger stays
|
|
488
|
+
concise. `automation status` reads the same ledger and exposes cycle counts
|
|
489
|
+
plus the latest cycle.
|
|
490
|
+
|
|
491
|
+
`target_report` and `automation target-report` build read-only factual JSON
|
|
492
|
+
from the target context, target cycle ledger, automation run ledger, recorded
|
|
493
|
+
work item refs, blockers, and notes. The report status is derived from the
|
|
494
|
+
latest recorded target cycle when present, otherwise the latest automation run.
|
|
495
|
+
The report also includes a `relaunchDecision` field with one of `relaunch`,
|
|
496
|
+
`stop`, `wait`, `report_blocked`, `report_failed`, or `not_ready`, based on
|
|
497
|
+
the latest recorded cycle status, recorded eligible work count, target stop
|
|
498
|
+
policy, and relaunch policy. It is intended for final user reporting and
|
|
499
|
+
relaunch decisions by a human or coordinator agent. It avoids live external
|
|
500
|
+
tracker calls, may read configured local work-item stores to fill missing
|
|
501
|
+
titles/statuses, and does not infer hidden work state. Component progress,
|
|
502
|
+
active blockers, commits, verification records, and publication decisions are
|
|
503
|
+
summarized only from durable cycle/run facts and locally recorded work-item
|
|
504
|
+
state.
|
|
505
|
+
|
|
506
|
+
`runNexusAutomationOnce` remains available for older local command smokes that
|
|
507
|
+
prepare one generated worktree and run `automation.executor.command`. That
|
|
508
|
+
selected-work path is interim. New automation work should prefer
|
|
509
|
+
`runNexusAutomationAgentLaunchOnce`: DevNexus prepares safe context, starts the
|
|
510
|
+
configured agent when the user-requested or scheduled launch policy fires, can
|
|
511
|
+
relaunch while eligible work remains when the user has configured that
|
|
512
|
+
behavior, and records the agent's reported result.
|
|
513
|
+
|
|
514
|
+
Generated worktrees can declare setup-only dependency links through
|
|
515
|
+
`automation.setup.dependencyLinks`. Each link copies no package data and runs
|
|
516
|
+
no installer; it only links an existing reviewed path from the active component
|
|
517
|
+
source root into the generated worktree and records the target in the worktree
|
|
518
|
+
Git exclude file. Required links are checked during read-only status so unsafe
|
|
519
|
+
or missing dependencies block before worktree creation.
|
|
520
|
+
|
|
521
|
+
Enabled plugins can contribute the same setup behavior through
|
|
522
|
+
`dependency_projection` capabilities. DevNexus lowers those plugin records into
|
|
523
|
+
worker setup, applies component and agent targeting, links existing dependency
|
|
524
|
+
paths without running installers, and records projection status in both the
|
|
525
|
+
setup result and generated worker context. `sourceControl: "support"` excludes
|
|
526
|
+
the projected target from the worker checkout's Git state; `"source"` leaves it
|
|
527
|
+
visible when a project intentionally wants the target committed.
|
|
528
|
+
|
|
529
|
+
Dependency-link setup also treats the component worktrees root as a safety
|
|
530
|
+
boundary when provided: the target worktree path must remain inside that root
|
|
531
|
+
before any link is created. This keeps shared dependencies scoped to the
|
|
532
|
+
component worktree that the coordinator selected.
|
|
533
|
+
|
|
534
|
+
Generated component worktrees also receive a DevNexus-owned worker context
|
|
535
|
+
bundle under `.dev-nexus/context/`. The bundle contains machine-readable
|
|
536
|
+
`context.json` ownership and project metadata plus an agent-readable
|
|
537
|
+
`briefing.md`. DevNexus generates these bundle files for the worker checkout
|
|
538
|
+
instead of copying root `AGENTS.md`, `PLAN.md`, or automation target-state
|
|
539
|
+
files into the component source tree. The generated context directory is
|
|
540
|
+
excluded from Git along with any setup-only dependency links.
|
|
541
|
+
|
|
542
|
+
Enabled plugin worker fragments are projected into the same support files
|
|
543
|
+
without DevNexus depending on plugin-specific terms. Context fragments appear
|
|
544
|
+
under `pluginFragments.context` in `context.json`. Briefing fragments appear
|
|
545
|
+
under `pluginFragments.briefing` and are rendered into `briefing.md` with their
|
|
546
|
+
source and provenance. These fragments are advisory setup/context only: they do
|
|
547
|
+
not select work, launch subagents, or supervise implementation.
|
|
548
|
+
|
|
549
|
+
The context bundle does not move command roots. Source edits, verification
|
|
550
|
+
commands, and Git commands still run from the component checkout root. DevNexus
|
|
551
|
+
project commands continue to use the configured project root when they need
|
|
552
|
+
project-owned state such as automation ledgers or target records.
|
|
553
|
+
|
|
554
|
+
The package also ships a generic `dev-nexus` CLI for the same boundary:
|
|
555
|
+
|
|
556
|
+
```bash
|
|
557
|
+
dev-nexus automation eligible-work <project-root> --json
|
|
558
|
+
dev-nexus automation agent-profiles <project-root> --json
|
|
559
|
+
dev-nexus automation target-report <project-root> --json
|
|
560
|
+
dev-nexus work-item update <project-root> local-1 --component core --status in_progress
|
|
561
|
+
dev-nexus work-item comment <project-root> local-1 --component core --body "Started focused verification."
|
|
562
|
+
dev-nexus automation target-cycle record <project-root> --status completed --work-item core:local-1 --eligible-work-items 0
|
|
563
|
+
dev-nexus automation target-cycle record <project-root> --status dispatched --work-item core:local-1 --work-item-status dispatched --work-item-agent-profile codex-local --work-item-note "Subagent launched."
|
|
564
|
+
dev-nexus work-item create <project-root> --title "Implement task" --status ready --label automation
|
|
565
|
+
dev-nexus work-item list <project-root> --status ready
|
|
566
|
+
dev-nexus work-item get <project-root> local-1
|
|
567
|
+
dev-nexus work-item update <project-root> local-1 --status in_progress
|
|
568
|
+
dev-nexus work-item comment <project-root> local-1 --body "Started focused verification."
|
|
569
|
+
dev-nexus automation status <project-root>
|
|
570
|
+
dev-nexus automation enqueue <project-root> --title "Implement task"
|
|
571
|
+
dev-nexus automation target-cycle record <project-root> --status dispatched --work-item primary:local-1
|
|
572
|
+
dev-nexus automation target-cycle list <project-root>
|
|
573
|
+
dev-nexus automation target-report <project-root> --json
|
|
574
|
+
dev-nexus automation run-once <project-root> --command "codex exec <prompt-or-script>"
|
|
575
|
+
dev-nexus automation schedule <project-root> --command "codex exec <prompt-or-script>" --max-runs 1
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
For `automation target-cycle record`, `--work-item-status`,
|
|
579
|
+
`--work-item-agent-profile`, and `--work-item-note` apply to the most recent
|
|
580
|
+
`--work-item` argument. They record what the coordinator reports; DevNexus does
|
|
581
|
+
not assign profiles, launch implementation subagents, or supervise their work.
|
|
582
|
+
|
|
583
|
+
For a low-token coordinator cycle, start with `automation eligible-work --json`
|
|
584
|
+
and `automation agent-profiles --json`, then use component-scoped `work-item`
|
|
585
|
+
and `target-cycle` commands to record the work the coordinator chose. The
|
|
586
|
+
full `automation status --json` remains available when the agent needs the
|
|
587
|
+
complete target context. `automation agent-profiles --json` includes enabled
|
|
588
|
+
`pluginCapabilities`, so coordinators can see generic plugin-provided skills,
|
|
589
|
+
MCP tools, setup obligations, dependency projections, environment hints,
|
|
590
|
+
cleanup hooks, and affordances without reading the full project config.
|
|
591
|
+
|
|
592
|
+
Projects can also store the shell command under `automation.agent.command` for
|
|
593
|
+
agent-launch mode or `automation.executor.command` for the older generated
|
|
594
|
+
worktree executor mode. For agent-launch mode, projects may instead set
|
|
595
|
+
`automation.agent.coordinatorProfileId` to a profile with `command` and
|
|
596
|
+
`args`. `automation run-once` and `automation schedule` may omit `--command`
|
|
597
|
+
when the relevant command source is configured. Command-line options still
|
|
598
|
+
override the configured command and timeout.
|
|
599
|
+
|
|
600
|
+
Profile selection is infrastructure policy, not work supervision. A
|
|
601
|
+
coordinator may use `automation.agent.profiles` and
|
|
602
|
+
`automation.agent.maxConcurrentSubagents` to decide how many subagents to run
|
|
603
|
+
and which executor/model/safety profile each one should receive, but DevNexus
|
|
604
|
+
does not select the work item batch or supervise subagent execution.
|
|
605
|
+
|
|
606
|
+
Manual `work-item` commands accept `--component <component-id>` for
|
|
607
|
+
component-owned work-item services. Omitting it targets the primary component
|
|
608
|
+
for compatibility. Agent-launch automation reads eligible work across all
|
|
609
|
+
configured component services.
|
|
610
|
+
|
|
611
|
+
`automation status` is read-only. It reports whether automation is disabled,
|
|
612
|
+
locked, in retry backoff, blocked by preflight, idle, or ready to launch an
|
|
613
|
+
agent under the user-configured launch policy before any worktree or tracker
|
|
614
|
+
mutation happens.
|
|
615
|
+
|
|
616
|
+
`automation enqueue` creates a work item that matches the configured automation
|
|
617
|
+
launch filter. It derives the default status, labels, and assignees from
|
|
618
|
+
`automation.selector`, lets callers add extra labels or assignees, and refuses
|
|
619
|
+
inputs that would be invisible to the configured agent-launch loop.
|
|
620
|
+
|
|
621
|
+
`automation run-once` runs the configured command with `DEV_NEXUS_*`
|
|
622
|
+
environment variables for project context and writes the retained run ledger.
|
|
623
|
+
In agent-launch mode, no work item is selected and no generated worktree is
|
|
624
|
+
prepared by DevNexus; the target command launches an agent with enough context
|
|
625
|
+
to make its own work-selection and supervision decisions.
|
|
626
|
+
|
|
627
|
+
`automation schedule` repeatedly checks the same read-only status boundary and
|
|
628
|
+
dispatches `automation run-once` only when the project is ready. It honors
|
|
629
|
+
project `automation.schedule.intervalMs`, waits until active locks or retry
|
|
630
|
+
backoff expire, and supports `--max-ticks` or `--max-runs` for bounded local
|
|
631
|
+
smokes and supervised runners.
|
|
632
|
+
|
|
633
|
+
## Curated Skills
|
|
634
|
+
|
|
635
|
+
DevNexus keeps reviewed skill definitions under its managed project support
|
|
636
|
+
directory, `.dev-nexus/skills`, as DevNexus-owned state. That directory is not
|
|
637
|
+
the agent-facing install location. Projects can also configure
|
|
638
|
+
`skills.agentTargets` so DevNexus projects selected skills into agent-native
|
|
639
|
+
directories:
|
|
640
|
+
|
|
641
|
+
- `codex` -> `.agents/skills/<skill-id>/SKILL.md`
|
|
642
|
+
- `claude` -> `.claude/skills/<skill-id>/SKILL.md`
|
|
643
|
+
|
|
644
|
+
This keeps DevNexus responsible for curated, pinned skill material while the
|
|
645
|
+
configured agents load skills from the locations they actually understand.
|
|
646
|
+
|
|
647
|
+
Prepared component worktrees receive their own generated agent-native skill
|
|
648
|
+
projection when `skills.agentTargets` is configured. DevNexus refreshes those
|
|
649
|
+
worker-local paths, such as `.agents/skills/`, from the project-managed
|
|
650
|
+
`.dev-nexus/skills` source and excludes them from the component worktree Git
|
|
651
|
+
index by default.
|
|
652
|
+
The default core pack includes:
|
|
653
|
+
|
|
654
|
+
- `diagnose`
|
|
655
|
+
- `tdd` for Test-Driven Development (TDD)
|
|
656
|
+
- `handoff`
|
|
657
|
+
- `triage`
|
|
658
|
+
- `architecture-review`
|
|
659
|
+
- `setup-agent-skills`
|
|
660
|
+
- `grill-with-docs`
|
|
661
|
+
- `to-issues`
|
|
662
|
+
- `to-prd` for Product Requirements Document (PRD) synthesis
|
|
663
|
+
- `prototype`
|
|
664
|
+
- `zoom-out`
|
|
665
|
+
- `architecture-deepening`
|
|
666
|
+
|
|
667
|
+
Curated skills must use explicit terminology. Acronyms such as Product
|
|
668
|
+
Requirements Document (PRD), Architecture Decision Record (ADR),
|
|
669
|
+
human-in-the-loop (HITL), and autonomous agent-ready (AFK) must be expanded
|
|
670
|
+
where they appear so generated guidance is understandable without external
|
|
671
|
+
context.
|
|
672
|
+
|
|
673
|
+
For DevNexus dogfooding, `to-issues` is the intended bridge from a target plan
|
|
674
|
+
to tracker-backed execution. A human or launched agent can use the skill to
|
|
675
|
+
split the current target plan into component-owned issues, mark which issues
|
|
676
|
+
are autonomous agent-ready (AFK), and then let DevNexus relaunch agents while
|
|
677
|
+
eligible work remains under the configured target and subagent caps.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface BrowserOpenResult {
|
|
2
|
+
url: string;
|
|
3
|
+
opened: boolean;
|
|
4
|
+
command?: string;
|
|
5
|
+
args?: string[];
|
|
6
|
+
error?: string;
|
|
7
|
+
}
|
|
8
|
+
export type BrowserOpener = (url: string) => Promise<BrowserOpenResult>;
|
|
9
|
+
export declare function openBrowser(url: string): Promise<BrowserOpenResult>;
|