@aperant/framework 0.6.5 → 0.6.7
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 +155 -0
- package/README.md +17 -251
- package/dist/cli/commands/check-version.d.mts.map +1 -1
- package/dist/cli/commands/check-version.mjs +76 -1
- package/dist/cli/commands/check-version.mjs.map +1 -1
- package/dist/cli/commands/ci-watch.d.mts.map +1 -1
- package/dist/cli/commands/ci-watch.mjs +34 -4
- package/dist/cli/commands/ci-watch.mjs.map +1 -1
- package/dist/cli/commands/commit.d.mts.map +1 -1
- package/dist/cli/commands/commit.mjs +25 -8
- package/dist/cli/commands/commit.mjs.map +1 -1
- package/dist/cli/commands/event.d.mts.map +1 -1
- package/dist/cli/commands/event.mjs +66 -0
- package/dist/cli/commands/event.mjs.map +1 -1
- package/dist/cli/commands/init.d.mts +8 -1
- package/dist/cli/commands/init.d.mts.map +1 -1
- package/dist/cli/commands/init.mjs +91 -9
- package/dist/cli/commands/init.mjs.map +1 -1
- package/dist/cli/commands/modes.d.mts.map +1 -1
- package/dist/cli/commands/modes.mjs +2 -1
- package/dist/cli/commands/modes.mjs.map +1 -1
- package/dist/cli/commands/release-notes.d.mts +11 -0
- package/dist/cli/commands/release-notes.d.mts.map +1 -0
- package/dist/cli/commands/release-notes.mjs +173 -0
- package/dist/cli/commands/release-notes.mjs.map +1 -0
- package/dist/cli/commands/task.d.mts.map +1 -1
- package/dist/cli/commands/task.mjs +285 -139
- package/dist/cli/commands/task.mjs.map +1 -1
- package/dist/cli/commands/triage.d.mts.map +1 -1
- package/dist/cli/commands/triage.mjs +9 -5
- package/dist/cli/commands/triage.mjs.map +1 -1
- package/dist/cli/config/load.d.mts +14 -0
- package/dist/cli/config/load.d.mts.map +1 -1
- package/dist/cli/config/load.mjs +40 -0
- package/dist/cli/config/load.mjs.map +1 -1
- package/dist/cli/config/upgrade-gitignore.d.mts.map +1 -1
- package/dist/cli/config/upgrade-gitignore.mjs +6 -0
- package/dist/cli/config/upgrade-gitignore.mjs.map +1 -1
- package/dist/cli/consistency/parse-review.d.mts.map +1 -1
- package/dist/cli/consistency/parse-review.mjs +4 -1
- package/dist/cli/consistency/parse-review.mjs.map +1 -1
- package/dist/cli/coordination/auto-emit-artifact-ready.d.mts +16 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.d.mts.map +1 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs +88 -0
- package/dist/cli/coordination/auto-emit-artifact-ready.mjs.map +1 -0
- package/dist/cli/coordination/event-schema.d.mts +16 -0
- package/dist/cli/coordination/event-schema.d.mts.map +1 -0
- package/dist/cli/coordination/event-schema.mjs +161 -0
- package/dist/cli/coordination/event-schema.mjs.map +1 -0
- package/dist/cli/coordination/store.d.mts +6 -0
- package/dist/cli/coordination/store.d.mts.map +1 -1
- package/dist/cli/coordination/store.mjs +14 -0
- package/dist/cli/coordination/store.mjs.map +1 -1
- package/dist/cli/dispatch.d.mts.map +1 -1
- package/dist/cli/dispatch.mjs +2 -0
- package/dist/cli/dispatch.mjs.map +1 -1
- package/dist/cli/gate/gates/review-clean.d.mts.map +1 -1
- package/dist/cli/gate/gates/review-clean.mjs +4 -2
- package/dist/cli/gate/gates/review-clean.mjs.map +1 -1
- package/dist/cli/help.mjs +2 -2
- package/dist/cli/help.mjs.map +1 -1
- package/dist/cli/install/update-chips.d.mts +23 -0
- package/dist/cli/install/update-chips.d.mts.map +1 -1
- package/dist/cli/install/update-chips.mjs +60 -0
- package/dist/cli/install/update-chips.mjs.map +1 -1
- package/dist/cli/release-notes/compile.d.mts +38 -0
- package/dist/cli/release-notes/compile.d.mts.map +1 -0
- package/dist/cli/release-notes/compile.mjs +244 -0
- package/dist/cli/release-notes/compile.mjs.map +1 -0
- package/dist/cli/release-notes/draft.d.mts +73 -0
- package/dist/cli/release-notes/draft.d.mts.map +1 -0
- package/dist/cli/release-notes/draft.mjs +120 -0
- package/dist/cli/release-notes/draft.mjs.map +1 -0
- package/dist/cli/release-notes/output-dir.d.mts +20 -0
- package/dist/cli/release-notes/output-dir.d.mts.map +1 -0
- package/dist/cli/release-notes/output-dir.mjs +42 -0
- package/dist/cli/release-notes/output-dir.mjs.map +1 -0
- package/dist/cli/release-notes/persona-filter.d.mts +51 -0
- package/dist/cli/release-notes/persona-filter.d.mts.map +1 -0
- package/dist/cli/release-notes/persona-filter.mjs +127 -0
- package/dist/cli/release-notes/persona-filter.mjs.map +1 -0
- package/dist/cli/release-notes/publish.d.mts +23 -0
- package/dist/cli/release-notes/publish.d.mts.map +1 -0
- package/dist/cli/release-notes/publish.mjs +125 -0
- package/dist/cli/release-notes/publish.mjs.map +1 -0
- package/dist/cli/release-notes/ship-autodraft.d.mts +37 -0
- package/dist/cli/release-notes/ship-autodraft.d.mts.map +1 -0
- package/dist/cli/release-notes/ship-autodraft.mjs +97 -0
- package/dist/cli/release-notes/ship-autodraft.mjs.map +1 -0
- package/dist/cli/roadmap/conductor-view.d.mts +13 -0
- package/dist/cli/roadmap/conductor-view.d.mts.map +1 -0
- package/dist/cli/roadmap/conductor-view.mjs +31 -0
- package/dist/cli/roadmap/conductor-view.mjs.map +1 -0
- package/dist/cli/route/skill-discover.d.mts.map +1 -1
- package/dist/cli/route/skill-discover.mjs +2 -1
- package/dist/cli/route/skill-discover.mjs.map +1 -1
- package/dist/cli/task/ids.d.mts +7 -4
- package/dist/cli/task/ids.d.mts.map +1 -1
- package/dist/cli/task/ids.mjs +11 -10
- package/dist/cli/task/ids.mjs.map +1 -1
- package/dist/types/config.d.ts +11 -7
- package/dist/types/config.d.ts.map +1 -1
- package/package.json +9 -1
- package/prompts/conductor-status-check.md +23 -0
- package/prompts/conductor-sub-agent.md +57 -0
- package/prompts/conductor-system.md +172 -0
- package/skills/apt-close-task/SKILL.md +25 -0
- package/skills/apt-diagram/SKILL.md +45 -9
- package/skills/apt-plan/SKILL.md +12 -0
- package/skills/apt-plan/adapters/conductor.md +98 -0
- package/skills/apt-release-notes/SKILL.md +193 -0
- package/skills/apt-release-notes/appendices/persona-voice.md +59 -0
- package/skills/apt-setup/SKILL.md +148 -3
- package/skills/apt-ship/SKILL.md +74 -12
- package/skills/apt-spar/SKILL.md +290 -0
- package/skills/apt-update/SKILL.md +51 -9
- package/skills/apt-watch-ci/SKILL.md +2 -2
- package/src/cli/commands/check-version.mjs +73 -1
- package/src/cli/commands/ci-watch.mjs +35 -4
- package/src/cli/commands/commit.mjs +27 -8
- package/src/cli/commands/event.mjs +68 -0
- package/src/cli/commands/init.mjs +101 -9
- package/src/cli/commands/modes.mjs +2 -1
- package/src/cli/commands/release-notes.mjs +187 -0
- package/src/cli/commands/task.mjs +305 -152
- package/src/cli/commands/triage.mjs +14 -5
- package/src/cli/config/load.mjs +37 -0
- package/src/cli/config/upgrade-gitignore.mjs +6 -0
- package/src/cli/consistency/parse-review.mjs +3 -1
- package/src/cli/coordination/auto-emit-artifact-ready.mjs +96 -0
- package/src/cli/coordination/event-schema.d.ts +13 -0
- package/src/cli/coordination/event-schema.mjs +174 -0
- package/src/cli/coordination/store.mjs +14 -0
- package/src/cli/dispatch.mjs +2 -0
- package/src/cli/gate/gates/review-clean.mjs +4 -2
- package/src/cli/help.mjs +2 -2
- package/src/cli/install/update-chips.mjs +57 -0
- package/src/cli/release-notes/compile.mjs +261 -0
- package/src/cli/release-notes/draft.mjs +133 -0
- package/src/cli/release-notes/output-dir.mjs +52 -0
- package/src/cli/release-notes/persona-filter.mjs +126 -0
- package/src/cli/release-notes/publish.mjs +128 -0
- package/src/cli/release-notes/ship-autodraft.mjs +106 -0
- package/src/cli/roadmap/conductor-view.d.ts +10 -0
- package/src/cli/roadmap/conductor-view.mjs +31 -0
- package/src/cli/route/skill-discover.mjs +2 -1
- package/src/cli/task/ids.mjs +15 -13
- package/templates/config.json +28 -3
- package/workflows/docs.md +12 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,161 @@
|
|
|
3
3
|
All notable changes to `@aperant/framework` are documented here. See
|
|
4
4
|
[`VERSIONING.md`](VERSIONING.md) for the per-tier contract.
|
|
5
5
|
|
|
6
|
+
## [Unreleased]
|
|
7
|
+
|
|
8
|
+
### persona-aware release-notes system (task persona-aware-changelog-and-release-note_16-05-26)
|
|
9
|
+
|
|
10
|
+
Two-skill split: `/apt:docs changelog` keeps the dev-flavored
|
|
11
|
+
`CHANGELOG.md` surface unchanged; a new opt-in `/apt:release-notes`
|
|
12
|
+
skill ships a persona-aware user-facing artifact. Schema bumps
|
|
13
|
+
`.aperant/config.json` v4 → v5 with a new `changelog.{dev,release_notes}`
|
|
14
|
+
block (default-OFF release-notes, dev-changelog stays default-ON).
|
|
15
|
+
|
|
16
|
+
- **New skill** `/apt:release-notes` (`stage: ops`, `intent: capture`,
|
|
17
|
+
`task_context: none`). Three modes — `draft --pr <n>` for towncrier-
|
|
18
|
+
style per-PR fragments, `compile <tag>` for tag-time narrative + the
|
|
19
|
+
non-negotiable `## Needs Triage` bucket (spec ID-6: never silent-drop
|
|
20
|
+
unmapped fragments), `publish <tag>` for `gh release create/edit`
|
|
21
|
+
with a graceful `{status: 'skipped', reason: 'gh-not-found'}`
|
|
22
|
+
envelope when `gh` is missing. DEEP-track-only — Fast Path Guarantee
|
|
23
|
+
pinned by `apt-release-notes-quick-exempt.test.ts`.
|
|
24
|
+
- **New CLI verb** `apt-tools release-notes <draft|compile|publish>`.
|
|
25
|
+
Deterministic I/O only — no LLM in the CLI, no prompt templates.
|
|
26
|
+
Persona-voice tuning lives in the SKILL.md via the
|
|
27
|
+
`appendices/persona-voice.md` posture loader.
|
|
28
|
+
- **Schema v4 → v5.** `packages/framework/templates/config.json` gains
|
|
29
|
+
the `changelog` block; the existing
|
|
30
|
+
`runMigrationsAgainstTemplate()` path silently auto-adds the new
|
|
31
|
+
block to any v4 config via the `auto_added` bucket. No bespoke
|
|
32
|
+
migration code, no destructive paths — TD-1 pins the safety net.
|
|
33
|
+
- **Setup integration.** `/apt:setup` gains Batch 9 (Changelog & Release
|
|
34
|
+
Notes) with two top-level questions + an audience / persona-filter
|
|
35
|
+
sub-picker under Q2=Yes. Per-project opt-in is explicit; presence of
|
|
36
|
+
`.aperant/personas.json` does NOT auto-enable (spec ID-7).
|
|
37
|
+
- **Ship integration.** `/apt:ship` §2.6 runs only when opted in.
|
|
38
|
+
Feature-registry diff → persona mapping → `Release note: …`
|
|
39
|
+
auto-draft in the PR body. When `require_pr_field=true` (default)
|
|
40
|
+
AND auto-draft fails, ship emits the exact error string `[APT] No
|
|
41
|
+
release-note signal found — author manual note in PR body or label
|
|
42
|
+
PR no-notes` and stops before `gh pr create`.
|
|
43
|
+
- **Close-task integration.** `/apt:close-task` §2.6 drops the
|
|
44
|
+
per-PR fragment on merge via the same idempotent `apt-tools
|
|
45
|
+
release-notes draft` verb. Failure is additive bookkeeping (appends
|
|
46
|
+
to `pending_release_note[]` in state.json) — never blocks close.
|
|
47
|
+
- **Tests.** TD-1 schema migration, TD-2 fragment idempotency, TD-3
|
|
48
|
+
compile + triage bucket, TD-4 ship-autodraft decision matrix, TD-5
|
|
49
|
+
end-to-end opt-in flow (mocked `gh`), TD-6 quick-exempt regression.
|
|
50
|
+
32 cases across 6 release-notes test files.
|
|
51
|
+
|
|
52
|
+
The framework's own `CHANGELOG.md` stays dev-flavored — Aperant ships
|
|
53
|
+
to developers, so this file is the right audience already. The
|
|
54
|
+
user-facing surface that this work introduces is for projects that
|
|
55
|
+
ship to non-developer humans.
|
|
56
|
+
|
|
57
|
+
## 0.6.7 — 2026-05-16 — /apt:update pipeline fixes (Codex spar) + framework-bug bundle
|
|
58
|
+
|
|
59
|
+
### /apt:update pipeline (Codex spar 2026-05-15)
|
|
60
|
+
|
|
61
|
+
Three line-cited defects from a 2026-05-15 Codex adversarial spar made
|
|
62
|
+
`/apt:update` silently a no-op on a real version bump (e.g. 0.6.5 →
|
|
63
|
+
0.6.7). All three are now fixed and proved by a new end-to-end test.
|
|
64
|
+
|
|
65
|
+
- **Bug 1: `check-version` was npm-blind.** `src/cli/commands/check-version.mjs:80-82`
|
|
66
|
+
previously read `framework_version` from the local kernel's own
|
|
67
|
+
`package.json` and hard-coded `update_available:false` per runtime
|
|
68
|
+
(lines 59, 70). The skill's `<context>` block documented fields like
|
|
69
|
+
`framework.latest_version` + `update_available` + `dev_install_ahead`
|
|
70
|
+
that `check-version` never emitted — those fields lived only in the
|
|
71
|
+
SessionStart worker's cache file (`hooks/apt-check-update-worker.js`
|
|
72
|
+
at `~/.cache/aperant/apt-update-check.json`). **Fix:** `check-version`
|
|
73
|
+
now reads that cache file when it exists and is fresh (< 1 h,
|
|
74
|
+
`schema_version=1`) and merges `framework.latest_version`,
|
|
75
|
+
`update_available`, `dev_install_ahead`, `not_published`,
|
|
76
|
+
`stale_files_total`, `lookup_error` into its envelope. On a stale or
|
|
77
|
+
missing cache the same field names are emitted with null/false/0
|
|
78
|
+
sentinel values so the skill's parser stays single-shape (ID-03).
|
|
79
|
+
Bails out on any non-1 `schema_version` (R2 mitigation against
|
|
80
|
+
future cache schema drift).
|
|
81
|
+
- **Bug 2: `init` upgrade no-op ignored runtime-manifest drift.**
|
|
82
|
+
`src/cli/commands/init.mjs:354-370` decided `upgrade_noop` solely on
|
|
83
|
+
`.aperant/config.json` schema drift, and lines `1064-1078` returned
|
|
84
|
+
`status:up_to_date` BEFORE `installRuntimes` ran. Reproduction:
|
|
85
|
+
deleting `.claude/apt-file-manifest.json` and re-running init still
|
|
86
|
+
returned `up_to_date` with the manifest unrestored. **Fix:** new
|
|
87
|
+
`--force-runtimes` flag on `init`. When set AND `upgrade_noop` would
|
|
88
|
+
fire, the cmdInit synthesizes a real `InstallAnswers` shape from the
|
|
89
|
+
existing config (preserving visibility/autonomy/cross-verification)
|
|
90
|
+
and falls through to `installRuntimes` + `runKernelInstall` +
|
|
91
|
+
`finishInit` as on the upgrade-with-drift path. The flag is strictly
|
|
92
|
+
additive — callers without it keep the existing no-op short-circuit
|
|
93
|
+
(preserves `init-upgrade-drift.test.ts` case (a) — verified by 27
|
|
94
|
+
passing tests across `init-upgrade-drift.test.ts` and
|
|
95
|
+
`init-flag-parser.test.ts`).
|
|
96
|
+
- **Bug 3: skill read fields `check-version` didn't emit.**
|
|
97
|
+
`skills/apt-update/SKILL.md:49-54` parsed `framework.installed_version`,
|
|
98
|
+
`framework.latest_version`, `stale_files_total`, `update_available`,
|
|
99
|
+
`dev_install_ahead`, `not_published` — none of which the CLI emitted.
|
|
100
|
+
**Fix:** Bug 1's fix lights up the fields the skill was already
|
|
101
|
+
reading; the SKILL.md prose is rewritten to also document a new
|
|
102
|
+
Step 1.5 (`npm view @aperant/framework version` + `npm install
|
|
103
|
+
--prefix .aperant/deps @aperant/framework@<latest>` when newer, with
|
|
104
|
+
10 s npm timeout per ID-04) and to pass `--force-runtimes` in Step 3.
|
|
105
|
+
Added a `TODO(followup)` comment near the hardcoded
|
|
106
|
+
`.aperant/deps/...` path so the PATH-only / npx-only install case is
|
|
107
|
+
tracked but explicitly deferred (ID-05).
|
|
108
|
+
|
|
109
|
+
- **Schema status.** Envelope changes are strictly additive — the new
|
|
110
|
+
`framework`, `update_available`, `dev_install_ahead`, `not_published`,
|
|
111
|
+
`stale_files_total`, `lookup_error` fields are all nullable; existing
|
|
112
|
+
callers ignore unknown fields. `--force-runtimes` is opt-in. No
|
|
113
|
+
`schema_version` bump required.
|
|
114
|
+
- **Decision source.** Codex spar 2026-05-15.
|
|
115
|
+
- **Tests.** New: `check-version-cache-merge.test.ts` (6 cases),
|
|
116
|
+
`init-force-runtimes.test.ts` (3 cases),
|
|
117
|
+
`update-pipeline-bump-e2e.test.ts` (2 cases). Existing:
|
|
118
|
+
`init-upgrade-drift.test.ts` case (a) still green —
|
|
119
|
+
`--force-runtimes` is opt-in, not a behavior change. Manual smoke
|
|
120
|
+
test (kernel binary upgrades in place via `npm install --prefix`) is
|
|
121
|
+
deferred to release-time validation; the e2e test scopes to
|
|
122
|
+
cache-merge + force-runtimes composition.
|
|
123
|
+
|
|
124
|
+
`task: fix-apt-update-pipeline-3-bugs_15-05-26`
|
|
125
|
+
|
|
126
|
+
### Other framework-bug fixes shipped in this release (rolled up from previous unreleased)
|
|
127
|
+
|
|
128
|
+
- **fix:** ship gate `review-clean` and `parse-review` now accept `fixed:true`
|
|
129
|
+
alongside `resolved:true` as resolution markers
|
|
130
|
+
([FRAMEWORK-BUG-009](../../docs/frameworks/spec-gaps.md#framework-bug-009-review-clean-fixed-key)).
|
|
131
|
+
The reviewer skill writes `fixed:true` paired with `fix_commit` — the gate
|
|
132
|
+
and consistency normalizer previously only recognized `resolved:true`,
|
|
133
|
+
causing false-positive blocks when a review fixed findings in-loop.
|
|
134
|
+
- **fix:** `apt-tools ci-watch tick --payload-file <path>` lets the
|
|
135
|
+
orchestrator skill pass pre-captured `gh pr checks` + `gh pr view`
|
|
136
|
+
payloads directly to the cmd, closing the production-path gap
|
|
137
|
+
([FRAMEWORK-BUG-010](../../docs/frameworks/spec-gaps.md#framework-bug-010-ci-watch-payload-file)).
|
|
138
|
+
The cmd still does NOT shell out to gh — that boundary stays with the
|
|
139
|
+
orchestrator.
|
|
140
|
+
- **feat:** new `loadMergedProjectConfig` deep-merge reader in
|
|
141
|
+
`src/cli/config/load.mjs` for per-user overrides via
|
|
142
|
+
`.aperant/config.local.json` (gitignored). `diagram.mcpConsent` migrated
|
|
143
|
+
to `config.local.json` to close a per-user consent-leak surface
|
|
144
|
+
([FRAMEWORK-AUDIT-001](../../docs/frameworks/spec-gaps.md#framework-audit-001-config-local-json-migration)).
|
|
145
|
+
Five additional per-user candidates documented and deferred per a recorded
|
|
146
|
+
Codex spar round (cede-partial outcome).
|
|
147
|
+
- **blocked:** FRAMEWORK-BUG-011 (vitest `NODE_ENV='test'` workaround
|
|
148
|
+
location). Spec proposed moving the env override from `vitest.config.ts`
|
|
149
|
+
to `vitest.setup.ts`; empirical regression in `use-analytics.test.ts`
|
|
150
|
+
(`ERR_UNKNOWN_BUILTIN_MODULE: No such built-in module: node:`) disproved
|
|
151
|
+
the hypothesis. See
|
|
152
|
+
[FRAMEWORK-BUG-011](../../docs/frameworks/spec-gaps.md#framework-bug-011-vitest-node-env-workaround)
|
|
153
|
+
for follow-up options.
|
|
154
|
+
|
|
155
|
+
### apt:setup onboarding-marker (rolled up from PR #137)
|
|
156
|
+
|
|
157
|
+
- **fix:** fresh installs now walk the full Batch 1-8 onboarding flow
|
|
158
|
+
via an explicit onboarding marker, replacing the previous heuristic
|
|
159
|
+
that short-circuited on the presence of any `.aperant/` content.
|
|
160
|
+
|
|
6
161
|
## 0.6.5 — 2026-05-14 — Drop aggregate envelope cap
|
|
7
162
|
|
|
8
163
|
Replaces the aggregate `ENVELOPE_MAX_BYTES` cap in
|
package/README.md
CHANGED
|
@@ -3,13 +3,17 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@aperant/framework)
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
> **Work in progress.** This is the foundation that will run the Aperant ecosystem — an agentic IDE covering the full software lifecycle. Join the waitlist at [aperant.com](https://aperant.com).
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Install
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
```bash
|
|
11
|
+
npx @aperant/framework init .
|
|
12
|
+
```
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
Just type `/apt` and describe what you want in natural language. The router classifies your input and dispatches to the right skill.
|
|
13
17
|
|
|
14
18
|
```
|
|
15
19
|
/apt add OAuth login with Google
|
|
@@ -19,28 +23,14 @@ You don't need to memorize commands. The `/apt` router auto-classifies your inpu
|
|
|
19
23
|
/apt review my PR
|
|
20
24
|
```
|
|
21
25
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| You type | Router picks | Why |
|
|
25
|
-
|---|---|---|
|
|
26
|
-
| `add OAuth login with Google` | `/apt:plan` | multi-file feature, STANDARD track |
|
|
27
|
-
| `chat scroll is jittery — debug it` | `/apt:debug` | investigation-first language |
|
|
28
|
-
| `help me think through the new pricing model` | `/apt:discuss --brainstorm` | exploratory framing, no concrete deliverable |
|
|
29
|
-
| `typo in the footer — wrong year` | `/apt:quick` | trivial single-file fix |
|
|
30
|
-
| `review my PR` | `/apt:pr-review` | PR reference triggers multi-agent review |
|
|
31
|
-
|
|
32
|
-
If the router isn't sure, it shows the top candidates and lets you pick. You can always be explicit (`/apt:plan ...`, `/apt:debug ...`) — the router is a shortcut, not the only path. Track classification (QUICK / STANDARD / DEEP / DEBUG) happens inline; no recursive LLM call.
|
|
33
|
-
|
|
34
|
-
Works identically under Claude Code (`/apt`), Codex (`$apt`), Gemini (`/apt`), and other supported CLIs — see [Host Support](#host-support) below.
|
|
35
|
-
|
|
36
|
-
## Command reference
|
|
26
|
+
You can also call any skill directly (e.g. `/apt:plan ...`, `/apt:debug ...`).
|
|
37
27
|
|
|
38
|
-
|
|
28
|
+
## Available commands
|
|
39
29
|
|
|
40
30
|
| Stage | Command | Purpose |
|
|
41
31
|
|---|---|---|
|
|
42
32
|
| **Route** | `/apt` | Smart router — natural-language dispatch to any skill |
|
|
43
|
-
| **Discovery** | `/apt:scan` | Build/refresh `.aperant/features/` registry
|
|
33
|
+
| **Discovery** | `/apt:scan` | Build/refresh `.aperant/features/` registry |
|
|
44
34
|
| **Discovery** | `/apt:zoom-out` | One-page architectural orientation for an unfamiliar area |
|
|
45
35
|
| **Discovery** | `/apt:improve` | 3-lens scan for refactor opportunities (DEEPENING / INTERFACE-DESIGN / LANGUAGE) |
|
|
46
36
|
| **Discovery** | `/apt:debug` | Systematic debugging with persistent state across context resets |
|
|
@@ -48,16 +38,17 @@ All 30+ skills below are also addressable directly. Listed by lifecycle stage.
|
|
|
48
38
|
| **Planning** | `/apt:design` | Pre-coding wireframe → critique → handoff to `/apt:plan` |
|
|
49
39
|
| **Planning** | `/apt:mockup` | Visual HTML+Tailwind mockup loop with parallel variants |
|
|
50
40
|
| **Planning** | `/apt:plan` | Investigate codebase, produce `spec.md` + `implementation_plan.json` |
|
|
51
|
-
| **Planning** | `/apt:roundtable` | 10-agent structured debate with supermajority voting
|
|
52
|
-
| **Planning** | `/apt:
|
|
41
|
+
| **Planning** | `/apt:roundtable` | 10-agent structured debate with supermajority voting |
|
|
42
|
+
| **Planning** | `/apt:spar` | Bidirectional adversarial sparring with a second CLI provider |
|
|
43
|
+
| **Planning** | `/apt:stress-test` | Scenario simulation to catch operational gaps before execution |
|
|
53
44
|
| **Planning** | `/apt:prototype` | Question-driven throwaway prototyping (LOGIC + UI branches) |
|
|
54
45
|
| **Build** | `/apt:quick` | Fast single-shot task — skip planning, go straight to implementation |
|
|
55
46
|
| **Build** | `/apt:execute` | Build code from a plan with atomic commits and progress tracking |
|
|
56
47
|
| **Build** | `/apt:run` | Full pipeline: plan → execute → verify → review in one command |
|
|
57
48
|
| **Verify** | `/apt:verify` | 4-dimension QA scoring (correctness / completeness / quality / coverage) |
|
|
58
49
|
| **Verify** | `/apt:verify-proof` | Visual proof verification — screenshots, video, HTML report |
|
|
59
|
-
| **Verify** | `/apt:review` | 6-pass inline code review
|
|
60
|
-
| **Verify** | `/apt:pr-review` | Multi-agent PR review — 6 parallel specialists + validator + fixer + self-reviewer
|
|
50
|
+
| **Verify** | `/apt:review` | 6-pass inline code review with fix-all pipeline |
|
|
51
|
+
| **Verify** | `/apt:pr-review` | Multi-agent PR review — 6 parallel specialists + validator + fixer + self-reviewer |
|
|
61
52
|
| **Ship** | `/apt:ship` | Create PR with QA scores, decision traceability, commit-to-subtask mapping |
|
|
62
53
|
| **Ship** | `/apt:watch-ci` | Post-ship CI watcher — polls PR checks, auto-fixes red, pushes, reschedules |
|
|
63
54
|
| **Ship** | `/apt:close-task` | Post-merge closer — confirm merged, flip phase, GC state |
|
|
@@ -69,235 +60,10 @@ All 30+ skills below are also addressable directly. Listed by lifecycle stage.
|
|
|
69
60
|
| **Project** | `/apt:bootstrap` | Generate/refresh PROJECT.md (product-context source of truth) |
|
|
70
61
|
| **Project** | `/apt:personas` | Discover 3–5 product personas grounded in code + PROJECT.md |
|
|
71
62
|
| **Project** | `/apt:roadmap` | Manage per-scope milestones, phases, owners, ROADMAP.md rendering |
|
|
72
|
-
| **Project** | `/apt:triage` | Move a task through the 5-state machine
|
|
63
|
+
| **Project** | `/apt:triage` | Move a task through the 5-state machine |
|
|
73
64
|
| **Framework** | `/apt:setup` | Change preferences (verification style, multi-model, parallelization, branching) |
|
|
74
65
|
| **Framework** | `/apt:update` | Refresh installed skills / agents / hooks across every runtime |
|
|
75
66
|
|
|
76
|
-
Each skill is self-contained — use `/apt:plan` alone for planning, `/apt:verify` alone for QA, or `/apt:run` for the full pipeline.
|
|
77
|
-
|
|
78
|
-
### Declarative YAML Workflows (C17)
|
|
79
|
-
|
|
80
|
-
In addition to the imperative skill chains above, the framework ships a
|
|
81
|
-
**declarative** runner: author a YAML DAG of skill/agent/tool nodes and
|
|
82
|
-
execute or emit it via `apt-tools wfrun {validate|plan|run}`. Example
|
|
83
|
-
workflows live under `workflows/examples/`.
|
|
84
|
-
|
|
85
|
-
## Quickstart
|
|
86
|
-
|
|
87
|
-
### Step 1: Install
|
|
88
|
-
|
|
89
|
-
```bash
|
|
90
|
-
npx @aperant/framework init .
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
This installs the framework's repo-local runtime surfaces:
|
|
94
|
-
|
|
95
|
-
- Claude Code: `.claude/skills/` and `.claude/agents/`
|
|
96
|
-
- Codex: `.agents/skills/`
|
|
97
|
-
|
|
98
|
-
`apt-tools init` also stamps `.apt-version` in each skill directory so `check-version` and `health-check` can detect stale installs.
|
|
99
|
-
|
|
100
|
-
### Alternative install: Claude Code plugin
|
|
101
|
-
|
|
102
|
-
If you use Claude Code and prefer the `/plugin install` flow, Aperant ships as a first-class Claude Code plugin:
|
|
103
|
-
|
|
104
|
-
```
|
|
105
|
-
/plugin install aperant
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
Both install paths are supported and install the same skills — the plugin path also ships the `apt-*` sub-agents.
|
|
109
|
-
|
|
110
|
-
### Step 2: Add project constitution (optional)
|
|
111
|
-
|
|
112
|
-
Create an `AGENTS.md` file at your project root describing your tech stack, conventions, and constraints:
|
|
113
|
-
|
|
114
|
-
```markdown
|
|
115
|
-
# Project Constitution
|
|
116
|
-
|
|
117
|
-
## Tech Stack
|
|
118
|
-
- TypeScript, React 19, Tailwind 4
|
|
119
|
-
- PostgreSQL with Drizzle ORM
|
|
120
|
-
- Vitest for testing
|
|
121
|
-
|
|
122
|
-
## Conventions
|
|
123
|
-
- Prefer composition over inheritance
|
|
124
|
-
- All API routes must have input validation
|
|
125
|
-
- 80% test coverage minimum
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
The framework reads `AGENTS.md` to adapt its behavior -- plans respect your architecture, verification checks your conventions, reviews apply your standards.
|
|
129
|
-
|
|
130
|
-
### Step 3: Plan a task
|
|
131
|
-
|
|
132
|
-
In Claude Code, run:
|
|
133
|
-
|
|
134
|
-
```
|
|
135
|
-
/apt:plan "Add user authentication with JWT"
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
In Codex, invoke the matching repo skill:
|
|
139
|
-
|
|
140
|
-
```
|
|
141
|
-
$apt:plan Add user authentication with JWT
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
The framework assesses complexity, investigates your codebase for relevant patterns and files, writes a specification (`spec.md`), and creates a structured implementation plan (`implementation_plan.json`) with subtasks, dependencies, and verification steps.
|
|
145
|
-
|
|
146
|
-
### Step 4: Full pipeline
|
|
147
|
-
|
|
148
|
-
For the complete experience -- plan, execute, verify, and review in one command:
|
|
149
|
-
|
|
150
|
-
```
|
|
151
|
-
/apt:run "Add user authentication with JWT"
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
This creates a feature branch, plans the work, implements each subtask with atomic commits, verifies the result against the spec, and runs a multi-pass code review. From task description to reviewed code.
|
|
155
|
-
|
|
156
|
-
## Host Support
|
|
157
|
-
|
|
158
|
-
The framework supports Claude Code and Codex as native repo-local hosts.
|
|
159
|
-
|
|
160
|
-
- Claude Code gets the full `.claude/skills` + `.claude/agents` payload, worktree support, structured prompt dialogs, and the optional PreCompact hook.
|
|
161
|
-
- Codex gets native repo-skill discovery through `.agents/skills` and can run the framework's sub-agent flows, but it does not have the Claude-only worktree and PreCompact surfaces.
|
|
162
|
-
- `/apt` track classification (QUICK/STANDARD/DEEP/DEBUG) is delegated to the host model inline via SKILL.md rather than a subprocess LLM call — no recursive `codex exec` from inside a Codex session.
|
|
163
|
-
|
|
164
|
-
## How It Works
|
|
165
|
-
|
|
166
|
-
The framework follows a 5-stage lifecycle (review is the terminal stage of the STANDARD/DEEP auto pipelines as of C32):
|
|
167
|
-
|
|
168
|
-
```
|
|
169
|
-
Context -> Plan -> Execute -> Verify -> Review
|
|
170
|
-
```
|
|
171
|
-
|
|
172
|
-
1. **Context** -- Read the project constitution (`AGENTS.md`), assess task complexity, investigate the codebase.
|
|
173
|
-
2. **Plan** -- Write a specification and decompose into subtasks with dependencies and verification criteria.
|
|
174
|
-
3. **Execute** -- Implement each subtask in dependency order. Atomic commits. Progress tracked in `build-progress.json`.
|
|
175
|
-
4. **Verify** -- Score the implementation on 4 dimensions (correctness, completeness, quality, coverage). Write `qa_signoff.json`.
|
|
176
|
-
5. **Review** -- Inline 6-pass review (logic / security / quality / architecture / performance / docs-coherence) with fix-all pipeline. `docs-drift` `auto-update` findings patched inline via `apt-tools docs-audit` / `apt-tools features-audit`; `flag-drift` findings surfaced to `review_findings.md`. Configure per-surface policy at `/apt:setup` Batch 7 (writes `.aperant/config.json.docs_policy`). Write `review.json`. Skip with `--skip-review` only if intentional.
|
|
177
|
-
|
|
178
|
-
Each stage produces artifacts. The `apt-tools` CLI kernel handles state management -- file I/O, git commits, progress tracking -- so the LLM focuses on reasoning and code, never on plumbing.
|
|
179
|
-
|
|
180
|
-
### Task-Level Worktree Isolation
|
|
181
|
-
|
|
182
|
-
When multiple agents run tasks in parallel on the same repo, opt-in worktree isolation gives each task its own git branch and working directory. Enable it in `.aperant/config.json` with `"task_isolation": { "worktree_per_task": true }`. Each `task create` forks a branch, adds a worktree at `.aperant/worktrees/{scope}/{task-id}/`, and records the paths on the task record. Pipeline skills edit inside the worktree while `apt-tools` commands continue to target the main repo for shared state coordination.
|
|
183
|
-
|
|
184
|
-
### Artifacts
|
|
185
|
-
|
|
186
|
-
| Stage | Artifact | Format |
|
|
187
|
-
| ------- | --------------------------- | -------- |
|
|
188
|
-
| Plan | `spec.md` | Markdown |
|
|
189
|
-
| Plan | `implementation_plan.json` | JSON |
|
|
190
|
-
| Execute | `build-progress.json` | JSON |
|
|
191
|
-
| Verify | `qa_signoff.json` | JSON |
|
|
192
|
-
| Review | `review.json` | JSON |
|
|
193
|
-
|
|
194
|
-
## Plugin System
|
|
195
|
-
|
|
196
|
-
The framework uses a **manifest + mapper** architecture for extensibility.
|
|
197
|
-
|
|
198
|
-
A plugin declares what artifacts each stage produces (the **manifest**) and provides JavaScript modules that translate those artifacts into standard UI shapes (the **mappers**). The Aperant app renders any framework's output through these normalized views -- a Kanban board for plans, a progress bar for execution, a verification dashboard for QA.
|
|
199
|
-
|
|
200
|
-
This means you can build your own framework (or wrap an existing one like BMAD, SpecKit, etc.) and have it render natively in the Aperant UI.
|
|
201
|
-
|
|
202
|
-
```typescript
|
|
203
|
-
import type { FrameworkManifest } from "@aperant/framework/types";
|
|
204
|
-
|
|
205
|
-
const manifest: FrameworkManifest = {
|
|
206
|
-
id: "my-framework",
|
|
207
|
-
name: "My Framework",
|
|
208
|
-
version: "1.0.0",
|
|
209
|
-
stages: [
|
|
210
|
-
{
|
|
211
|
-
stage: "plan",
|
|
212
|
-
artifacts: [
|
|
213
|
-
{ nativeName: "plan.md", role: "plan", format: "markdown" }
|
|
214
|
-
],
|
|
215
|
-
mapper: "./mappers/plan-mapper.js"
|
|
216
|
-
}
|
|
217
|
-
]
|
|
218
|
-
};
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
## Project Structure
|
|
222
|
-
|
|
223
|
-
```
|
|
224
|
-
packages/framework/
|
|
225
|
-
bin/apt-tools.mjs # Deterministic CLI kernel
|
|
226
|
-
commands/ # Slash command definitions
|
|
227
|
-
plan.md # /apt:plan
|
|
228
|
-
execute.md # /apt:execute
|
|
229
|
-
verify.md # /apt:verify
|
|
230
|
-
review.md # /apt:review
|
|
231
|
-
run.md # /apt:run
|
|
232
|
-
prompts/ # Agent prompt templates
|
|
233
|
-
src/ # TypeScript types + mappers
|
|
234
|
-
types/ # FrameworkManifest, UI shapes, ProviderCapabilities
|
|
235
|
-
mappers/ # Reference mapper implementation
|
|
236
|
-
dist/ # Built output (published to npm)
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
## Provider Independence
|
|
240
|
-
|
|
241
|
-
The framework is provider-agnostic. It works with Claude, GPT-4o, o3, Codex, or any model that supports tool calling. The `ProviderCapabilities` type lets skills adapt prompting strategy per provider -- preferred structured format (XML for Claude, JSON for GPT), whether to use system prompts, context window limits -- without provider-specific code branches in the orchestration logic.
|
|
242
|
-
|
|
243
|
-
```typescript
|
|
244
|
-
import type { ProviderCapabilities } from "@aperant/framework/types";
|
|
245
|
-
```
|
|
246
|
-
|
|
247
|
-
## apt-tools CLI
|
|
248
|
-
|
|
249
|
-
The `apt-tools` binary is the deterministic kernel. It handles operations that the LLM should never do itself:
|
|
250
|
-
|
|
251
|
-
| Command | Description |
|
|
252
|
-
| ------------------------------------ | ------------------------------------------------ |
|
|
253
|
-
| `apt-tools init <dir>` | Install command files into a project |
|
|
254
|
-
| `apt-tools state <dir>` | Read framework state |
|
|
255
|
-
| `apt-tools constitution <dir>` | Read project constitution (AGENTS.md / CLAUDE.md) |
|
|
256
|
-
| `apt-tools cost <dir> [flags]` | Cost tracking (per-task, trending, comparison) |
|
|
257
|
-
| `apt-tools tokens <record\|tally\|compare\|list> <dir>` | C11: per-task token telemetry — record actuals from a Claude Code transcript or manual `--input/--output`, tally a `TaskCostSummary`, compare against an optional baseline, and list across tasks |
|
|
258
|
-
| `apt-tools commit <msg> --files ...` | Commit files with message |
|
|
259
|
-
| `apt-tools task complete-subtask <dir>` | C33: atomic plan ↔ build-progress sync. Flips `implementation_plan.json.subtasks[].status` AND appends `build-progress.json.completed_subtasks` under one lock; supports consolidated ids like `E1+E2`. Used by `/apt:execute` §3e. |
|
|
260
|
-
| `apt-tools docs-audit <dir>` | C33: docs-coherence audit. External prose (CLAUDE.md / AGENTS.md / READMEs / docs/**) + internal state. Findings bucketed by policy from `.aperant/config.json.docs_policy`. |
|
|
261
|
-
| `apt-tools features-audit <dir> [--apply-stubs]` | C33: features-registry audit. Detects new UI/core-service/hook/IPC files in a diff; `--apply-stubs` auto-registers them in `.aperant/features/<area>.json`. |
|
|
262
|
-
| `apt-tools roadmap rollup <dir> --scope <s> --milestone <id>` | C33: recompute a single milestone's status from its phases. Idempotent. |
|
|
263
|
-
| `apt-tools audit privacy <dir>` | Diff tracked `.aperant/*` vs share policy (exit 2 on violations; `--scrub` emits `git filter-repo` commands + checklist, never executes) |
|
|
264
|
-
| `apt-tools audit visibility-signals <dir>` | Structured JSON signals for `/apt:setup`'s visibility mini-flow (public-remote host, gitignore allow rules, current policy) |
|
|
265
|
-
|
|
266
|
-
All output is JSON. No external dependencies -- pure Node.js.
|
|
267
|
-
|
|
268
|
-
## Artifact Sharing Policy (C35)
|
|
269
|
-
|
|
270
|
-
`.aperant/config.json` includes a `share` block that controls which framework
|
|
271
|
-
artifacts are committed to git and which stay local. The resolved policy drives
|
|
272
|
-
both the `.aperant/.gitignore` template and `apt-tools audit privacy`.
|
|
273
|
-
|
|
274
|
-
```jsonc
|
|
275
|
-
{
|
|
276
|
-
"share": {
|
|
277
|
-
"visibility": "solo", // "solo" | "team" | "oss"
|
|
278
|
-
"roadmap": false, // commit .aperant/roadmap/
|
|
279
|
-
"tasks": false, // commit .aperant/tasks/*/ artifacts
|
|
280
|
-
"team": { "roster": false }, // commit .aperant/team.json
|
|
281
|
-
"decisions": false, // commit .aperant/decisions/
|
|
282
|
-
"digests": null // null = follow digests.enabled; or true/false
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
Presets:
|
|
288
|
-
|
|
289
|
-
- **`solo`** (default) — nothing shared. Byte-identical to the pre-C35 template.
|
|
290
|
-
- **`team`** — roadmap + tasks + team.roster + decisions + digests shared with teammates.
|
|
291
|
-
- **`oss`** — identical shape to `team` today; reserved for future divergence.
|
|
292
|
-
|
|
293
|
-
`apt-tools init` resolves the effective policy, renders the `.aperant/.gitignore`
|
|
294
|
-
from it, and warns when a public remote (github.com / gitlab.com / bitbucket.org)
|
|
295
|
-
is combined with any sharing toggle.
|
|
296
|
-
|
|
297
|
-
## Part of Aperant
|
|
298
|
-
|
|
299
|
-
This framework powers the [Aperant IDE](https://github.com/Mikalsen-AI/aperant-cloud-desktop) -- an AI platform covering the full software lifecycle from idea to production and everything after. The same prompts and methodology used in the CLI are used inside the Aperant app. The framework is open source; the IDE adds a visual layer, collaboration features, and managed infrastructure on top.
|
|
300
|
-
|
|
301
67
|
## License
|
|
302
68
|
|
|
303
69
|
AGPL-3.0-only. See [LICENSE](LICENSE).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-version.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/check-version.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"check-version.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/check-version.mjs"],"names":[],"mappings":"AAqGA;;GAEG;AACH,4CAFW,MAAM,8CAsFhB"}
|
|
@@ -16,7 +16,26 @@
|
|
|
16
16
|
* stale_files: [{ path, reason }],
|
|
17
17
|
* update_available: false
|
|
18
18
|
* }],
|
|
19
|
-
* legacy_install: false
|
|
19
|
+
* legacy_install: false, // true when only the old .apt-version exists
|
|
20
|
+
* // === 0.6.7 cache-merge fields (Bug 1 fix) ===
|
|
21
|
+
* // Merged from the SessionStart worker's cache at
|
|
22
|
+
* // ~/.cache/aperant/apt-update-check.json when fresh (< 1 h,
|
|
23
|
+
* // schema_version=1). When stale, missing, or malformed, the same
|
|
24
|
+
* // field names are present with null/false/0 sentinel values so
|
|
25
|
+
* // the skill's parser stays single-shape.
|
|
26
|
+
* //
|
|
27
|
+
* // Note: framework.installed_version is intentionally absent.
|
|
28
|
+
* // The live kernel version is always in the top-level
|
|
29
|
+
* // `framework_version` field (read from package.json, never from
|
|
30
|
+
* // the cache).
|
|
31
|
+
* framework: {
|
|
32
|
+
* latest_version: '0.6.7' | null
|
|
33
|
+
* },
|
|
34
|
+
* update_available: false,
|
|
35
|
+
* dev_install_ahead: false,
|
|
36
|
+
* not_published: false,
|
|
37
|
+
* stale_files_total: 0,
|
|
38
|
+
* lookup_error: null
|
|
20
39
|
* }
|
|
21
40
|
*
|
|
22
41
|
* Per-file `reason` values:
|
|
@@ -30,6 +49,7 @@ import { dirname, join, resolve } from 'node:path';
|
|
|
30
49
|
import { fileURLToPath } from 'node:url';
|
|
31
50
|
import { readManifest } from '../install/manifest.mjs';
|
|
32
51
|
import { detectInstalledRuntimes } from '../install/runtime-detect.mjs';
|
|
52
|
+
import { readFreshUpdateCache } from '../install/update-chips.mjs';
|
|
33
53
|
import { inspectManifestFiles } from '../install/version-header.mjs';
|
|
34
54
|
import { err, ok } from '../util/result.mjs';
|
|
35
55
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -53,6 +73,10 @@ function inspectRuntime(targetDir, descriptor) {
|
|
|
53
73
|
runtime: descriptor.id,
|
|
54
74
|
installed_version: null,
|
|
55
75
|
stale_files: [],
|
|
76
|
+
// 0.6.7 — per-runtime `update_available` is retained as `false` for
|
|
77
|
+
// backward shape compatibility with pre-0.6.7 callers. The real
|
|
78
|
+
// npm-bump signal now lives on the TOP-LEVEL `update_available`
|
|
79
|
+
// field (merged from the SessionStart worker's cache below).
|
|
56
80
|
update_available: false,
|
|
57
81
|
};
|
|
58
82
|
}
|
|
@@ -64,9 +88,12 @@ function inspectRuntime(targetDir, descriptor) {
|
|
|
64
88
|
runtime: descriptor.id,
|
|
65
89
|
installed_version: manifest.framework_version,
|
|
66
90
|
stale_files: stale,
|
|
91
|
+
// See note above — top-level `update_available` carries the real signal.
|
|
67
92
|
update_available: false,
|
|
68
93
|
};
|
|
69
94
|
}
|
|
95
|
+
/** Cache freshness window — 1 hour, matches the worker's CACHE_TTL_MS. */
|
|
96
|
+
const CACHE_TTL_MS = 60 * 60 * 1_000;
|
|
70
97
|
/**
|
|
71
98
|
* @param {string} projectDir
|
|
72
99
|
*/
|
|
@@ -98,6 +125,43 @@ export function cmdCheckVersion(projectDir) {
|
|
|
98
125
|
else if (runtimes.length > 0) {
|
|
99
126
|
messageParts.push(`Skills are up to date for ${runtimes.length} runtime(s).`);
|
|
100
127
|
}
|
|
128
|
+
// 0.6.7 (Bug 1 fix) — merge the SessionStart worker's cache fields when
|
|
129
|
+
// the cache file is fresh (< 1 h, schema_version=1). On a stale / missing
|
|
130
|
+
// / malformed cache the same field names are emitted with null/false/0
|
|
131
|
+
// sentinel values so the skill's parser stays single-shape (ID-03).
|
|
132
|
+
//
|
|
133
|
+
// LOG-001: stale_files_total is always derived from the live per-runtime
|
|
134
|
+
// walk (totalStale). The cache value is intentionally NOT merged — it is
|
|
135
|
+
// up to 1 h old and would hide drift that occurred since the last worker
|
|
136
|
+
// run.
|
|
137
|
+
//
|
|
138
|
+
// LOG-002: installed_version always comes from the kernel's own
|
|
139
|
+
// package.json (frameworkVersion). The cache's installed_version is
|
|
140
|
+
// stale by definition and is NOT merged into the envelope. Consumers
|
|
141
|
+
// that need the live kernel version use the top-level `framework_version`
|
|
142
|
+
// field, which is identical.
|
|
143
|
+
const cacheResult = readFreshUpdateCache(CACHE_TTL_MS);
|
|
144
|
+
let latestVersion = null;
|
|
145
|
+
let updateAvailable = false;
|
|
146
|
+
let devInstallAhead = false;
|
|
147
|
+
let notPublished = false;
|
|
148
|
+
let lookupError = null;
|
|
149
|
+
if (cacheResult.fresh) {
|
|
150
|
+
const c = cacheResult.cache;
|
|
151
|
+
const fw = c.framework && typeof c.framework === 'object' ? c.framework : {};
|
|
152
|
+
// latest_version is semver-validated inside readFreshUpdateCache (SEC-001).
|
|
153
|
+
if (typeof fw.latest_version === 'string')
|
|
154
|
+
latestVersion = fw.latest_version;
|
|
155
|
+
if (typeof c.update_available === 'boolean')
|
|
156
|
+
updateAvailable = c.update_available;
|
|
157
|
+
if (typeof c.dev_install_ahead === 'boolean')
|
|
158
|
+
devInstallAhead = c.dev_install_ahead;
|
|
159
|
+
if (typeof c.not_published === 'boolean')
|
|
160
|
+
notPublished = c.not_published;
|
|
161
|
+
// stale_files_total intentionally NOT taken from cache (LOG-001).
|
|
162
|
+
if (typeof c.lookup_error === 'string')
|
|
163
|
+
lookupError = c.lookup_error;
|
|
164
|
+
}
|
|
101
165
|
return ok({
|
|
102
166
|
status,
|
|
103
167
|
command: 'check-version',
|
|
@@ -105,6 +169,17 @@ export function cmdCheckVersion(projectDir) {
|
|
|
105
169
|
runtimes,
|
|
106
170
|
legacy_install: legacyInstall,
|
|
107
171
|
message: messageParts.join(' '),
|
|
172
|
+
// Cache-merge fields (additive, nullable). Documented in the
|
|
173
|
+
// file-header schema comment.
|
|
174
|
+
framework: {
|
|
175
|
+
latest_version: latestVersion,
|
|
176
|
+
},
|
|
177
|
+
update_available: updateAvailable,
|
|
178
|
+
dev_install_ahead: devInstallAhead,
|
|
179
|
+
not_published: notPublished,
|
|
180
|
+
// stale_files_total: always the live sum from per-runtime walks (LOG-001).
|
|
181
|
+
stale_files_total: totalStale,
|
|
182
|
+
lookup_error: lookupError,
|
|
108
183
|
});
|
|
109
184
|
}
|
|
110
185
|
//# sourceMappingURL=check-version.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-version.mjs","sourceRoot":"","sources":["../../../src/cli/commands/check-version.mjs"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"check-version.mjs","sourceRoot":"","sources":["../../../src/cli/commands/check-version.mjs"],"names":[],"mappings":"AAAA;;;;;;;;;;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CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAA;QAC5E,4EAA4E;QAC5E,IAAI,OAAO,EAAE,CAAC,cAAc,KAAK,QAAQ;YAAE,aAAa,GAAG,EAAE,CAAC,cAAc,CAAA;QAC5E,IAAI,OAAO,CAAC,CAAC,gBAAgB,KAAK,SAAS;YAAE,eAAe,GAAG,CAAC,CAAC,gBAAgB,CAAA;QACjF,IAAI,OAAO,CAAC,CAAC,iBAAiB,KAAK,SAAS;YAAE,eAAe,GAAG,CAAC,CAAC,iBAAiB,CAAA;QACnF,IAAI,OAAO,CAAC,CAAC,aAAa,KAAK,SAAS;YAAE,YAAY,GAAG,CAAC,CAAC,aAAa,CAAA;QACxE,kEAAkE;QAClE,IAAI,OAAO,CAAC,CAAC,YAAY,KAAK,QAAQ;YAAE,WAAW,GAAG,CAAC,CAAC,YAAY,CAAA;IACrE,CAAC;IAED,OAAO,EAAE,CAAC;QACT,MAAM;QACN,OAAO,EAAE,eAAe;QACxB,iBAAiB,EAAE,gBAAgB;QACnC,QAAQ;QACR,cAAc,EAAE,aAAa;QAC7B,OAAO,EAAE,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC;QAC/B,6DAA6D;QAC7D,8BAA8B;QAC9B,SAAS,EAAE;YACV,cAAc,EAAE,aAAa;SAC7B;QACD,gBAAgB,EAAE,eAAe;QACjC,iBAAiB,EAAE,eAAe;QAClC,aAAa,EAAE,YAAY;QAC3B,2EAA2E;QAC3E,iBAAiB,EAAE,UAAU;QAC7B,YAAY,EAAE,WAAW;KACzB,CAAC,CAAA;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-watch.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/ci-watch.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ci-watch.d.mts","sourceRoot":"","sources":["../../../src/cli/commands/ci-watch.mjs"],"names":[],"mappings":"AAoEA;;;;GAIG;AACH,uCAJW,MAAM,cACN,MAAM,aACN,MAAM,EAAE,8CAyBlB"}
|