scene-capability-engine 3.6.38 → 3.6.44

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/CHANGELOG.md +63 -0
  2. package/bin/scene-capability-engine.js +42 -2
  3. package/docs/command-reference.md +27 -0
  4. package/docs/developer-guide.md +1 -1
  5. package/docs/document-governance.md +22 -2
  6. package/docs/releases/README.md +6 -0
  7. package/docs/releases/v3.6.39.md +24 -0
  8. package/docs/releases/v3.6.40.md +19 -0
  9. package/docs/releases/v3.6.41.md +20 -0
  10. package/docs/releases/v3.6.42.md +19 -0
  11. package/docs/releases/v3.6.43.md +17 -0
  12. package/docs/releases/v3.6.44.md +17 -0
  13. package/docs/spec-collaboration-guide.md +1 -1
  14. package/docs/state-migration-reconciliation-runbook.md +76 -0
  15. package/docs/state-storage-tiering.md +104 -0
  16. package/docs/zh/releases/README.md +6 -0
  17. package/docs/zh/releases/v3.6.39.md +24 -0
  18. package/docs/zh/releases/v3.6.40.md +19 -0
  19. package/docs/zh/releases/v3.6.41.md +20 -0
  20. package/docs/zh/releases/v3.6.42.md +19 -0
  21. package/docs/zh/releases/v3.6.43.md +17 -0
  22. package/docs/zh/releases/v3.6.44.md +17 -0
  23. package/lib/adoption/adoption-logger.js +1 -1
  24. package/lib/adoption/adoption-strategy.js +29 -29
  25. package/lib/adoption/detection-engine.js +16 -13
  26. package/lib/adoption/smart-orchestrator.js +3 -3
  27. package/lib/adoption/strategy-selector.js +19 -15
  28. package/lib/adoption/template-sync.js +3 -3
  29. package/lib/auto/autonomous-engine.js +5 -5
  30. package/lib/auto/handoff-release-gate-history-loaders-service.js +24 -4
  31. package/lib/auto/handoff-run-service.js +37 -0
  32. package/lib/backup/backup-system.js +10 -10
  33. package/lib/collab/collab-manager.js +8 -5
  34. package/lib/collab/dependency-manager.js +1 -1
  35. package/lib/commands/adopt.js +2 -2
  36. package/lib/commands/auto.js +239 -97
  37. package/lib/commands/collab.js +10 -4
  38. package/lib/commands/docs.js +8 -2
  39. package/lib/commands/scene.js +78 -18
  40. package/lib/commands/status.js +3 -3
  41. package/lib/commands/studio.js +8 -0
  42. package/lib/commands/watch.js +10 -1
  43. package/lib/governance/config-manager.js +16 -0
  44. package/lib/governance/diagnostic-engine.js +2 -1
  45. package/lib/governance/validation-engine.js +3 -2
  46. package/lib/repo/config-manager.js +2 -2
  47. package/lib/runtime/session-store.js +8 -0
  48. package/lib/spec/bootstrap/context-collector.js +5 -4
  49. package/lib/spec-gate/rules/default-rules.js +8 -8
  50. package/lib/state/sce-state-store.js +265 -0
  51. package/lib/state/state-migration-manager.js +27 -2
  52. package/lib/state/state-storage-policy.js +179 -0
  53. package/lib/upgrade/migration-engine.js +5 -5
  54. package/lib/upgrade/migrations/1.0.0-to-1.1.0.js +3 -3
  55. package/lib/utils/tool-detector.js +4 -4
  56. package/lib/utils/validation.js +6 -6
  57. package/lib/watch/action-executor.js +10 -1
  58. package/lib/watch/event-debouncer.js +3 -0
  59. package/lib/watch/file-watcher.js +51 -10
  60. package/lib/watch/watch-manager.js +10 -1
  61. package/lib/workspace/multi/workspace-context-resolver.js +3 -3
  62. package/lib/workspace/multi/workspace-registry.js +3 -3
  63. package/lib/workspace/multi/workspace-state-manager.js +3 -3
  64. package/lib/workspace/spec-delivery-audit.js +553 -0
  65. package/lib/workspace/takeover-baseline.js +11 -0
  66. package/package.json +5 -1
  67. package/template/.sce/config/state-storage-policy.json +165 -0
package/CHANGELOG.md CHANGED
@@ -7,6 +7,69 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.6.44] - 2026-03-13
11
+
12
+ ### Fixed
13
+ - Fixed spec delivery sync auditing in GitHub tag-release workflows so detached `HEAD` checkouts no longer fail the hard gate for missing upstream tracking, while declared deliverable tracking and worktree integrity checks remain enforced.
14
+
15
+ ## [3.6.43] - 2026-03-13
16
+
17
+ ### Changed
18
+ - Tightened release-gate preflight blocking semantics so advisory drift alerts no longer hard-block release publish unless drift produced blocked runs.
19
+ - Updated the release workflow preflight step to print the captured preflight JSON when `sce auto handoff preflight-check --require-pass` fails, so future release failures expose the actual blocking reasons immediately.
20
+
21
+ ## [3.6.42] - 2026-03-13
22
+
23
+ ### Changed
24
+ - Hardened release-gate preflight loading so `sce auto handoff preflight-check` now falls back to the latest `release-gate-*.json` report when the history index is missing, empty, or temporarily unavailable during release execution.
25
+ - Improved release workflow diagnostics for `Build release gate history index` by capturing and surfacing the command stderr in release evidence artifacts instead of masking the underlying failure behind an empty summary.
26
+
27
+ ### Fixed
28
+ - Fixed release history loading so a single malformed release-gate report or seed entry is skipped with a warning instead of aborting the entire gate-index build.
29
+
30
+ ## [3.6.41] - 2026-03-13
31
+
32
+ ### Added
33
+ - Added targeted regression coverage in `tests/unit/collab/collab-manager.test.js` to lock the collaboration assignment metadata migration on `sceInstance` while preserving legacy read compatibility.
34
+
35
+ ### Changed
36
+ - Completed SCE takeover baseline alignment for the repository and committed the managed `.sce` baseline state used by takeover audit/apply flows.
37
+ - Migrated active runtime naming from legacy `kiro*` internals to `sce*` across backup, adoption, bootstrap, spec-gate, auto, repo-config, and CLI-init paths so the live codebase reflects SCE ownership consistently.
38
+ - Updated developer-facing docs and adoption tests to use `hasSceDir` / `sceInstance` as the canonical naming while preserving compatibility aliases where old project state may still exist.
39
+
40
+ ### Fixed
41
+ - Fixed collaboration assignment persistence so new metadata writes `sceInstance` instead of the stale `kiroInstance` field, while graph/status readers still accept older metadata written by previous versions.
42
+
43
+ ## [3.6.40] - 2026-03-13
44
+
45
+ ### Added
46
+ - Added spec delivery sync auditing via `lib/workspace/spec-delivery-audit.js` and the new `sce workspace delivery-audit` command so specs can declare required deliverables in `.sce/specs/<spec>/deliverables.json`.
47
+ - Added Spec `121-00-spec-delivery-sync-integrity-gate` with requirements, design, tasks, and a dogfooded delivery manifest to formalize this governance capability.
48
+ - Added unit/integration coverage for delivery-sync behavior across workspace CLI, handoff preflight/run orchestration, and studio release gating.
49
+
50
+ ### Changed
51
+ - Wired auto-handoff preflight and run precheck to evaluate declared spec deliverables against git tracking, worktree cleanliness, and upstream sync state.
52
+ - Extended studio release gating so spec delivery sync audit is now a required release-evidence step alongside the existing git/errorbook/handoff gates.
53
+ - Exported reusable git helper functions from `scripts/git-managed-gate.js` so higher-level workspace governance checks can share the same branch/upstream parsing logic.
54
+
55
+ ## [3.6.39] - 2026-03-13
56
+
57
+ ### Added
58
+ - Added state storage tiering policy artifacts and guidance in `docs/state-storage-tiering.md`, `docs/state-migration-reconciliation-runbook.md`, `.sce/config/state-storage-policy.json`, and `template/.sce/config/state-storage-policy.json`.
59
+ - Added append-only evidence projection and audit tooling via `scripts/interactive-approval-event-projection.js`, `scripts/state-storage-tiering-audit.js`, and the `audit:state-storage` / `report:state-storage` package scripts.
60
+ - Added scene command coverage and helper fixtures for the expanded `scene` subcommand surface, including publish/install/info/diff/validate/owner/tag/stats/lock/contribute/version and related property tests.
61
+ - Added release-facing closeout evidence for the scene command specs and the quality hardening master spec under `.sce/specs/*/custom/`.
62
+
63
+ ### Changed
64
+ - Expanded `lib/commands/scene.js` to cover the newer scene command flows and stabilized JSON summary output so CLI JSON mode preserves edge-case numeric payloads such as `-0`.
65
+ - Hardened state migration and storage behavior in `lib/state/sce-state-store.js`, `lib/state/state-migration-manager.js`, `lib/runtime/session-store.js`, and related governance/config plumbing while keeping file sources canonical.
66
+ - Completed the `115-00-sce-quality-hardening-program` integration closeout, including `watch logs --follow` completion, open-handle governance follow-through, and master/sub-spec status convergence.
67
+ - Updated `docs/command-reference.md`, `docs/document-governance.md`, and multiple Spec task ledgers to reflect the shipped command surface and governance posture.
68
+
69
+ ### Fixed
70
+ - Removed the remaining `forceExit` dependency from the validated Jest path and confirmed `npm run test:handles` passes without open-handle leakage.
71
+ - Stabilized watch/integration helper timing and watcher cleanup paths so `test:smoke`, `test:full`, and `test:handles` can run cleanly in sequence.
72
+
10
73
  ## [3.6.38] - 2026-03-12
11
74
 
12
75
  ### Added
@@ -33,6 +33,7 @@ const {
33
33
  migrateLegacyKiroDirectories,
34
34
  } = require('../lib/workspace/legacy-kiro-migrator');
35
35
  const { auditSceTracking } = require('../lib/workspace/sce-tracking-audit');
36
+ const { auditSpecDeliverySync } = require('../lib/workspace/spec-delivery-audit');
36
37
  const { applyTakeoverBaseline } = require('../lib/workspace/takeover-baseline');
37
38
 
38
39
  const i18n = getI18n();
@@ -259,8 +260,8 @@ program
259
260
  }
260
261
 
261
262
  // 检查是否已存在 .sce 目录
262
- const kiroDir = path.join(process.cwd(), '.sce');
263
- if (fs.existsSync(kiroDir) && !options.force) {
263
+ const sceDir = path.join(process.cwd(), '.sce');
264
+ if (fs.existsSync(sceDir) && !options.force) {
264
265
  console.log(chalk.yellow(t('cli.commands.init.alreadyExists')));
265
266
  const { overwrite } = await inquirer.prompt([
266
267
  {
@@ -783,6 +784,45 @@ workspaceCmd
783
784
  console.log(chalk.gray(`Conflict files: ${report.conflict_files}`));
784
785
  });
785
786
 
787
+ workspaceCmd
788
+ .command('delivery-audit')
789
+ .description('Audit spec delivery manifests against git tracking and upstream sync state')
790
+ .option('--spec <name>', 'Audit one spec only')
791
+ .option('--require-manifest', 'Fail when no deliverables.json manifests are found')
792
+ .option('--json', 'Output in JSON format')
793
+ .option('--strict', 'Exit non-zero when delivery sync violations are found')
794
+ .action(async (options) => {
795
+ const report = await auditSpecDeliverySync(process.cwd(), {
796
+ spec: options.spec,
797
+ requireManifest: options.requireManifest === true
798
+ });
799
+
800
+ if (options.json) {
801
+ console.log(JSON.stringify(report, null, 2));
802
+ } else if (report.passed) {
803
+ if (report.reason === 'no-manifests') {
804
+ console.log(chalk.yellow('⚠ Spec delivery audit found no manifests.'));
805
+ } else {
806
+ console.log(chalk.green('✓ Spec delivery audit passed.'));
807
+ }
808
+ console.log(chalk.gray(`Manifest count: ${report.summary.manifest_count}`));
809
+ if (report.warnings.length > 0) {
810
+ report.warnings.forEach((item) => console.log(chalk.gray(` - ${item}`)));
811
+ }
812
+ } else {
813
+ console.log(chalk.red('✖ Spec delivery audit failed.'));
814
+ report.violations.forEach((item) => console.log(chalk.gray(` - ${item}`)));
815
+ if (report.warnings.length > 0) {
816
+ console.log(chalk.yellow('Warnings:'));
817
+ report.warnings.forEach((item) => console.log(chalk.gray(` - ${item}`)));
818
+ }
819
+ }
820
+
821
+ if (!report.passed && options.strict) {
822
+ process.exitCode = 1;
823
+ }
824
+ });
825
+
786
826
  workspaceCmd
787
827
  .command('tracking-audit')
788
828
  .description('Audit tracked .sce assets required for deterministic CI/release behavior')
@@ -876,6 +876,29 @@ Runtime read preference:
876
876
  - `sce state doctor --json` now includes:
877
877
  - `summary` aggregate (`pending_components`, `total_record_drift`, `blocking_count`, `alert_count`)
878
878
  - runtime read diagnostics (`runtime.timeline`, `runtime.scene_session`) with read-source/read-preference and consistency status
879
+ - hardened severity model:
880
+ - `blocking`: `sqlite-unavailable`, `source-parse-error`, `sqlite-ahead`, `sqlite-only`
881
+ - `alert`: `pending-migration`, `missing-source`, runtime `pending-sync`
882
+ - current release guidance:
883
+ - treat `sqlite-ahead` and `sqlite-only` as anomalies requiring repair before release
884
+ - treat `pending-migration` as repairable drift, not a steady-state
885
+ - only allow `missing-source` to persist when the component is intentionally out of scope for the project
886
+
887
+ State storage tiering policy:
888
+ - Policy file: `.sce/config/state-storage-policy.json`
889
+ - Audit command: `npm run audit:state-storage`
890
+ - Machine-readable report: `npm run report:state-storage`
891
+ - Tier meanings:
892
+ - `file-source`: canonical evidence, audit, recovery payloads, and low-cardinality personal state
893
+ - `sqlite-index`: query-oriented registry/index layer with files still canonical
894
+ - `derived-sqlite-projection`: rebuildable SQLite projection for append-only stream queries
895
+ - Explicit non-candidates for SQLite source replacement:
896
+ - `~/.sce/workspace-state.json`
897
+ - `.sce/reports/**/*.jsonl`
898
+ - `.sce/audit/**/*.jsonl`
899
+ - Supporting docs:
900
+ - `docs/state-storage-tiering.md`
901
+ - `docs/state-migration-reconciliation-runbook.md`
879
902
 
880
903
  Write lease model (optional, policy-driven, SQLite-backed):
881
904
  - Policy file: `.sce/config/authorization-policy.json`
@@ -1836,6 +1859,10 @@ Interactive approval workflow helper (script-level stage-B approval state machin
1836
1859
  - `node scripts/interactive-approval-workflow.js --action <init|submit|approve|reject|execute|verify|archive|status> [--plan <path>] [--state-file <path>] [--audit-file <path>] [--actor <id>] [--actor-role <name>] [--role-policy <path>] [--comment <text>] [--password <text>] [--password-hash <sha256>] [--password-hash-env <name>] [--password-required] [--password-scope <csv>] [--json]`: maintain approval lifecycle state for interactive change plans and append approval events to JSONL audit logs.
1837
1860
  - Default state file: `.sce/reports/interactive-approval-state.json`
1838
1861
  - Default audit file: `.sce/reports/interactive-approval-events.jsonl`
1862
+ - `node scripts/interactive-approval-event-projection.js --action <rebuild|doctor|query> [--input <path>] [--read-source <auto|file|projection>] [--workflow-id <id>] [--actor <id>] [--approval-action <name>] [--event-type <type>] [--blocked|--not-blocked] [--limit <n>] [--fail-on-drift] [--fail-on-parse-error] [--json]`: build and inspect a rebuildable SQLite projection for `interactive-approval-events.jsonl` while keeping raw JSONL as canonical evidence.
1863
+ - `rebuild` clears and rebuilds the projection for the target audit file
1864
+ - `doctor` compares raw file count vs projection count and flags `projection-missing`, `pending-projection`, `projection-ahead`, or parse errors
1865
+ - `query` discloses `read_source=file|projection`
1839
1866
  - `init` requires `--plan`; high-risk plans are marked as `approval_required=true`.
1840
1867
  - Password authorization can be required per plan (`plan.authorization.password_required=true`) or overridden in `init`.
1841
1868
  - `execute` is blocked (exit code `2`) when approval is required but current status is not `approved`.
@@ -424,7 +424,7 @@ Analyzes project structure and returns analysis result.
424
424
  {
425
425
  mode: 'fresh' | 'partial' | 'full',
426
426
  projectType: 'nodejs' | 'python' | 'mixed',
427
- hasKiroDir: boolean,
427
+ hasSceDir: boolean,
428
428
  hasSpecs: boolean,
429
429
  hasVersion: boolean,
430
430
  conflicts: string[],
@@ -21,7 +21,7 @@ Document governance ensures your project follows these rules:
21
21
 
22
22
  1. **Root Directory** - Only 4 markdown files allowed: `README.md`, `README.zh.md`, `CHANGELOG.md`, `CONTRIBUTING.md`
23
23
  2. **Spec Structure** - Each Spec must have `requirements.md`, `design.md`, `tasks.md`
24
- 3. **Artifact Organization** - Spec artifacts must be in subdirectories: `reports/`, `scripts/`, `tests/`, `results/`, `docs/`
24
+ 3. **Artifact Organization** - Spec artifacts must be in subdirectories, except approved Spec-root metadata such as `requirements.md`, `design.md`, `tasks.md`, and `collaboration.json`
25
25
  4. **No Temporary Files** - Temporary documents (like `*-SUMMARY.md`, `SESSION-*.md`) must be deleted after use
26
26
 
27
27
  ### Why Use Document Governance?
@@ -128,7 +128,7 @@ sce docs diagnose
128
128
  - Root directory for non-allowed markdown files
129
129
  - Root directory for temporary documents
130
130
  - Spec directories for missing required files
131
- - Spec directories for misplaced artifacts
131
+ - Spec directories for misplaced artifacts outside approved Spec-root metadata
132
132
  - Spec directories for temporary documents
133
133
 
134
134
  **Output:**
@@ -240,6 +240,7 @@ sce docs validate [options]
240
240
  **What it validates:**
241
241
  - Root directory has only allowed markdown files
242
242
  - Spec directories have required files (requirements.md, design.md, tasks.md)
243
+ - Spec root contains only approved metadata files plus governed subdirectories
243
244
  - Spec subdirectories follow naming conventions
244
245
  - No misplaced artifacts
245
246
 
@@ -443,6 +444,7 @@ sce docs config [options]
443
444
 
444
445
  **Configuration keys:**
445
446
  - `root-allowed-files` - Allowed markdown files in root
447
+ - `spec-allowed-root-files` - Allowed files at Spec root before artifact warnings apply
446
448
  - `spec-subdirs` - Recognized Spec subdirectories
447
449
  - `temporary-patterns` - Patterns for temporary files
448
450
 
@@ -467,6 +469,12 @@ Spec Subdirectories:
467
469
  • results
468
470
  • docs
469
471
 
472
+ Spec Allowed Root Files:
473
+ • requirements.md
474
+ • design.md
475
+ • tasks.md
476
+ • collaboration.json
477
+
470
478
  Temporary Patterns:
471
479
  • *-SUMMARY.md
472
480
  • SESSION-*.md
@@ -724,6 +732,12 @@ The default configuration is:
724
732
  "CHANGELOG.md",
725
733
  "CONTRIBUTING.md"
726
734
  ],
735
+ "specAllowedRootFiles": [
736
+ "requirements.md",
737
+ "design.md",
738
+ "tasks.md",
739
+ "collaboration.json"
740
+ ],
727
741
  "specSubdirs": [
728
742
  "reports",
729
743
  "scripts",
@@ -749,6 +763,11 @@ The default configuration is:
749
763
  sce docs config --set root-allowed-files "README.md,README.zh.md,CHANGELOG.md,CONTRIBUTING.md,LICENSE.md,SECURITY.md"
750
764
  ```
751
765
 
766
+ **Allow additional Spec-root metadata:**
767
+ ```bash
768
+ sce docs config --set spec-allowed-root-files "requirements.md,design.md,tasks.md,collaboration.json"
769
+ ```
770
+
752
771
  **Add custom subdirectories:**
753
772
  ```bash
754
773
  sce docs config --set spec-subdirs "reports,scripts,tests,results,docs,diagrams,examples"
@@ -768,6 +787,7 @@ You can also edit this file directly:
768
787
  ```json
769
788
  {
770
789
  "rootAllowedFiles": ["README.md", "CUSTOM.md"],
790
+ "specAllowedRootFiles": ["requirements.md", "design.md", "tasks.md", "collaboration.json"],
771
791
  "specSubdirs": ["reports", "scripts", "custom"],
772
792
  "temporaryPatterns": ["*-TEMP.md"]
773
793
  }
@@ -9,6 +9,12 @@ This directory stores release-facing documents:
9
9
  ## Archived Versions
10
10
 
11
11
  - [Release checklist](../release-checklist.md)
12
+ - [v3.6.44 release notes](./v3.6.44.md)
13
+ - [v3.6.43 release notes](./v3.6.43.md)
14
+ - [v3.6.42 release notes](./v3.6.42.md)
15
+ - [v3.6.41 release notes](./v3.6.41.md)
16
+ - [v3.6.40 release notes](./v3.6.40.md)
17
+ - [v3.6.39 release notes](./v3.6.39.md)
12
18
  - [v3.6.38 release notes](./v3.6.38.md)
13
19
  - [v3.6.37 release notes](./v3.6.37.md)
14
20
  - [v1.46.2 release notes](./v1.46.2.md) (historical)
@@ -0,0 +1,24 @@
1
+ # v3.6.39 Release Notes
2
+
3
+ Release date: 2026-03-13
4
+
5
+ ## Highlights
6
+
7
+ - Added a canonical state-storage tiering policy, reconciliation runbook, and audit/report tooling so SQLite remains a scoped index layer rather than a silent source-of-truth replacement.
8
+ - Expanded and hardened the `sce scene` command surface with broader command coverage, stronger property tests, and JSON summary output that preserves edge-case numeric payloads.
9
+ - Closed the `115-00-sce-quality-hardening-program` integration loop, including `watch logs --follow` completion and Jest open-handle governance without relying on `forceExit`.
10
+
11
+ ## Verification
12
+
13
+ - `node bin/sce.js collab status 115-00-sce-quality-hardening-program --graph`
14
+ - `npm run test:smoke`
15
+ - `npm run test:skip-audit`
16
+ - `npm run test:brand-consistency`
17
+ - `npm run test:full`
18
+ - `npm run test:handles`
19
+
20
+ ## Release Notes
21
+
22
+ - State persistence is now explicitly tiered: evidence and operator-facing files remain canonical, while SQLite stays limited to rebuildable index/projection use cases.
23
+ - The scene command family is substantially more release-ready, with dedicated tests and closeout artifacts across publish/install/info/diff/validate/owner/tag/stats/lock/contribute/version flows.
24
+ - Quality hardening gates should be executed in sequence for release validation; `test:full` and `test:handles` are both green when run serially.
@@ -0,0 +1,19 @@
1
+ # v3.6.40 Release Notes
2
+
3
+ Release date: 2026-03-13
4
+
5
+ ## Highlights
6
+
7
+ - Added spec delivery sync governance so each spec can declare its real deliverables and SCE can verify those files are tracked, committed, and upstream-synced before release or handoff.
8
+ - Added a dedicated `sce workspace delivery-audit` command and wired it into auto-handoff preflight/run plus studio release gates.
9
+ - Dogfooded the capability with a new `121-00-spec-delivery-sync-integrity-gate` spec and matching delivery manifest.
10
+
11
+ ## Verification
12
+
13
+ - `npx jest tests/unit/workspace/spec-delivery-audit.test.js tests/unit/commands/auto.test.js tests/unit/auto/handoff-run-service.test.js tests/unit/commands/studio.test.js tests/integration/workspace-delivery-audit-cli.integration.test.js --runInBand`
14
+
15
+ ## Release Notes
16
+
17
+ - Delivery sync is intentionally implemented as `manifest + audit + gate`, not as an automatic file copy/sync mechanism. Git remains the only source of truth.
18
+ - When manifests exist, blocking specs now fail if declared files are missing, untracked, dirty, or only local because the branch is ahead of upstream.
19
+ - When no delivery manifests exist yet, the audit remains advisory by default, so older repos are not hard-blocked until they opt into explicit deliverable governance.
@@ -0,0 +1,20 @@
1
+ # v3.6.41 Release Notes
2
+
3
+ Release date: 2026-03-13
4
+
5
+ ## Highlights
6
+
7
+ - Completed a practical SCE takeover cleanup pass so the repo now aligns with the current takeover baseline and active code paths consistently use SCE naming.
8
+ - Fixed collaboration assignment metadata so new writes persist `sceInstance`, while older `kiroInstance` metadata remains readable for backward compatibility.
9
+ - Removed high-value legacy naming drift across active modules such as backup, adoption, bootstrap, spec gate, auto runtime, repo config, and CLI initialization without disturbing the intentional `.kiro` migration layer.
10
+
11
+ ## Verification
12
+
13
+ - `npx jest tests/unit/collab/collab-manager.test.js tests/unit/adoption/strategy-selector.test.js tests/unit/adoption/adoption-logger.test.js tests/unit/adoption.test.js --runInBand`
14
+ - `node bin/sce.js workspace takeover-audit --json`
15
+
16
+ ## Release Notes
17
+
18
+ - This release is intentionally a value-focused cleanup, not a blind repository-wide rename. Real legacy migration support for `.kiro` remains in place.
19
+ - Canonical runtime naming is now `hasSceDir` and `sceInstance`; compatibility aliases remain where existing project state or metadata may still depend on older keys.
20
+ - No `.kiro-workspaces` runtime artifact was present in the repository. The shipped work targets only active naming debt and one real collaboration metadata bug.
@@ -0,0 +1,19 @@
1
+ # v3.6.42 Release Notes
2
+
3
+ Release date: 2026-03-13
4
+
5
+ ## Highlights
6
+
7
+ - Hardened handoff release preflight so release publishing can continue when `release-gate-history.json` is temporarily unavailable but the current `release-gate-*.json` report is present.
8
+ - Made release-gate history loading more fault-tolerant by skipping malformed report or seed entries with warnings instead of aborting the full index build.
9
+ - Improved release workflow diagnostics by persisting `gate-index` stderr into the release evidence bundle when history index generation fails.
10
+
11
+ ## Verification
12
+
13
+ - `npx jest tests/unit/commands/auto.test.js --runInBand --testNamePattern "preflight-check|falls back to latest release gate report when history index is empty"`
14
+ - `npx jest tests/unit/auto/handoff-release-gate-history-loaders-service.test.js --runInBand`
15
+
16
+ ## Release Notes
17
+
18
+ - This patch is targeted at the failed `v3.6.41` release workflow path, specifically the chain where history index generation failed and the subsequent hard gate blocked publish.
19
+ - The release policy remains strict. The change only adds a safe fallback to the current gate report and exposes better diagnostics for the real upstream failure.
@@ -0,0 +1,17 @@
1
+ # v3.6.43 Release Notes
2
+
3
+ Release date: 2026-03-13
4
+
5
+ ## Highlights
6
+
7
+ - Fixed the second-stage release blocker uncovered by `v3.6.42`: advisory drift alerts no longer cause `Enforce handoff preflight hard gate` to fail when there are no drift-blocked runs.
8
+ - Improved release workflow observability again so a failed preflight gate now prints the generated JSON payload directly into the Actions log.
9
+
10
+ ## Verification
11
+
12
+ - `npx jest tests/unit/commands/auto.test.js --runInBand --testNamePattern "preflight-check|advisory drift alerts without blocked runs|falls back to latest release gate report when history index is empty"`
13
+
14
+ ## Release Notes
15
+
16
+ - `v3.6.42` fixed the missing-history path, but exposed a separate policy bug where advisory drift alerts were treated as hard blockers.
17
+ - `v3.6.43` narrows the hard gate back to real release blockers: failed latest gate or drift-blocked history.
@@ -0,0 +1,17 @@
1
+ # v3.6.44 Release Notes
2
+
3
+ Release date: 2026-03-13
4
+
5
+ ## Highlights
6
+
7
+ - Fixed the final release blocker in GitHub Actions tag workflows: spec delivery sync now accepts detached `HEAD` release checkouts when declared deliverables are tracked and the worktree is clean.
8
+
9
+ ## Verification
10
+
11
+ - `npx jest tests/unit/workspace/spec-delivery-audit.test.js --runInBand`
12
+ - `npx jest tests/unit/commands/auto.test.js --runInBand --testNamePattern "preflight-check|advisory drift alerts without blocked runs|falls back to latest release gate report when history index is empty"`
13
+
14
+ ## Release Notes
15
+
16
+ - This patch specifically targets GitHub Actions `push` workflows on `v*` tags, where the repository is checked out at detached `HEAD` and therefore has no upstream tracking branch by design.
17
+ - Deliverable tracking, worktree cleanliness, and missing-file detection are still enforced; only the branch-upstream proof is skipped in that release context.
@@ -348,7 +348,7 @@ Collaboration metadata is stored in `.sce/specs/{spec-name}/collaboration.json`:
348
348
  }
349
349
  ],
350
350
  "assignment": {
351
- "kiroInstance": "SCE-1",
351
+ "sceInstance": "SCE-1",
352
352
  "assignedAt": "2026-02-01T10:00:00Z"
353
353
  },
354
354
  "status": {
@@ -0,0 +1,76 @@
1
+ # State Migration Reconciliation Runbook
2
+
3
+ Use this runbook when working with the current file-to-SQLite migration surface.
4
+
5
+ ## Normal Flow
6
+
7
+ 1. Inspect scope
8
+ - `sce state plan --json`
9
+ 2. Diagnose drift
10
+ - `sce state doctor --json`
11
+ 3. Apply repair
12
+ - `sce state reconcile --all --apply --json`
13
+ 4. Re-check gate posture
14
+ - `node scripts/state-migration-reconciliation-gate.js --fail-on-blocking --fail-on-pending --json`
15
+
16
+ ## Severity Model
17
+
18
+ ### Blocking
19
+
20
+ Treat these as release-blocking anomalies:
21
+
22
+ - `sqlite-unavailable`
23
+ - `source-parse-error`
24
+ - `sqlite-ahead`
25
+ - `sqlite-only`
26
+ - runtime `sqlite-ahead`
27
+ - runtime `sqlite-only`
28
+
29
+ Typical meaning:
30
+
31
+ - `sqlite-ahead`: SQLite contains index rows that are no longer represented by canonical files
32
+ - `sqlite-only`: canonical file source disappeared but SQLite rows still exist
33
+
34
+ ### Alert
35
+
36
+ Treat these as repairable but non-steady-state conditions:
37
+
38
+ - `pending-migration`
39
+ - `missing-source`
40
+ - runtime `pending-sync`
41
+
42
+ Typical meaning:
43
+
44
+ - `pending-migration`: file source has more records than SQLite index
45
+ - `missing-source`: the project does not currently have that source artifact
46
+
47
+ ## Operator Decisions
48
+
49
+ ### When `pending-migration`
50
+
51
+ - Run `sce state reconcile --all --apply --json`
52
+ - Re-run `sce state doctor --json`
53
+ - If it persists, inspect source parser assumptions and source file health
54
+
55
+ ### When `sqlite-ahead`
56
+
57
+ - Treat as anomaly first, not optimization
58
+ - Inspect whether source artifacts were deleted, rotated, or never written
59
+ - Rebuild or re-sync from canonical file source before release
60
+
61
+ ### When `sqlite-only`
62
+
63
+ - Confirm whether the file source was removed accidentally
64
+ - Restore canonical files when possible
65
+ - Do not normalize this into a permanent state for current migration-scope components
66
+
67
+ ### When `missing-source`
68
+
69
+ - If the component is intentionally unused in the current project, keep it advisory
70
+ - If the component should exist for this workflow, generate or restore the source artifact and reconcile
71
+
72
+ ## Related Commands
73
+
74
+ - `npm run gate:state-migration-reconciliation`
75
+ - `npm run audit:state-storage`
76
+ - `npm run report:interactive-approval-projection`
@@ -0,0 +1,104 @@
1
+ # State Storage Tiering
2
+
3
+ SCE uses a selective SQLite strategy.
4
+
5
+ The operating rule is:
6
+
7
+ - keep canonical evidence, audit, recovery payloads, and low-cardinality personal state in files
8
+ - use SQLite for registry/index workloads with real query pressure
9
+ - allow SQLite projections for append-only streams only when they are rebuildable from files
10
+
11
+ ## Tiers
12
+
13
+ ### `file-source`
14
+
15
+ Use this tier when:
16
+
17
+ - the file is the canonical evidence or audit artifact
18
+ - the resource is a small personal or local configuration object
19
+ - manual inspection, Git diff, and recovery are more important than indexed querying
20
+
21
+ Examples:
22
+
23
+ - `~/.sce/workspace-state.json`
24
+ - `.sce/reports/**/*.jsonl`
25
+ - `.sce/audit/**/*.jsonl`
26
+ - `.sce/timeline/snapshots/**`
27
+ - `.sce/session-governance/sessions/**`
28
+
29
+ ### `sqlite-index`
30
+
31
+ Use this tier when:
32
+
33
+ - the canonical content still lives in files
34
+ - the resource behaves like a registry or index
35
+ - repeated filtering, sorting, and cross-run queries justify an index
36
+
37
+ Current active scope:
38
+
39
+ - `collab.agent-registry` -> `.sce/config/agent-registry.json`
40
+ - `runtime.timeline-index` -> `.sce/timeline/index.json`
41
+ - `runtime.scene-session-index` -> `.sce/session-governance/scene-index.json`
42
+ - `errorbook.entry-index` -> `.sce/errorbook/index.json`
43
+ - `errorbook.incident-index` -> `.sce/errorbook/staging/index.json`
44
+ - `governance.spec-scene-overrides` -> `.sce/spec-governance/spec-scene-overrides.json`
45
+ - `governance.scene-index` -> `.sce/spec-governance/scene-index.json`
46
+ - `release.evidence-runs-index` -> `.sce/reports/release-evidence/handoff-runs.json`
47
+ - `release.gate-history-index` -> `.sce/reports/release-evidence/release-gate-history.json`
48
+
49
+ ### `derived-sqlite-projection`
50
+
51
+ Use this tier only when:
52
+
53
+ - the source remains append-only files
54
+ - the projection can be deleted and rebuilt
55
+ - reads clearly disclose when SQLite projection is used
56
+
57
+ This tier is for query acceleration, not source-of-truth replacement.
58
+
59
+ ## Admission Rubric
60
+
61
+ A resource should only enter SQLite scope when all of the following are true:
62
+
63
+ 1. Cross-run or cross-session query pressure is real.
64
+ 2. File scans are materially weaker than indexed filtering/sorting.
65
+ 3. SQLite rows are rebuildable from a canonical file or stream.
66
+ 4. Diagnostics, reconcile behavior, and operator guidance are defined up front.
67
+
68
+ Reject SQLite source migration when any of the following are true:
69
+
70
+ 1. The resource is raw audit or evidence.
71
+ 2. The resource is low-cardinality workspace or preference state.
72
+ 3. Human-readable recovery and Git diff matter more than query speed.
73
+ 4. The change would silently cut over the source of truth.
74
+
75
+ ## Current Classification
76
+
77
+ | Resource | Tier | Why |
78
+ | --- | --- | --- |
79
+ | `~/.sce/workspace-state.json` | `file-source` | Atomic personal state; no meaningful query pressure |
80
+ | `.sce/reports/**/*.jsonl` | `file-source` | Canonical append-only governance/evidence streams |
81
+ | `.sce/audit/**/*.jsonl` | `file-source` | Canonical audit evidence |
82
+ | `.sce/timeline/index.json` | `sqlite-index` | Index-like query workload |
83
+ | `.sce/session-governance/scene-index.json` | `sqlite-index` | Registry-like query workload |
84
+ | `.sce/errorbook/index.json` | `sqlite-index` | Filtered status/quality lookup |
85
+ | `.sce/errorbook/staging/index.json` | `sqlite-index` | Incident triage lookup |
86
+ | `.sce/spec-governance/*.json` indexes | `sqlite-index` | Governance registry lookup |
87
+ | `.sce/reports/release-evidence/handoff-runs.json` | `sqlite-index` | Historical release summary lookup |
88
+ | `.sce/reports/release-evidence/release-gate-history.json` | `sqlite-index` | Gate history lookup |
89
+ | `.sce/timeline/snapshots/**` | `file-source` | Recovery payloads |
90
+ | `.sce/session-governance/sessions/**` | `file-source` | Session payload archives |
91
+
92
+ ## Operator Rules
93
+
94
+ - Do not propose blanket sqlite-ization.
95
+ - Before adding a new SQLite candidate, update `.sce/config/state-storage-policy.json`.
96
+ - Run `npm run audit:state-storage` after changing state storage behavior.
97
+ - If the resource is append-only evidence, prefer a projection pilot over source migration.
98
+
99
+ ## Related Assets
100
+
101
+ - Policy file: `.sce/config/state-storage-policy.json`
102
+ - Audit command: `npm run audit:state-storage`
103
+ - Machine-readable report: `npm run report:state-storage`
104
+ - State migration commands: `sce state plan|doctor|migrate|reconcile`
@@ -9,6 +9,12 @@
9
9
  ## 历史版本归档
10
10
 
11
11
  - [发布检查清单](../release-checklist.md)
12
+ - [v3.6.44 发布说明](./v3.6.44.md)
13
+ - [v3.6.43 发布说明](./v3.6.43.md)
14
+ - [v3.6.42 发布说明](./v3.6.42.md)
15
+ - [v3.6.41 发布说明](./v3.6.41.md)
16
+ - [v3.6.40 发布说明](./v3.6.40.md)
17
+ - [v3.6.39 发布说明](./v3.6.39.md)
12
18
  - [v3.6.38 发布说明](./v3.6.38.md)
13
19
  - [v3.6.37 发布说明](./v3.6.37.md)
14
20
  - [v1.46.2 发布说明](./v1.46.2.md)(历史归档)
@@ -0,0 +1,24 @@
1
+ # v3.6.39 发布说明
2
+
3
+ 发布日期:2026-03-13
4
+
5
+ ## 重点变化
6
+
7
+ - 新增规范化的状态存储分层策略、迁移对账 runbook,以及配套 audit/report 工具,明确 SQLite 只承担受控索引层,不替代文件真源。
8
+ - 扩展并加固了 `sce scene` 命令族,补齐多类命令覆盖、性质测试和 JSON summary 输出边界处理。
9
+ - 完成 `115-00-sce-quality-hardening-program` 主 Spec 的集成收口,包含 `watch logs --follow` 补完,以及不依赖 `forceExit` 的 Jest open-handle 治理。
10
+
11
+ ## 验证
12
+
13
+ - `node bin/sce.js collab status 115-00-sce-quality-hardening-program --graph`
14
+ - `npm run test:smoke`
15
+ - `npm run test:skip-audit`
16
+ - `npm run test:brand-consistency`
17
+ - `npm run test:full`
18
+ - `npm run test:handles`
19
+
20
+ ## 发布说明
21
+
22
+ - 状态持久化现在有了明确分层:证据、审计和操作员可读文件继续保持 canonical,SQLite 仅用于可重建索引或投影。
23
+ - `scene` 命令面已经更接近稳定发布状态,publish/install/info/diff/validate/owner/tag/stats/lock/contribute/version 等流都有专门测试和 closeout 证据。
24
+ - 质量门禁建议串行执行;`test:full` 与 `test:handles` 在串行场景下均已验证通过。
@@ -0,0 +1,19 @@
1
+ # v3.6.40 发布说明
2
+
3
+ 发布日期:2026-03-13
4
+
5
+ ## 重点变化
6
+
7
+ - 新增 spec 交付同步治理能力。每个 spec 可以声明真实交付文件,SCE 会在 handoff 或 release 前校验这些文件是否已纳入 git、已提交并具备 upstream 同步证明。
8
+ - 新增 `sce workspace delivery-audit` 命令,并将其接入 auto handoff preflight/run 与 studio release gate。
9
+ - 使用新的 `121-00-spec-delivery-sync-integrity-gate` spec 和对应交付清单对这项能力进行了自举治理。
10
+
11
+ ## 验证
12
+
13
+ - `npx jest tests/unit/workspace/spec-delivery-audit.test.js tests/unit/commands/auto.test.js tests/unit/auto/handoff-run-service.test.js tests/unit/commands/studio.test.js tests/integration/workspace-delivery-audit-cli.integration.test.js --runInBand`
14
+
15
+ ## 发布说明
16
+
17
+ - 这项能力刻意采用 `manifest + audit + gate`,而不是做自动文件同步工具;git 仍然是唯一可信的交付事实来源。
18
+ - 一旦 spec 提供了 delivery manifest,blocking 模式下若声明文件缺失、未跟踪、工作区有脏改动,或分支相对 upstream 未同步,都会直接失败。
19
+ - 对于尚未建立 delivery manifest 的老仓库,默认仍保持 advisory 模式,不会立刻形成硬阻断。