instar 1.2.69 → 1.2.71
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/dist/cli.js +14 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +5 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/spec.d.ts +22 -0
- package/dist/commands/spec.d.ts.map +1 -0
- package/dist/commands/spec.js +85 -0
- package/dist/commands/spec.js.map +1 -0
- package/dist/core/TopicIntent.d.ts +12 -0
- package/dist/core/TopicIntent.d.ts.map +1 -1
- package/dist/core/TopicIntent.js +48 -4
- package/dist/core/TopicIntent.js.map +1 -1
- package/dist/core/installCodexHooks.d.ts.map +1 -1
- package/dist/core/installCodexHooks.js +7 -2
- package/dist/core/installCodexHooks.js.map +1 -1
- package/dist/core/types.d.ts +11 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.js.map +1 -1
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.d.ts +65 -0
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.d.ts.map +1 -0
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.js +178 -0
- package/dist/providers/adapters/openai-codex/canary/codexHookContractCanary.js.map +1 -0
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +31 -31
- package/upgrades/1.2.70.md +72 -0
- package/upgrades/1.2.71.md +52 -0
- package/upgrades/side-effects/codex-parity-canary-scope-coherence.md +34 -0
- package/upgrades/side-effects/cwa-decay-profile-config.md +58 -0
- package/upgrades/side-effects/scg-cli.md +48 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.2.
|
|
4
|
+
"generatedAt": "2026-05-25T06:38:58.237Z",
|
|
5
|
+
"instarVersion": "1.2.71",
|
|
6
6
|
"entryCount": 191,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -752,7 +752,7 @@
|
|
|
752
752
|
"type": "cli-command",
|
|
753
753
|
"domain": "setup",
|
|
754
754
|
"sourcePath": "src/cli.ts",
|
|
755
|
-
"contentHash": "
|
|
755
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
756
756
|
"since": "2025-01-01"
|
|
757
757
|
},
|
|
758
758
|
"cli:setup": {
|
|
@@ -760,7 +760,7 @@
|
|
|
760
760
|
"type": "cli-command",
|
|
761
761
|
"domain": "setup",
|
|
762
762
|
"sourcePath": "src/cli.ts",
|
|
763
|
-
"contentHash": "
|
|
763
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
764
764
|
"since": "2025-01-01"
|
|
765
765
|
},
|
|
766
766
|
"cli:add": {
|
|
@@ -768,7 +768,7 @@
|
|
|
768
768
|
"type": "cli-command",
|
|
769
769
|
"domain": "setup",
|
|
770
770
|
"sourcePath": "src/cli.ts",
|
|
771
|
-
"contentHash": "
|
|
771
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
772
772
|
"since": "2025-01-01"
|
|
773
773
|
},
|
|
774
774
|
"cli:backup": {
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
"type": "cli-command",
|
|
777
777
|
"domain": "operations",
|
|
778
778
|
"sourcePath": "src/cli.ts",
|
|
779
|
-
"contentHash": "
|
|
779
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
780
780
|
"since": "2025-01-01"
|
|
781
781
|
},
|
|
782
782
|
"cli:git": {
|
|
@@ -784,7 +784,7 @@
|
|
|
784
784
|
"type": "cli-command",
|
|
785
785
|
"domain": "coordination",
|
|
786
786
|
"sourcePath": "src/cli.ts",
|
|
787
|
-
"contentHash": "
|
|
787
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
788
788
|
"since": "2025-01-01"
|
|
789
789
|
},
|
|
790
790
|
"cli:memory": {
|
|
@@ -792,7 +792,7 @@
|
|
|
792
792
|
"type": "cli-command",
|
|
793
793
|
"domain": "memory",
|
|
794
794
|
"sourcePath": "src/cli.ts",
|
|
795
|
-
"contentHash": "
|
|
795
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
796
796
|
"since": "2025-01-01"
|
|
797
797
|
},
|
|
798
798
|
"cli:knowledge": {
|
|
@@ -800,7 +800,7 @@
|
|
|
800
800
|
"type": "cli-command",
|
|
801
801
|
"domain": "memory",
|
|
802
802
|
"sourcePath": "src/cli.ts",
|
|
803
|
-
"contentHash": "
|
|
803
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
804
804
|
"since": "2025-01-01"
|
|
805
805
|
},
|
|
806
806
|
"cli:semantic": {
|
|
@@ -808,7 +808,7 @@
|
|
|
808
808
|
"type": "cli-command",
|
|
809
809
|
"domain": "memory",
|
|
810
810
|
"sourcePath": "src/cli.ts",
|
|
811
|
-
"contentHash": "
|
|
811
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
812
812
|
"since": "2025-01-01"
|
|
813
813
|
},
|
|
814
814
|
"cli:intent": {
|
|
@@ -816,7 +816,7 @@
|
|
|
816
816
|
"type": "cli-command",
|
|
817
817
|
"domain": "intent",
|
|
818
818
|
"sourcePath": "src/cli.ts",
|
|
819
|
-
"contentHash": "
|
|
819
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
820
820
|
"since": "2025-01-01"
|
|
821
821
|
},
|
|
822
822
|
"cli:feedback": {
|
|
@@ -824,7 +824,7 @@
|
|
|
824
824
|
"type": "cli-command",
|
|
825
825
|
"domain": "feedback",
|
|
826
826
|
"sourcePath": "src/cli.ts",
|
|
827
|
-
"contentHash": "
|
|
827
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
828
828
|
"since": "2025-01-01"
|
|
829
829
|
},
|
|
830
830
|
"cli:server": {
|
|
@@ -832,7 +832,7 @@
|
|
|
832
832
|
"type": "cli-command",
|
|
833
833
|
"domain": "server",
|
|
834
834
|
"sourcePath": "src/cli.ts",
|
|
835
|
-
"contentHash": "
|
|
835
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
836
836
|
"since": "2025-01-01"
|
|
837
837
|
},
|
|
838
838
|
"cli:status": {
|
|
@@ -840,7 +840,7 @@
|
|
|
840
840
|
"type": "cli-command",
|
|
841
841
|
"domain": "monitoring",
|
|
842
842
|
"sourcePath": "src/cli.ts",
|
|
843
|
-
"contentHash": "
|
|
843
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
844
844
|
"since": "2025-01-01"
|
|
845
845
|
},
|
|
846
846
|
"cli:user": {
|
|
@@ -848,7 +848,7 @@
|
|
|
848
848
|
"type": "cli-command",
|
|
849
849
|
"domain": "users",
|
|
850
850
|
"sourcePath": "src/cli.ts",
|
|
851
|
-
"contentHash": "
|
|
851
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
852
852
|
"since": "2025-01-01"
|
|
853
853
|
},
|
|
854
854
|
"cli:relationship": {
|
|
@@ -856,7 +856,7 @@
|
|
|
856
856
|
"type": "cli-command",
|
|
857
857
|
"domain": "relationships",
|
|
858
858
|
"sourcePath": "src/cli.ts",
|
|
859
|
-
"contentHash": "
|
|
859
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
860
860
|
"since": "2025-01-01"
|
|
861
861
|
},
|
|
862
862
|
"cli:job": {
|
|
@@ -864,7 +864,7 @@
|
|
|
864
864
|
"type": "cli-command",
|
|
865
865
|
"domain": "scheduling",
|
|
866
866
|
"sourcePath": "src/cli.ts",
|
|
867
|
-
"contentHash": "
|
|
867
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
868
868
|
"since": "2025-01-01"
|
|
869
869
|
},
|
|
870
870
|
"cli:lifeline": {
|
|
@@ -872,7 +872,7 @@
|
|
|
872
872
|
"type": "cli-command",
|
|
873
873
|
"domain": "communication",
|
|
874
874
|
"sourcePath": "src/cli.ts",
|
|
875
|
-
"contentHash": "
|
|
875
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
876
876
|
"since": "2025-01-01"
|
|
877
877
|
},
|
|
878
878
|
"cli:list": {
|
|
@@ -880,7 +880,7 @@
|
|
|
880
880
|
"type": "cli-command",
|
|
881
881
|
"domain": "monitoring",
|
|
882
882
|
"sourcePath": "src/cli.ts",
|
|
883
|
-
"contentHash": "
|
|
883
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
884
884
|
"since": "2025-01-01"
|
|
885
885
|
},
|
|
886
886
|
"cli:autostart": {
|
|
@@ -888,7 +888,7 @@
|
|
|
888
888
|
"type": "cli-command",
|
|
889
889
|
"domain": "operations",
|
|
890
890
|
"sourcePath": "src/cli.ts",
|
|
891
|
-
"contentHash": "
|
|
891
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
892
892
|
"since": "2025-01-01"
|
|
893
893
|
},
|
|
894
894
|
"cli:migrate": {
|
|
@@ -896,7 +896,7 @@
|
|
|
896
896
|
"type": "cli-command",
|
|
897
897
|
"domain": "updates",
|
|
898
898
|
"sourcePath": "src/cli.ts",
|
|
899
|
-
"contentHash": "
|
|
899
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
900
900
|
"since": "2025-01-01"
|
|
901
901
|
},
|
|
902
902
|
"cli:machines": {
|
|
@@ -904,7 +904,7 @@
|
|
|
904
904
|
"type": "cli-command",
|
|
905
905
|
"domain": "coordination",
|
|
906
906
|
"sourcePath": "src/cli.ts",
|
|
907
|
-
"contentHash": "
|
|
907
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
908
908
|
"since": "2025-01-01"
|
|
909
909
|
},
|
|
910
910
|
"cli:whoami": {
|
|
@@ -912,7 +912,7 @@
|
|
|
912
912
|
"type": "cli-command",
|
|
913
913
|
"domain": "identity",
|
|
914
914
|
"sourcePath": "src/cli.ts",
|
|
915
|
-
"contentHash": "
|
|
915
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
916
916
|
"since": "2025-01-01"
|
|
917
917
|
},
|
|
918
918
|
"cli:pair": {
|
|
@@ -920,7 +920,7 @@
|
|
|
920
920
|
"type": "cli-command",
|
|
921
921
|
"domain": "coordination",
|
|
922
922
|
"sourcePath": "src/cli.ts",
|
|
923
|
-
"contentHash": "
|
|
923
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
924
924
|
"since": "2025-01-01"
|
|
925
925
|
},
|
|
926
926
|
"cli:join": {
|
|
@@ -928,7 +928,7 @@
|
|
|
928
928
|
"type": "cli-command",
|
|
929
929
|
"domain": "coordination",
|
|
930
930
|
"sourcePath": "src/cli.ts",
|
|
931
|
-
"contentHash": "
|
|
931
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
932
932
|
"since": "2025-01-01"
|
|
933
933
|
},
|
|
934
934
|
"cli:wakeup": {
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
"type": "cli-command",
|
|
937
937
|
"domain": "coordination",
|
|
938
938
|
"sourcePath": "src/cli.ts",
|
|
939
|
-
"contentHash": "
|
|
939
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
940
940
|
"since": "2025-01-01"
|
|
941
941
|
},
|
|
942
942
|
"cli:leave": {
|
|
@@ -944,7 +944,7 @@
|
|
|
944
944
|
"type": "cli-command",
|
|
945
945
|
"domain": "coordination",
|
|
946
946
|
"sourcePath": "src/cli.ts",
|
|
947
|
-
"contentHash": "
|
|
947
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
948
948
|
"since": "2025-01-01"
|
|
949
949
|
},
|
|
950
950
|
"cli:doctor": {
|
|
@@ -952,7 +952,7 @@
|
|
|
952
952
|
"type": "cli-command",
|
|
953
953
|
"domain": "monitoring",
|
|
954
954
|
"sourcePath": "src/cli.ts",
|
|
955
|
-
"contentHash": "
|
|
955
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
956
956
|
"since": "2025-01-01"
|
|
957
957
|
},
|
|
958
958
|
"cli:review": {
|
|
@@ -960,7 +960,7 @@
|
|
|
960
960
|
"type": "cli-command",
|
|
961
961
|
"domain": "monitoring",
|
|
962
962
|
"sourcePath": "src/cli.ts",
|
|
963
|
-
"contentHash": "
|
|
963
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
964
964
|
"since": "2025-01-01"
|
|
965
965
|
},
|
|
966
966
|
"cli:nuke": {
|
|
@@ -968,7 +968,7 @@
|
|
|
968
968
|
"type": "cli-command",
|
|
969
969
|
"domain": "operations",
|
|
970
970
|
"sourcePath": "src/cli.ts",
|
|
971
|
-
"contentHash": "
|
|
971
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
972
972
|
"since": "2025-01-01"
|
|
973
973
|
},
|
|
974
974
|
"cli:playbook": {
|
|
@@ -976,7 +976,7 @@
|
|
|
976
976
|
"type": "cli-command",
|
|
977
977
|
"domain": "context",
|
|
978
978
|
"sourcePath": "src/cli.ts",
|
|
979
|
-
"contentHash": "
|
|
979
|
+
"contentHash": "2f06177819f2332512cb9fd329ef2a78613fa347b737b3ffb22554e415171861",
|
|
980
980
|
"since": "2025-01-01"
|
|
981
981
|
},
|
|
982
982
|
"template:build-stop-hook.sh": {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
<!-- patch = bug fixes, refactors, test additions, doc updates -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Two pieces of Codex-parity hardening on the enforcement-hook layer, both within
|
|
9
|
+
the approved spec (`docs/specs/codex-enforcement-hook-layer.md`):
|
|
10
|
+
|
|
11
|
+
1. **Scope-coherence checkpoint now runs on Codex.** `installCodexHooks` wires
|
|
12
|
+
`scope-coherence-checkpoint.js` into Codex's `Stop` event, joining the
|
|
13
|
+
`response-review` + `deferral-detector` pair already there. This completes the
|
|
14
|
+
spec §4.1 Stop mapping ("deferral / scope checkpoint → Stop") — previously only
|
|
15
|
+
deferral was wired. The script is framework-neutral (reads stdin, POSTs to the
|
|
16
|
+
local server) and Codex honors `{decision:"block", reason}` on `Stop` (verified
|
|
17
|
+
in the 0.133 binary's `StopCommandOutputWire`), so it gives Codex agents the same
|
|
18
|
+
structural "zoom out and re-read scope" grounding pause Claude agents get — not a
|
|
19
|
+
hard termination. It defaults to approve and self-throttles (depth threshold +
|
|
20
|
+
30-minute cooldown), so it cannot loop an autonomous run. Existing Codex agents
|
|
21
|
+
pick it up on update: the script already ships via always-overwrite migration and
|
|
22
|
+
`migrateHooks` re-runs `installCodexHooks` for codex-cli agents.
|
|
23
|
+
|
|
24
|
+
2. **A hook-contract drift canary** (`codexHookContractCanary.ts`). Layer A is an
|
|
25
|
+
env-independent invariant lock: it asserts the Codex hook config still has the
|
|
26
|
+
load-bearing shape that two earlier live silent-no-op bugs taught us to protect —
|
|
27
|
+
the `.*` tool matcher (a bare `*` matches nothing), `dangerous-command-guard` on
|
|
28
|
+
PreToolUse, and the full Stop review trio. A refactor that regresses any of these
|
|
29
|
+
fails CI. Layer B is best-effort: when a real codex binary is resolvable, it reads
|
|
30
|
+
the binary's embedded hook-event schema and confirms the events instar depends on
|
|
31
|
+
are still declared (catching real Codex-side contract drift). No binary present →
|
|
32
|
+
the binary layer skips rather than fails.
|
|
33
|
+
|
|
34
|
+
Also recorded honestly: a WIP that would have wired compaction-recovery to Codex's
|
|
35
|
+
`PostCompact` event was set aside after verifying against the 0.133 binary schema
|
|
36
|
+
that `PostCompact` has no `additionalContext` field — the only channel that
|
|
37
|
+
re-injects context into the model. It would have installed a hook that does nothing.
|
|
38
|
+
Codex compaction-recovery parity needs a different mechanism and is tracked.
|
|
39
|
+
|
|
40
|
+
## What to Tell Your User
|
|
41
|
+
|
|
42
|
+
- **Codex agents now get the same scope-grounding check Claude agents have**: "When
|
|
43
|
+
I've been heads-down implementing for a long stretch, I now get a structural nudge
|
|
44
|
+
to step back and re-check I'm building the right thing — on the Codex engine too,
|
|
45
|
+
not just on Claude."
|
|
46
|
+
- **A watchdog for the Codex safety guards**: "There's now an automatic check that
|
|
47
|
+
notices if the Codex safety guards ever stop firing or if Codex changes its format
|
|
48
|
+
underneath us — so a guard can't silently turn into a no-op without us catching it."
|
|
49
|
+
- Nothing for you to do — both ship automatically on update.
|
|
50
|
+
|
|
51
|
+
## Summary of New Capabilities
|
|
52
|
+
|
|
53
|
+
| Capability | How to Use |
|
|
54
|
+
|-----------|-----------|
|
|
55
|
+
| Scope-coherence checkpoint on Codex Stop | Automatic (installed via init + update migration) |
|
|
56
|
+
| Codex hook-contract drift canary | Automatic (CI invariant lock; best-effort binary probe) |
|
|
57
|
+
|
|
58
|
+
## Evidence
|
|
59
|
+
|
|
60
|
+
- **Codex Stop schema honors `decision:block`**: verified directly against the
|
|
61
|
+
codex-cli 0.133.0 binary — `strings` shows `StopCommandOutputWire` plus the error
|
|
62
|
+
string `"Stop hook returned decision:block without a non-empty reason"`, confirming
|
|
63
|
+
the block-with-reason contract the scope-coherence script relies on.
|
|
64
|
+
- **PostCompact cannot re-inject context** (why that WIP was dropped): the binary's
|
|
65
|
+
`post-compact.command.output` schema enumerates only `continue/stopReason/`
|
|
66
|
+
`suppressOutput/systemMessage` — no `additionalContext`. Only the `SessionStart`
|
|
67
|
+
and `UserPromptSubmit` output wires carry `additionalContext`, and `SessionStart`
|
|
68
|
+
triggers are `startup/resume/clear` (no `compact`). Verified by extracting the
|
|
69
|
+
embedded JSON schema from the binary.
|
|
70
|
+
- **Tests**: `installCodexHooks.test.ts` 8 green (incl. new Stop-trio assertion);
|
|
71
|
+
`codexHookContractCanary.test.ts` 6 green (layer-A invariants always asserted;
|
|
72
|
+
layer-B skip-not-fail with no binary). `tsc` clean.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Upgrade Guide — tunable topic-intent decay horizons
|
|
2
|
+
|
|
3
|
+
<!-- bump: minor -->
|
|
4
|
+
<!-- minor = new features, new APIs, new capabilities (backwards-compatible) -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
**You can now tune how fast each kind of memory fades, from config.**
|
|
9
|
+
|
|
10
|
+
Rung 1 gave topic-intent memories different "shelf lives" — a method ("we're
|
|
11
|
+
testing over Telegram") fades in about a week, an audience in about a month,
|
|
12
|
+
facts and decisions over months. Those numbers were code constants. This ships
|
|
13
|
+
the tracked `cwa-decay-profile-config` follow-up: they're now overridable via
|
|
14
|
+
config, so we can tune them from real data without a code change.
|
|
15
|
+
|
|
16
|
+
`topicIntent.capture.decayProfiles` takes any subset of refkinds
|
|
17
|
+
(method/audience/goal/fact/decision) and any subset of `{graceDays, halfLifeDays}`;
|
|
18
|
+
anything you don't specify keeps the built-in default. Invalid values (zero,
|
|
19
|
+
negative, non-finite) are ignored — a bad config can never break decay; it just
|
|
20
|
+
falls back to the default. Set nothing and behavior is exactly as before.
|
|
21
|
+
|
|
22
|
+
Example: slow down how fast a "method" frame fades —
|
|
23
|
+
`{"topicIntent":{"capture":{"decayProfiles":{"method":{"halfLifeDays":21}}}}}`.
|
|
24
|
+
|
|
25
|
+
**Evidence**: 6 unit tests (defaults, partial override, invalid-ignored,
|
|
26
|
+
idempotent, reset, and that an override actually changes projected decay). The
|
|
27
|
+
rung-0/rung-1 decay math is unchanged when no override is set (existing
|
|
28
|
+
projection tests green). `tsc` + lint clean.
|
|
29
|
+
|
|
30
|
+
Spec: `docs/specs/topic-intent-task-context-capture.md` §3 (the
|
|
31
|
+
`cwa-decay-profile-config` tracked deferral, now shipped). Side-effects:
|
|
32
|
+
`upgrades/side-effects/cwa-decay-profile-config.md`.
|
|
33
|
+
|
|
34
|
+
## What to Tell Your User
|
|
35
|
+
|
|
36
|
+
- **Tune memory shelf-lives**: "How fast I forget different kinds of context is
|
|
37
|
+
now adjustable in config — if a 'how we're working' note fades too fast or
|
|
38
|
+
sticks too long, we can dial it without changing code."
|
|
39
|
+
|
|
40
|
+
## Summary of New Capabilities
|
|
41
|
+
|
|
42
|
+
| Capability | How to Use |
|
|
43
|
+
|-----------|-----------|
|
|
44
|
+
| Override topic-intent decay horizons | `topicIntent.capture.decayProfiles.<kind>.{graceDays,halfLifeDays}` in `.instar/config.json` (optional; omitted → defaults) |
|
|
45
|
+
|
|
46
|
+
## Evidence
|
|
47
|
+
|
|
48
|
+
Not a bug fix — a tuning knob over the rung-1 decay model. Verified by 6 unit
|
|
49
|
+
tests including one that confirms an override actually changes projected decay
|
|
50
|
+
(a method ref barely decays by day 8 under a long-horizon override vs. ~halving
|
|
51
|
+
under the default). No-override behavior is byte-for-byte the prior defaults.
|
|
52
|
+
`tsc` + lint clean.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Side-Effects Review: Codex parity — Stop scope-coherence + hook-contract canary (P6)
|
|
2
|
+
|
|
3
|
+
## Change
|
|
4
|
+
Two changes to the Codex enforcement layer, both within the approved spec (`docs/specs/codex-enforcement-hook-layer.md`):
|
|
5
|
+
|
|
6
|
+
1. **`installCodexHooks.ts`** — added `scope-coherence-checkpoint.js` to the Codex `Stop` event, alongside the existing `response-review.js` + `deferral-detector.js`. Completes the spec §4.1 mapping ("deferral / scope checkpoint → Stop"), which previously wired only deferral.
|
|
7
|
+
2. **`codexHookContractCanary.ts`** (new) — the P6 hook-contract drift canary. Two layers: (A) a deterministic, env-independent invariant lock asserting `buildInstarCodexHookGroups` still emits the load-bearing shape (`.*` matcher, `dangerous-command-guard` on PreToolUse, the full Stop review trio); (B) a best-effort probe of a resolvable codex binary's embedded hook-event schema, asserting the events instar depends on are still declared.
|
|
8
|
+
|
|
9
|
+
## Why
|
|
10
|
+
- **Scope-coherence on Stop**: the spec intends it; without it, Codex agents drift deep into implementation without the structural zoom-out that Claude agents get. The script is framework-neutral (reads stdin, POSTs to the local server) and Codex honors `{decision:'block', reason}` on Stop (verified in the 0.133 binary's `StopCommandOutputWire`). Same grounding-pause semantics as Claude — not a hard termination.
|
|
11
|
+
- **Canary**: P5c paid for two silent-no-op bugs live (a `*` matcher that matched nothing; the `cmd` vs `command` field). Layer A is the regression lock against that exact class — a refactor that regresses any invariant fails CI. Layer B catches real Codex-side drift (renamed/dropped hook events) when a binary is present.
|
|
12
|
+
|
|
13
|
+
## Scope / blast radius
|
|
14
|
+
- `scope-coherence-checkpoint.js` already ships to all agents via always-overwrite migration (`PostUpdateMigrator` line ~1698) and `installCodexHooks` is called from `migrateHooks` gated on codex-cli (line ~1655) — so existing Codex agents pick up the new Stop wiring on update (migration parity satisfied, no new migration needed). `validateHookReferences` guards against a dangling reference.
|
|
15
|
+
- The canary is invoked only from its unit test (the established pattern for the existing Codex canaries — CI drift lock), so it adds zero runtime cost on the hot path.
|
|
16
|
+
|
|
17
|
+
## Signal vs Authority
|
|
18
|
+
- Unchanged. scope-coherence is a low-context Stop-trigger that routes to the server; it never holds blocking authority of its own beyond the existing grounding-pause. The canary is pure verification — no authority, no runtime gating.
|
|
19
|
+
|
|
20
|
+
## Over-block / autonomy risk
|
|
21
|
+
- scope-coherence defaults to `approve` and self-throttles (depth threshold + 30-min cooldown), so it cannot loop an autonomous Codex run. The deferral-detector already runs on Codex Stop the same way (proven-compatible precedent).
|
|
22
|
+
|
|
23
|
+
## Honesty note — PostCompact NOT shipped
|
|
24
|
+
- A WIP that wired `compaction-recovery.sh` to Codex's `PostCompact` event was set aside this session after verifying (against the 0.133 binary schema) that `PostCompact` exposes only `continue/stopReason/suppressOutput/systemMessage` — no `additionalContext`, the only field that re-injects context. Only `SessionStart`/`UserPromptSubmit` carry it, and Codex's `SessionStart` triggers are `startup/resume/clear` (no `compact`). So that wiring would have installed a hook that cannot re-inject identity — dead on arrival. Compaction-recovery parity on Codex needs a different mechanism; tracked, not shipped.
|
|
25
|
+
|
|
26
|
+
## Rollback
|
|
27
|
+
- Revert the one-line `Stop` array edit + delete the canary module + test. No data migration, no config change.
|
|
28
|
+
|
|
29
|
+
## Tests
|
|
30
|
+
- `installCodexHooks.test.ts`: +1 test asserting the full Stop review trio (response-review + deferral + scope-coherence). 8 green.
|
|
31
|
+
- `codexHookContractCanary.test.ts`: 6 tests — layer-A invariants always asserted; layer-B skip-not-fail when no binary; binary-probed branch asserts all required events. Green.
|
|
32
|
+
|
|
33
|
+
## Publish
|
|
34
|
+
- Feature branch `echo/codex-parity-audit`. Targets a patch release on merge.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Side-effects review — config-overridable decay profiles (cwa-decay-profile-config)
|
|
2
|
+
|
|
3
|
+
**Scope**: Ship the tracked `cwa-decay-profile-config` deferral from the rung-1
|
|
4
|
+
task-context spec (`docs/specs/topic-intent-task-context-capture.md` §3, approved):
|
|
5
|
+
let operators tune the per-kind decay horizons (method/audience/goal/fact/decision)
|
|
6
|
+
via config instead of code constants, so the short/medium/long numbers become
|
|
7
|
+
tunable from real data without a code change.
|
|
8
|
+
|
|
9
|
+
**Files touched**:
|
|
10
|
+
- `src/core/TopicIntent.ts` — split `DECAY_PROFILES` into `DEFAULT_DECAY_PROFILES`
|
|
11
|
+
(the baseline) + a mutable `activeDecayProfiles`; add `configureDecayProfiles(overrides)`
|
|
12
|
+
(existence-checked, validated, idempotent — always re-derives from defaults),
|
|
13
|
+
`resetDecayProfiles()` (test isolation), and `DecayProfileOverrides` type.
|
|
14
|
+
`decayProfileFor` now reads the active profiles. `projectConfidence` is
|
|
15
|
+
unchanged (still pure w.r.t. its args; it calls `decayProfileFor`).
|
|
16
|
+
- `src/core/types.ts` — `topicIntent.capture.decayProfiles?` config field.
|
|
17
|
+
- `src/commands/server.ts` — call `configureDecayProfiles(config.topicIntent?.capture?.decayProfiles)`
|
|
18
|
+
once at startup, right after the TopicIntentStore is constructed.
|
|
19
|
+
- `tests/unit/TopicIntent-decay-profile-config.test.ts` — 6 tests (defaults,
|
|
20
|
+
partial override, invalid-ignored, idempotent, reset, projection-reflects-override).
|
|
21
|
+
|
|
22
|
+
**Under-block**: An override only changes the numbers it specifies; everything
|
|
23
|
+
else keeps the default. Invalid values (non-finite / ≤ 0) are silently ignored,
|
|
24
|
+
so a malformed config can never break decay (the loop falls back to defaults).
|
|
25
|
+
|
|
26
|
+
**Over-block**: None. This is a tuning knob, not a gate.
|
|
27
|
+
|
|
28
|
+
**Level-of-abstraction fit**: Decay horizons are process-wide *policy*, so a
|
|
29
|
+
module-level configurable map (set once at startup) is the right level — not
|
|
30
|
+
per-call state. `projectConfidence` keeps its signature and purity-w.r.t-args;
|
|
31
|
+
the only behavioral input it gains is the global policy via `decayProfileFor`,
|
|
32
|
+
which already read a module constant. `configureDecayProfiles` always re-derives
|
|
33
|
+
from `DEFAULT_DECAY_PROFILES` so it's idempotent and order-independent.
|
|
34
|
+
|
|
35
|
+
**Signal vs authority**: N/A (a tuning value, no decision authority).
|
|
36
|
+
|
|
37
|
+
**Interactions**:
|
|
38
|
+
- `configureDecayProfiles` is called once at server startup. If never called
|
|
39
|
+
(e.g. tests, or a path that doesn't boot the server), the defaults are in
|
|
40
|
+
effect — identical to pre-change behavior. **Rung-0/rung-1 decay math is
|
|
41
|
+
unchanged when no override is set** (fact/decision stay 30/180; task kinds keep
|
|
42
|
+
their defaults), so existing projection tests are unaffected.
|
|
43
|
+
- `resetDecayProfiles()` exists for test isolation (module-global state); tests
|
|
44
|
+
call it in `afterEach`.
|
|
45
|
+
- Idempotent + validated → re-running migration / re-reading config is safe.
|
|
46
|
+
|
|
47
|
+
**External surfaces**: New config field `topicIntent.capture.decayProfiles`
|
|
48
|
+
(optional, existence-checked). New exported `configureDecayProfiles`,
|
|
49
|
+
`resetDecayProfiles`, `DecayProfileOverrides`. No new endpoint.
|
|
50
|
+
|
|
51
|
+
**Rollback cost**: Low. Revert `decayProfileFor` to read a const + drop the
|
|
52
|
+
config field + the startup call; behavior returns to fixed code-constant
|
|
53
|
+
profiles (today's state). No persisted state involved.
|
|
54
|
+
|
|
55
|
+
**Migration parity**: Pure config-read at startup (server-side; every agent
|
|
56
|
+
gets the capability on update). The field is opt-in with an existence check, so
|
|
57
|
+
no `ConfigDefaults` entry is required — absence → built-in defaults. No
|
|
58
|
+
hook/template/skill change.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Side-effects review — `instar spec conformance` CLI (scg-cli)
|
|
2
|
+
|
|
3
|
+
**Scope**: Ship the tracked `scg-cli` deferral from the standards-conformance-gate
|
|
4
|
+
spec (`docs/specs/standards-conformance-gate.md`, approved/merged in #373): a
|
|
5
|
+
command-line entry point to the conformance gate, so a spec can be checked
|
|
6
|
+
against the constitution without curl. Thin client over the existing
|
|
7
|
+
`POST /spec/conformance-check` route.
|
|
8
|
+
|
|
9
|
+
**Files touched**:
|
|
10
|
+
- `src/commands/spec.ts` — NEW. `runSpecConformance({specPath,dir,port,json})`:
|
|
11
|
+
reads the spec file, resolves port + authToken from `loadConfig`, POSTs
|
|
12
|
+
`{markdown}` to the local server's conformance route, prints a formatted
|
|
13
|
+
rule-by-rule report (or `--json`). Server-down / 503 / missing-file are clear
|
|
14
|
+
errors with non-zero exit.
|
|
15
|
+
- `src/cli.ts` — register `instar spec conformance <path>` (a `spec` command group
|
|
16
|
+
+ `conformance` subcommand) using the established Commander + `loadConfig` pattern.
|
|
17
|
+
- `tests/unit/spec-conformance-cli.test.ts` — 5 tests (posts markdown, prints
|
|
18
|
+
findings, clean-pass, degraded-advisory, --json, missing-file exit).
|
|
19
|
+
|
|
20
|
+
**Under-block / over-block**: None. The CLI only *reads* a spec and *prints* a
|
|
21
|
+
report; it has no authority (mirrors the route's signal-only nature). It cannot
|
|
22
|
+
block anything.
|
|
23
|
+
|
|
24
|
+
**Level-of-abstraction fit**: The CLI is a thin presentation layer over the
|
|
25
|
+
already-built route + reviewer; it duplicates no logic. It reuses the standard
|
|
26
|
+
CLI→local-server pattern (`loadConfig` → port/authToken → fetch), so the
|
|
27
|
+
subscription-backed intelligence provider stays server-side (the CLI never
|
|
28
|
+
constructs an LLM client).
|
|
29
|
+
|
|
30
|
+
**Signal vs authority**: Inherits the route's signal-only posture — prints
|
|
31
|
+
"possible violations (you decide)", never a pass/fail verdict that gates anything.
|
|
32
|
+
|
|
33
|
+
**Interactions**:
|
|
34
|
+
- Requires the local server running (it's a client). Server-down → a clear
|
|
35
|
+
"Is the server running?" error + exit 1, not a crash.
|
|
36
|
+
- Reads `config.port` (so it targets the agent's real port, e.g. 4042) with a 4040
|
|
37
|
+
fallback; reads `authToken` for the Bearer header.
|
|
38
|
+
- 60s fetch timeout (a `capable`-tier conformance check can take a while).
|
|
39
|
+
|
|
40
|
+
**External surfaces**: New CLI subcommand `instar spec conformance <path>
|
|
41
|
+
[--dir] [--port] [--json]`. New exported `runSpecConformance`. No new endpoint,
|
|
42
|
+
no config change.
|
|
43
|
+
|
|
44
|
+
**Rollback cost**: Trivial. Remove the command registration + `src/commands/spec.ts`
|
|
45
|
+
+ the test. The route it calls is unaffected.
|
|
46
|
+
|
|
47
|
+
**Migration parity**: CLI code only (shipped in the package; every agent gets it
|
|
48
|
+
on update). No hook/template/config/skill change.
|