ultra-builder-pro-cli 0.9.0 → 0.11.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/CHANGELOG.md +92 -1
- package/README.md +11 -6
- package/adapters/_shared/codex-assets.cjs +23 -331
- package/adapters/_shared/handbook.cjs +2 -0
- package/adapters/_shared/runtime-assets.cjs +25 -0
- package/adapters/_shared/tests/handbook.test.cjs +3 -0
- package/adapters/_shared/tests/runtime-assets.test.cjs +12 -4
- package/adapters/claude.js +28 -5
- package/adapters/kimi.js +15 -138
- package/adapters/opencode.js +59 -63
- package/adapters/tests/claude.test.cjs +26 -9
- package/adapters/tests/codex.test.cjs +23 -9
- package/adapters/tests/kimi.test.cjs +15 -11
- package/adapters/tests/opencode.test.cjs +57 -10
- package/agents/code-reviewer.md +24 -85
- package/agents/debugger.md +30 -132
- package/agents/review-code.md +24 -104
- package/agents/review-comments.md +20 -83
- package/agents/review-coordinator.md +40 -137
- package/agents/review-design.md +21 -118
- package/agents/review-errors.md +22 -70
- package/agents/review-spec.md +36 -0
- package/agents/review-tests.md +20 -76
- package/agents/tdd-runner.md +26 -84
- package/commands/learn.md +5 -36
- package/commands/ultra-change.md +5 -43
- package/commands/ultra-deliver.md +4 -46
- package/commands/ultra-dev.md +4 -48
- package/commands/ultra-doctor.md +4 -30
- package/commands/ultra-init.md +5 -47
- package/commands/ultra-plan.md +5 -48
- package/commands/ultra-research.md +5 -54
- package/commands/ultra-status.md +5 -44
- package/commands/ultra-test.md +5 -45
- package/commands/ultra-think.md +5 -40
- package/docs/AGENT-CONTEXT.md +34 -12
- package/docs/ARCHITECTURE.md +31 -5
- package/docs/PLAN.zh-CN.md +3 -2
- package/docs/ROADMAP.md +5 -4
- package/docs/RUNTIME-COMPAT-MATRIX.md +7 -5
- package/docs/SKILL-AUTHORING.md +75 -0
- package/docs/USER-HANDBOOK-CONTRACT.md +9 -2
- package/hooks/README.md +6 -4
- package/hooks/active_task_context.py +14 -0
- package/hooks/context_spine.py +218 -0
- package/hooks/health_check.py +1 -1
- package/hooks/workflow_context.py +16 -123
- package/hooks/workflow_resume.py +21 -0
- package/mcp-server/lib/change-workflow.cjs +89 -11
- package/mcp-server/lib/change-workflow.test.cjs +202 -7
- package/mcp-server/lib/context-spine.cjs +331 -0
- package/mcp-server/lib/context-spine.test.cjs +73 -0
- package/mcp-server/lib/spec-learning.cjs +191 -0
- package/mcp-server/lib/spec-learning.test.cjs +62 -0
- package/mcp-server/lib/state-db.cjs +72 -10
- package/mcp-server/lib/state-db.test.cjs +7 -2
- package/mcp-server/server.cjs +31 -1
- package/mcp-server/tests/db-ops.test.cjs +3 -3
- package/mcp-server/tests/server-contract.test.cjs +74 -0
- package/mcp-server/tests/state-db.test.cjs +20 -3
- package/package.json +3 -2
- package/skills/cc-collab/SKILL.md +16 -18
- package/skills/code-review-expert/SKILL.md +39 -114
- package/skills/code-review-expert/references/correctness-reliability.md +30 -0
- package/skills/code-review-expert/references/design-boundaries.md +26 -0
- package/skills/code-review-expert/references/removal-plan.md +17 -45
- package/skills/codex-collab/SKILL.md +23 -28
- package/skills/codex-collab/evals/evals.json +18 -23
- package/skills/integration-rules/SKILL.md +28 -67
- package/skills/learn/SKILL.md +46 -105
- package/skills/security-rules/SKILL.md +34 -56
- package/skills/testing-rules/SKILL.md +28 -52
- package/skills/ultra-change/SKILL.md +61 -145
- package/skills/ultra-deliver/SKILL.md +63 -229
- package/skills/ultra-dev/SKILL.md +46 -338
- package/skills/ultra-doctor/SKILL.md +39 -71
- package/skills/ultra-init/SKILL.md +59 -139
- package/skills/ultra-plan/SKILL.md +50 -310
- package/skills/ultra-research/SKILL.md +59 -152
- package/skills/ultra-research/references/architecture.md +38 -0
- package/skills/ultra-research/references/problem-product.md +39 -0
- package/skills/ultra-research/references/quality-delivery.md +34 -0
- package/skills/ultra-research/references/synthesis.md +38 -0
- package/skills/ultra-research/references/users-scope.md +40 -0
- package/skills/ultra-review/SKILL.md +55 -427
- package/skills/ultra-review/references/unified-schema.md +76 -101
- package/skills/ultra-review/scripts/review_wait.py +242 -77
- package/skills/ultra-status/SKILL.md +38 -173
- package/skills/ultra-test/SKILL.md +41 -195
- package/skills/ultra-think/SKILL.md +43 -101
- package/skills/ultra-verify/SKILL.md +44 -84
- package/skills/ultra-verify/evals/evals.json +24 -27
- package/spec/cli-protocol.md +3 -0
- package/spec/mcp-tools.yaml +133 -4
- package/spec/schemas/command-manifest.schema.json +7 -25
- package/spec/schemas/skill-manifest.schema.json +9 -79
- package/spec/schemas/state-db.sql +31 -0
- package/skills/code-review-expert/references/code-quality-checklist.md +0 -112
- package/skills/code-review-expert/references/integration-checklist.md +0 -46
- package/skills/code-review-expert/references/security-checklist.md +0 -100
- package/skills/code-review-expert/references/solid-checklist.md +0 -65
- package/skills/ultra-research/steps/step-00-problem-validation.md +0 -154
- package/skills/ultra-research/steps/step-01-opportunity-discovery.md +0 -172
- package/skills/ultra-research/steps/step-02-market-assessment.md +0 -195
- package/skills/ultra-research/steps/step-03-competitive-landscape.md +0 -197
- package/skills/ultra-research/steps/step-04-product-strategy.md +0 -196
- package/skills/ultra-research/steps/step-05-assumptions-validation.md +0 -234
- package/skills/ultra-research/steps/step-10-user-personas.md +0 -169
- package/skills/ultra-research/steps/step-11-user-scenarios.md +0 -181
- package/skills/ultra-research/steps/step-20-user-stories.md +0 -156
- package/skills/ultra-research/steps/step-21-features-scope.md +0 -157
- package/skills/ultra-research/steps/step-22-success-metrics.md +0 -195
- package/skills/ultra-research/steps/step-30-architecture-context.md +0 -154
- package/skills/ultra-research/steps/step-31-solution-strategy.md +0 -172
- package/skills/ultra-research/steps/step-32-building-blocks.md +0 -188
- package/skills/ultra-research/steps/step-40-deployment.md +0 -123
- package/skills/ultra-research/steps/step-41-quality-risks.md +0 -135
- package/skills/ultra-research/steps/step-99-synthesis.md +0 -188
- package/skills/ultra-review/scripts/review_verdict_update.py +0 -99
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,95 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.11.0] — 2026-07-18
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Added a portable Skill authoring contract aligned with OpenAI Skills guidance
|
|
15
|
+
and the Agent Skills progressive-disclosure model, plus regression coverage for
|
|
16
|
+
source prompts, commands, agents, generated runtimes, and package contents.
|
|
17
|
+
- Added an independent `review-spec` worker and the `ultra-review-findings-v2` /
|
|
18
|
+
`ultra-review-summary-v2` evidence contracts so specification fidelity and
|
|
19
|
+
engineering standards remain separate release-gate axes.
|
|
20
|
+
- Added focused research and code-review references that are loaded only when the
|
|
21
|
+
active workflow needs them.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- Rewrote the nineteen packaged source Skills as concise, English, host-neutral
|
|
26
|
+
procedures with portable `name` and `description` frontmatter. Runtime metadata,
|
|
27
|
+
invocation policy, and MCP dependencies now belong to host adapters.
|
|
28
|
+
- Reduced all eleven command documents to thin workflow launchers and rewrote the
|
|
29
|
+
bundled workers as bounded, evidence-based roles without arbitrary confidence,
|
|
30
|
+
coverage, severity, or option-count thresholds.
|
|
31
|
+
- Simplified Claude Code, Codex, OpenCode, and Kimi Code adaptation by removing
|
|
32
|
+
stale prompt rewriting branches while preserving each host's native invocation,
|
|
33
|
+
MCP, hook, and agent contracts.
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Made the review waiter validate exact named v2 artifacts, reject partial or stale
|
|
38
|
+
schemas, derive severity counts from evidence, and fail inconsistent two-axis
|
|
39
|
+
summaries closed.
|
|
40
|
+
- Isolated read-only collaboration commands from user configuration and repository
|
|
41
|
+
rules, and passed the review schema by an explicit absolute path instead of
|
|
42
|
+
guessing an installed plugin root.
|
|
43
|
+
- Prevented Python caches and retired prompt/runtime artifacts from entering the npm
|
|
44
|
+
tarball.
|
|
45
|
+
|
|
46
|
+
### Removed
|
|
47
|
+
|
|
48
|
+
- Removed the duplicate `ai-collab-base` prompt framework, the seventeen-step
|
|
49
|
+
research prompt tree, redundant review checklists, learned-Skill placeholder, and
|
|
50
|
+
obsolete v1 verdict updater.
|
|
51
|
+
|
|
52
|
+
## [0.10.0] — 2026-07-18
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
|
|
56
|
+
- Added Context Manifest v2 and a DB-derived Context Spine across planning,
|
|
57
|
+
implementation, checking, review, convergence, and recovery. Context snapshots
|
|
58
|
+
now carry role, gate, readiness blockers, bounded references and digests,
|
|
59
|
+
fresh-context budgets, a public seam, an exact verification command, and one
|
|
60
|
+
deterministic next action.
|
|
61
|
+
- Added `change.breadcrumb`, `change.learning_propose`, and
|
|
62
|
+
`change.learning_resolve`, advancing the live MCP contract to 32 tools and
|
|
63
|
+
`.ultra/state.db` to schema 10.0 with 16 tables.
|
|
64
|
+
- Added approval-gated specification-learning candidates. Proposed or approved
|
|
65
|
+
discoveries block convergence until rejected or applied to a declared baseline
|
|
66
|
+
target, and `change.get` exposes their authoritative state.
|
|
67
|
+
- Added independent `spec_fidelity` and `engineering_standards` review evidence,
|
|
68
|
+
plus public-seam and exact red/green signal fields for convergence.
|
|
69
|
+
|
|
70
|
+
### Changed
|
|
71
|
+
|
|
72
|
+
- Rebuilt the daily harness around one status router, one highest-value alignment
|
|
73
|
+
question, fresh-context tracer bullets, explicit expand contracts, independent
|
|
74
|
+
check/review contexts, and convergence before release.
|
|
75
|
+
- Reduced the seven core execution workflow prompts from 1,922 to 758 lines and
|
|
76
|
+
added a 220-line ceiling for every public Ultra skill so host prompts cannot
|
|
77
|
+
silently accumulate duplicated procedure. All twelve public workflows are now
|
|
78
|
+
explicitly user-invocable; four rule skills remain agent-only.
|
|
79
|
+
- Session-start, pre-edit, and recovery hooks now share one read-only
|
|
80
|
+
`context_spine.py` helper and inject only the compact DB breadcrumb. Intent,
|
|
81
|
+
transcript, memory-provider, and graph-provider payloads never enter hook context.
|
|
82
|
+
- OpenCode now consumes the DB-generated Context Manifest v2 projection, strips
|
|
83
|
+
provider/intent content, and fails context readiness when its compiled HEAD
|
|
84
|
+
differs from the current repository.
|
|
85
|
+
- Updated Claude Code, Codex, OpenCode, and Kimi Code native renderings, managed
|
|
86
|
+
handbook blocks, MCP mapping, architecture, and compatibility documentation.
|
|
87
|
+
|
|
88
|
+
### Fixed
|
|
89
|
+
|
|
90
|
+
- Prevented plan-role task context from becoming ready without an execution
|
|
91
|
+
contract, public seam, and verification command.
|
|
92
|
+
- Prevented breadcrumbs from reusing a snapshot after task state or git HEAD
|
|
93
|
+
changed, and made an explicitly missing change id fail closed.
|
|
94
|
+
- Added auditable 9.1 → 10.0 migration history while preserving existing runtime
|
|
95
|
+
rows, references, projections, and foreign-key integrity.
|
|
96
|
+
- Corrected hook conformance to package `context_spine.py` as an imported helper
|
|
97
|
+
without registering it as a duplicate lifecycle hook.
|
|
98
|
+
|
|
10
99
|
## [0.9.0] — 2026-07-17
|
|
11
100
|
|
|
12
101
|
### Added
|
|
@@ -362,7 +451,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
362
451
|
skill manifest, CLI protocol + mapping table; 5 spec validators.
|
|
363
452
|
- **Phase 0 — skeleton**: multi-runtime installer scaffolding.
|
|
364
453
|
|
|
365
|
-
[Unreleased]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.
|
|
454
|
+
[Unreleased]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.11.0...HEAD
|
|
455
|
+
[0.11.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.10.0...v0.11.0
|
|
456
|
+
[0.10.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.9.0...v0.10.0
|
|
366
457
|
[0.9.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.8.1...v0.9.0
|
|
367
458
|
[0.8.1]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.8.0...v0.8.1
|
|
368
459
|
[0.8.0]: https://github.com/rocky2431/ultra-builder-pro-cli/compare/v0.7.0...v0.8.0
|
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ authoritative `.ultra/state.db`.
|
|
|
8
8
|
|
|
9
9
|
<div align="center">
|
|
10
10
|
|
|
11
|
-
[](./CHANGELOG.md)
|
|
12
12
|
[](#verification)
|
|
13
13
|
[](./LICENSE)
|
|
14
14
|
[](./package.json)
|
|
@@ -36,8 +36,10 @@ authoritative `.ultra/state.db`.
|
|
|
36
36
|
- **Runs real PRDs end-to-end.** `task.parse_prd` → `lib/topo.cjs` waves →
|
|
37
37
|
`.ultra/execution-plan.json` → parallel worktree sessions → auto-merge back.
|
|
38
38
|
- **Keeps daily work convergent.** `/ultra-change` creates a bounded delta and
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
Context Manifest v2; the Context Spine assigns a role/gate, verifies required
|
|
40
|
+
references and fresh-context budget, exposes one DB-derived breadcrumb, and
|
|
41
|
+
routes a single next action. `/ultra-deliver` requires applied specification
|
|
42
|
+
learning plus docs/test/two-axis review evidence before archive. `/ultra-doctor` reports incidents,
|
|
41
43
|
projection lag, orphan sessions, and backup-first mechanical recovery.
|
|
42
44
|
Incident changes additionally require a five-section `diagnosis.md` covering
|
|
43
45
|
reproduction, hypotheses, root cause, regression test, and recovery.
|
|
@@ -91,7 +93,7 @@ for per-runtime capabilities.
|
|
|
91
93
|
The layers share one `.ultra/state.db`, but the CLI is not a mirror of every MCP
|
|
92
94
|
tool: continuous change mutations are MCP-only and fail closed. See
|
|
93
95
|
[`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md) for the full contract and
|
|
94
|
-
[`spec/cli-protocol.md`](./spec/cli-protocol.md) for the
|
|
96
|
+
[`spec/cli-protocol.md`](./spec/cli-protocol.md) for the 32 live contracts.
|
|
95
97
|
Review, impact discovery, skill resolution, and user interaction stay on each
|
|
96
98
|
Host's native surfaces; the generated Codex capability map documents those
|
|
97
99
|
replacements without advertising non-existent MCP tools.
|
|
@@ -137,8 +139,11 @@ ultra-tools system doctor
|
|
|
137
139
|
|
|
138
140
|
Or let the skills drive it. In Codex, invoke
|
|
139
141
|
`$ultra-builder-pro:ultra-plan` → `$ultra-builder-pro:ultra-dev` →
|
|
140
|
-
`$ultra-builder-pro:ultra-
|
|
141
|
-
|
|
142
|
+
`$ultra-builder-pro:ultra-test` → `$ultra-builder-pro:ultra-review` →
|
|
143
|
+
`$ultra-builder-pro:ultra-deliver`; after the baseline is delivered, daily work
|
|
144
|
+
starts with `$ultra-builder-pro:ultra-change`, while
|
|
145
|
+
`$ultra-builder-pro:ultra-status` reads the compact authoritative breadcrumb.
|
|
146
|
+
Kimi uses the corresponding
|
|
142
147
|
`/ultra-builder-pro:ultra-*` namespace. Other runtimes retain their native
|
|
143
148
|
command form.
|
|
144
149
|
|
|
@@ -8,8 +8,8 @@ const { spawnSync } = require('node:child_process');
|
|
|
8
8
|
const yaml = require('js-yaml');
|
|
9
9
|
const {
|
|
10
10
|
CORE_PUBLIC_SKILLS,
|
|
11
|
-
INTERNAL_AGENT_SKILLS,
|
|
12
11
|
WORKFLOW_HOOK_FILES,
|
|
12
|
+
skillPolicy,
|
|
13
13
|
skillsForRuntime,
|
|
14
14
|
} = require('./runtime-assets.cjs');
|
|
15
15
|
|
|
@@ -69,7 +69,6 @@ const SKILL_REFERENCE_NAMES = Object.freeze([
|
|
|
69
69
|
'ultra-review',
|
|
70
70
|
'ultra-verify',
|
|
71
71
|
]);
|
|
72
|
-
const INTERNAL_SKILLS = new Set(INTERNAL_AGENT_SKILLS);
|
|
73
72
|
const CODEX_PRIMARY_SKILLS = new Set([...COMMAND_NAMES, 'ultra-review']);
|
|
74
73
|
const TEXT_EXTENSIONS = new Set(['.md', '.json', '.py', '.sh', '.txt', '.yaml', '.yml']);
|
|
75
74
|
|
|
@@ -202,11 +201,7 @@ Model agreement never overrides failing tests or authoritative runtime evidence.
|
|
|
202
201
|
Read the bundled references for mode-specific evidence and confidence guidance.
|
|
203
202
|
*/ }).match(/\/\*([\s\S]*?)\*\//)[1].trim();
|
|
204
203
|
function titleCase(name) {
|
|
205
|
-
const special = {
|
|
206
|
-
'ai-collab-base': 'AI Collaboration Base',
|
|
207
|
-
'cc-collab': 'Claude Code Collaboration',
|
|
208
|
-
'use-railway': 'Use Railway',
|
|
209
|
-
};
|
|
204
|
+
const special = { 'cc-collab': 'Claude Code Collaboration' };
|
|
210
205
|
if (special[name]) return special[name];
|
|
211
206
|
return name.split('-').map((part) => part ? part[0].toUpperCase() + part.slice(1) : part).join(' ');
|
|
212
207
|
}
|
|
@@ -221,266 +216,11 @@ function replaceSlashCommand(text, command, replacement) {
|
|
|
221
216
|
|
|
222
217
|
function adaptCodexPrimaryText(input, skillName) {
|
|
223
218
|
let text = String(input);
|
|
224
|
-
|
|
225
|
-
text = text.replaceAll('claude_md_rule', 'agents_md_rule');
|
|
226
|
-
text = text.replaceAll('claude-opus-4-6', '<codex-model>');
|
|
227
|
-
text = text.replaceAll('Claude', 'Codex');
|
|
228
|
-
text = text.replaceAll('TaskCreate/TaskUpdate', 'the Codex plan tool');
|
|
229
|
-
text = text.replaceAll('TaskCreate', 'the Codex plan tool');
|
|
230
|
-
text = text.replaceAll('TaskUpdate', 'the Codex plan tool');
|
|
231
|
-
text = text.replaceAll('TaskList', 'the current Codex plan');
|
|
232
|
-
text = text.replaceAll('TaskOutput', 'verbose subagent transcript output');
|
|
233
|
-
text = text.replaceAll('run_in_background: true', 'native parallel execution');
|
|
234
|
-
text = text.replaceAll('Bash tool', '`exec_command`');
|
|
235
|
-
text = text.replaceAll('Bash calls', '`exec_command` calls');
|
|
236
|
-
text = text.replaceAll('Read tool', 'targeted file reads');
|
|
237
|
-
text = text.replaceAll('Write tool', '`apply_patch`');
|
|
238
|
-
text = text.replaceAll('`ask.question`', 'a direct user question');
|
|
239
|
-
text = text.replaceAll('ask.question', 'ask the user directly');
|
|
240
|
-
text = text.replaceAll('Playwright via Bash', 'Playwright through `exec_command`');
|
|
241
|
-
text = text.replaceAll('mcp__context7__query-docs', 'official documentation lookup');
|
|
242
|
-
text = text.replaceAll('mcp__exa__web_search_exa', 'verified web search');
|
|
243
|
-
text = text.replaceAll('Context7 MCP', 'official primary documentation');
|
|
244
|
-
text = text.replaceAll('Context7/Exa', 'official primary documentation and verified web search');
|
|
245
|
-
text = text.replaceAll('Context7', 'official primary documentation');
|
|
246
|
-
text = text.replaceAll('Exa MCP', 'verified web search');
|
|
247
|
-
text = text.replaceAll('a direct user question (or runtime `ask the user directly`)', 'ask the user directly');
|
|
248
|
-
text = text.replaceAll('a direct user question (fallback: `ask the user directly` / CLI menu)', 'ask the user directly');
|
|
249
|
-
text = text.replaceAll('questions via ask the user directly.', 'questions directly to the user.');
|
|
250
|
-
text = text.replaceAll('using `the Codex plan tool`', 'with the Codex plan tool');
|
|
251
|
-
text = text.replaceAll("via the runtime's native the Codex plan tool", 'with the Codex plan tool when available');
|
|
252
|
-
text = text.replaceAll('`the Codex plan tool` → `status: "in_progress"`', 'Mark the current Codex plan item `in_progress`');
|
|
253
|
-
text = text.replaceAll('`the Codex plan tool` → `status: "completed"`', 'Mark the current Codex plan item `completed`');
|
|
254
|
-
text = text.replaceAll('`the current Codex plan` → resume from last incomplete step', 'Resume from the first incomplete item in the current Codex plan');
|
|
255
|
-
text = text.replaceAll('`the Codex plan tool`', 'the Codex plan tool');
|
|
256
|
-
|
|
257
|
-
if (skillName === 'ultra-init') {
|
|
258
|
-
text = text.replace(
|
|
259
|
-
/MCP 不可达时回退[^。]*。/,
|
|
260
|
-
'MCP 不可达时只使用插件内置的可验证 CLI 初始化路径;不得手写投影文件。',
|
|
261
|
-
);
|
|
262
|
-
text = text.replace(
|
|
263
|
-
/- \*\*无 Codex 独占依赖\*\*[::][\s\S]*?(?=\n- \*\*模板内置)/,
|
|
264
|
-
'- **Codex-native boundary**: use the bundled `task.init_project` MCP tool; the plugin-local CLI below is only the verified initialization fallback.',
|
|
265
|
-
);
|
|
266
|
-
text = text.replace(
|
|
267
|
-
/在调 `task\.init_project` 之前,调用方(Codex \/ CLI \/ SDK)需要先判断:/,
|
|
268
|
-
'在调 `task.init_project` 之前,Codex 需要先判断:',
|
|
269
|
-
);
|
|
270
|
-
text = text.replace(
|
|
271
|
-
/- 如果调用方是 Codex,可在此用 the Codex plan tool 跟踪 Step 0–4 的 session 内进度\n (这是 runtime 的 session-local 跟踪,不走 MCP)/,
|
|
272
|
-
'- 多步初始化可用 Codex plan 跟踪;持久项目状态仍只通过 Ultra MCP 写入。',
|
|
273
|
-
);
|
|
274
|
-
text = text.replace(
|
|
275
|
-
/交互渠道:[\s\S]*?(?=\n确认 4 个问题:)/,
|
|
276
|
-
'交互渠道:直接向用户提问;不要调用未注册的人机交互 MCP tool。\n',
|
|
277
|
-
);
|
|
278
|
-
text = text.replace(
|
|
279
|
-
/\*\*CLI 回退路径\*\*[\s\S]*?(?=\n\*\*错误处理\*\*)/,
|
|
280
|
-
`**插件内置 CLI 回退路径**(只在 MCP 启动失败时使用):
|
|
281
|
-
|
|
282
|
-
\`\`\`bash
|
|
283
|
-
node ~/plugins/ultra-builder-pro/runtime/ultra-tools.cjs task init-project \\
|
|
284
|
-
--target-dir "$TARGET" \\
|
|
285
|
-
--project-name "$NAME" \\
|
|
286
|
-
--project-type "$TYPE" \\
|
|
287
|
-
--stack "$STACK"
|
|
288
|
-
\`\`\`
|
|
289
|
-
|
|
290
|
-
该 CLI 与 MCP 使用同一模板和校验规则。不得改写 \`.ultra/tasks/tasks.json\` 来模拟成功。
|
|
291
|
-
`,
|
|
292
|
-
);
|
|
293
|
-
text = text.replace(
|
|
294
|
-
/## 调用方式(按 runtime)[\s\S]*?(?=\n## 输出锚点)/,
|
|
295
|
-
'## Codex 调用方式\n\n在 Codex 中显式调用 `$ultra-builder-pro:ultra-init`,并在同一条任务消息中提供项目名、类型、技术栈或 git 约束。\n',
|
|
296
|
-
);
|
|
297
|
-
text = text.replace(
|
|
298
|
-
/- \*\*不\*\*写入 state\.db(state\.db 由第一次 MCP 写操作或显式 `ultra-tools db init` 触发)/,
|
|
299
|
-
'- **不**直接写入 state.db;它由第一次 Ultra MCP 状态写操作初始化。',
|
|
300
|
-
);
|
|
301
|
-
text = text.replaceAll('不再依赖 `~/.codex/.ultra-template/`', '不依赖任何用户目录模板');
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
if (skillName === 'ultra-plan') {
|
|
305
|
-
text = text.replace(
|
|
306
|
-
/Interactive prompt uses[\s\S]*?(?=\n\n\*\*Dual-scale effort)/,
|
|
307
|
-
'Ask the user directly in Codex and record the selected posture.',
|
|
308
|
-
);
|
|
309
|
-
text = text.replace(
|
|
310
|
-
/\*\*CLI fallback\*\* \(per task\):[\s\S]*?(?=\nAfter each `task\.create`)/,
|
|
311
|
-
'**Failure boundary**: if the bundled MCP cannot execute `task.create`, stop and report the MCP error. Do not write state.db or its JSON/Markdown projections directly.\n\n',
|
|
312
|
-
);
|
|
313
|
-
text = text.replace(
|
|
314
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## What this skill DOES NOT do)/,
|
|
315
|
-
`## Codex runtime boundary
|
|
316
|
-
|
|
317
|
-
- Ask scope and approval questions directly in the Codex conversation.
|
|
318
|
-
- Persist tasks only through bundled MCP \`task.create\` or \`task.parse_prd\`.
|
|
319
|
-
- If that MCP is unavailable, stop the state mutation with evidence; the legacy CLI does not
|
|
320
|
-
implement task creation and is not a valid fallback.
|
|
321
|
-
`,
|
|
322
|
-
);
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
if (skillName === 'ultra-dev') {
|
|
326
|
-
text = text.replace(
|
|
327
|
-
/## Design decisions vs pre-Phase-3[\s\S]*?(?=\n## Prerequisites)/,
|
|
328
|
-
`## Codex-native execution boundaries
|
|
329
|
-
|
|
330
|
-
- Status changes use bundled MCP \`task.update\`; projected JSON and frontmatter are read-only.
|
|
331
|
-
- Review uses \`$ultra-builder-pro:ultra-review\` and the installed native Codex custom agents.
|
|
332
|
-
The active MCP server does not expose a server-side review worker.
|
|
333
|
-
- Recovery uses the Codex plan plus \`.ultra/workflow-state.json\`, with the bundled compact hooks.
|
|
334
|
-
The active MCP server does not expose a checkpoint tool, and no manual compact is required.
|
|
335
|
-
`,
|
|
336
|
-
);
|
|
337
|
-
text = text.replaceAll(
|
|
338
|
-
'**CLI fallback**: `ultra-tools task update <id> --status in_progress`.',
|
|
339
|
-
'**Failure boundary**: if `task.update` is unavailable, stop; do not edit state.db or projections directly.',
|
|
340
|
-
);
|
|
341
|
-
text = text.replaceAll(
|
|
342
|
-
'**CLI fallback**: `ultra-tools task update <id> --status completed`.',
|
|
343
|
-
'**Failure boundary**: if `task.update` is unavailable, stop; do not mark the projection completed manually.',
|
|
344
|
-
);
|
|
345
|
-
text = text.replace(
|
|
346
|
-
/\*\*Subagent isolation \(complexity ≥ 7\)\*\*:[\s\S]*?subagent returns summary\./,
|
|
347
|
-
'**Subagent isolation (complexity ≥ 7)**: use a bounded installed Codex custom agent only when the Subagent Policy or this invoked workflow authorizes delegation; the parent retains decisions and verification.',
|
|
348
|
-
);
|
|
349
|
-
text = text.replace(
|
|
350
|
-
/### Step 4\.4 — Pre-Review Checkpoint[\s\S]*?(?=\n### Step 4\.5)/,
|
|
351
|
-
`### Step 4.4 — Pre-Review Checkpoint
|
|
352
|
-
|
|
353
|
-
Atomically write \`.ultra/workflow-state.json\` with \`step=4.5\`,
|
|
354
|
-
\`status=pre_review\`, the task id, branch, and timestamp. Mark the matching Codex plan item
|
|
355
|
-
complete. The PreCompact/PostCompact hooks preserve and restore this checkpoint automatically;
|
|
356
|
-
do not require the user to compact or call a nonexistent checkpoint tool.
|
|
357
|
-
`,
|
|
358
|
-
);
|
|
359
|
-
text = text.replace(
|
|
360
|
-
/### Step 4\.5 — Ultra Review \(MANDATORY\)[\s\S]*?(?=\n\*\*MAX_REVIEW_ITERATIONS)/,
|
|
361
|
-
`### Step 4.5 — Ultra Review (MANDATORY)
|
|
362
|
-
|
|
363
|
-
Invoke \`$ultra-builder-pro:ultra-review all\`. That skill selects and dispatches the installed
|
|
364
|
-
native Codex review agents, waits on their structured files, and owns \`SUMMARY.json\`. Do not call
|
|
365
|
-
an unregistered review MCP tool or shell out to another Codex process as a substitute.
|
|
366
|
-
|
|
367
|
-
`,
|
|
368
|
-
);
|
|
369
|
-
text = text.replace(
|
|
370
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## What this skill DOES NOT do)/,
|
|
371
|
-
`## Codex runtime boundary
|
|
372
|
-
|
|
373
|
-
| Purpose | Authoritative Codex path |
|
|
374
|
-
|---------|--------------------------|
|
|
375
|
-
| Select/read/update task | bundled MCP \`task.list\`, \`task.get\`, \`task.update\` |
|
|
376
|
-
| Pre-review recovery | Codex plan + \`.ultra/workflow-state.json\` + compact hooks |
|
|
377
|
-
| Review | \`$ultra-builder-pro:ultra-review\` + native custom agents |
|
|
378
|
-
| Human decision | ask the user directly |
|
|
379
|
-
|
|
380
|
-
If a required task MCP operation fails, stop and report it; never fall back to direct database or
|
|
381
|
-
projection writes.
|
|
382
|
-
`,
|
|
383
|
-
);
|
|
384
|
-
text = text.replace(
|
|
385
|
-
/- Does NOT assume `review\.run` or `session\.checkpoint` are wired — fallbacks are first-class/,
|
|
386
|
-
'- Does NOT call unregistered review or checkpoint MCP tools.',
|
|
387
|
-
);
|
|
388
|
-
}
|
|
389
|
-
|
|
390
|
-
if (skillName === 'ultra-test') {
|
|
391
|
-
text = text.replace(
|
|
392
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## What this skill DOES NOT do)/,
|
|
393
|
-
`## Codex runtime boundary
|
|
394
|
-
|
|
395
|
-
- Read task completion through bundled MCP \`task.list\`.
|
|
396
|
-
- Ask before risky auto-fixes directly in the Codex conversation.
|
|
397
|
-
- If task state is unavailable, report the missing gate rather than trusting a projection alone.
|
|
398
|
-
`,
|
|
399
|
-
);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
if (skillName === 'ultra-deliver') {
|
|
403
|
-
text = text.replace(
|
|
404
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## What this skill DOES NOT do)/,
|
|
405
|
-
`## Codex runtime boundary
|
|
406
|
-
|
|
407
|
-
Ask the user directly before committing, tagging, pushing, or overriding the version bump. These are
|
|
408
|
-
external repository mutations; never infer approval from a prior read-only or test request.
|
|
409
|
-
`,
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
if (skillName === 'ultra-status') {
|
|
414
|
-
text = text.replace(
|
|
415
|
-
/\*\*CLI fallback\*\*: `ultra-tools task list` \+ `ultra-tools session list`\./,
|
|
416
|
-
'**Failure boundary**: if the bundled task/session MCP tools are unavailable, report those panels as unavailable; do not trust projections as authority.',
|
|
417
|
-
);
|
|
418
|
-
text = text.replace(
|
|
419
|
-
/\*\*Output block\*\*:[\s\S]*?(?=\n## Single-task mode)/,
|
|
420
|
-
`**Output block**: name the concrete next skill and use its namespaced Codex invocation, for
|
|
421
|
-
example \`$ultra-builder-pro:ultra-dev\`. If a fresh context would help, recommend starting a new
|
|
422
|
-
Codex task; do not emit a legacy slash-command placeholder.
|
|
423
|
-
|
|
424
|
-
`,
|
|
425
|
-
);
|
|
426
|
-
text = text.replace(
|
|
427
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## Cost panel)/,
|
|
428
|
-
`## Codex data paths
|
|
429
|
-
|
|
430
|
-
| Purpose | Path |
|
|
431
|
-
|---------|------|
|
|
432
|
-
| List/detail tasks | bundled MCP \`task.list\` / \`task.get\` |
|
|
433
|
-
| Cost panel | \`node ~/plugins/ultra-builder-pro/runtime/ultra-tools.cjs status --cost --json --since 7d\` |
|
|
434
|
-
|
|
435
|
-
Task projections are not an authority fallback. If the MCP is unavailable, label the task panel
|
|
436
|
-
unavailable while still reporting file and git evidence.
|
|
437
|
-
`,
|
|
438
|
-
);
|
|
439
|
-
text = text.replaceAll(
|
|
440
|
-
'`ultra-tools status --cost --json`',
|
|
441
|
-
'`node ~/plugins/ultra-builder-pro/runtime/ultra-tools.cjs status --cost --json`',
|
|
442
|
-
);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
if (skillName === 'ultra-think') {
|
|
446
|
-
text = text.replace(
|
|
447
|
-
/Every factual claim about tech\/API\/best-practices must be verified via:[\s\S]*?(?=\n\nLabel each assertion:)/,
|
|
448
|
-
`Every factual claim about technology, APIs, or current behavior must use the best available
|
|
449
|
-
primary evidence in this order:
|
|
450
|
-
- current repository or installed source;
|
|
451
|
-
- official primary documentation;
|
|
452
|
-
- web search when the fact may have changed or local evidence is insufficient.
|
|
453
|
-
`,
|
|
454
|
-
);
|
|
219
|
+
if (skillName === 'ultra-review') {
|
|
455
220
|
text = text.replaceAll(
|
|
456
|
-
'
|
|
457
|
-
'
|
|
221
|
+
"the current host's native bounded-worker mechanism",
|
|
222
|
+
'native Codex custom agents installed for the selected review workers',
|
|
458
223
|
);
|
|
459
|
-
text = text.replace(
|
|
460
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## What this skill DOES NOT do)/,
|
|
461
|
-
`## Codex interaction boundary
|
|
462
|
-
|
|
463
|
-
Ask clarifying questions directly in the Codex conversation. This reasoning workflow is read-only
|
|
464
|
-
and does not require an interactive MCP or legacy CLI menu.
|
|
465
|
-
`,
|
|
466
|
-
);
|
|
467
|
-
}
|
|
468
|
-
|
|
469
|
-
if (skillName === 'ultra-review') {
|
|
470
|
-
text = text.replaceAll('### Phase 3: Background Execution', '### Phase 3: Parallel Native Agent Execution');
|
|
471
|
-
text = text.replaceAll('**Step 4b: Launch coordinator in background:**', '**Step 4b: Delegate coordination:**');
|
|
472
|
-
text = text.replaceAll('in **background mode** (`native parallel execution`)', 'concurrently with native Codex subagent orchestration');
|
|
473
|
-
text = text.replaceAll('using multiple native Codex subagent orchestration calls in a single message', 'using the installed native Codex custom agents');
|
|
474
|
-
text = text.replaceAll('Set `native parallel execution` on every Task call.', 'Dispatch every selected custom agent concurrently and keep each delegated scope bounded.');
|
|
475
|
-
text = text.replaceAll('NEVER call verbose subagent transcript output for any review agent', 'Do not copy verbose subagent transcripts into the parent context');
|
|
476
|
-
text = text.replaceAll('Call `review_wait.py` IMMEDIATELY — do NOT process idle notifications', 'Use `review_wait.py` as the file-completion gate before synthesis');
|
|
477
|
-
text = text.replaceAll('Ignore all agent idle/completion messages between launch and wait script return', 'Treat completion messages only as lifecycle evidence; findings still come from the JSON files');
|
|
478
|
-
text = text.replaceAll('Launch review-coordinator with `native parallel execution`:', 'After reviewer completion, delegate coordination to the native `review-coordinator` agent:');
|
|
479
|
-
text = text.replaceAll('Use Bash to block until all agents finish writing:', 'Run the waiter through `exec_command` with a short yield; if it returns a live session, poll in bounded intervals:');
|
|
480
|
-
text = text.replaceAll('After launching background agents', 'After dispatching the review agents');
|
|
481
|
-
text = text.replaceAll('The review agents write to files; you read from files.', 'The review agents write findings to files; the parent reads only the structured files and concise lifecycle acknowledgements.');
|
|
482
|
-
text = text.replaceAll('The ONLY information path from agents is: wait script → Read SUMMARY.json', 'The authoritative finding path is: wait script → inspect SUMMARY.json');
|
|
483
|
-
text = text.replaceAll('**Read SUMMARY.json**', '**Inspect SUMMARY.json**');
|
|
484
224
|
}
|
|
485
225
|
|
|
486
226
|
return text;
|
|
@@ -526,15 +266,6 @@ function adaptHostText(input, skillName = '') {
|
|
|
526
266
|
text = text.replaceAll('~/.codex/skills', '~/plugins/ultra-builder-pro/skills');
|
|
527
267
|
text = text.replaceAll('~/.claude/hooks', '~/plugins/ultra-builder-pro/hooks');
|
|
528
268
|
text = text.replaceAll('~/.claude', '~/.codex');
|
|
529
|
-
text = text.replaceAll('AskUserQuestion', 'ask the user directly');
|
|
530
|
-
text = text.replaceAll('Claude runtime', 'Codex runtime');
|
|
531
|
-
text = text.replaceAll('Claude-only', 'Codex-only');
|
|
532
|
-
text = text.replaceAll('Claude Task tool', 'Codex native subagent orchestration');
|
|
533
|
-
text = text.replaceAll('Claude `Task` tool', 'Codex native subagent orchestration');
|
|
534
|
-
text = text.replaceAll('Claude: `Task`', 'Codex: native subagent orchestration');
|
|
535
|
-
text = text.replaceAll('Task tool', 'native Codex subagent orchestration');
|
|
536
|
-
text = text.replaceAll('`Task`/`ultra-tools subagent run`', 'native Codex subagent orchestration / `ultra-tools subagent run`');
|
|
537
|
-
text = text.replaceAll('`Task` →', 'native Codex subagent orchestration →');
|
|
538
269
|
|
|
539
270
|
for (const skill of SKILL_REFERENCE_NAMES) {
|
|
540
271
|
text = replaceSlashCommand(text, skill, `$ultra-builder-pro:${skill}`);
|
|
@@ -545,52 +276,8 @@ function adaptHostText(input, skillName = '') {
|
|
|
545
276
|
text = adaptCodexPrimaryText(text, skillName);
|
|
546
277
|
}
|
|
547
278
|
|
|
548
|
-
if (skillName === 'ai-collab-base') {
|
|
549
|
-
text = text.replaceAll("Claude's", "Codex's");
|
|
550
|
-
text = text.replaceAll('Claude-only', 'Codex-only');
|
|
551
|
-
text = text.replaceAll('Claude ', 'Codex ');
|
|
552
|
-
text = text.replaceAll('Claude\n', 'Codex\n');
|
|
553
|
-
text = text.replaceAll('--approval-mode yolo', '--approval-mode plan');
|
|
554
|
-
text = text.replaceAll('--yolo', '--approval-mode plan');
|
|
555
|
-
text = text.replaceAll('Bash tool', '`exec_command`');
|
|
556
|
-
text = text.replaceAll('Read tool', 'targeted file reads');
|
|
557
|
-
text = text.replaceAll('Write tool', '`apply_patch`');
|
|
558
|
-
}
|
|
559
|
-
|
|
560
279
|
if (skillName === 'learn') {
|
|
561
|
-
text = text.replaceAll(
|
|
562
|
-
'~/plugins/ultra-builder-pro/skills/learned-<name>-unverified/SKILL.md',
|
|
563
|
-
'~/.agents/skills/learned-<name>-unverified/SKILL.md',
|
|
564
|
-
);
|
|
565
|
-
text = text.replaceAll(
|
|
566
|
-
'~/plugins/ultra-builder-pro/skills/learned-<pattern-slug>-unverified/SKILL.md',
|
|
567
|
-
'~/.agents/skills/learned-<pattern-slug>-unverified/SKILL.md',
|
|
568
|
-
);
|
|
569
|
-
text = text.replaceAll(
|
|
570
|
-
'~/plugins/ultra-builder-pro/skills/learned-<slug>-unverified/SKILL.md',
|
|
571
|
-
'~/.agents/skills/learned-<slug>-unverified/SKILL.md',
|
|
572
|
-
);
|
|
573
|
-
text = text.replaceAll(
|
|
574
|
-
'~/plugins/ultra-builder-pro/skills/learned/<name>_unverified.md',
|
|
575
|
-
'~/.agents/skills/learned-<name>-unverified/SKILL.md',
|
|
576
|
-
);
|
|
577
|
-
text = text.replaceAll(
|
|
578
|
-
'~/plugins/ultra-builder-pro/skills/learned/<pattern-slug>_unverified.md',
|
|
579
|
-
'~/.agents/skills/learned-<pattern-slug>-unverified/SKILL.md',
|
|
580
|
-
);
|
|
581
|
-
text = text.replaceAll(
|
|
582
|
-
'~/plugins/ultra-builder-pro/skills/learned/<slug>_unverified.md',
|
|
583
|
-
'~/.agents/skills/learned-<slug>-unverified/SKILL.md',
|
|
584
|
-
);
|
|
585
|
-
text = text.replaceAll('append the `_unverified` suffix to the filename', 'append `-unverified` to the skill directory name');
|
|
586
|
-
text = text.replaceAll('Never overwrite an existing unverified file', 'Never overwrite an existing learned skill directory');
|
|
587
|
-
text = text.replaceAll('remove the `_unverified` suffix', 'rename the directory to remove `-unverified` and update the frontmatter name');
|
|
588
|
-
text = text.replaceAll('(`pattern-slug-2_unverified.md`)', '(`learned-pattern-slug-2-unverified/`)');
|
|
589
|
-
text = text.replaceAll('Anything the user already wrote in AGENTS.md or similar project instructions', 'Anything already captured in AGENTS.md or equivalent project instructions');
|
|
590
|
-
text = text.replace(
|
|
591
|
-
/## MCP → CLI fallback matrix[\s\S]*?(?=\n## What this skill DOES NOT do)/,
|
|
592
|
-
'## Codex approval boundary\n\nAsk the user directly before writing a learned skill. No MCP or legacy CLI interaction layer is required.\n',
|
|
593
|
-
);
|
|
280
|
+
text = text.replaceAll("current host's user skill directory", '`~/.agents/skills`');
|
|
594
281
|
text += `\n\n## Codex packaging requirement\n\nEach learned pattern must be a valid skill directory, not a loose Markdown file. The generated\n\`SKILL.md\` must start with only \`name\` and \`description\` frontmatter. Also create\n\`agents/openai.yaml\` with \`policy.allow_implicit_invocation: false\`. A new Codex task is required\nbefore the learned skill appears in discovery.\n`;
|
|
595
282
|
}
|
|
596
283
|
|
|
@@ -600,9 +287,9 @@ function adaptHostText(input, skillName = '') {
|
|
|
600
287
|
function adaptedDescription(sourceDescription, targetName) {
|
|
601
288
|
const special = {
|
|
602
289
|
'cc-collab': 'Ask Claude Code for an independent read-only analysis while Codex owns verification and synthesis. Use only when the user explicitly requests CC or Claude Code collaboration.',
|
|
603
|
-
'ultra-verify': 'Run Codex-primary
|
|
604
|
-
'ultra-dev': 'Execute one Ultra task with Codex-native
|
|
605
|
-
'learn': 'Extract one reusable
|
|
290
|
+
'ultra-verify': 'Run Codex-primary cross-model verification with a read-only Claude Code advisor. Use only when the user explicitly requests independent model verification.',
|
|
291
|
+
'ultra-dev': 'Execute one authoritative Ultra task with Codex-native implementation, verification, and review. Use when a dependency-ready slice is ready for development.',
|
|
292
|
+
'learn': 'Extract one verified reusable workflow from the current Codex task into a portable user skill. Use when the user explicitly asks to preserve the method.',
|
|
606
293
|
};
|
|
607
294
|
return special[targetName] || adaptHostText(String(sourceDescription || `${titleCase(targetName)} workflow for Codex.`), targetName)
|
|
608
295
|
.replace(/\s+/g, ' ')
|
|
@@ -623,21 +310,26 @@ function buildSkillMarkdown(sourceText, sourceName, targetName) {
|
|
|
623
310
|
}
|
|
624
311
|
|
|
625
312
|
function buildOpenAiYaml(name, description) {
|
|
626
|
-
const
|
|
627
|
-
COMMAND_NAMES.includes(name)
|
|
628
|
-
|| INTERNAL_SKILLS.has(name)
|
|
629
|
-
|| name === 'cc-collab'
|
|
630
|
-
|| name.startsWith('ultra-')
|
|
631
|
-
);
|
|
313
|
+
const policy = skillPolicy(name);
|
|
632
314
|
const short = description.replace(/\s+/g, ' ').trim().slice(0, 63).replace(/[\s.,;:]+$/, '');
|
|
633
|
-
|
|
315
|
+
const metadata = {
|
|
634
316
|
interface: {
|
|
635
317
|
display_name: titleCase(name),
|
|
636
318
|
short_description: short || `${titleCase(name)} for Codex`,
|
|
637
319
|
default_prompt: `Use $ultra-builder-pro:${name} for this task and follow its workflow.`,
|
|
638
320
|
},
|
|
639
|
-
policy: { allow_implicit_invocation:
|
|
640
|
-
}
|
|
321
|
+
policy: { allow_implicit_invocation: policy.allowImplicitInvocation },
|
|
322
|
+
};
|
|
323
|
+
if (policy.requiresUltraMcp) {
|
|
324
|
+
metadata.dependencies = {
|
|
325
|
+
tools: [{
|
|
326
|
+
type: 'mcp',
|
|
327
|
+
value: PLUGIN_NAME,
|
|
328
|
+
description: 'Ultra Builder Pro authoritative task and change runtime',
|
|
329
|
+
}],
|
|
330
|
+
};
|
|
331
|
+
}
|
|
332
|
+
return yaml.dump(metadata, { lineWidth: -1, noRefs: true });
|
|
641
333
|
}
|
|
642
334
|
|
|
643
335
|
function isTextFile(rel) {
|
|
@@ -60,6 +60,8 @@ function renderHandbook(runtime) {
|
|
|
60
60
|
`- Collaboration boundary: ${value.collaboration}. The current host remains primary and owns final verification.`,
|
|
61
61
|
`- Coordination boundary: ${value.coordination}.`,
|
|
62
62
|
'- Authority: `.ultra/state.db` is the only durable Ultra authority for changes, tasks, sessions, events, incidents, projection state, telemetry, and review evidence. Generated JSON and Markdown are projections or workflow artifacts.',
|
|
63
|
+
'- Context Spine boundary: `change.context` compiles role/gate readiness, bounded references, fresh-context budget, public seam, verification command, and one next action. Hooks inject only the DB-derived `change.breadcrumb`; stale or blocked context must be recompiled.',
|
|
64
|
+
'- Specification learning boundary: stable implementation discoveries use approval-gated propose/approve-or-reject/apply transitions. Unresolved learning blocks convergence; review requires independent specification-fidelity and engineering-standards evidence.',
|
|
63
65
|
'- Memory and graph boundary: Ultra Builder Pro does not capture prompts, transcripts, observations, summaries, cross-session memory, or code-graph content. Separately installed providers own that data; Ultra may store only their metadata references in a change context manifest.',
|
|
64
66
|
'- Hook boundary: Ultra hooks observe workflow/change lifecycle only. Health/context may run when `.ultra/state.db` exists; projection protection is always authoritative, while edit/compact/stop/subagent enforcement remains active-workflow scoped. Generic command blocking and post-edit policy stay in user or repository governance.',
|
|
65
67
|
'- Installation boundary: `ubp --doctor` is the read-only authority for installed asset provenance, content hashes, and host entry-point wiring; `system.doctor` remains scoped to project state and workflow recovery.',
|
|
@@ -38,6 +38,18 @@ const COLLAB_SKILLS_BY_RUNTIME = Object.freeze({
|
|
|
38
38
|
kimi: Object.freeze(['cc-collab', 'codex-collab', 'ultra-verify']),
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
+
const MCP_DEPENDENT_SKILLS = Object.freeze([
|
|
42
|
+
'ultra-init',
|
|
43
|
+
'ultra-change',
|
|
44
|
+
'ultra-plan',
|
|
45
|
+
'ultra-dev',
|
|
46
|
+
'ultra-test',
|
|
47
|
+
'ultra-review',
|
|
48
|
+
'ultra-deliver',
|
|
49
|
+
'ultra-status',
|
|
50
|
+
'ultra-doctor',
|
|
51
|
+
]);
|
|
52
|
+
|
|
41
53
|
const RETIRED_SKILLS = Object.freeze([
|
|
42
54
|
'agent-browser',
|
|
43
55
|
'find-skills',
|
|
@@ -50,6 +62,7 @@ const RETIRED_SKILLS = Object.freeze([
|
|
|
50
62
|
|
|
51
63
|
const WORKFLOW_HOOK_FILES = Object.freeze([
|
|
52
64
|
'active_task_context.py',
|
|
65
|
+
'context_spine.py',
|
|
53
66
|
'health_check.py',
|
|
54
67
|
'pre_stop_check.py',
|
|
55
68
|
'subagent_tracker.py',
|
|
@@ -68,13 +81,25 @@ function isSupportedRuntime(runtime) {
|
|
|
68
81
|
return SUPPORTED_RUNTIMES.includes(runtime);
|
|
69
82
|
}
|
|
70
83
|
|
|
84
|
+
function skillPolicy(name) {
|
|
85
|
+
const packaged = SUPPORTED_RUNTIMES.some((runtime) => skillsForRuntime(runtime).includes(name));
|
|
86
|
+
if (!packaged) throw new Error(`unknown packaged Ultra skill: ${name}`);
|
|
87
|
+
return {
|
|
88
|
+
userInvocable: !INTERNAL_AGENT_SKILLS.includes(name),
|
|
89
|
+
allowImplicitInvocation: false,
|
|
90
|
+
requiresUltraMcp: MCP_DEPENDENT_SKILLS.includes(name),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
71
94
|
module.exports = {
|
|
72
95
|
CORE_PUBLIC_SKILLS,
|
|
73
96
|
INTERNAL_AGENT_SKILLS,
|
|
74
97
|
SUPPORTED_RUNTIMES,
|
|
75
98
|
COLLAB_SKILLS_BY_RUNTIME,
|
|
99
|
+
MCP_DEPENDENT_SKILLS,
|
|
76
100
|
RETIRED_SKILLS,
|
|
77
101
|
WORKFLOW_HOOK_FILES,
|
|
78
102
|
isSupportedRuntime,
|
|
103
|
+
skillPolicy,
|
|
79
104
|
skillsForRuntime,
|
|
80
105
|
};
|
|
@@ -33,6 +33,9 @@ test('renders one common contract with host-native invocation syntax', () => {
|
|
|
33
33
|
assert.match(rendered, /ultra-change/);
|
|
34
34
|
assert.match(rendered, /ultra-doctor/);
|
|
35
35
|
assert.match(rendered, /metadata references/);
|
|
36
|
+
assert.match(rendered, /Context Spine boundary/);
|
|
37
|
+
assert.match(rendered, /change\.breadcrumb/);
|
|
38
|
+
assert.match(rendered, /Specification learning boundary/);
|
|
36
39
|
assert.doesNotMatch(rendered, /\.ultra\/memory|memory\.retain|memory\.recall/);
|
|
37
40
|
assert.match(rendered, new RegExp(BEGIN_MARKER.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
|
38
41
|
assert.match(rendered, new RegExp(END_MARKER.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|