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
|
@@ -1,92 +1,52 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-verify
|
|
3
|
-
description: Run independent two-model verification with the current host as primary and a read-only
|
|
3
|
+
description: Run independent two-model verification with the current host as primary and a read-only external advisor, then verify and synthesize both evidence sets. Use only when the user explicitly requests cross-model verification.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Run independent cross-model verification
|
|
7
7
|
|
|
8
|
-
Claude Code
|
|
9
|
-
|
|
10
|
-
when the user explicitly asks for cross-model verification.
|
|
8
|
+
Claude Code writes the first analysis, verifies consequential claims, and owns the
|
|
9
|
+
final answer. Codex is an untrusted read-only advisor.
|
|
11
10
|
|
|
12
11
|
## Modes
|
|
13
12
|
|
|
14
|
-
- `decision
|
|
15
|
-
- `diagnose
|
|
16
|
-
- `audit
|
|
17
|
-
- `estimate
|
|
18
|
-
|
|
19
|
-
##
|
|
20
|
-
|
|
21
|
-
1. Confirm
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
intervals; never hold one blocking tool call longer than 60 seconds.
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
python3 "$CLAUDE_PLUGIN_ROOT/skills/ultra-verify/scripts/verify_wait.py" \
|
|
58
|
-
"${SESSION_PATH}" --timeout 1200
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
The waiter reports the advisor as `complete`, `failed`, `empty`, or `pending`. Read the output only
|
|
62
|
-
after its status is `complete` and the file is non-empty. Preserve the error log when it fails.
|
|
63
|
-
|
|
64
|
-
## 4. Verify and synthesize
|
|
65
|
-
|
|
66
|
-
Compare `claude-analysis.md` with `codex-output.md`:
|
|
67
|
-
|
|
68
|
-
1. Verify claims against the current checkout, tests, runtime, or primary documentation.
|
|
69
|
-
2. Separate verified agreement, useful dissent, and unsupported assertions.
|
|
70
|
-
3. Explain scope, version, and assumption differences before judging the result.
|
|
71
|
-
4. Write `synthesis.md` and `metadata.json`, then return one Claude Code-owned conclusion.
|
|
72
|
-
|
|
73
|
-
Use `references/confidence-system.md` for evidence-based confidence and
|
|
74
|
-
`references/cross-verify-modes.md` for mode-specific expectations. Model agreement never overrides
|
|
75
|
-
failing tests or authoritative runtime evidence.
|
|
76
|
-
|
|
77
|
-
## Degraded operation
|
|
78
|
-
|
|
79
|
-
- Advisor failure: return the primary analysis with an explicit single-source warning.
|
|
80
|
-
- Never block the underlying user task solely because the advisor is absent, unauthenticated, or
|
|
81
|
-
slow.
|
|
82
|
-
|
|
83
|
-
## Session files
|
|
84
|
-
|
|
85
|
-
```text
|
|
86
|
-
.ultra/collab/<SESSION_ID>/
|
|
87
|
-
claude-analysis.md
|
|
88
|
-
codex-output.md
|
|
89
|
-
codex-error.log
|
|
90
|
-
metadata.json
|
|
91
|
-
synthesis.md
|
|
92
|
-
```
|
|
13
|
+
- `decision`: one consequential architecture or product choice;
|
|
14
|
+
- `diagnose`: independent root-cause hypotheses;
|
|
15
|
+
- `audit`: evidence-backed findings over a bounded scope;
|
|
16
|
+
- `estimate`: an estimate with explicit assumptions and uncertainty.
|
|
17
|
+
|
|
18
|
+
## Workflow
|
|
19
|
+
|
|
20
|
+
1. Confirm the advisor CLI and authentication. Define the exact workspace, question,
|
|
21
|
+
evidence standard, and response shape. Exclude secrets and unrelated files.
|
|
22
|
+
2. Create `.ultra/collab/<session-id>/` and write the primary host's evidence-backed
|
|
23
|
+
analysis to `claude-analysis.md` before reading advisor output.
|
|
24
|
+
3. Launch Codex with the raw bounded question and evidence in a read-only sandbox. Do
|
|
25
|
+
not include the primary conclusion when independence matters:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
codex exec -s read-only \
|
|
29
|
+
-a never \
|
|
30
|
+
--ephemeral \
|
|
31
|
+
--ignore-user-config \
|
|
32
|
+
--ignore-rules \
|
|
33
|
+
-o "${SESSION_PATH}/codex-output.md" \
|
|
34
|
+
"<bounded prompt>" \
|
|
35
|
+
2> "${SESSION_PATH}/codex-error.log"
|
|
36
|
+
```
|
|
37
|
+
4. Run `scripts/verify_wait.py` resolved relative to this skill directory. Use a
|
|
38
|
+
yielded or asynchronous shell session and poll at bounded intervals; do not hold a
|
|
39
|
+
blocking tool call longer than one minute.
|
|
40
|
+
5. Read advisor output only after the waiter reports a complete, non-empty file.
|
|
41
|
+
6. Verify both analyses against the current checkout, tests, runtime, or primary
|
|
42
|
+
documentation. Explain scope, version, evidence, and assumption differences before
|
|
43
|
+
judging disagreement.
|
|
44
|
+
7. Write session metadata and a synthesis artifact, then return one host-owned
|
|
45
|
+
conclusion.
|
|
46
|
+
|
|
47
|
+
Read `references/cross-verify-modes.md` for mode-specific evidence and
|
|
48
|
+
`references/confidence-system.md` when confidence language is useful. Model agreement
|
|
49
|
+
never overrides failing tests or authoritative runtime evidence.
|
|
50
|
+
|
|
51
|
+
Advisor failure degrades to the primary analysis with a single-source warning. It does
|
|
52
|
+
not block the user's underlying task.
|
|
@@ -2,47 +2,44 @@
|
|
|
2
2
|
"skill_name": "ultra-verify",
|
|
3
3
|
"evals": [
|
|
4
4
|
{
|
|
5
|
-
"id":
|
|
6
|
-
"prompt": "
|
|
7
|
-
"
|
|
5
|
+
"id": "explicit-decision",
|
|
6
|
+
"prompt": "Run independent cross-model verification on the database choice, with the current host writing its view before the advisor.",
|
|
7
|
+
"should_trigger": true,
|
|
8
8
|
"assertions": [
|
|
9
|
-
"
|
|
10
|
-
"Launches
|
|
11
|
-
"
|
|
9
|
+
"Writes the primary analysis before reading advisor output",
|
|
10
|
+
"Launches the advisor in a read-only sandbox",
|
|
11
|
+
"Uses a bounded session directory and completion waiter",
|
|
12
12
|
"Verifies consequential claims against authoritative evidence",
|
|
13
|
-
"
|
|
13
|
+
"Returns one host-owned synthesis"
|
|
14
14
|
]
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
|
-
"id":
|
|
18
|
-
"prompt": "
|
|
19
|
-
"
|
|
17
|
+
"id": "explicit-diagnosis",
|
|
18
|
+
"prompt": "Use two independent models to diagnose the intermittent 500 response and reconcile their hypotheses with discriminating checks.",
|
|
19
|
+
"should_trigger": true,
|
|
20
20
|
"assertions": [
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
21
|
+
"Keeps both initial hypotheses independent",
|
|
22
|
+
"Deduplicates by root cause after both outputs complete",
|
|
23
|
+
"Orders verification by evidence and diagnostic value",
|
|
24
|
+
"Does not decide by model vote"
|
|
25
25
|
]
|
|
26
26
|
},
|
|
27
27
|
{
|
|
28
|
-
"id":
|
|
29
|
-
"prompt": "
|
|
30
|
-
"
|
|
28
|
+
"id": "ordinary-analysis-negative",
|
|
29
|
+
"prompt": "Should this service use PostgreSQL or MongoDB?",
|
|
30
|
+
"should_trigger": false,
|
|
31
31
|
"assertions": [
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"Retains uniquely reported findings when source evidence confirms them",
|
|
35
|
-
"Severity does not depend on model agreement"
|
|
32
|
+
"Answers with the ordinary analysis workflow",
|
|
33
|
+
"Does not launch an external advisor without explicit cross-model intent"
|
|
36
34
|
]
|
|
37
35
|
},
|
|
38
36
|
{
|
|
39
|
-
"id":
|
|
40
|
-
"prompt": "
|
|
41
|
-
"
|
|
37
|
+
"id": "ordinary-review-negative",
|
|
38
|
+
"prompt": "Review these changes before I commit.",
|
|
39
|
+
"should_trigger": false,
|
|
42
40
|
"assertions": [
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"Final range is supported by the reconciled work breakdown"
|
|
41
|
+
"Uses the standard review workflow",
|
|
42
|
+
"Does not substitute cross-model verification for native review"
|
|
46
43
|
]
|
|
47
44
|
}
|
|
48
45
|
]
|
package/spec/cli-protocol.md
CHANGED
|
@@ -105,6 +105,9 @@ as a fallback unless `ultra-tools <family> --help` lists it.
|
|
|
105
105
|
| `change.get` | `change get` | 9 | any |
|
|
106
106
|
| `change.list` | `change list` | 9 | any |
|
|
107
107
|
| `change.context` | `change context` | 9 | mcp |
|
|
108
|
+
| `change.breadcrumb` | `change breadcrumb` | 10 | any |
|
|
109
|
+
| `change.learning_propose` | `change learning-propose` | 10 | mcp |
|
|
110
|
+
| `change.learning_resolve` | `change learning-resolve` | 10 | mcp |
|
|
108
111
|
| `change.converge` | `change converge` | 9 | mcp |
|
|
109
112
|
| `change.archive` | `change archive` | 9 | mcp |
|
|
110
113
|
| `system.doctor` | `system doctor` | 9 | mcp |
|
package/spec/mcp-tools.yaml
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
# Validated by spec/schemas/mcp-tools.schema.json (run `npm run test:spec`).
|
|
4
4
|
# Trace: PLAN §7.3, decisions D12 / D29 / D31-D34.
|
|
5
5
|
|
|
6
|
-
version: '1.
|
|
6
|
+
version: '1.1'
|
|
7
7
|
|
|
8
8
|
info:
|
|
9
9
|
title: Ultra Builder Pro MCP tool contracts
|
|
@@ -398,6 +398,8 @@ tools:
|
|
|
398
398
|
- change_blocked
|
|
399
399
|
- change_converged
|
|
400
400
|
- change_archived
|
|
401
|
+
- spec_learning_proposed
|
|
402
|
+
- spec_learning_resolved
|
|
401
403
|
payload: { type: object }
|
|
402
404
|
output_schema:
|
|
403
405
|
type: object
|
|
@@ -759,7 +761,7 @@ tools:
|
|
|
759
761
|
|
|
760
762
|
- name: change.get
|
|
761
763
|
family: change
|
|
762
|
-
description: Read one continuous change unit from authoritative state.
|
|
764
|
+
description: Read one continuous change unit and its specification-learning candidates from authoritative state.
|
|
763
765
|
phase: '9'
|
|
764
766
|
readonly: true
|
|
765
767
|
input_schema:
|
|
@@ -805,8 +807,8 @@ tools:
|
|
|
805
807
|
|
|
806
808
|
- name: change.context
|
|
807
809
|
family: change
|
|
808
|
-
description: Compile
|
|
809
|
-
phase: '
|
|
810
|
+
description: Compile a role-scoped Context Spine manifest with readiness, budget, execution seam, and next-action evidence.
|
|
811
|
+
phase: '10'
|
|
810
812
|
writer_role: mcp
|
|
811
813
|
input_schema:
|
|
812
814
|
type: object
|
|
@@ -815,7 +817,37 @@ tools:
|
|
|
815
817
|
properties:
|
|
816
818
|
id: { type: string }
|
|
817
819
|
task_id: { type: string }
|
|
820
|
+
role: { type: string, enum: [plan, implement, check, review] }
|
|
821
|
+
gate: { type: string, enum: [alignment, planning, implementation, verification, review, convergence, recovery] }
|
|
822
|
+
next_action: { type: string, minLength: 3 }
|
|
818
823
|
spec_refs: { type: array, items: { type: object } }
|
|
824
|
+
context_refs:
|
|
825
|
+
type: array
|
|
826
|
+
maxItems: 64
|
|
827
|
+
items:
|
|
828
|
+
type: object
|
|
829
|
+
required: [ref, reason]
|
|
830
|
+
additionalProperties: false
|
|
831
|
+
properties:
|
|
832
|
+
ref: { type: string, minLength: 1 }
|
|
833
|
+
kind: { type: string, enum: [spec, source, test, docs, external], default: source }
|
|
834
|
+
reason: { type: string, minLength: 3 }
|
|
835
|
+
required: { type: boolean, default: true }
|
|
836
|
+
digest: { type: string, pattern: '^[0-9a-f]{64}$' }
|
|
837
|
+
budget:
|
|
838
|
+
type: object
|
|
839
|
+
additionalProperties: false
|
|
840
|
+
properties:
|
|
841
|
+
max_tokens: { type: integer, minimum: 1, default: 12000 }
|
|
842
|
+
max_files: { type: integer, minimum: 1, default: 12 }
|
|
843
|
+
execution_contract:
|
|
844
|
+
type: object
|
|
845
|
+
additionalProperties: false
|
|
846
|
+
properties:
|
|
847
|
+
slice_kind: { type: string, enum: [tracer_bullet, expand_contract, integration_checkpoint], default: tracer_bullet }
|
|
848
|
+
public_seam: { type: string }
|
|
849
|
+
verification_command: { type: string }
|
|
850
|
+
context_budget_percent: { type: integer, minimum: 1, maximum: 100, default: 40 }
|
|
819
851
|
allowed_paths: { type: array, items: { type: string } }
|
|
820
852
|
provider_refs:
|
|
821
853
|
type: object
|
|
@@ -852,12 +884,96 @@ tools:
|
|
|
852
884
|
manifest_hash: { type: string, pattern: '^[0-9a-f]{64}$' }
|
|
853
885
|
manifest: { type: object }
|
|
854
886
|
errors:
|
|
887
|
+
- { code: VALIDATION_ERROR, description: 'context role, gate, references, budget, or execution contract is invalid' }
|
|
855
888
|
- { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
|
|
856
889
|
- { code: CHANGE_TERMINAL, description: 'terminal change cannot compile a new context' }
|
|
890
|
+
- { code: TASK_NOT_FOUND, description: 'task id is not linked to the change' }
|
|
857
891
|
- { code: PROVIDER_CONTENT_FORBIDDEN, description: 'provider payload content must remain external' }
|
|
858
892
|
cli_subcommand: change context
|
|
859
893
|
emits_events: [context_updated]
|
|
860
894
|
|
|
895
|
+
- name: change.breadcrumb
|
|
896
|
+
family: change
|
|
897
|
+
description: Read the compact DB-derived Context Spine position, readiness, and single recommended next action.
|
|
898
|
+
phase: '10'
|
|
899
|
+
readonly: true
|
|
900
|
+
writer_role: any
|
|
901
|
+
input_schema:
|
|
902
|
+
type: object
|
|
903
|
+
additionalProperties: false
|
|
904
|
+
properties:
|
|
905
|
+
id: { type: string }
|
|
906
|
+
output_schema:
|
|
907
|
+
type: object
|
|
908
|
+
required: [breadcrumb]
|
|
909
|
+
additionalProperties: false
|
|
910
|
+
properties:
|
|
911
|
+
breadcrumb: { type: object }
|
|
912
|
+
errors:
|
|
913
|
+
- { code: CHANGE_NOT_FOUND, description: 'explicit change id does not exist' }
|
|
914
|
+
- { code: STATE_DB_ERROR, description: 'runtime state could not be read' }
|
|
915
|
+
cli_subcommand: change breadcrumb
|
|
916
|
+
emits_events: []
|
|
917
|
+
|
|
918
|
+
- name: change.learning_propose
|
|
919
|
+
family: change
|
|
920
|
+
description: Propose one stable implementation discovery for approval-gated baseline specification convergence.
|
|
921
|
+
phase: '10'
|
|
922
|
+
writer_role: mcp
|
|
923
|
+
input_schema:
|
|
924
|
+
type: object
|
|
925
|
+
required: [change_id, target_ref, summary]
|
|
926
|
+
additionalProperties: false
|
|
927
|
+
properties:
|
|
928
|
+
id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
|
|
929
|
+
change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
|
|
930
|
+
task_id: { type: string }
|
|
931
|
+
target_ref: { type: string, minLength: 1 }
|
|
932
|
+
summary: { type: string, minLength: 3 }
|
|
933
|
+
evidence: { type: array, items: { type: string, minLength: 1 } }
|
|
934
|
+
output_schema:
|
|
935
|
+
type: object
|
|
936
|
+
required: [candidate]
|
|
937
|
+
additionalProperties: false
|
|
938
|
+
properties:
|
|
939
|
+
candidate: { type: object }
|
|
940
|
+
errors:
|
|
941
|
+
- { code: VALIDATION_ERROR, description: 'candidate id, target, summary, or evidence is invalid' }
|
|
942
|
+
- { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
|
|
943
|
+
- { code: CHANGE_NOT_MUTABLE, description: 'learning must resolve before convergence' }
|
|
944
|
+
- { code: TASK_NOT_FOUND, description: 'task is not linked to the change' }
|
|
945
|
+
- { code: DUPLICATE_LEARNING_ID, description: 'candidate id already exists' }
|
|
946
|
+
cli_subcommand: change learning-propose
|
|
947
|
+
emits_events: [spec_learning_proposed]
|
|
948
|
+
|
|
949
|
+
- name: change.learning_resolve
|
|
950
|
+
family: change
|
|
951
|
+
description: Approve, reject, or mark applied one specification-learning candidate through a guarded state transition.
|
|
952
|
+
phase: '10'
|
|
953
|
+
writer_role: mcp
|
|
954
|
+
input_schema:
|
|
955
|
+
type: object
|
|
956
|
+
required: [change_id, candidate_id, decision]
|
|
957
|
+
additionalProperties: false
|
|
958
|
+
properties:
|
|
959
|
+
change_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
|
|
960
|
+
candidate_id: { type: string, pattern: '^[a-zA-Z0-9_\-]+$' }
|
|
961
|
+
decision: { type: string, enum: [approve, reject, apply] }
|
|
962
|
+
resolution: { type: string }
|
|
963
|
+
output_schema:
|
|
964
|
+
type: object
|
|
965
|
+
required: [candidate]
|
|
966
|
+
additionalProperties: false
|
|
967
|
+
properties:
|
|
968
|
+
candidate: { type: object }
|
|
969
|
+
errors:
|
|
970
|
+
- { code: VALIDATION_ERROR, description: 'decision or required resolution is invalid' }
|
|
971
|
+
- { code: CHANGE_NOT_FOUND, description: 'change id does not exist' }
|
|
972
|
+
- { code: LEARNING_NOT_FOUND, description: 'candidate id does not exist for the change' }
|
|
973
|
+
- { code: ILLEGAL_LEARNING_TRANSITION, description: 'candidate state transition is not permitted' }
|
|
974
|
+
cli_subcommand: change learning-resolve
|
|
975
|
+
emits_events: [spec_learning_resolved]
|
|
976
|
+
|
|
861
977
|
- name: change.converge
|
|
862
978
|
family: change
|
|
863
979
|
description: Deterministically verify task, spec, test, documentation, review, context, and incident diagnosis structure before closure.
|
|
@@ -880,6 +996,19 @@ tools:
|
|
|
880
996
|
category: { type: string, enum: [diagnosis, diff, tests, spec, docs, review] }
|
|
881
997
|
status: { type: string, enum: [pass, fail, not_applicable] }
|
|
882
998
|
evidence: { type: string, minLength: 3 }
|
|
999
|
+
axis: { type: string, enum: [spec_fidelity, engineering_standards] }
|
|
1000
|
+
seam: { type: string, minLength: 3 }
|
|
1001
|
+
signal:
|
|
1002
|
+
type: object
|
|
1003
|
+
additionalProperties: false
|
|
1004
|
+
required: [command, expected_red, observed_red, observed_green, deterministic]
|
|
1005
|
+
properties:
|
|
1006
|
+
command: { type: string, minLength: 3 }
|
|
1007
|
+
expected_red: { type: string, minLength: 3 }
|
|
1008
|
+
observed_red: { type: boolean }
|
|
1009
|
+
observed_green: { type: boolean }
|
|
1010
|
+
deterministic: { type: boolean }
|
|
1011
|
+
duration_ms: { type: number, minimum: 0 }
|
|
883
1012
|
output_schema:
|
|
884
1013
|
type: object
|
|
885
1014
|
required: [ready, status, blockers]
|
|
@@ -1,47 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://ultra-builder-pro.dev/spec/command-manifest.schema.json",
|
|
4
|
-
"title": "
|
|
5
|
-
"description": "
|
|
4
|
+
"title": "Ultra command launcher frontmatter",
|
|
5
|
+
"description": "Portable source contract for a thin command launcher. Runtime metadata and workflow procedure belong outside the command file.",
|
|
6
6
|
"type": "object",
|
|
7
|
-
"required": ["description"],
|
|
7
|
+
"required": ["description", "workflow-ref"],
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"description": {
|
|
11
11
|
"type": "string",
|
|
12
12
|
"minLength": 10,
|
|
13
|
-
"
|
|
13
|
+
"maxLength": 240,
|
|
14
|
+
"description": "Concise user-visible action description."
|
|
14
15
|
},
|
|
15
16
|
"argument-hint": {
|
|
16
17
|
"oneOf": [
|
|
17
18
|
{ "type": "string" },
|
|
18
19
|
{ "type": "array", "items": { "type": "string" }, "minItems": 1 }
|
|
19
20
|
],
|
|
20
|
-
"description": "
|
|
21
|
-
},
|
|
22
|
-
"allowed-tools": {
|
|
23
|
-
"type": "string",
|
|
24
|
-
"description": "Claude Code convention: comma-separated tool allowlist"
|
|
25
|
-
},
|
|
26
|
-
"model": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"enum": ["haiku", "sonnet", "opus"],
|
|
29
|
-
"description": "Claude Code convention: model routing hint"
|
|
21
|
+
"description": "Optional host launcher hint; it does not define argument semantics."
|
|
30
22
|
},
|
|
31
23
|
"workflow-ref": {
|
|
32
24
|
"type": "string",
|
|
33
25
|
"pattern": "^@skills/[a-z][a-z0-9\\-]*/SKILL\\.md$",
|
|
34
|
-
"description": "
|
|
35
|
-
},
|
|
36
|
-
"mcp_tools_required": {
|
|
37
|
-
"type": "array",
|
|
38
|
-
"items": { "type": "string", "pattern": "^[a-z]+\\.[a-z_]+$" },
|
|
39
|
-
"uniqueItems": true,
|
|
40
|
-
"description": "Phase 3+: 命令运行时会调用的 MCP tool 名单; 无 MCP 时走 cli_fallback"
|
|
41
|
-
},
|
|
42
|
-
"cli_fallback": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"description": "Phase 3+: MCP 不可达时回退的 ultra-tools 子命令 (e.g. 'init' -> 'ultra-tools init')"
|
|
26
|
+
"description": "The single Skill that owns this workflow."
|
|
45
27
|
}
|
|
46
28
|
}
|
|
47
29
|
}
|
|
@@ -1,94 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://ultra-builder-pro.dev/spec/skill-manifest.schema.json",
|
|
4
|
-
"title": "Skill
|
|
5
|
-
"description": "
|
|
4
|
+
"title": "Portable Agent Skill frontmatter",
|
|
5
|
+
"description": "Canonical source contract for skills/*/SKILL.md. Host invocation policy, UI metadata, runtime dependencies, and command hints belong in adapters or host-native metadata, not model instructions.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"required": ["name", "description"],
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"name": {
|
|
11
11
|
"type": "string",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"minLength": 1,
|
|
13
|
+
"maxLength": 64,
|
|
14
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$",
|
|
15
|
+
"description": "Portable Agent Skills name; must match the parent directory."
|
|
14
16
|
},
|
|
15
17
|
"description": {
|
|
16
18
|
"type": "string",
|
|
17
19
|
"minLength": 10,
|
|
18
|
-
"
|
|
19
|
-
|
|
20
|
-
"runtime": {
|
|
21
|
-
"oneOf": [
|
|
22
|
-
{ "type": "string", "enum": ["claude", "opencode", "codex", "kimi", "all"] },
|
|
23
|
-
{
|
|
24
|
-
"type": "array",
|
|
25
|
-
"items": { "type": "string", "enum": ["claude", "opencode", "codex", "kimi"] },
|
|
26
|
-
"minItems": 1,
|
|
27
|
-
"uniqueItems": true
|
|
28
|
-
}
|
|
29
|
-
],
|
|
30
|
-
"description": "v4.5 — which runtime(s) this skill targets. Defaults to 'all' when absent (Phase 4 adapter installs everywhere)."
|
|
31
|
-
},
|
|
32
|
-
"mcp_tools_required": {
|
|
33
|
-
"type": "array",
|
|
34
|
-
"items": { "type": "string", "pattern": "^[a-z]+\\.[a-z_]+$" },
|
|
35
|
-
"uniqueItems": true,
|
|
36
|
-
"description": "v4.5 — MCP tool names this skill calls; Phase 3+ generators verify availability"
|
|
37
|
-
},
|
|
38
|
-
"cli_fallback": {
|
|
39
|
-
"type": "string",
|
|
40
|
-
"description": "v4.5 — ultra-tools subcommand to fall back to when MCP unreachable"
|
|
41
|
-
},
|
|
42
|
-
"complexity_hint": {
|
|
43
|
-
"type": "string",
|
|
44
|
-
"enum": ["haiku", "sonnet", "opus"],
|
|
45
|
-
"description": "v4.5 — model routing hint (Phase 7+)"
|
|
46
|
-
},
|
|
47
|
-
"argument-hint": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"description": "Claude Code convention: hint shown after slash-command name"
|
|
50
|
-
},
|
|
51
|
-
"allowed-tools": {
|
|
52
|
-
"type": "string",
|
|
53
|
-
"description": "Claude Code convention: comma-separated tool allowlist"
|
|
54
|
-
},
|
|
55
|
-
"user-invocable": {
|
|
56
|
-
"type": "boolean",
|
|
57
|
-
"description": "Claude Code convention: can the user call this via slash command"
|
|
58
|
-
},
|
|
59
|
-
"disable-model-invocation": {
|
|
60
|
-
"type": "boolean",
|
|
61
|
-
"description": "Claude Code convention: skill is not auto-invoked by the model"
|
|
62
|
-
},
|
|
63
|
-
"context": {
|
|
64
|
-
"type": "string",
|
|
65
|
-
"enum": ["fork", "main"],
|
|
66
|
-
"description": "Claude Code convention: 'fork' isolates skill output from main conversation"
|
|
67
|
-
},
|
|
68
|
-
"license": {
|
|
69
|
-
"type": "string",
|
|
70
|
-
"description": "third-party skill license (e.g. MIT)"
|
|
71
|
-
},
|
|
72
|
-
"metadata": {
|
|
73
|
-
"type": "object",
|
|
74
|
-
"additionalProperties": true,
|
|
75
|
-
"properties": {
|
|
76
|
-
"author": { "type": "string" },
|
|
77
|
-
"version": { "type": "string" }
|
|
78
|
-
},
|
|
79
|
-
"description": "third-party metadata block (vercel skills, etc.)"
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
"allOf": [
|
|
83
|
-
{
|
|
84
|
-
"if": { "required": ["user-invocable"], "properties": { "user-invocable": { "const": true } } },
|
|
85
|
-
"then": {
|
|
86
|
-
"not": {
|
|
87
|
-
"required": ["disable-model-invocation"],
|
|
88
|
-
"properties": { "disable-model-invocation": { "const": true } }
|
|
89
|
-
},
|
|
90
|
-
"errorMessage": "user-invocable=true cannot coexist with disable-model-invocation=true"
|
|
91
|
-
}
|
|
20
|
+
"maxLength": 1024,
|
|
21
|
+
"description": "Concise discovery metadata that states both what the skill does and when to use it."
|
|
92
22
|
}
|
|
93
|
-
|
|
23
|
+
}
|
|
94
24
|
}
|
|
@@ -197,11 +197,40 @@ CREATE TABLE IF NOT EXISTS context_snapshots (
|
|
|
197
197
|
provider_refs_json TEXT NOT NULL DEFAULT '{}',
|
|
198
198
|
manifest_path TEXT NOT NULL,
|
|
199
199
|
manifest_hash TEXT NOT NULL,
|
|
200
|
+
role TEXT NOT NULL DEFAULT 'plan'
|
|
201
|
+
CHECK (role IN ('plan', 'implement', 'check', 'review')),
|
|
202
|
+
gate TEXT NOT NULL DEFAULT 'alignment'
|
|
203
|
+
CHECK (gate IN ('alignment', 'planning', 'implementation', 'verification', 'review', 'convergence', 'recovery')),
|
|
204
|
+
next_action TEXT NOT NULL DEFAULT 'Resolve the next Ultra workflow action.',
|
|
205
|
+
readiness TEXT NOT NULL DEFAULT 'ready'
|
|
206
|
+
CHECK (readiness IN ('ready', 'blocked')),
|
|
207
|
+
blockers_json TEXT NOT NULL DEFAULT '[]',
|
|
208
|
+
context_json TEXT NOT NULL DEFAULT '{}',
|
|
209
|
+
token_estimate INTEGER NOT NULL DEFAULT 0 CHECK (token_estimate >= 0),
|
|
210
|
+
token_budget INTEGER NOT NULL DEFAULT 12000 CHECK (token_budget > 0),
|
|
200
211
|
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now'))
|
|
201
212
|
);
|
|
202
213
|
|
|
203
214
|
CREATE INDEX IF NOT EXISTS context_snapshots_change ON context_snapshots(change_id, created_at);
|
|
204
215
|
|
|
216
|
+
CREATE TABLE IF NOT EXISTS spec_learning_candidates (
|
|
217
|
+
id TEXT PRIMARY KEY,
|
|
218
|
+
change_id TEXT NOT NULL REFERENCES changes(id) ON DELETE CASCADE,
|
|
219
|
+
task_id TEXT REFERENCES tasks(id) ON DELETE SET NULL,
|
|
220
|
+
target_ref TEXT NOT NULL,
|
|
221
|
+
summary TEXT NOT NULL,
|
|
222
|
+
evidence_json TEXT NOT NULL DEFAULT '[]',
|
|
223
|
+
status TEXT NOT NULL DEFAULT 'proposed'
|
|
224
|
+
CHECK (status IN ('proposed', 'approved', 'rejected', 'applied')),
|
|
225
|
+
resolution TEXT,
|
|
226
|
+
proposed_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%fZ', 'now')),
|
|
227
|
+
resolved_at TEXT,
|
|
228
|
+
applied_at TEXT
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
CREATE INDEX IF NOT EXISTS spec_learning_change
|
|
232
|
+
ON spec_learning_candidates(change_id, status, proposed_at);
|
|
233
|
+
|
|
205
234
|
CREATE TABLE IF NOT EXISTS trace_links (
|
|
206
235
|
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
207
236
|
change_id TEXT NOT NULL REFERENCES changes(id) ON DELETE CASCADE,
|
|
@@ -274,3 +303,5 @@ INSERT OR IGNORE INTO schema_version (version, description)
|
|
|
274
303
|
VALUES ('9.0', 'Continuous change units, context snapshots, trace links, incidents, projection outbox, and durable consumers');
|
|
275
304
|
INSERT OR IGNORE INTO schema_version (version, description)
|
|
276
305
|
VALUES ('9.1', 'Kimi runtime support in durable events and sessions');
|
|
306
|
+
INSERT OR IGNORE INTO schema_version (version, description)
|
|
307
|
+
VALUES ('10.0', 'Role-scoped context snapshots, deterministic breadcrumbs, and approval-gated specification learning');
|