pi-session-continuity 0.1.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +172 -0
  4. package/docs/deploys/README.md +18 -0
  5. package/docs/deploys/deploy-2026-07-07-SCOPE-0001-package-skeleton.md +53 -0
  6. package/docs/deploys/deploy-2026-07-07-SCOPE-0002-core-artifact-engine.md +39 -0
  7. package/docs/deploys/deploy-2026-07-07-SCOPE-0003-manual-checkpoint.md +38 -0
  8. package/docs/deploys/deploy-2026-07-07-SCOPE-0004-status-settings.md +38 -0
  9. package/docs/deploys/deploy-2026-07-07-SCOPE-0005-automatic-threshold.md +37 -0
  10. package/docs/deploys/deploy-2026-07-07-SCOPE-0006-compaction-hygiene.md +38 -0
  11. package/docs/deploys/deploy-2026-07-07-SCOPE-0007-tests-smoke.md +38 -0
  12. package/docs/deploys/deploy-2026-07-07-SCOPE-0008-public-docs-release-readiness.md +37 -0
  13. package/docs/deploys/deploy-2026-07-07-SCOPE-0009-dogfood-hardening-local-readiness.md +40 -0
  14. package/docs/deploys/deploy-2026-07-08-SCOPE-0010-ux-settings-menu.md +41 -0
  15. package/docs/deploys/deploy-2026-07-08-SCOPE-0011-compact-status-footer.md +26 -0
  16. package/docs/deploys/deploy-2026-07-08-SCOPE-0012-remove-settings-show.md +20 -0
  17. package/docs/deploys/deploy-2026-07-08-SCOPE-0014-status-and-effort.md +21 -0
  18. package/docs/deploys/deploy-2026-07-08-SCOPE-0016-codex-empty-synthesis.md +21 -0
  19. package/docs/product-spec.md +702 -0
  20. package/docs/release-readiness/local-v1-readiness-2026-07-07.md +76 -0
  21. package/extensions/session-continuity/index.ts +317 -0
  22. package/package.json +58 -0
  23. package/scripts/smoke/manual-checks.sh +42 -0
  24. package/src/artifact.ts +535 -0
  25. package/src/config.ts +360 -0
  26. package/src/constants.ts +68 -0
  27. package/src/handoff.ts +674 -0
  28. package/src/status.ts +130 -0
  29. package/src/trigger.ts +40 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 — 2026-07-09
4
+
5
+ - Add Pi package manifest for `pi-session-continuity`.
6
+ - Add `/continuity status`, `/continuity checkpoint`, and `/continuity settings` extension entrypoint.
7
+ - Add project-local config validation and trusted-project gating.
8
+ - Add Continuity Brief frontmatter, mandatory heading validation, artifact pathing, failed artifact handling, and disk-backed resume prompt construction.
9
+ - Add automatic threshold check and single-flight duplicate suppression.
10
+ - Add local unit tests and a packaged manual smoke checklist covering the required clean Pi smoke assertions.
11
+ - Add package/docs contract tests for the smoke script and public documentation collateral.
12
+
13
+ Public tag, GitHub install smoke, npm publish, and external release announcement remain gated by explicit human approval.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pi Session Continuity contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,172 @@
1
+ # Pi Session Continuity
2
+
3
+ **Keep long-running Pi coding sessions moving without losing the plot.**
4
+
5
+ Pi Session Continuity exists so extended agentic coding work can survive the boring failure modes: a context window fills up, a session reloads, a compaction happens, or the next agent has to recover the state of the task. Its job is not to be clever, visible, or exciting. Its job is to be dull enough that you forget it is there — until the moment it quietly gives the next session a reliable handoff.
6
+
7
+ Only after that intent is clear does the mechanism matter: Pi Session Continuity is a Pi package that writes a structured **Continuity Brief** to disk before it queues any resume prompt. The continuation is driven from the saved artifact, not from fragile in-memory state.
8
+
9
+ ## Why this exists
10
+
11
+ Long-running agentic coding work often fails at the worst possible boundary: the session is full, the model is tired, the transcript is noisy, and the next prompt has to reconstruct what matters. A normal compaction can reduce tokens, but compaction is still an in-session memory-management step. If the handoff itself fails, or if a reload happens at the wrong time, the recovery story can become ambiguous.
12
+
13
+ Pi Session Continuity turns that risky boundary into a small, repeatable reliability step:
14
+
15
+ 1. synthesize the current state of the work;
16
+ 2. write and validate a disk-backed Continuity Brief;
17
+ 3. re-read the saved file;
18
+ 4. queue the resume prompt from that exact file;
19
+ 5. use native compaction only as token hygiene after the durable path is safe.
20
+
21
+ Core invariant:
22
+
23
+ ```text
24
+ Durable Continuity Brief first.
25
+ Resume prompt is injected from the disk artifact.
26
+ Compaction is token hygiene, not the source of continuity.
27
+ ```
28
+
29
+ ## Why this approach is better for continuous coding
30
+
31
+ Pi Session Continuity is not trying to be magical or invisible. It is intentionally explicit:
32
+
33
+ - **Recoverable:** the important state is in a local Markdown artifact that can be inspected, archived, copied, or used by a future Pi session.
34
+ - **Auditable:** every handoff records task, done criteria, constraints, files, validation evidence, open questions, and next actions in a stable structure.
35
+ - **Safer than memory-only continuation:** the resume prompt is generated from the artifact on disk, so continuity does not depend on the agent remembering what it meant to say.
36
+ - **Compatible with compaction:** compaction remains useful, but it is no longer the source of truth for continuity.
37
+ - **Good for unattended work:** if a long task reaches a context threshold, the package can create a visible handoff instead of silently drifting or truncating the useful state.
38
+
39
+ The result is a conservative infrastructure layer for extended Pi sessions: less clever, more durable, and easier to debug.
40
+
41
+ ## Installation
42
+
43
+ Recommended install from npm:
44
+
45
+ ```bash
46
+ pi install npm:pi-session-continuity
47
+ ```
48
+
49
+ Pinned GitHub install:
50
+
51
+ ```bash
52
+ pi install git:github.com/bernardofortes/pi-session-continuity@v0.1.0
53
+ ```
54
+
55
+ For local development only:
56
+
57
+ ```bash
58
+ pi -e /path/to/pi-session-continuity
59
+ ```
60
+
61
+ Do not install from sources you do not trust. Pi packages execute with local user permissions.
62
+
63
+ ## Quick start
64
+
65
+ ```text
66
+ /continuity
67
+ /continuity status
68
+ /continuity checkpoint
69
+ ```
70
+
71
+ `/continuity` opens the settings/config menu in interactive Pi TUI sessions. `/continuity checkpoint` performs a full Continuity Handoff: synthesize, validate, write the Continuity Brief, re-read it from disk, and queue the resume prompt from that saved content.
72
+
73
+ ## Commands
74
+
75
+ - `/continuity` — opens the same settings/config menu as `/continuity settings` in interactive Pi TUI sessions.
76
+ - `/continuity status` — shows a human-readable status panel with enabled/disabled state, trigger and keep percentages, synthesis model and effort, artifact directory, active operation, last checkpoint, last artifact, failures, and stale same-session pending artifacts.
77
+ - `/continuity checkpoint` — manually creates a disk-backed Continuity Brief and queues a resume prompt from it.
78
+ - `/continuity settings` — opens an interactive settings menu in Pi TUI so you can view/change public config values such as `triggerAtPercent` without manually editing JSON. In non-interactive contexts, the same command falls back to textual output.
79
+
80
+ ## Configuration
81
+
82
+ Project-local config is read only when the project is trusted:
83
+
84
+ ```text
85
+ <workspace>/<CONFIG_DIR_NAME>/session-continuity.json
86
+ ```
87
+
88
+ `CONFIG_DIR_NAME` is supplied by Pi and is normally `.pi`.
89
+
90
+ Defaults:
91
+
92
+ ```json
93
+ {
94
+ "enabled": true,
95
+ "triggerAtPercent": 75,
96
+ "keepRecentPercent": 20,
97
+ "synthesisModel": "inherit",
98
+ "synthesisEffort": "medium",
99
+ "artifactDirectory": "session-continuity"
100
+ }
101
+ ```
102
+
103
+ `synthesisEffort` controls Continuity Brief synthesis reasoning/thinking level and accepts `inherit`, `minimal`, `low`, `medium`, `high`, or `xhigh`. `artifactDirectory` resolves under `<workspace>/<CONFIG_DIR_NAME>/` unless absolute. Invalid config disables automatic behavior and reports the config path.
104
+
105
+ In interactive Pi sessions, `/continuity settings` can update this file for the public config fields. In non-interactive contexts, edit the JSON directly or run `/continuity settings` for textual inspection.
106
+
107
+ ## Artifact layout
108
+
109
+ ```text
110
+ <artifactDirectory>/<sessionId>/pending/<eventId>.md
111
+ <artifactDirectory>/<sessionId>/archive/<timestamp>-<eventId>.md
112
+ <artifactDirectory>/<sessionId>/failed/<timestamp>-<eventId>.md
113
+ <artifactDirectory>/<sessionId>/lock/<eventId>.json
114
+ ```
115
+
116
+ Artifacts from other sessions are inert. Same-session stale pending artifacts after reload are reported but not injected automatically.
117
+
118
+ Successful handoffs are archived per session. After each successful archive, Pi Session Continuity keeps only the newest 10 archived Continuity Briefs for that session and deletes older archived briefs automatically.
119
+
120
+ ## Privacy and security
121
+
122
+ Continuity Briefs are local files that may contain prompts, tool output, file paths, command results, and sensitive project context. v0.1.0 does not guarantee secret redaction. Choose artifact directories and ignore rules accordingly.
123
+
124
+ This package must not push, publish, create repositories, upload artifacts, or mutate external systems.
125
+
126
+ ## Manual smoke and release validation
127
+
128
+ Local package gates:
129
+
130
+ ```bash
131
+ npm test
132
+ npm run typecheck
133
+ npm run smoke:manual
134
+ npm pack --dry-run
135
+ ```
136
+
137
+ `npm run smoke:manual` prints a checklist template for the required clean Pi smoke assertions. The checklist must be executed from a clean Pi install pinned to a GitHub ref before public announcement. Record the Pi version, Node version, OS, install command, smoke transcript, and resulting artifact path.
138
+
139
+ External validation commands such as `pi install git:github.com/bernardofortes/pi-session-continuity@v0.1.0`, git tags, releases, npm publishing, or uploads require separate explicit human approval.
140
+
141
+ ## Known limitations in v0.1.0
142
+
143
+ - Local Pi sessions only.
144
+ - No user-facing cleanup command.
145
+ - No cross-machine sync or cloud storage.
146
+ - GitHub clean-install smoke is required before public announcement.
147
+ - npm is the recommended public install path after the tagged release passes smoke validation.
148
+
149
+ ## Troubleshooting
150
+
151
+ - Invalid config: fix the JSON at the reported path; automatic behavior stays disabled until corrected.
152
+ - Synthesis failure: no resume prompt is queued; inspect the failed artifact path if one was written.
153
+ - Write failure: no resume prompt is queued; fix filesystem permissions or artifact path.
154
+ - Stale pending artifact: `/continuity status` reports it as inert; v0.1.0 will not silently inject it after reload.
155
+ - Untrusted project: trust the project before relying on project-local config or automatic behavior.
156
+
157
+ ## Update / uninstall
158
+
159
+ ```bash
160
+ pi update --extension npm:pi-session-continuity
161
+ pi remove npm:pi-session-continuity
162
+
163
+ # For pinned GitHub installs:
164
+ pi update --extension git:github.com/bernardofortes/pi-session-continuity@v0.1.0
165
+ pi remove git:github.com/bernardofortes/pi-session-continuity
166
+ ```
167
+
168
+ Removing the package stops loading the extension. Existing local artifacts remain on disk unless you remove them manually.
169
+
170
+ ## Compatibility
171
+
172
+ Developed against Pi CLI/package APIs from `@earendil-works/pi-coding-agent` 0.80.x, Node.js 22, and Linux. Record exact Pi version, OS, install command, and smoke transcript before tagging a public release.
@@ -0,0 +1,18 @@
1
+ # SpecForge Deploy Notes
2
+
3
+ | Date | Scope | Title | Area | Status | Note |
4
+ |---|---|---|---|---|---|
5
+ | 2026-07-07 | SCOPE-0001 | Package Skeleton | Pi package/extension | Done | [deploy-2026-07-07-SCOPE-0001-package-skeleton.md](deploy-2026-07-07-SCOPE-0001-package-skeleton.md) |
6
+ | 2026-07-07 | SCOPE-0002 | Core Artifact Engine Hardening | Artifact/config core | Done | [deploy-2026-07-07-SCOPE-0002-core-artifact-engine.md](deploy-2026-07-07-SCOPE-0002-core-artifact-engine.md) |
7
+ | 2026-07-07 | SCOPE-0003 | Manual Checkpoint Hardening | Manual Continuity Handoff | Done | [deploy-2026-07-07-SCOPE-0003-manual-checkpoint.md](deploy-2026-07-07-SCOPE-0003-manual-checkpoint.md) |
8
+ | 2026-07-07 | SCOPE-0004 | Status/Settings Hardening | Status/settings output | Done | [deploy-2026-07-07-SCOPE-0004-status-settings.md](deploy-2026-07-07-SCOPE-0004-status-settings.md) |
9
+ | 2026-07-07 | SCOPE-0005 | Automatic Threshold Hardening | Automatic threshold trigger | Done | [deploy-2026-07-07-SCOPE-0005-automatic-threshold.md](deploy-2026-07-07-SCOPE-0005-automatic-threshold.md) |
10
+ | 2026-07-07 | SCOPE-0006 | Compaction Hygiene Hardening | Compaction hygiene | Done | [deploy-2026-07-07-SCOPE-0006-compaction-hygiene.md](deploy-2026-07-07-SCOPE-0006-compaction-hygiene.md) |
11
+ | 2026-07-07 | SCOPE-0007 | Tests and Smoke Scripts | Tests and manual smoke collateral | Done | [deploy-2026-07-07-SCOPE-0007-tests-smoke.md](deploy-2026-07-07-SCOPE-0007-tests-smoke.md) |
12
+ | 2026-07-07 | SCOPE-0008 | Public Docs and Release Readiness | Public docs and release-readiness collateral | Done | [deploy-2026-07-07-SCOPE-0008-public-docs-release-readiness.md](deploy-2026-07-07-SCOPE-0008-public-docs-release-readiness.md) |
13
+ | 2026-07-07 | SCOPE-0009 | Dogfood Hardening and Local Readiness | Local v1 readiness decision | Done | [deploy-2026-07-07-SCOPE-0009-dogfood-hardening-local-readiness.md](deploy-2026-07-07-SCOPE-0009-dogfood-hardening-local-readiness.md) |
14
+ | 2026-07-08 | SCOPE-0010 | UX Settings Menu | Status/settings UX | Done | [deploy-2026-07-08-SCOPE-0010-ux-settings-menu.md](deploy-2026-07-08-SCOPE-0010-ux-settings-menu.md) |
15
+ | 2026-07-08 | SCOPE-0011 | Compact Status Footer | Status/footer UX | Done | [deploy-2026-07-08-SCOPE-0011-compact-status-footer.md](deploy-2026-07-08-SCOPE-0011-compact-status-footer.md) |
16
+ | 2026-07-08 | RUN-0012 | Remove Settings Show From TUI | Settings UX | Done | [deploy-2026-07-08-SCOPE-0012-remove-settings-show.md](deploy-2026-07-08-SCOPE-0012-remove-settings-show.md) |
17
+ | 2026-07-08 | RUN-0014 | Status Panel Simplification and Synthesis Effort | Status/settings UX and synthesis config | Done | [deploy-2026-07-08-SCOPE-0014-status-and-effort.md](deploy-2026-07-08-SCOPE-0014-status-and-effort.md) |
18
+ | 2026-07-08 | RUN-0016 | Codex Empty Synthesis Repair | Synthesis reliability | Done | [deploy-2026-07-08-SCOPE-0016-codex-empty-synthesis.md](deploy-2026-07-08-SCOPE-0016-codex-empty-synthesis.md) |
@@ -0,0 +1,53 @@
1
+ # Deploy Note: Package Skeleton
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0001
5
+ Run ID: RUN-0001
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Pi package/extension
9
+
10
+ ## Delivered
11
+
12
+ - Created the public package skeleton for Pi Session Continuity.
13
+ - Added the `/continuity` extension entrypoint and core config/artifact/handoff helpers.
14
+ - Added tests for config, artifact validation, disk-backed prompt use, failures, stale status, and locks.
15
+ - Added README, CHANGELOG, LICENSE, and smoke checklist scaffold.
16
+
17
+ ## Files touched
18
+
19
+ - `package.json` / `tsconfig.json` — package metadata and local validation scripts.
20
+ - `extensions/session-continuity/index.ts` — Pi extension command and threshold wiring.
21
+ - `src/` — config, artifact, handoff, constants, and status modules.
22
+ - `test/` — unit coverage for the initial contract.
23
+ - `scripts/smoke/manual-checks.sh` — named manual smoke checklist.
24
+
25
+ ## Evidence
26
+
27
+ - `npm test` — passed, 4 files and 22 tests (`CMD-0009`).
28
+ - `npm run typecheck` — passed (`CMD-0010`).
29
+ - `npm pack --dry-run` — passed, 11 packaged files (`CMD-0011`).
30
+ - Runtime source grep found no `loop`, `campaign`, or `episode` terms.
31
+
32
+ ## Decisions
33
+
34
+ - Kept external install/tag/release/publish out of scope.
35
+ - Used project-local config only and `CONFIG_DIR_NAME` for path resolution.
36
+ - Added an extra `.active` lock directory as an atomic local guard while preserving event lock files.
37
+
38
+ ## How it works now
39
+
40
+ The extension loads config from the trusted project, reports `/continuity status`, and can run a manual or threshold handoff. The handoff writes and validates a pending Continuity Brief, re-reads it from disk for the prompt, marks it injected, archives it, and only then attempts compaction hygiene.
41
+
42
+ ## Future notes
43
+
44
+ Clean Pi install and live command smoke from a GitHub ref remain required before public release.
45
+
46
+ ## Operational risks
47
+
48
+ Continuity Briefs may contain sensitive local session context. v0.1.0 does not redact secrets. The `.active` lock is local filesystem coordination only, not cross-machine locking.
49
+
50
+ ## Artifact refs
51
+
52
+ - Packet: `specforge/scopes/SCOPE-0001/autonomous-implementation-packet.yaml`
53
+ - Run: `specforge/runs/RUN-0001/`
@@ -0,0 +1,39 @@
1
+ # Deploy Note: Core Artifact Engine Hardening
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0002
5
+ Run ID: RUN-0002
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Artifact/config core
9
+
10
+ ## Delivered
11
+
12
+ - Hardened Continuity Brief validation for schema version, string identity fields, numeric fields, percentage bounds, and keep/trigger ordering.
13
+ - Enforced the product-spec status state machine for artifact status updates.
14
+ - Restricted resume prompt input to valid `pending` Continuity Brief artifacts only.
15
+ - Rejected relative `artifactDirectory` values that escape `<workspace>/<CONFIG_DIR_NAME>/`; absolute paths remain explicitly allowed.
16
+ - Added focused artifact/config tests for the hardened contract.
17
+
18
+ ## Evidence
19
+
20
+ - `npm test` — passed, 4 files and 26 tests (`CMD-0003`).
21
+ - `npm run typecheck` — passed (`CMD-0004`).
22
+ - `npm pack --dry-run` — passed (`CMD-0005`).
23
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
24
+
25
+ ## Decisions
26
+
27
+ - Kept this slice focused on core artifact/config behavior only.
28
+ - Did not change `docs/product-spec.md`.
29
+ - Did not add commands, cleanup behavior, or external install/release steps.
30
+
31
+ ## Operational risks
32
+
33
+ Clean Pi install and live manual smoke remain release-gated future evidence. The directive-promotion detector remains intentionally heuristic and can be expanded in a later hardening slice if needed.
34
+
35
+ ## Artifact refs
36
+
37
+ - Packet: `specforge/scopes/SCOPE-0002/autonomous-implementation-packet.yaml`
38
+ - Run: `specforge/runs/RUN-0002/`
39
+ - Judge: `specforge/runs/RUN-0002/subagents/JUDGE-0001.md`
@@ -0,0 +1,38 @@
1
+ # Deploy Note: Manual Checkpoint Hardening
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0003
5
+ Run ID: RUN-0003
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Manual Continuity Handoff
9
+
10
+ ## Delivered
11
+
12
+ - Added focused handoff tests for synthesized validation failure: no resume prompt, failed artifact written, and failed artifact rejected as resume input.
13
+ - Added idle delivery coverage: idle sends immediately without `followUp`; busy still uses `deliverAs: "followUp"`.
14
+ - Strengthened success-path coverage for archive state/path behavior and lock cleanup.
15
+ - Kept implementation unchanged because existing handoff code satisfied the new contract tests.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 4 files and 28 tests (`CMD-0002`).
20
+ - `npm run typecheck` — passed (`CMD-0003`).
21
+ - `npm pack --dry-run` — passed (`CMD-0004`).
22
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
23
+
24
+ ## Decisions
25
+
26
+ - Kept this slice focused on manual handoff semantics only.
27
+ - Did not change `docs/product-spec.md`.
28
+ - Did not add status/settings, threshold, or compaction behavior.
29
+
30
+ ## Operational risks
31
+
32
+ Clean Pi install and live manual smoke remain release-gated future evidence. Exact queued-brief assertion trims trailing whitespace, which preserves substantive disk-sourced content but is not a byte-for-byte newline assertion.
33
+
34
+ ## Artifact refs
35
+
36
+ - Packet: `specforge/scopes/SCOPE-0003/autonomous-implementation-packet.yaml`
37
+ - Run: `specforge/runs/RUN-0003/`
38
+ - Judge: `specforge/runs/RUN-0003/subagents/JUDGE-0001.md`
@@ -0,0 +1,38 @@
1
+ # Deploy Note: Status/Settings Hardening
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0004
5
+ Run ID: RUN-0004
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Status/settings output
9
+
10
+ ## Delivered
11
+
12
+ - Added a reusable settings formatter for the public v0.1.0 config fields.
13
+ - Updated `/continuity settings` to use the shared formatter.
14
+ - Hardened `/continuity status` formatting so untrusted, invalid, enabled, and disabled states all include the complete status field set.
15
+ - Added focused status/settings tests for trust, validity, enabled/disabled config, paths, stale artifacts, and settings fields.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 4 files and 31 tests (`CMD-0005`).
20
+ - `npm run typecheck` — passed (`CMD-0006`).
21
+ - `npm pack --dry-run` — passed (`CMD-0007`).
22
+ - Fresh delta reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0002`).
23
+
24
+ ## Decisions
25
+
26
+ - Kept this slice focused on status/settings formatting only.
27
+ - Did not change threshold or compaction behavior.
28
+ - Did not change `docs/product-spec.md`.
29
+
30
+ ## Operational risks
31
+
32
+ Live Pi command rendering remains covered by source/unit evidence only until a clean Pi smoke run is approved.
33
+
34
+ ## Artifact refs
35
+
36
+ - Packet: `specforge/scopes/SCOPE-0004/autonomous-implementation-packet.yaml`
37
+ - Run: `specforge/runs/RUN-0004/`
38
+ - Judge: `specforge/runs/RUN-0004/subagents/JUDGE-0002.md`
@@ -0,0 +1,37 @@
1
+ # Deploy Note: Automatic Threshold Hardening
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0005
5
+ Run ID: RUN-0005
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Automatic threshold trigger
9
+
10
+ ## Delivered
11
+
12
+ - Added a pure automatic-trigger decision helper.
13
+ - Updated `turn_end` to use the helper.
14
+ - Added tests for disabled, untrusted, invalid, unavailable usage/window, below-threshold, and threshold-reached decisions.
15
+ - Verified 65% threshold behavior across 128k and 1M context windows.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 5 files and 33 tests (`CMD-0002`).
20
+ - `npm run typecheck` — passed (`CMD-0003`).
21
+ - `npm pack --dry-run` — passed (`CMD-0004`).
22
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
23
+
24
+ ## Decisions
25
+
26
+ - Kept trigger math as `tokens / contextWindow >= triggerAtPercent / 100`.
27
+ - Kept compaction request tied to automatic threshold handoff only; compaction behavior remains a separate episode.
28
+
29
+ ## Operational risks
30
+
31
+ `turn_end` integration is verified by source inspection and helper tests, not live Pi event smoke.
32
+
33
+ ## Artifact refs
34
+
35
+ - Packet: `specforge/scopes/SCOPE-0005/autonomous-implementation-packet.yaml`
36
+ - Run: `specforge/runs/RUN-0005/`
37
+ - Judge: `specforge/runs/RUN-0005/subagents/JUDGE-0001.md`
@@ -0,0 +1,38 @@
1
+ # Deploy Note: Compaction Hygiene Hardening
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0006
5
+ Run ID: RUN-0006
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Compaction hygiene
9
+
10
+ ## Delivered
11
+
12
+ - Added focused handoff tests proving compaction is requested only after a successful disk-backed resume path.
13
+ - Verified compaction custom instructions include the archive artifact path and `keepRecentPercent`-derived token count.
14
+ - Added failure-path tests proving validation failure and post-queue archive/update failure do not request compaction.
15
+ - Reconfirmed compaction setup failure remains a warning and does not invalidate archived handoff success.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 5 files and 35 tests (`CMD-0002`).
20
+ - `npm run typecheck` — passed (`CMD-0003`).
21
+ - `npm pack --dry-run` — passed (`CMD-0004`).
22
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
23
+
24
+ ## Decisions
25
+
26
+ - Kept compaction as token hygiene only.
27
+ - Did not change runtime implementation because the hardened tests proved the existing behavior.
28
+ - Did not add cleanup or compaction commands.
29
+
30
+ ## Operational risks
31
+
32
+ Live Pi compaction behavior remains source/test validated only until a clean smoke run is approved.
33
+
34
+ ## Artifact refs
35
+
36
+ - Packet: `specforge/scopes/SCOPE-0006/autonomous-implementation-packet.yaml`
37
+ - Run: `specforge/runs/RUN-0006/`
38
+ - Judge: `specforge/runs/RUN-0006/subagents/JUDGE-0001.md`
@@ -0,0 +1,38 @@
1
+ # Deploy Note: Tests and Smoke Scripts
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0007
5
+ Run ID: RUN-0007
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Tests and manual smoke collateral
9
+
10
+ ## Delivered
11
+
12
+ - Updated the package contract to include `scripts` because `smoke:manual` points to a script file.
13
+ - Ensured `package.json` includes `scripts` in package files.
14
+ - Expanded `scripts/smoke/manual-checks.sh` into a runnable manual smoke template with environment fields, all nine required assertions, and pass/fail result columns.
15
+ - Added package/smoke contract tests covering script presence, executable bit, assertion IDs, pass/fail markers, and spec alignment.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 6 files and 38 tests (`CMD-0002`).
20
+ - `npm run typecheck` — passed (`CMD-0003`).
21
+ - `npm run smoke:manual` — printed the manual checklist (`CMD-0004`).
22
+ - `npm pack --dry-run` — passed and included `scripts/smoke/manual-checks.sh` (`CMD-0005`).
23
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
24
+
25
+ ## Decisions
26
+
27
+ - Kept clean GitHub-ref install smoke deferred behind explicit approval.
28
+ - Included smoke scripts in packaged files so published package scripts do not reference missing files.
29
+
30
+ ## Operational risks
31
+
32
+ Clean Pi install and live smoke execution remain release-gated external validation.
33
+
34
+ ## Artifact refs
35
+
36
+ - Packet: `specforge/scopes/SCOPE-0007/autonomous-implementation-packet.yaml`
37
+ - Run: `specforge/runs/RUN-0007/`
38
+ - Judge: `specforge/runs/RUN-0007/subagents/JUDGE-0001.md`
@@ -0,0 +1,37 @@
1
+ # Deploy Note: Public Docs and Release Readiness
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0008
5
+ Run ID: RUN-0008
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Public docs and release-readiness collateral
9
+
10
+ ## Delivered
11
+
12
+ - Expanded README release-validation guidance with local gates, manual smoke checklist usage, and explicit external-action approval gating.
13
+ - Updated CHANGELOG v0.1.0 notes for the packaged manual smoke checklist and docs/package contract tests.
14
+ - Added README and CHANGELOG public-doc contract coverage to `test/package.test.ts`.
15
+ - Reconfirmed MIT license and package metadata through reviewer inspection.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 6 files and 40 tests (`CMD-0002`).
20
+ - `npm run typecheck` — passed (`CMD-0003`).
21
+ - `npm pack --dry-run` — passed and included public docs/scripts (`CMD-0004`).
22
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
23
+
24
+ ## Decisions
25
+
26
+ - Kept clean GitHub-ref install smoke deferred behind explicit external-action approval.
27
+ - Did not perform push, tag, release, publish, upload, or repository mutation.
28
+
29
+ ## Operational risks
30
+
31
+ Clean Pi install and live smoke execution remain required before public tag or announcement.
32
+
33
+ ## Artifact refs
34
+
35
+ - Packet: `specforge/scopes/SCOPE-0008/autonomous-implementation-packet.yaml`
36
+ - Run: `specforge/runs/RUN-0008/`
37
+ - Judge: `specforge/runs/RUN-0008/subagents/JUDGE-0001.md`
@@ -0,0 +1,40 @@
1
+ # Deploy Note: Dogfood Hardening and Local Readiness
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0009
5
+ Run ID: RUN-0009
6
+ Date: 2026-07-07
7
+ Status: Done
8
+ Area: Local v1 readiness decision
9
+
10
+ ## Delivered
11
+
12
+ - Added the local v1 readiness report at `docs/release-readiness/local-v1-readiness-2026-07-07.md`.
13
+ - Ran final local gates for tests, typecheck, manual smoke checklist, package dry-run, and forbidden runtime terminology.
14
+ - Recorded final independent local-readiness review.
15
+ - Preserved the boundary that public release readiness still requires separate human-approved external validation.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 6 files and 40 tests (`CMD-0002`).
20
+ - `npm run typecheck` — passed (`CMD-0003`).
21
+ - `npm run smoke:manual` — printed manual checklist (`CMD-0004`).
22
+ - `npm pack --dry-run` — passed after final docs (`CMD-0007`).
23
+ - Forbidden runtime terminology grep — no matches after final docs (`CMD-0008`).
24
+ - Fresh reviewer judge — PASS with no blockers/majors and two process minors now addressed (`JUDGE-0001`).
25
+
26
+ ## Decisions
27
+
28
+ - Local v1 readiness is accepted separately from public release readiness.
29
+ - External clean-install/tag/release validation remains Bernardo-only and requires explicit approval.
30
+
31
+ ## Operational risks
32
+
33
+ Clean GitHub-ref Pi install/smoke is still required before any public tag or announcement.
34
+
35
+ ## Artifact refs
36
+
37
+ - Packet: `specforge/scopes/SCOPE-0009/autonomous-implementation-packet.yaml`
38
+ - Readiness: `docs/release-readiness/local-v1-readiness-2026-07-07.md`
39
+ - Run: `specforge/runs/RUN-0009/`
40
+ - Judge: `specforge/runs/RUN-0009/subagents/JUDGE-0001.md`
@@ -0,0 +1,41 @@
1
+ # Deploy Note: UX Settings Menu
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0010
5
+ Run ID: RUN-0010
6
+ Date: 2026-07-08
7
+ Status: Done
8
+ Area: Status/settings UX
9
+
10
+ ## Delivered
11
+
12
+ - Updated the product spec to require human-facing status/settings UX and an interactive settings menu.
13
+ - Changed status/settings output to put readable labels first while preserving diagnostic paths and fields.
14
+ - Routed detailed TUI output through a widget with concise headline notifications.
15
+ - Added `/continuity settings show` as the textual fallback.
16
+ - Added interactive `/continuity settings` flows for enabled, trigger threshold, keep percent, synthesis model, and artifact directory.
17
+ - Added project-local config write helpers that validate drafts before writing.
18
+
19
+ ## Evidence
20
+
21
+ - `npm test` — passed, 43 tests (`CMD-0002`).
22
+ - `npm run typecheck` — passed (`CMD-0003`).
23
+ - `npm pack --dry-run` — passed (`CMD-0004`).
24
+ - Forbidden runtime terminology grep — no matches (`CMD-0005`).
25
+ - Fresh reviewer judge — PASS with no blockers/majors/minors (`JUDGE-0001`).
26
+
27
+ ## Decisions
28
+
29
+ - Keep the single project-local config source of truth.
30
+ - Keep manual/live TUI navigation as the remaining dogfood validation item; code and tests cover persistence and command fallback.
31
+ - Do not change handoff/artifact semantics in this UX slice.
32
+
33
+ ## Operational risks
34
+
35
+ Interactive `/continuity settings` navigation should still be manually dogfooded in Pi TUI before removing Pi Continue.
36
+
37
+ ## Artifact refs
38
+
39
+ - Packet: `specforge/scopes/SCOPE-0010/autonomous-implementation-packet.yaml`
40
+ - Run: `specforge/runs/RUN-0010/`
41
+ - Judge: `specforge/runs/RUN-0010/subagents/JUDGE-0001.md`
@@ -0,0 +1,26 @@
1
+ # Deploy Note: Compact Status Footer
2
+
3
+ Type: SpecForge Deploy Note
4
+ Scope ID: SCOPE-0011
5
+ Run ID: RUN-0011
6
+ Date: 2026-07-08
7
+ Status: Done
8
+ Area: Status/footer UX
9
+
10
+ ## Delivered
11
+
12
+ - Removed full multiline status/settings content from the persistent Pi widget path.
13
+ - Added compact footer labels such as `PSC 75/15`.
14
+ - Clear any previous `session-continuity` widget before showing new status.
15
+ - Updated the product spec to forbid persistent oversized status widgets.
16
+
17
+ ## Evidence
18
+
19
+ - `npm test` — passed, 44 tests (`CMD-0001`).
20
+ - `npm run typecheck` — passed (`CMD-0002`).
21
+ - `npm pack --dry-run` — passed (`CMD-0003`).
22
+ - Forbidden runtime terminology grep — no matches (`CMD-0004`).
23
+
24
+ ## Operational risks
25
+
26
+ Manual Pi TUI dogfood should confirm the previous truncated widget no longer appears.