ultra-builder-pro-cli 0.26.2 → 3.0.2

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.
Files changed (67) hide show
  1. package/.ultra-template/contexts/TEMPLATE.md +64 -29
  2. package/.ultra-template/north-star.md +35 -18
  3. package/.ultra-template/tasks.json +1 -0
  4. package/.ultra-template/test-report.json +17 -1
  5. package/CHANGELOG.md +163 -1
  6. package/README.md +108 -38
  7. package/adapters/_shared/host-profile.cjs +68 -12
  8. package/adapters/_shared/plugin-core.cjs +4 -5
  9. package/adapters/_shared/runtime-assets.cjs +11 -2
  10. package/adapters/zcode.js +375 -0
  11. package/bin/delegate-worker.cjs +20 -0
  12. package/bin/delegate.cjs +94 -25
  13. package/bin/install.js +11 -6
  14. package/docs/ARCHITECTURE.md +84 -23
  15. package/docs/ARTIFACT-AUTHORITY.md +167 -22
  16. package/docs/DECISIONS.md +131 -17
  17. package/docs/PHILOSOPHY.md +58 -7
  18. package/docs/PLUGIN-ISOLATION-CONTRACT.md +6 -0
  19. package/docs/RUNTIME-COMPAT-MATRIX.md +106 -13
  20. package/docs/SKILL-AUTHORING.md +4 -3
  21. package/docs/WORKFLOW-LIFECYCLE.md +126 -28
  22. package/docs/evals/adversarial-review-2026-08-14.md +84 -0
  23. package/docs/evals/zcode-automation-2026-08-14.md +103 -0
  24. package/hooks/README.md +27 -4
  25. package/hooks/_common.py +1678 -61
  26. package/hooks/adapters/zcode.py +227 -0
  27. package/hooks/compact_context.py +176 -17
  28. package/hooks/mid_workflow_recall.py +27 -5
  29. package/hooks/post_edit_guard.py +133 -23
  30. package/hooks/session_context.py +707 -22
  31. package/package.json +6 -3
  32. package/skills/ultra-change/SKILL.md +40 -9
  33. package/skills/ultra-change/references/change-contract.md +93 -27
  34. package/skills/ultra-change/references/execution-grant.md +109 -0
  35. package/skills/ultra-change/references/primary-transfer.md +273 -0
  36. package/skills/ultra-change/scripts/validate_primary_transfer.cjs +1928 -0
  37. package/skills/ultra-delegate/SKILL.md +24 -2
  38. package/skills/ultra-delegate/references/delegation-contract.md +21 -1
  39. package/skills/ultra-deliver/SKILL.md +85 -11
  40. package/skills/ultra-dev/SKILL.md +171 -41
  41. package/skills/ultra-grilling/SKILL.md +10 -7
  42. package/skills/ultra-grilling/references/reframing.md +7 -3
  43. package/skills/ultra-init/SKILL.md +44 -7
  44. package/skills/ultra-init/scripts/init_project.cjs +968 -21
  45. package/skills/ultra-plan/SKILL.md +70 -44
  46. package/skills/ultra-plan/references/task-evidence-v2.md +300 -0
  47. package/skills/ultra-plan/scripts/validate_task_evidence.cjs +859 -0
  48. package/skills/ultra-research/SKILL.md +38 -10
  49. package/skills/ultra-research/references/04-product-strategy.md +11 -2
  50. package/skills/ultra-research/references/21-features-scope.md +8 -0
  51. package/skills/ultra-research/references/22-success-metrics.md +4 -3
  52. package/skills/ultra-research/references/99-synthesis.md +19 -2
  53. package/skills/ultra-research/references/north-star-v2.md +168 -0
  54. package/skills/ultra-research/references/wayfinding.md +8 -0
  55. package/skills/ultra-research/scripts/validate_north_star.cjs +1174 -0
  56. package/skills/ultra-review/SKILL.md +201 -27
  57. package/skills/ultra-review/references/adversarial-evaluation.md +31 -0
  58. package/skills/ultra-review/references/spec.md +5 -0
  59. package/skills/ultra-review/references/unified-schema.md +146 -11
  60. package/skills/ultra-review/references/worker-packet.md +151 -8
  61. package/skills/ultra-review/scripts/review_wait.py +2653 -63
  62. package/skills/ultra-status/SKILL.md +95 -11
  63. package/skills/ultra-tdd/SKILL.md +11 -4
  64. package/skills/ultra-tdd/references/test-execution.md +6 -1
  65. package/skills/ultra-test/SKILL.md +145 -17
  66. package/skills/ultra-test/scripts/validate_review_transport.cjs +549 -0
  67. package/skills/ultra-test/scripts/worktree_digest.cjs +518 -30
@@ -24,9 +24,10 @@ baseline, settle domain language, choose a Change, or start another public workf
24
24
 
25
25
  - `.ultra/project-brief.md` contains raw owner intake: one line, a broad outline,
26
26
  explicit inputs already supplied, and open questions handed to Research.
27
- - For a new skeleton, an empty North Star and the three specification skeletons exist.
28
- Recovery preserves any populated authority; Init does not fill semantic sections or
29
- create `CONTEXT.md`.
27
+ - For a new skeleton, a structurally complete North Star v2 with status `unresearched`
28
+ and the three specification skeletons exist. Init does not populate `FP-*`, `NS-*`,
29
+ or `HC-*`; recovery preserves any populated authority, and Init does not create
30
+ `CONTEXT.md`.
30
31
  - Every packaged path was read back after copying, while every pre-existing file stayed
31
32
  byte-identical.
32
33
  - `.git` exists. Commit, push, remote creation, and publication remain separate effects.
@@ -59,12 +60,44 @@ unless evidence conflicts with it.
59
60
 
60
61
  Resolve this loaded Skill's directory, then run
61
62
  `node <ultra-init-skill-dir>/scripts/init_project.cjs --project <repository-root>`.
62
- The script copies only missing files from `assets/project-template`, preserves every
63
- existing file, and reads the complete result back.
63
+ The script stages and reads back only missing files from `assets/project-template`,
64
+ validates the staged North Star from its raw bytes, and then publishes a complete new
65
+ `.ultra/` by atomic rename. Partial recovery publishes each staged file atomically
66
+ without clobbering a concurrent or existing path. A validation or publication failure
67
+ removes a published path only while its current stable identity and digest still match
68
+ this invocation's recorded publication. A workspace edit is preserved and returns the
69
+ typed retryable `initialization_snapshot_changed` diagnostic. Init binds every preserved
70
+ file to one nonblocking, no-follow descriptor/path identity and SHA-256 digest, then
71
+ rechecks all of them before staging, before publication, and before success. It likewise
72
+ captures every staged digest before publication and compares it with a stable target
73
+ snapshot before success. Each file publication takes fresh no-symlink parent-chain and
74
+ resolved-root identity snapshots before and after the effect; detectable directory drift
75
+ stops publication. A failed snapshot `lstat`, `open`, `fstat`, or `read` with no observed
76
+ identity, type, size, or digest change instead returns the typed retryable
77
+ `initialization_snapshot_io_error`; its sanitized `operation`, symbolic `errno`, and
78
+ actionable permission, descriptor-limit, or storage recovery remain in the
79
+ `ultra-init-error-v1` result. The North Star compatibility diagnostic remains
80
+ `preserved_north_star_changed`. A malformed packaged placeholder stops before publication
81
+ with an `ultra-init-error-v1` payload whose `code` is `north_star_template_invalid` and
82
+ whose `diagnostics` preserve the canonical validator entries, including
83
+ `invalid_unresearched_placeholder` for an exact-byte mismatch.
84
+
85
+ This recovery contract assumes a cooperative local workspace. It detects observable
86
+ path-identity or byte drift and preserves the current bytes for retry; it does not claim
87
+ that Node filesystem calls can defeat a malicious operating-system-level replacement.
88
+ Init also binds the root identity of its staging directory. Cleanup recursively removes
89
+ that path only after a fresh no-symlink root rewalk proves the same device and inode. If
90
+ the path was replaced, Init leaves it untouched and returns the retryable typed
91
+ `initialization_cleanup_conflict` diagnostic with the owned identity and manual recovery
92
+ instruction. If a typed initialization failure is already pending, that primary
93
+ diagnostic remains the top-level `ultra-init-error-v1` result and the cleanup diagnostic
94
+ is retained under `cleanup_conflict`, including its identity-bound manual recovery.
95
+ On success every existing file stayed byte-identical and every new file matches its
96
+ packaged digest.
64
97
 
65
98
  ```text
66
99
  .ultra/project-brief.md raw intake and initial outline
67
- .ultra/north-star.md empty Research-owned steering contract
100
+ .ultra/north-star.md unresearched Research-owned placeholder
68
101
  .ultra/specs/{product,architecture,discovery}.md empty specification skeletons
69
102
  .ultra/specs/research-distillate.md empty Research synthesis skeleton
70
103
  .ultra/{tasks.json,test-report.json} empty or not-yet-run ledgers
@@ -72,7 +105,11 @@ existing file, and reads the complete result back.
72
105
  .ultra/changes/{active,archive,abandoned}/
73
106
  ```
74
107
 
75
- For a legacy `north-star.md` containing `## One-line`, keep that file byte-identical.
108
+ The script reports `created_unresearched` for a new placeholder. For a preserved file it
109
+ reports exactly `preserved_unresearched`, `preserved_accepted`, `preserved_legacy`, or
110
+ `preserved_unknown`; unknown or malformed content is never described as authority. For
111
+ a legacy `north-star.md` containing the actual v0.26 headings or the older `## One-line`
112
+ form, keep that file byte-identical.
76
113
  When the new Project Brief is still unresolved, copy the legacy one-line verbatim into
77
114
  it and list legacy hard constraints under Explicit Inputs without assigning new IDs.
78
115
  Research later proposes the accepted North Star; it never rewrites history silently.