ultra-builder-pro-cli 0.25.1 → 0.26.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/.ultra-template/contexts/TEMPLATE.md +87 -0
- package/.ultra-template/decisions/.gitkeep +1 -0
- package/.ultra-template/evidence/.gitkeep +1 -0
- package/.ultra-template/north-star.md +46 -0
- package/.ultra-template/research/.gitkeep +1 -0
- package/.ultra-template/specs/discovery.md +2 -2
- package/.ultra-template/tasks.json +3 -0
- package/.ultra-template/test-report.json +27 -0
- package/CHANGELOG.md +40 -0
- package/README.md +217 -579
- package/adapters/_shared/delegate-profiles/kimi-read-only.md +15 -0
- package/adapters/_shared/delegate-profiles/kimi-write.md +17 -0
- package/adapters/_shared/file-ops.cjs +76 -2
- package/adapters/_shared/host-profile.cjs +97 -0
- package/adapters/_shared/plugin-core.cjs +204 -0
- package/adapters/_shared/runtime-assets.cjs +31 -96
- package/adapters/claude.js +92 -291
- package/adapters/codex.js +309 -842
- package/adapters/grok.js +143 -1469
- package/adapters/kimi.js +124 -1053
- package/adapters/opencode.js +230 -742
- package/bin/delegate-worker.cjs +323 -0
- package/bin/delegate.cjs +456 -0
- package/bin/install.js +38 -11
- package/docs/ARCHITECTURE.md +122 -216
- package/docs/ARTIFACT-AUTHORITY.md +90 -268
- package/docs/DECISIONS.md +75 -87
- package/docs/PHILOSOPHY.md +177 -0
- package/docs/PLUGIN-ISOLATION-CONTRACT.md +62 -39
- package/docs/RUNTIME-COMPAT-MATRIX.md +99 -156
- package/docs/SKILL-AUTHORING.md +94 -73
- package/docs/WORKFLOW-LIFECYCLE.md +93 -189
- package/hooks/README.md +17 -37
- package/hooks/_common.py +113 -0
- package/hooks/adapters/codex.py +9 -16
- package/hooks/adapters/grok.py +5 -5
- package/hooks/adapters/kimi.py +8 -14
- package/hooks/block_dangerous_commands.py +95 -0
- package/hooks/compact_context.py +65 -0
- package/hooks/mid_workflow_recall.py +25 -0
- package/hooks/post_edit_guard.py +105 -0
- package/hooks/session_context.py +30 -0
- package/package.json +17 -52
- package/skills/ultra-change/SKILL.md +97 -50
- package/skills/ultra-change/references/change-contract.md +40 -1
- package/skills/ultra-delegate/SKILL.md +82 -0
- package/skills/ultra-delegate/references/delegation-contract.md +51 -0
- package/skills/ultra-delegate/scripts/delegate_wait.py +86 -0
- package/skills/ultra-deliver/SKILL.md +61 -42
- package/skills/ultra-deliver/references/baseline-reconciliation.md +39 -20
- package/skills/ultra-dev/SKILL.md +96 -62
- package/skills/ultra-dev/references/debugging.md +22 -0
- package/skills/ultra-domain-modeling/SKILL.md +79 -0
- package/skills/ultra-grilling/SKILL.md +79 -0
- package/skills/ultra-init/SKILL.md +94 -37
- package/skills/ultra-init/references/brownfield-adoption.md +33 -83
- package/skills/ultra-init/scripts/init_project.cjs +84 -0
- package/skills/ultra-plan/SKILL.md +88 -68
- package/skills/ultra-research/SKILL.md +62 -48
- package/skills/ultra-research/references/00-problem-validation.md +5 -5
- package/skills/ultra-research/references/01-opportunity-discovery.md +3 -3
- package/skills/ultra-research/references/02-market-assessment.md +5 -4
- package/skills/ultra-research/references/03-competitive-landscape.md +3 -3
- package/skills/ultra-research/references/04-product-strategy.md +3 -3
- package/skills/ultra-research/references/05-assumptions-validation.md +5 -5
- package/skills/ultra-research/references/10-user-personas.md +3 -2
- package/skills/ultra-research/references/11-user-scenarios.md +3 -3
- package/skills/ultra-research/references/20-user-stories.md +4 -3
- package/skills/ultra-research/references/21-features-scope.md +3 -2
- package/skills/ultra-research/references/22-success-metrics.md +3 -3
- package/skills/ultra-research/references/30-architecture-context.md +3 -3
- package/skills/ultra-research/references/31-solution-strategy.md +3 -3
- package/skills/ultra-research/references/32-building-blocks.md +3 -3
- package/skills/ultra-research/references/40-deployment.md +3 -3
- package/skills/ultra-research/references/41-quality-risks.md +3 -3
- package/skills/ultra-research/references/99-synthesis.md +7 -7
- package/skills/ultra-review/SKILL.md +59 -32
- package/skills/ultra-review/references/code.md +17 -0
- package/skills/ultra-review/references/comments.md +12 -0
- package/skills/ultra-review/references/design.md +12 -0
- package/skills/ultra-review/references/errors.md +13 -0
- package/skills/ultra-review/references/spec.md +13 -0
- package/skills/ultra-review/references/tests.md +12 -0
- package/skills/ultra-review/references/worker-packet.md +40 -0
- package/skills/ultra-review/scripts/review_wait.py +26 -15
- package/skills/ultra-status/SKILL.md +61 -36
- package/skills/ultra-tdd/SKILL.md +81 -0
- package/skills/ultra-tdd/references/templates/README.md +20 -0
- package/skills/ultra-tdd/references/templates/feature-flag-default-audit.sh +79 -0
- package/skills/ultra-tdd/references/templates/persistence-real.ts +78 -0
- package/skills/ultra-tdd/references/templates/testcontainer-postgres.py +78 -0
- package/skills/ultra-tdd/references/templates/testcontainer-postgres.ts +73 -0
- package/skills/ultra-tdd/references/templates/vertical-slice.ts +66 -0
- package/skills/ultra-tdd/references/test-execution.md +18 -0
- package/skills/ultra-test/SKILL.md +70 -30
- package/skills/ultra-test/references/export-syntax.md +18 -0
- package/skills/ultra-test/scripts/worktree_digest.cjs +54 -0
- package/skills/ultra-think/SKILL.md +49 -27
- package/skills/ultra-think/references/autonomy-boundary.md +48 -0
- package/skills/ultra-think/references/interaction-boundary.md +18 -33
- package/.ultra-template/docs/research/README.md +0 -55
- package/.ultra-template/reports/templates/delivery-report.json +0 -17
- package/.ultra-template/reports/templates/test-report.json +0 -18
- package/.ultra-template/tasks/tasks.json +0 -15
- package/.ultra-template/templates/task-context.md +0 -19
- package/adapters/_shared/codex-assets.cjs +0 -725
- package/adapters/_shared/codex-ultra-tools-entry.cjs +0 -11
- package/adapters/_shared/interaction-contract.cjs +0 -129
- package/adapters/_shared/path-rewrite.cjs +0 -79
- package/adapters/_shared/runtime-native.cjs +0 -132
- package/adapters/_shared/settings-merge.cjs +0 -76
- package/agents/code-reviewer.md +0 -42
- package/agents/debugger.md +0 -40
- package/agents/review-code.md +0 -49
- package/agents/review-comments.md +0 -38
- package/agents/review-coordinator.md +0 -56
- package/agents/review-design.md +0 -40
- package/agents/review-errors.md +0 -43
- package/agents/review-spec.md +0 -39
- package/agents/review-tests.md +0 -40
- package/agents/tdd-runner.md +0 -38
- package/bin/orchestrator.js +0 -383
- package/commands/ultra-change.md +0 -10
- package/commands/ultra-deliver.md +0 -10
- package/commands/ultra-dev.md +0 -10
- package/commands/ultra-doctor.md +0 -10
- package/commands/ultra-init.md +0 -10
- package/commands/ultra-plan.md +0 -10
- package/commands/ultra-research.md +0 -10
- package/commands/ultra-review.md +0 -10
- package/commands/ultra-status.md +0 -10
- package/commands/ultra-test.md +0 -10
- package/commands/ultra-think.md +0 -10
- package/docs/AGENT-CONTEXT.md +0 -191
- package/docs/COMMIT-HASH-BACKFILL.md +0 -51
- package/docs/LEGACY-CLI-CROSSWALK.md +0 -175
- package/docs/ROADMAP.md +0 -101
- package/docs/STATE-DB-ACCESS-POLICY.md +0 -161
- package/hooks/active_task_context.py +0 -152
- package/hooks/context_envelope.py +0 -100
- package/hooks/health_check.py +0 -196
- package/hooks/pre_stop_check.py +0 -66
- package/hooks/runtime_paths.py +0 -396
- package/hooks/subagent_tracker.py +0 -88
- package/hooks/workflow_checkpoint.py +0 -76
- package/hooks/workflow_context.py +0 -48
- package/hooks/workflow_resume.py +0 -84
- package/mcp-server/hook-context.cjs +0 -38
- package/mcp-server/hook-event.cjs +0 -34
- package/mcp-server/lib/archive-journal.cjs +0 -1119
- package/mcp-server/lib/archive-mutation-worker.py +0 -365
- package/mcp-server/lib/artifact-registry.cjs +0 -1232
- package/mcp-server/lib/baseline-workflow.cjs +0 -1193
- package/mcp-server/lib/canonical-json.cjs +0 -19
- package/mcp-server/lib/change-authority.cjs +0 -26
- package/mcp-server/lib/change-packet.cjs +0 -790
- package/mcp-server/lib/change-workflow.cjs +0 -65
- package/mcp-server/lib/context-envelope.cjs +0 -581
- package/mcp-server/lib/context-paths.cjs +0 -142
- package/mcp-server/lib/decision-records.cjs +0 -423
- package/mcp-server/lib/delivery-transaction.cjs +0 -471
- package/mcp-server/lib/doctor-backup-worker.cjs +0 -328
- package/mcp-server/lib/doctor.cjs +0 -627
- package/mcp-server/lib/git-bootstrap.cjs +0 -651
- package/mcp-server/lib/init-project.cjs +0 -1021
- package/mcp-server/lib/kernel-change-workflow.cjs +0 -2029
- package/mcp-server/lib/legacy-change-workflow.cjs +0 -3032
- package/mcp-server/lib/managed-file-write.cjs +0 -172
- package/mcp-server/lib/plan-checkpoint.cjs +0 -177
- package/mcp-server/lib/plan-publication-worker.cjs +0 -830
- package/mcp-server/lib/plan-store.cjs +0 -794
- package/mcp-server/lib/prd-parser.cjs +0 -83
- package/mcp-server/lib/pricing.cjs +0 -44
- package/mcp-server/lib/project-context.cjs +0 -178
- package/mcp-server/lib/projector.cjs +0 -386
- package/mcp-server/lib/provider-refs.cjs +0 -42
- package/mcp-server/lib/runtime-paths.cjs +0 -1714
- package/mcp-server/lib/runtime-state.cjs +0 -222
- package/mcp-server/lib/safe-project-file.cjs +0 -385
- package/mcp-server/lib/stage-checkpoints.cjs +0 -463
- package/mcp-server/lib/state-authority.cjs +0 -95
- package/mcp-server/lib/state-db.cjs +0 -1580
- package/mcp-server/lib/state-ops.cjs +0 -1428
- package/mcp-server/lib/task-contract.cjs +0 -404
- package/mcp-server/lib/task-expander.cjs +0 -105
- package/mcp-server/lib/task-ledger.cjs +0 -1964
- package/mcp-server/lib/telemetry.cjs +0 -85
- package/mcp-server/lib/topo.cjs +0 -131
- package/mcp-server/lib/ultra-facade.cjs +0 -2684
- package/mcp-server/lib/worker-packet.cjs +0 -358
- package/mcp-server/server.cjs +0 -437
- package/orchestrator/auto-merge.cjs +0 -128
- package/orchestrator/daemon.cjs +0 -264
- package/orchestrator/dispatch-rules.cjs +0 -78
- package/orchestrator/parallel-orchestrator.cjs +0 -903
- package/orchestrator/planner/plan-builder.cjs +0 -125
- package/orchestrator/recovery.cjs +0 -188
- package/orchestrator/session-close-journal-worker.cjs +0 -5
- package/orchestrator/session-close-journal.cjs +0 -1014
- package/orchestrator/session-runner.cjs +0 -1153
- package/orchestrator/worktree-manager.cjs +0 -282
- package/settings.json +0 -7
- package/skills/cc-collab/SKILL.md +0 -42
- package/skills/code-review-expert/SKILL.md +0 -43
- package/skills/code-review-expert/references/correctness-reliability.md +0 -30
- package/skills/code-review-expert/references/design-boundaries.md +0 -26
- package/skills/code-review-expert/references/removal-plan.md +0 -24
- package/skills/codex-collab/SKILL.md +0 -49
- package/skills/codex-collab/evals/evals.json +0 -35
- package/skills/integration-rules/SKILL.md +0 -32
- package/skills/security-rules/SKILL.md +0 -38
- package/skills/testing-rules/SKILL.md +0 -32
- package/skills/ultra-doctor/SKILL.md +0 -41
- package/skills/ultra-plan/references/semantic-preflight.md +0 -20
- package/skills/ultra-verify/SKILL.md +0 -46
- package/skills/ultra-verify/evals/evals.json +0 -46
- package/skills/ultra-verify/references/cross-verify-modes.md +0 -28
- package/skills/ultra-verify/references/evidence-status.md +0 -21
- package/skills/ultra-verify/scripts/verify_wait.py +0 -94
- package/spec/cli-protocol.md +0 -102
- package/spec/mcp-tools.yaml +0 -312
- package/spec/schemas/baseline-reconciliation.v1.schema.json +0 -73
- package/spec/schemas/change-delta.v1.schema.json +0 -153
- package/spec/schemas/command-manifest.schema.json +0 -29
- package/spec/schemas/context-file.v4.5.schema.json +0 -54
- package/spec/schemas/delivery-report.v1.schema.json +0 -66
- package/spec/schemas/documentation-reconciliation.v1.schema.json +0 -106
- package/spec/schemas/mcp-tools.schema.json +0 -136
- package/spec/schemas/skill-manifest.schema.json +0 -24
- package/spec/schemas/state-db.sql +0 -641
- package/spec/schemas/task-ledger.v2.schema.json +0 -296
- package/spec/schemas/tasks.v4.5.schema.json +0 -96
- package/spec/schemas/test-report.v1.schema.json +0 -225
- package/ultra-tools/cli.cjs +0 -129
- package/ultra-tools/commands/db.cjs +0 -226
- package/ultra-tools/commands/legacy-memory.cjs +0 -159
- package/ultra-tools/commands/migrate.cjs +0 -1386
- package/ultra-tools/commands/session.cjs +0 -213
- package/ultra-tools/commands/status.cjs +0 -559
- package/ultra-tools/commands/system.cjs +0 -498
- package/ultra-tools/commands/task.cjs +0 -105
|
@@ -1,54 +1,111 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-init
|
|
3
|
-
description:
|
|
3
|
+
description: Establish a project's Ultra authority as files — the owner's one-line goal, hard constraints, the three specification skeletons, an empty task ledger, and Git. Use when a repository has no `.ultra` directory yet, or has a partial one left by an interrupted setup, whether the codebase is new or already carries years of history.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
6
|
+
# Build the skeleton the rest of the workflow writes into
|
|
7
7
|
|
|
8
|
-
Initialization creates the repository-local
|
|
9
|
-
research, accept a product baseline, choose a Change, or
|
|
10
|
-
capability.
|
|
8
|
+
Initialization creates the repository-local authority and nothing else.
|
|
9
|
+
It does not perform research, accept a product baseline, choose a Change, or
|
|
10
|
+
start another capability — recommend the next one and stop; do not invoke it.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
The dividing line against research is **authorization versus claim**. What the
|
|
13
|
+
owner authorizes comes out of their head and evidence cannot overturn it. What
|
|
14
|
+
research collects is a claim about the outside world, which evidence can confirm
|
|
15
|
+
or refute. A technology choice is a claim, so it is not initialization's business
|
|
16
|
+
— and a new project has no configuration files to read anyway.
|
|
13
17
|
|
|
14
|
-
|
|
15
|
-
monorepo boundaries, and the current request.
|
|
16
|
-
2. When authority already exists, call `ultra.doctor { repair: false }` and preserve
|
|
17
|
-
healthy state. Never replace or delete it merely to obtain a clean init.
|
|
18
|
-
3. Classify the repository from evidence:
|
|
19
|
-
- `greenfield`: no meaningful delivered behavior exists;
|
|
20
|
-
- `brownfield`: source, runtime, API, data, deployment, or tests describe an
|
|
21
|
-
existing maintained system;
|
|
22
|
-
- `migrated`: older Ultra authority was preserved but is not yet a trusted baseline.
|
|
23
|
-
4. Ask the owner only when scope, healthy-authority replacement, destructive recovery,
|
|
24
|
-
or another material choice cannot be derived. Reuse explicit intent.
|
|
18
|
+
## Before you start
|
|
25
19
|
|
|
26
|
-
Read
|
|
27
|
-
|
|
20
|
+
1. Read `.ultra/tasks.json` if it exists, along with the `context_file` of any
|
|
21
|
+
task it names — a partial `.ultra/` means an earlier attempt stopped midway.
|
|
22
|
+
2. Read `CONTEXT.md` at the repository root for vocabulary already settled, and
|
|
23
|
+
`.ultra/decisions/` for any entries preserved by a partial setup.
|
|
24
|
+
3. Establish the route's facts from the filesystem, not by asking.
|
|
28
25
|
|
|
29
|
-
##
|
|
26
|
+
## Definition of done
|
|
30
27
|
|
|
31
|
-
|
|
28
|
+
- `.ultra/north-star.md` carries the owner's one-line goal in their own words.
|
|
29
|
+
- Every file listed under **What gets written** exists; you read each one back
|
|
30
|
+
after writing and stopped at the first one missing.
|
|
31
|
+
- `.git` exists. Any initial commit is a separately authorized delivery effect.
|
|
32
|
+
- Nothing is invented: what is unknown says `[NEEDS CLARIFICATION]`.
|
|
33
|
+
|
|
34
|
+
## Which route
|
|
35
|
+
|
|
36
|
+
Check the filesystem in this order and take the first match:
|
|
37
|
+
|
|
38
|
+
| Check | Route | What changes |
|
|
39
|
+
|---|---|---|
|
|
40
|
+
| `docs/` holds two or more non-README `.md` files, or `docs/adr/` or `doc/` exists | Documented brownfield | Write everything; cite maintained documents as evidence and preserve their repository paths in `trace_to` when they remain authoritative |
|
|
41
|
+
| A language configuration file exists and the row above did not match | Brownfield | Write everything; record what a code scan shows in `architecture.md` and `discovery.md`, marked as observed and unverified |
|
|
42
|
+
| Neither | Greenfield | Write everything |
|
|
43
|
+
|
|
44
|
+
For either brownfield route, read `references/brownfield-adoption.md`. Existing docs
|
|
45
|
+
are evidence or an explicitly retained authority; they never justify omitting the
|
|
46
|
+
canonical specification skeleton that downstream workflows require.
|
|
47
|
+
|
|
48
|
+
## Draw out the intent
|
|
49
|
+
|
|
50
|
+
Follow `../ultra-grilling/SKILL.md`. It is a loop, not a questionnaire, because
|
|
51
|
+
the owner cannot state what they want up front. Start from what they already said
|
|
52
|
+
when invoking you, restate it for confirmation, and ask only about what is
|
|
53
|
+
genuinely missing. Five things come out of it:
|
|
54
|
+
|
|
55
|
+
| What you draw out | Where it lands |
|
|
56
|
+
|---|---|
|
|
57
|
+
| What you want to build, in one sentence, their words | `north-star.md`, `## One-line` |
|
|
58
|
+
| What counts as success | `specs/product.md`, behavioral requirements and acceptance |
|
|
59
|
+
| What must never happen | `north-star.md`, `## Hard Constraints` |
|
|
60
|
+
| Who uses it, and how they cope today | `discovery.md`, marked as the owner's statement |
|
|
61
|
+
| **What you already know you are unsure about** | `discovery.md` — research's priority queue |
|
|
62
|
+
|
|
63
|
+
When the first domain terms appear, follow `../ultra-domain-modeling/SKILL.md`
|
|
64
|
+
and create `CONTEXT.md` at the repository root.
|
|
65
|
+
|
|
66
|
+
## What gets written
|
|
67
|
+
|
|
68
|
+
Resolve this loaded Skill's directory, then run
|
|
69
|
+
`node <ultra-init-skill-dir>/scripts/init_project.cjs --project <repository-root>`. The script copies
|
|
70
|
+
only missing files from `assets/project-template`, preserves every existing authority
|
|
71
|
+
file byte-for-byte, and reads the resulting skeleton back. Then fill its semantic
|
|
72
|
+
placeholders from verified facts and owner decisions.
|
|
32
73
|
|
|
33
74
|
```text
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
75
|
+
.ultra/north-star.md ## One-line, ## Hard Constraints
|
|
76
|
+
.ultra/specs/{product,architecture,discovery}.md ## Observed, ## Decisions, ## Unknowns
|
|
77
|
+
.ultra/tasks.json {"tasks": []}
|
|
78
|
+
.ultra/test-report.json not-yet-run report with git_commit
|
|
79
|
+
.ultra/contexts/ .ultra/decisions/ .ultra/evidence/
|
|
80
|
+
CONTEXT.md repository root, once a term is settled
|
|
38
81
|
```
|
|
39
82
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
83
|
+
The copied `.ultra/.gitignore` excludes `.runtime/`, `progress/`, and `reviews/`
|
|
84
|
+
without editing the owner's root ignore file. Those paths are exact — hooks and later
|
|
85
|
+
skills read them by name. Every section left unfilled carries
|
|
86
|
+
`[NEEDS CLARIFICATION]`, and which of those you resolve now has a checkable rule:
|
|
87
|
+
**what can be read out of repository files, you fill; what needs investigation,
|
|
88
|
+
research fills.**
|
|
89
|
+
|
|
90
|
+
Git is not a preference. Reconciliation reads `git log` and `git diff`, staleness
|
|
91
|
+
detection compares against `HEAD`, archiving is a `git mv`, and rollback is Git.
|
|
92
|
+
If `.git` is absent, run `git init`. Report the uncommitted initialized files and ask
|
|
93
|
+
for commit authority only if the owner wants that separate effect now.
|
|
94
|
+
|
|
95
|
+
## When the owner decides
|
|
96
|
+
|
|
97
|
+
Only the five things above, and only through the grilling loop. Replacing
|
|
98
|
+
authority that already exists and looks healthy is the owner's call, never a
|
|
99
|
+
convenience on the way to a clean start — preserve it and report what you found.
|
|
44
100
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
101
|
+
Where the host cannot ask at all, leave the one-line goal empty and say plainly
|
|
102
|
+
that it is empty, that goal injection will therefore be empty, and that the next
|
|
103
|
+
skill asks again. Do not infer it from the directory name.
|
|
48
104
|
|
|
49
|
-
##
|
|
105
|
+
## References
|
|
50
106
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
107
|
+
- `../ultra-grilling/SKILL.md` — the loop; read it before the first question.
|
|
108
|
+
- `../ultra-domain-modeling/SKILL.md` — read when the first term needs writing.
|
|
109
|
+
- `references/brownfield-adoption.md` — read for either existing-code route.
|
|
110
|
+
- `../ultra-think/references/autonomy-boundary.md` — read before touching
|
|
111
|
+
authority that already exists.
|
|
@@ -1,99 +1,49 @@
|
|
|
1
1
|
# Brownfield adoption
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
Use this procedure only when `ultra-init` detects an existing codebase without a
|
|
4
|
+
healthy `.ultra/` authority surface. Initialization records the observable baseline;
|
|
5
|
+
it does not redesign the application or accept claims the repository cannot support.
|
|
5
6
|
|
|
6
7
|
## Bind the repository boundary
|
|
7
8
|
|
|
8
|
-
Record the repository root, selected
|
|
9
|
-
generated and vendored exclusions, manifests, verification commands, and public
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Record the repository root, selected workspace roots, branch, `HEAD`, dirty files,
|
|
10
|
+
generated and vendored exclusions, manifests, verification commands, and public
|
|
11
|
+
seams. Keep out-of-scope dirty files visible as context without treating them as part
|
|
12
|
+
of the selected baseline.
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
files outside that scope separately as repository context, but do not include them in
|
|
15
|
-
the baseline digest. Require `accept_dirty_worktree: true` only after the owner confirms
|
|
16
|
-
the exact in-scope `worktree_files` returned by the server.
|
|
14
|
+
## Inspect the maintained system
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
Trace product behavior through real entry points, runtime consumers, persistence,
|
|
17
|
+
integrations, permissions, failure paths, tests, deployment, observability, and
|
|
18
|
+
recovery. Classify every material statement as `Observed`, `Verified`, `Decided`, or
|
|
19
|
+
`Unknown`. Record maintained-document conflicts as drift.
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
## Write the baseline once
|
|
21
22
|
|
|
22
|
-
- product
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
23
|
+
- Update `.ultra/specs/product.md` with delivered behavior and acceptance.
|
|
24
|
+
- Update `.ultra/specs/architecture.md` with boundaries, authority, consumers,
|
|
25
|
+
permissions, failures, and recovery.
|
|
26
|
+
- Update `.ultra/specs/discovery.md` with scope evidence, known defects, drift, and
|
|
27
|
+
unresolved questions.
|
|
28
|
+
- Initialize `.ultra/tasks.json` and `.ultra/test-report.json` from the packaged
|
|
29
|
+
templates without manufacturing passing results.
|
|
27
30
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
record only bounded metadata references.
|
|
31
|
+
Use the specifications as the canonical representation. Do not create a second
|
|
32
|
+
baseline ledger, database projection, or generated semantic mirror.
|
|
31
33
|
|
|
32
|
-
##
|
|
33
|
-
|
|
34
|
-
Update `.ultra/specs/product.md` with current delivered behavior and acceptance. Update
|
|
35
|
-
`.ultra/specs/architecture.md` with real boundaries, owners, writers, consumers,
|
|
36
|
-
consistency rules, permissions, failures, and recovery. Use `discovery.md` for scope
|
|
37
|
-
evidence, decisions, and unresolved questions.
|
|
38
|
-
|
|
39
|
-
Capture current facts without redesigning the application or manufacturing product
|
|
40
|
-
narratives that are absent from evidence.
|
|
41
|
-
|
|
42
|
-
## Run characterization verification
|
|
34
|
+
## Characterize verification
|
|
43
35
|
|
|
44
36
|
Run the repository's existing verification commands. Record each result as `pass`,
|
|
45
|
-
`known_red`, or `not_run
|
|
46
|
-
|
|
47
|
-
seam that has no stable verification signal; create its ordinary task only after the
|
|
48
|
-
baseline is ready.
|
|
49
|
-
|
|
50
|
-
## Maintain the gap ledger
|
|
51
|
-
|
|
52
|
-
Record every adoption gap with a stable id, evidence references, owner, blocking flag,
|
|
53
|
-
and one category:
|
|
54
|
-
|
|
55
|
-
- `baseline_blocker`: the model should recommend against adoption until resolved or
|
|
56
|
-
the owner explicitly accepts the recorded risk;
|
|
57
|
-
- `documentation_drift`: maintained prose conflicts with observed behavior;
|
|
58
|
-
- `known_defect`: reproducible incorrect behavior;
|
|
59
|
-
- `technical_debt`: accepted maintainability or quality cost;
|
|
60
|
-
- `unknown`: evidence is insufficient;
|
|
61
|
-
- `future_change`: desired behavior outside the current baseline.
|
|
62
|
-
|
|
63
|
-
Use `open` for unresolved gaps, `accepted` for owner-accepted debt,
|
|
64
|
-
`resolved` when evidence closes the gap, and `deferred` for explicitly postponed
|
|
65
|
-
work. Keep every open `baseline_blocker` visible as a semantic warning. It does not
|
|
66
|
-
become a SQLite hard gate: the model explains the risk, recommends resolution, and may
|
|
67
|
-
record owner-authorized adoption without erasing the gap. Do not convert the ledger
|
|
68
|
-
into hundreds of application tasks.
|
|
69
|
-
|
|
70
|
-
## Record authority
|
|
71
|
-
|
|
72
|
-
Use `ultra.record` with `kind: baseline`, `action: observe`, and full replacement
|
|
73
|
-
arrays for:
|
|
74
|
-
|
|
75
|
-
- scope and repository revision;
|
|
76
|
-
- repository classification;
|
|
77
|
-
- product and architecture specification paths;
|
|
78
|
-
- bounded source, documentation, runtime, test, deployment, or external references;
|
|
79
|
-
- verification results;
|
|
80
|
-
- blocking and non-blocking unknowns;
|
|
81
|
-
- the complete gap ledger;
|
|
82
|
-
- external provider metadata references, when supplied.
|
|
83
|
-
|
|
84
|
-
Use the server-returned revision, branch, worktree digest, and specification digests.
|
|
37
|
+
`known_red`, or `not_run`; a missing command is not a pass. A critical public seam
|
|
38
|
+
without a stable signal is an explicit gap, not an excuse to invent completion.
|
|
85
39
|
|
|
86
|
-
##
|
|
40
|
+
## Converge
|
|
87
41
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
42
|
+
Read every written file back, show the owner the selected scope, observed behavior,
|
|
43
|
+
drift, known-red verification, unknowns, and material decisions, and leave unresolved
|
|
44
|
+
items marked `[NEEDS CLARIFICATION]`. Adoption is ready when the file set is complete,
|
|
45
|
+
the recorded revision matches the inspected checkout, and every material gap remains
|
|
46
|
+
visible with its evidence and owner decision where one exists.
|
|
93
47
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
baseline, every material open gap is visible with its owner/risk and any acceptance is
|
|
97
|
-
explicit in the approval note, and project doctor has no mechanical authority failure.
|
|
98
|
-
Route all selected work through `ultra-change`, including work described by a legacy
|
|
99
|
-
plan. Import its accepted intent into a current Change Contract before planning.
|
|
48
|
+
Recommend `ultra-change` for subsequent work and stop; public skills do not invoke one
|
|
49
|
+
another.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const fs = require('node:fs');
|
|
5
|
+
const path = require('node:path');
|
|
6
|
+
|
|
7
|
+
function usage() {
|
|
8
|
+
return 'usage: init_project.cjs --project <repository-root>';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function parseArgs(argv) {
|
|
12
|
+
if (argv.length !== 2 || argv[0] !== '--project' || !argv[1]) {
|
|
13
|
+
throw new Error(usage());
|
|
14
|
+
}
|
|
15
|
+
return path.resolve(argv[1]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function listFiles(root) {
|
|
19
|
+
const files = [];
|
|
20
|
+
(function walk(directory) {
|
|
21
|
+
for (const entry of fs.readdirSync(directory, { withFileTypes: true })) {
|
|
22
|
+
const file = path.join(directory, entry.name);
|
|
23
|
+
if (entry.isDirectory()) walk(file);
|
|
24
|
+
else if (entry.isFile()) files.push(path.relative(root, file));
|
|
25
|
+
}
|
|
26
|
+
}(root));
|
|
27
|
+
return files.sort();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function templateRoot() {
|
|
31
|
+
const installed = path.resolve(__dirname, '..', 'assets', 'project-template');
|
|
32
|
+
if (fs.existsSync(installed)) return installed;
|
|
33
|
+
const checkout = path.resolve(__dirname, '..', '..', '..', '.ultra-template');
|
|
34
|
+
if (fs.existsSync(checkout)) return checkout;
|
|
35
|
+
throw new Error('ultra-init project template is missing');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function ensurePlainDirectory(directory, label) {
|
|
39
|
+
const stat = fs.lstatSync(directory);
|
|
40
|
+
if (!stat.isDirectory() || stat.isSymbolicLink()) {
|
|
41
|
+
throw new Error(`${label} must be a real directory: ${directory}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function initialize(project) {
|
|
46
|
+
if (!fs.existsSync(project)) throw new Error(`project does not exist: ${project}`);
|
|
47
|
+
ensurePlainDirectory(project, 'project');
|
|
48
|
+
const source = templateRoot();
|
|
49
|
+
const ultra = path.join(project, '.ultra');
|
|
50
|
+
if (fs.existsSync(ultra)) ensurePlainDirectory(ultra, '.ultra');
|
|
51
|
+
else fs.mkdirSync(ultra);
|
|
52
|
+
|
|
53
|
+
const created = [];
|
|
54
|
+
const preserved = [];
|
|
55
|
+
for (const relative of listFiles(source)) {
|
|
56
|
+
const target = path.join(ultra, relative);
|
|
57
|
+
if (fs.existsSync(target)) {
|
|
58
|
+
preserved.push(relative);
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
62
|
+
fs.copyFileSync(path.join(source, relative), target, fs.constants.COPYFILE_EXCL);
|
|
63
|
+
created.push(relative);
|
|
64
|
+
}
|
|
65
|
+
for (const relative of [...created, ...preserved]) {
|
|
66
|
+
if (!fs.existsSync(path.join(ultra, relative))) {
|
|
67
|
+
throw new Error(`initialization read-back failed: ${relative}`);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
$schema: 'ultra-init-result-v1',
|
|
72
|
+
project,
|
|
73
|
+
template: source,
|
|
74
|
+
created,
|
|
75
|
+
preserved,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
try {
|
|
80
|
+
process.stdout.write(`${JSON.stringify(initialize(parseArgs(process.argv.slice(2))), null, 2)}\n`);
|
|
81
|
+
} catch (error) {
|
|
82
|
+
process.stderr.write(`${error.message}\n`);
|
|
83
|
+
process.exitCode = 1;
|
|
84
|
+
}
|
|
@@ -1,72 +1,92 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ultra-plan
|
|
3
|
-
description: Turn an
|
|
3
|
+
description: Turn an evidenced Change intent into a dependency-valid task ledger, confirmed test seams, and resumable task contexts. Use when implementation needs decomposition, a wide refactor needs an expand-contract route, or an interrupted plan must be reconstructed from repository files.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
#
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
|
|
13
|
-
1.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
3.
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
`
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
6
|
+
# Turn one Change into executable tracer bullets
|
|
7
|
+
|
|
8
|
+
Planning owns decomposition and technical design. Files carry the result across
|
|
9
|
+
sessions and hosts; no runtime state decides whether the plan is meaningful.
|
|
10
|
+
|
|
11
|
+
## Before you start
|
|
12
|
+
|
|
13
|
+
1. Read `.ultra/tasks.json`; if a task is unfinished, read its `context_file` and
|
|
14
|
+
closing `## Resume Note` before replacing or extending anything.
|
|
15
|
+
2. Read `CONTEXT.md` for vocabulary and the relevant `.ultra/decisions/` entries.
|
|
16
|
+
3. Read the active Change intent, its `trace_to` specification anchors, and the
|
|
17
|
+
source, tests, consumers and recovery paths those anchors describe.
|
|
18
|
+
|
|
19
|
+
## Definition of done
|
|
20
|
+
|
|
21
|
+
- `.ultra/tasks.json` and one `.ultra/contexts/task-<id>.md` per task agree on
|
|
22
|
+
identifiers, status, dependencies and trace anchors.
|
|
23
|
+
- The owner confirmed the scope posture and the seam list.
|
|
24
|
+
- Every feature task is a tracer bullet touching at least two layers, unless the
|
|
25
|
+
Change itself demonstrably touches only one layer.
|
|
26
|
+
- Coverage, dependency, trace, scope and context-budget checks have concrete results.
|
|
27
|
+
|
|
28
|
+
## Fix the planning posture
|
|
29
|
+
|
|
30
|
+
Choose `EXPAND`, `SELECTIVE`, `HOLD` or `REDUCE`; default to `SELECTIVE`. Once
|
|
31
|
+
chosen, keep that posture visible in the active Change intent rather than silently drifting.
|
|
32
|
+
Write it to the active Change `intent.md` under `## Planning Posture`; there is no
|
|
33
|
+
separate `plan.md` authority.
|
|
34
|
+
Use `../ultra-grilling/SKILL.md` through the host-native question surface when the
|
|
35
|
+
choice remains material, one question with a recommendation at a time.
|
|
36
|
+
|
|
37
|
+
If the work cannot fit in one session *and* the path itself is still unclear, use
|
|
38
|
+
`../ultra-think/SKILL.md` to resolve decision tickets before decomposing tasks.
|
|
39
|
+
|
|
40
|
+
## Choose the plan shape
|
|
41
|
+
|
|
42
|
+
Use tracer bullets for ordinary work: each slice delivers one observable path through
|
|
43
|
+
the layers it changes. Use expand–contract only when one mechanical change has a
|
|
44
|
+
repository-wide blast radius and no vertical slice can keep the checkout green:
|
|
45
|
+
expand with old and new forms, migrate bounded batches, then contract the old form.
|
|
46
|
+
|
|
47
|
+
Build the graph with these structural defences:
|
|
48
|
+
|
|
49
|
+
- **Walking Skeleton**: Task 1 traverses every layer this Change touches through one
|
|
50
|
+
real request and real data. A genuinely one-layer Change does not invent one.
|
|
51
|
+
- **Contract task**: create it before both implementations when targets cross two top-
|
|
52
|
+
level source directories or two processes/services.
|
|
53
|
+
- **Integration Checkpoint**: insert one after every three or four feature tasks.
|
|
54
|
+
- A feature task that touches only one of several affected layers is merged or split
|
|
55
|
+
into a tracer bullet; moving a whole layer into one task is horizontal slicing.
|
|
56
|
+
|
|
57
|
+
Confirm the seam list before tests are written. Reuse an existing public seam and use
|
|
58
|
+
the highest seam that observes the behavior; one seam is ideal when it covers the path.
|
|
59
|
+
|
|
60
|
+
## Write the files
|
|
61
|
+
|
|
62
|
+
Each task records `id`, `title`, `type`, `priority`, `complexity`, `status`,
|
|
63
|
+
`dependencies`, `context_file`, `trace_to` and `change_ref`. Complexity is only a
|
|
64
|
+
splitting and context signal: 1–2 is local, 3–5 is bounded, 6–7 crosses a boundary,
|
|
65
|
+
and complexity > 7 must split.
|
|
66
|
+
|
|
67
|
+
Each context records Acceptance, confirmed seams, layers touched, target files,
|
|
68
|
+
Implementation, verification commands, Definition of Drift, Change Log, Completion
|
|
69
|
+
and Resume Note. Read every file back; task count and context count must match.
|
|
70
|
+
|
|
71
|
+
## Verify the plan
|
|
72
|
+
|
|
73
|
+
1. Map every in-scope user story or acceptance anchor to at least one task.
|
|
74
|
+
2. Walk dependencies and repair every cycle with the exact cycle chain visible.
|
|
75
|
+
3. Resolve every `trace_to` path and heading against a real file.
|
|
76
|
+
4. Surface complexity, more than eight target files, or more than twenty tasks as
|
|
77
|
+
scope warnings; they are observations, not semantic verdicts.
|
|
78
|
+
5. Estimate context at roughly `complexity × 5%`; surface anything above 40%.
|
|
79
|
+
|
|
80
|
+
Report the graph, frontier, seams, warnings and first task. Recommend the next explicit
|
|
81
|
+
capability from the files; do not invoke it.
|
|
82
|
+
|
|
83
|
+
## When the owner decides
|
|
84
|
+
|
|
85
|
+
The owner chooses the posture, confirms seams, resolves reductions and accepts material
|
|
86
|
+
omissions. Mechanical cycles and broken paths are repaired before handoff because they
|
|
87
|
+
make the written graph impossible to execute.
|
|
88
|
+
|
|
89
|
+
## References
|
|
90
|
+
|
|
91
|
+
- `../ultra-grilling/SKILL.md` — read before a material posture or seam question.
|
|
92
|
+
- `../ultra-think/SKILL.md` — read when fog of war requires decision tickets.
|