ultra-builder-pro-cli 0.5.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/delivery-report.json +9 -0
- package/.ultra-template/docs/research/README.md +53 -0
- package/.ultra-template/specs/architecture.md +250 -0
- package/.ultra-template/specs/discovery.md +248 -0
- package/.ultra-template/specs/product.md +223 -0
- package/.ultra-template/tasks/contexts/TEMPLATE.md +57 -0
- package/.ultra-template/tasks/tasks.json +33 -0
- package/.ultra-template/test-report.json +8 -0
- package/CHANGELOG.md +194 -0
- package/LICENSE +21 -0
- package/README.md +187 -0
- package/adapters/_shared/codex-assets.cjs +1128 -0
- package/adapters/_shared/codex-ultra-tools-entry.cjs +11 -0
- package/adapters/_shared/file-ops.cjs +115 -0
- package/adapters/_shared/frontmatter.cjs +52 -0
- package/adapters/_shared/handbook.cjs +144 -0
- package/adapters/_shared/md-to-toml.cjs +54 -0
- package/adapters/_shared/path-rewrite.cjs +79 -0
- package/adapters/_shared/rtk-detect.cjs +86 -0
- package/adapters/_shared/runtime-assets.cjs +70 -0
- package/adapters/_shared/settings-merge.cjs +76 -0
- package/adapters/_shared/tests/file-ops.test.cjs +54 -0
- package/adapters/_shared/tests/frontmatter.test.cjs +47 -0
- package/adapters/_shared/tests/handbook.test.cjs +86 -0
- package/adapters/_shared/tests/md-to-toml.test.cjs +48 -0
- package/adapters/_shared/tests/path-rewrite.test.cjs +60 -0
- package/adapters/_shared/tests/resolve-target.test.cjs +85 -0
- package/adapters/_shared/tests/rtk-detect.test.cjs +116 -0
- package/adapters/_shared/tests/runtime-assets.test.cjs +107 -0
- package/adapters/_shared/tests/settings-merge.test.cjs +85 -0
- package/adapters/_shared/tests/validate.test.cjs +30 -0
- package/adapters/_shared/validate.cjs +24 -0
- package/adapters/claude.js +182 -0
- package/adapters/codex.js +385 -0
- package/adapters/gemini.js +204 -0
- package/adapters/opencode.js +506 -0
- package/adapters/tests/claude.test.cjs +117 -0
- package/adapters/tests/codex-hook.test.cjs +90 -0
- package/adapters/tests/codex.test.cjs +356 -0
- package/adapters/tests/gemini.test.cjs +112 -0
- package/adapters/tests/opencode.test.cjs +246 -0
- package/agents/code-reviewer.md +102 -0
- package/agents/debugger.md +127 -0
- package/agents/review-code.md +125 -0
- package/agents/review-comments.md +98 -0
- package/agents/review-coordinator.md +146 -0
- package/agents/review-design.md +133 -0
- package/agents/review-errors.md +87 -0
- package/agents/review-tests.md +93 -0
- package/agents/tdd-runner.md +92 -0
- package/bin/handbook.js +54 -0
- package/bin/install.js +254 -0
- package/bin/orchestrator.js +214 -0
- package/commands/learn.md +41 -0
- package/commands/ultra-deliver.md +45 -0
- package/commands/ultra-dev.md +50 -0
- package/commands/ultra-init.md +51 -0
- package/commands/ultra-plan.md +49 -0
- package/commands/ultra-research.md +59 -0
- package/commands/ultra-status.md +46 -0
- package/commands/ultra-test.md +48 -0
- package/commands/ultra-think.md +45 -0
- package/docs/AGENT-CONTEXT.md +143 -0
- package/docs/ARCHITECTURE.md +197 -0
- package/docs/COMMIT-HASH-BACKFILL.md +101 -0
- package/docs/LEGACY-HERMES.md +1175 -0
- package/docs/PLAN.zh-CN.md +1683 -0
- package/docs/ROADMAP.md +102 -0
- package/docs/RUNTIME-COMPAT-MATRIX.md +98 -0
- package/docs/STATE-DB-ACCESS-POLICY.md +109 -0
- package/docs/USER-HANDBOOK-CONTRACT.md +61 -0
- package/hooks/README.md +24 -0
- package/hooks/active_task_context.py +44 -0
- package/hooks/adapters/codex.py +302 -0
- package/hooks/health_check.py +61 -0
- package/hooks/pre_stop_check.py +56 -0
- package/hooks/subagent_tracker.py +116 -0
- package/hooks/workflow_checkpoint.py +56 -0
- package/hooks/workflow_context.py +63 -0
- package/hooks/workflow_resume.py +50 -0
- package/mcp-server/lib/init-project.cjs +162 -0
- package/mcp-server/lib/llm-client.cjs +157 -0
- package/mcp-server/lib/llm-client.test.cjs +156 -0
- package/mcp-server/lib/plan-store.cjs +96 -0
- package/mcp-server/lib/plan-store.test.cjs +132 -0
- package/mcp-server/lib/prd-parser.cjs +110 -0
- package/mcp-server/lib/prd-parser.test.cjs +171 -0
- package/mcp-server/lib/pricing.cjs +53 -0
- package/mcp-server/lib/projector.cjs +158 -0
- package/mcp-server/lib/state-db.cjs +113 -0
- package/mcp-server/lib/state-db.test.cjs +116 -0
- package/mcp-server/lib/state-ops.cjs +725 -0
- package/mcp-server/lib/task-expander.cjs +123 -0
- package/mcp-server/lib/task-expander.test.cjs +253 -0
- package/mcp-server/lib/telemetry.cjs +72 -0
- package/mcp-server/lib/topo.cjs +131 -0
- package/mcp-server/lib/topo.test.cjs +158 -0
- package/mcp-server/server.cjs +482 -0
- package/mcp-server/tests/circuit-breaker.test.cjs +125 -0
- package/mcp-server/tests/commit-hash-flow.test.cjs +117 -0
- package/mcp-server/tests/concurrency-update.test.cjs +96 -0
- package/mcp-server/tests/concurrency.test.cjs +112 -0
- package/mcp-server/tests/db-ops.test.cjs +117 -0
- package/mcp-server/tests/init-project.test.cjs +141 -0
- package/mcp-server/tests/migrate.test.cjs +144 -0
- package/mcp-server/tests/projector.test.cjs +130 -0
- package/mcp-server/tests/server-contract.test.cjs +750 -0
- package/mcp-server/tests/staleness.test.cjs +190 -0
- package/mcp-server/tests/state-ops.test.cjs +286 -0
- package/mcp-server/tests/tagged-tasks.test.cjs +163 -0
- package/mcp-server/tests/telemetry.test.cjs +205 -0
- package/orchestrator/auto-merge.cjs +109 -0
- package/orchestrator/code-graph-watcher.cjs +121 -0
- package/orchestrator/daemon.cjs +112 -0
- package/orchestrator/dispatch-rules.cjs +93 -0
- package/orchestrator/parallel-orchestrator.cjs +195 -0
- package/orchestrator/planner/expand-prompt.cjs +62 -0
- package/orchestrator/planner/expand-prompt.test.cjs +52 -0
- package/orchestrator/planner/plan-builder.cjs +116 -0
- package/orchestrator/planner/plan-builder.test.cjs +165 -0
- package/orchestrator/planner/prd-prompt.cjs +44 -0
- package/orchestrator/planner/prd-prompt.test.cjs +30 -0
- package/orchestrator/recovery.cjs +70 -0
- package/orchestrator/session-runner.cjs +224 -0
- package/orchestrator/skill-miner.cjs +133 -0
- package/orchestrator/tests/auto-merge.test.cjs +216 -0
- package/orchestrator/tests/code-graph-watcher.test.cjs +183 -0
- package/orchestrator/tests/daemon.test.cjs +260 -0
- package/orchestrator/tests/dispatch-rules.test.cjs +122 -0
- package/orchestrator/tests/parallel-orchestrator.test.cjs +233 -0
- package/orchestrator/tests/phase-8b-gate.test.cjs +183 -0
- package/orchestrator/tests/recovery.test.cjs +190 -0
- package/orchestrator/tests/session-runner.test.cjs +314 -0
- package/orchestrator/tests/skill-miner.test.cjs +147 -0
- package/orchestrator/tests/worktree-manager.test.cjs +148 -0
- package/orchestrator/worktree-manager.cjs +131 -0
- package/output-styles/coding-vibes.md +67 -0
- package/output-styles/structural-thinking.md +61 -0
- package/package.json +109 -0
- package/settings.json +8 -0
- package/skills/cc-collab/SKILL.md +41 -0
- package/skills/code-review-expert/SKILL.md +118 -0
- package/skills/code-review-expert/references/code-quality-checklist.md +112 -0
- package/skills/code-review-expert/references/integration-checklist.md +46 -0
- package/skills/code-review-expert/references/removal-plan.md +52 -0
- package/skills/code-review-expert/references/security-checklist.md +100 -0
- package/skills/code-review-expert/references/solid-checklist.md +65 -0
- package/skills/codex-collab/SKILL.md +52 -0
- package/skills/codex-collab/evals/evals.json +40 -0
- package/skills/gemini-collab/SKILL.md +51 -0
- package/skills/gemini-collab/evals/evals.json +42 -0
- package/skills/integration-rules/SKILL.md +71 -0
- package/skills/learn/SKILL.md +117 -0
- package/skills/security-rules/SKILL.md +60 -0
- package/skills/testing-rules/SKILL.md +56 -0
- package/skills/ultra-deliver/SKILL.md +171 -0
- package/skills/ultra-dev/SKILL.md +324 -0
- package/skills/ultra-init/SKILL.md +148 -0
- package/skills/ultra-plan/SKILL.md +314 -0
- package/skills/ultra-research/SKILL.md +156 -0
- package/skills/ultra-research/steps/step-00-problem-validation.md +154 -0
- package/skills/ultra-research/steps/step-01-opportunity-discovery.md +172 -0
- package/skills/ultra-research/steps/step-02-market-assessment.md +195 -0
- package/skills/ultra-research/steps/step-03-competitive-landscape.md +197 -0
- package/skills/ultra-research/steps/step-04-product-strategy.md +196 -0
- package/skills/ultra-research/steps/step-05-assumptions-validation.md +234 -0
- package/skills/ultra-research/steps/step-10-user-personas.md +169 -0
- package/skills/ultra-research/steps/step-11-user-scenarios.md +181 -0
- package/skills/ultra-research/steps/step-20-user-stories.md +156 -0
- package/skills/ultra-research/steps/step-21-features-scope.md +157 -0
- package/skills/ultra-research/steps/step-22-success-metrics.md +195 -0
- package/skills/ultra-research/steps/step-30-architecture-context.md +154 -0
- package/skills/ultra-research/steps/step-31-solution-strategy.md +172 -0
- package/skills/ultra-research/steps/step-32-building-blocks.md +188 -0
- package/skills/ultra-research/steps/step-40-deployment.md +123 -0
- package/skills/ultra-research/steps/step-41-quality-risks.md +135 -0
- package/skills/ultra-research/steps/step-99-synthesis.md +188 -0
- package/skills/ultra-review/SKILL.md +437 -0
- package/skills/ultra-review/references/unified-schema.md +127 -0
- package/skills/ultra-review/scripts/review_verdict_update.py +99 -0
- package/skills/ultra-review/scripts/review_wait.py +120 -0
- package/skills/ultra-status/SKILL.md +162 -0
- package/skills/ultra-test/SKILL.md +195 -0
- package/skills/ultra-think/SKILL.md +109 -0
- package/skills/ultra-verify/SKILL.md +111 -0
- package/skills/ultra-verify/evals/evals.json +51 -0
- package/skills/ultra-verify/references/confidence-system.md +38 -0
- package/skills/ultra-verify/references/cross-verify-modes.md +73 -0
- package/skills/ultra-verify/scripts/verify_wait.py +131 -0
- package/spec/cli-protocol.md +118 -0
- package/spec/mcp-tools.yaml +658 -0
- package/spec/schemas/command-manifest.schema.json +47 -0
- package/spec/schemas/context-file.v4.5.schema.json +54 -0
- package/spec/schemas/mcp-tools.schema.json +136 -0
- package/spec/schemas/skill-manifest.schema.json +94 -0
- package/spec/schemas/state-db.sql +154 -0
- package/spec/schemas/tasks.v4.5.schema.json +66 -0
- package/ultra-tools/cli.cjs +121 -0
- package/ultra-tools/commands/db.cjs +175 -0
- package/ultra-tools/commands/legacy-memory.cjs +159 -0
- package/ultra-tools/commands/migrate.cjs +354 -0
- package/ultra-tools/commands/session.cjs +180 -0
- package/ultra-tools/commands/status.cjs +158 -0
- package/ultra-tools/commands/task.cjs +95 -0
- package/ultra-tools/legacy-memory.test.cjs +80 -0
- package/ultra-tools/status-command.test.cjs +132 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Commit-hash backfill — two-commit completion flow
|
|
2
|
+
|
|
3
|
+
> Phase 2.8 contract. Replaces the v4.4 `git commit --amend` step with an
|
|
4
|
+
> append-only flow that survives the SQLite authority model.
|
|
5
|
+
> Hook wiring lives in Phase 3 (`skills/ultra-dev/SKILL.md` Step 6).
|
|
6
|
+
|
|
7
|
+
## Why we changed
|
|
8
|
+
|
|
9
|
+
In v4.4 the per-task `context md` carried a `completion_commit` field
|
|
10
|
+
in its frontmatter. The legacy flow was:
|
|
11
|
+
|
|
12
|
+
1. `git commit -m "feat: …"` to land the implementation
|
|
13
|
+
2. read the freshly-created commit hash
|
|
14
|
+
3. edit `contexts/task-N.md` to write the hash into the header
|
|
15
|
+
4. `git commit --amend --no-edit` to fold the edit into the same commit
|
|
16
|
+
|
|
17
|
+
That last step makes the commit non-atomic (the second write produces
|
|
18
|
+
a new SHA, invalidating the value we just stamped). It also fights the
|
|
19
|
+
v4.5 authority rule (D32) — the projector is the only writer to
|
|
20
|
+
`contexts/task-N.md`, so any handwritten edit gets stomped.
|
|
21
|
+
|
|
22
|
+
## The new flow
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
┌──────────────────────────────────┐
|
|
26
|
+
│ 1. feat commit │ context md still has empty
|
|
27
|
+
│ git add … && git commit │ completion_commit (projector
|
|
28
|
+
│ -m "feat: task-N — title" │ emitted it from a NULL row)
|
|
29
|
+
└──────────────────┬───────────────┘
|
|
30
|
+
▼
|
|
31
|
+
┌──────────────────────────────────┐
|
|
32
|
+
│ 2. read the new SHA │ hash = `git rev-parse HEAD`
|
|
33
|
+
└──────────────────┬───────────────┘
|
|
34
|
+
▼
|
|
35
|
+
┌──────────────────────────────────┐
|
|
36
|
+
│ 3. update state.db │ ops.patchTask(db, id,
|
|
37
|
+
│ │ { completion_commit: hash })
|
|
38
|
+
└──────────────────┬───────────────┘
|
|
39
|
+
▼
|
|
40
|
+
┌──────────────────────────────────┐
|
|
41
|
+
│ 4. projector regenerates the │ projector.projectContext(db, id)
|
|
42
|
+
│ context md header with the │ writes a new contexts/task-N.md
|
|
43
|
+
│ completion_commit value │ whose YAML now contains the hash
|
|
44
|
+
└──────────────────┬───────────────┘
|
|
45
|
+
▼
|
|
46
|
+
┌──────────────────────────────────┐
|
|
47
|
+
│ 5. chore commit │ git add contexts/task-N.md
|
|
48
|
+
│ │ git commit -m
|
|
49
|
+
│ │ "chore: record task-N hash"
|
|
50
|
+
└──────────────────────────────────┘
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The result in `git log --oneline`:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
2222222 chore: record task-N completion hash
|
|
57
|
+
1111111 feat: task-N — <title>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Both commits are immutable. The chore commit is small (only the
|
|
61
|
+
projection file changed) and is trivial to revert if the wrong task is
|
|
62
|
+
recorded.
|
|
63
|
+
|
|
64
|
+
## Why two commits, not amend
|
|
65
|
+
|
|
66
|
+
- **Atomic history.** Each SHA is final the moment it is written.
|
|
67
|
+
- **Idempotent.** Re-running the chore commit on the same hash is a
|
|
68
|
+
no-op (projector emits the same bytes).
|
|
69
|
+
- **Survives the projector contract.** The projection is the only
|
|
70
|
+
writer to `contexts/task-N.md`; this flow keeps that promise.
|
|
71
|
+
- **Audit trail.** Reviewers can see the implementation diff (commit 1)
|
|
72
|
+
separately from the bookkeeping diff (commit 2).
|
|
73
|
+
|
|
74
|
+
## Hook integration (Phase 3)
|
|
75
|
+
|
|
76
|
+
The post-commit hook installed by `skills/ultra-dev/` will invoke this
|
|
77
|
+
flow as soon as a feat commit lands on a task branch:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
post-commit hook → if commit message starts with "feat:" and the
|
|
81
|
+
working tree contains contexts/task-N.md →
|
|
82
|
+
ultra-tools task update --id task-N \
|
|
83
|
+
--completion-commit $(git rev-parse HEAD) &&
|
|
84
|
+
git add contexts/task-N.md &&
|
|
85
|
+
git commit -m "chore: record task-N completion hash"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Until that hook lands, contributors run the two commits manually. The
|
|
89
|
+
contract above is what the hook will codify.
|
|
90
|
+
|
|
91
|
+
## Verification
|
|
92
|
+
|
|
93
|
+
`mcp-server/tests/commit-hash-flow.test.cjs` builds a throwaway git
|
|
94
|
+
repo, walks the five steps in-process, and asserts:
|
|
95
|
+
|
|
96
|
+
- `git log --oneline -2` shows `chore: record task-N completion hash`
|
|
97
|
+
on top of `feat: task-N — …`.
|
|
98
|
+
- The post-projection `contexts/task-N.md` frontmatter contains the
|
|
99
|
+
exact SHA produced by the feat commit.
|
|
100
|
+
- Re-running step 4 + step 5 against the same SHA is a no-op (the
|
|
101
|
+
chore commit is empty and skipped).
|