paqad-ai 1.46.2 → 1.48.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 CHANGED
@@ -1,5 +1,124 @@
1
1
  # paqad-ai
2
2
 
3
+ ## 1.48.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 93e45d3: Stage-Spine 05 (#320): artifact-bearing stage markers — prove the work, not just the claim.
8
+
9
+ A stage-end marker can now carry an artifact the recorder validates over its real
10
+ on-disk bytes: `paqad:stage <stage> end -- <path>` (and `paqad-ai stage end <stage>
11
+ --artifact <path>`). The thinking stages — planning, specification, review — must
12
+ reference a substantive (present, non-empty) artifact to count as complete. A bare
13
+ marker pair, a missing file, or an empty file now folds to **inconclusive**, not
14
+ complete, and no longer clears the pre-code gate. Mutation stages (development, checks,
15
+ documentation_sync) are unchanged — the observed edit is their proof. Reuses the single
16
+ `hashArtifacts` path (returns null when no real bytes exist) and preserves same-turn
17
+ remediation (#307) and the docs/`.paqad` scope exclusion (#310).
18
+
19
+ - 93e45d3: Stage-Spine 06 (#321): per-change completion gate — stop later changes free-riding on the first.
20
+
21
+ The end-of-change completeness gate no longer fires only once per session. On a passing
22
+ verify, finalize now appends a `close` row and resets the session ledger's `.open` pointer
23
+ (`closeSessionOrdinal`), so the next stage/edit opens a fresh ordinal and the pre-code gate
24
+ re-arms — change #2+ earns its own verdict instead of inheriting change #1's markers. The
25
+ verify-once early return is gone (each Stop re-verifies the open change; the last verify is
26
+ the verdict), and the redo cap now counts only failed verifies since the last stage mutation,
27
+ so re-verifying never spuriously trips it while a stuck change still marches to `blocked`
28
+ (#303 bite-once preserved). Docs-only / `.paqad`-only changes still no-op (#310).
29
+
30
+ - 93e45d3: Stage-Spine 07 (#322): deterministic ticket intake — make "do PQD-123" fetch the real ticket.
31
+
32
+ Wires the front door of the ticket → PR loop so the spec grounds in the actual ticket text
33
+ instead of a guess from the id:
34
+
35
+ - **`paqad-ai intake fetch <ref>`** — GitHub issues via `gh issue view` (mapped through a new
36
+ `GithubIssuesTicketProvider`), Jira via the Atlassian MCP in-session; prints the normalized
37
+ ticket and records an optional `ticket_intake` stage row. Graceful when `gh` is absent or the
38
+ ref is unrecognised; intake is a bookend and never blocks a change.
39
+ - **Prompt-seam detector** (`detectTicketRefs`) + a Claude-Code `UserPromptSubmit` arming hook:
40
+ a ticket ref in a prompt surfaces a `▸ paqad` line pointing at `intake fetch`. Advisory on
41
+ hosts without the seam.
42
+ - Adds an optional "Stage 0 — ticket_intake" to the feature-development rule and fixes the
43
+ `conventions.intake_decisions` → `process.intake_decisions` key mismatch in the policy text.
44
+
45
+ - 93e45d3: Stage-Spine 08 (#323): ship `paqad-ai deliver` — wire the dead delivery engine and close the CI loop.
46
+
47
+ The ~1,900-line delivery engine (branch/commit/PR + CI wait-for-green + on-red-stop + evidence
48
+ comment) had no invocation path. `paqad-ai deliver` now runs the tested chain end-to-end:
49
+
50
+ - `--dry-run` renders the branch/commit/PR text without pushing.
51
+ - The real path asks first via a mandatory `delivery.open_pr` Decision Packet (opening a PR is
52
+ outward-facing and hard to reverse), then runs `renderDelivery → runDelivery → runCiGate`,
53
+ waits for CI (`wait_for_green` / `on_red: stop`), stops with a clear reason on red (never a
54
+ false success), and posts the rendered verification evidence to the PR on green.
55
+ - Reuses `src/delivery/*` — no hand-rolled git/gh flow.
56
+
57
+ Also fixes the delivery-policy evidence instruction that promised an auto-posted comment that
58
+ never happened: it now names `paqad-ai deliver` (auto-posts on green) plus the manual
59
+ `paqad-ai evidence --output … && gh pr comment --body-file …` fallback.
60
+
61
+ Deferred (follow-ups): a Bash `PreToolUse` deny of hand-rolled `gh pr create` / `git push` while
62
+ a `delivery.open_pr` packet is pending (the pause is already enforced by the verb), and adding a
63
+ delivery block to this repo's `feature-development.yaml` + having `paqad-ai update` append missing
64
+ default blocks (ties to #12).
65
+
66
+ ## 1.47.0
67
+
68
+ ### Minor Changes
69
+
70
+ - 49db0e3: Make the session-context rule contract fail-safe (#316). `writeRuleContext` could
71
+ write a drift-, memory-, or retrieval-only artifact with zero rules when the compiled
72
+ rules store was absent or empty. Because the framework bootstrap only loads the full
73
+ `docs/instructions/rules/` tree when the artifact is _missing_, a rules-less file was
74
+ silently treated as the rule contract and every project rule vanished from context.
75
+ The writer now prepends an explicit fallback marker to any written artifact that
76
+ carries no rule manifest, so a bootstrap-obedient agent always knows to load the rules
77
+ in full. A populated store is unchanged (byte-identical).
78
+ - 49db0e3: Ship `paqad-ai spec freeze` and activate the built-but-dead spec sign-off engine
79
+ (#317). The `src/spec/` freeze machinery (build → evaluate → freeze → write frozen
80
+ sidecar) was fully implemented and tested but had no caller and no instruction naming
81
+ it, so the "spec frozen and signed off before code" promise was enforced by nothing.
82
+ The new `spec freeze <spec-file>` verb wires the existing engine end to end: it prints
83
+ every freeze blocker and exits non-zero (nothing written) when the spec is not
84
+ freezable, and on a clean spec writes the frozen sidecar at `.paqad/specs/<id>.frozen.json`.
85
+ The specification-stage instructions and the feature-development rule now name the
86
+ command so the agent runs it. No freeze logic is reimplemented.
87
+ - 49db0e3: Build the deterministic check runner and stop assuming tests passed (#318). The
88
+ `checks` stage is meant to be 100% deterministic — run format/test/build and block
89
+ on red — but nothing executed the commands: the resolver had no caller and the
90
+ completion backstop hardcoded `code_tests_lint_passed: true`, so a change with
91
+ failing tests could still be reported green by the framework layer.
92
+
93
+ New `paqad-ai checks run` verb resolves the project's mapped commands, executes
94
+ them, and persists one `StructuredTestResult` per command (the shape the
95
+ `code-tests-lint` gate already consumes) to `.paqad/checks/last-run.json`; it exits
96
+ non-zero on any red. The completion backstop now reads that report: it populates
97
+ `structured_test_results`, derives `code_tests_lint_passed` from real execution (no
98
+ longer a hardcoded `true`), and replaces the `code-tests-lint` gate's skipped
99
+ placeholder with the report-driven verdict — a red report blocks the completion
100
+ verdict, a green one passes, and an absent report reads as Inconclusive rather than
101
+ a vacuous green. Deterministic throughout: a command's exit code is the verdict.
102
+
103
+ - 49db0e3: Arm the rule-scripts gate by generating the rule-script map at onboarding (#319).
104
+ paqad's deterministic, no-LLM rule enforcement engine was live but disarmed on every
105
+ fresh project: `rule-script-map.yml` — the map linking rules to their compiled
106
+ scripts — was produced by no code path, so the enforcement seam fast-skipped on the
107
+ missing map and the gate passed by default. And the strictness a team set in
108
+ `feature-development.yaml` (`checks.rule_compliance.mode`) was read from a different
109
+ surface at runtime (`.config`, default `warn`), so a team asking for `strict` silently
110
+ got `warn`.
111
+
112
+ New `paqad-ai rules compile` verb (and `compileRuleScripts`) generates the map from
113
+ the rule tree — embedding stable rule ids and listing every rule via the existing
114
+ analyzer + atomic-writer, carrying over any bound scripts — and the onboarding
115
+ orchestrator now runs it after the rule refresh, so a fresh project is armed. The
116
+ strictness resolver now folds the project's on-disk `feature-development.yaml`
117
+ `rule_compliance.mode` as a real, team-tracked floor (stricter of it and `.config`
118
+ wins; local/env may only raise), and the policy merge no longer silently drops
119
+ `rule_compliance` when a project supplies its own workflow file. No enforcement or
120
+ atomic-apply logic is reimplemented.
121
+
3
122
  ## 1.46.2
4
123
 
5
124
  ### Patch Changes