instar 1.3.88 → 1.3.90
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/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/core/InstarWorktreeManager.d.ts +1 -0
- package/dist/core/InstarWorktreeManager.d.ts.map +1 -1
- package/dist/core/InstarWorktreeManager.js +46 -0
- package/dist/core/InstarWorktreeManager.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +8 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +18 -18
- package/upgrades/1.3.89.md +33 -0
- package/upgrades/1.3.90.md +35 -0
- package/upgrades/side-effects/capabilities-auth-self-discovery.md +31 -0
- package/upgrades/side-effects/worktree-husky-hook-shim.md +108 -0
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-29T14:01:29.929Z",
|
|
5
|
+
"instarVersion": "1.3.90",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"domain": "identity",
|
|
12
12
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
13
13
|
"installedPath": ".instar/hooks/instar/session-start.sh",
|
|
14
|
-
"contentHash": "
|
|
14
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
15
15
|
"since": "2025-01-01"
|
|
16
16
|
},
|
|
17
17
|
"hook:dangerous-command-guard": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"domain": "safety",
|
|
21
21
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
22
22
|
"installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
|
|
23
|
-
"contentHash": "
|
|
23
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
24
24
|
"since": "2025-01-01"
|
|
25
25
|
},
|
|
26
26
|
"hook:grounding-before-messaging": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"domain": "safety",
|
|
30
30
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
31
31
|
"installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
|
|
32
|
-
"contentHash": "
|
|
32
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
33
33
|
"since": "2025-01-01"
|
|
34
34
|
},
|
|
35
35
|
"hook:compaction-recovery": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"domain": "identity",
|
|
39
39
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
40
40
|
"installedPath": ".instar/hooks/instar/compaction-recovery.sh",
|
|
41
|
-
"contentHash": "
|
|
41
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
42
42
|
"since": "2025-01-01"
|
|
43
43
|
},
|
|
44
44
|
"hook:external-operation-gate": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"domain": "safety",
|
|
48
48
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
49
49
|
"installedPath": ".instar/hooks/instar/external-operation-gate.js",
|
|
50
|
-
"contentHash": "
|
|
50
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
51
51
|
"since": "2025-01-01"
|
|
52
52
|
},
|
|
53
53
|
"hook:deferral-detector": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"domain": "safety",
|
|
57
57
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
58
58
|
"installedPath": ".instar/hooks/instar/deferral-detector.js",
|
|
59
|
-
"contentHash": "
|
|
59
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:post-action-reflection": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "evolution",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:external-communication-guard": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "safety",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:scope-coherence-collector": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "coherence",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:free-text-guard": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "safety",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:claim-intercept": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "coherence",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept-response": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:stop-gate-router": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "safety",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:auto-approve-permissions": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"job:health-check": {
|
|
@@ -1489,7 +1489,7 @@
|
|
|
1489
1489
|
"type": "subsystem",
|
|
1490
1490
|
"domain": "updates",
|
|
1491
1491
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1492
|
-
"contentHash": "
|
|
1492
|
+
"contentHash": "02e081441560e8b3a82c3cd7ed647ff0cb8f7042b166a4ab1241a86d8c113883",
|
|
1493
1493
|
"since": "2025-01-01"
|
|
1494
1494
|
},
|
|
1495
1495
|
"subsystem:scheduler": {
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
Instar worktree creation now activates the Husky pre-commit shim in newly
|
|
8
|
+
created worktrees. A fresh worktree could previously have Git configured for
|
|
9
|
+
Husky and the tracked pre-commit script present, while still missing Husky's
|
|
10
|
+
generated local shim. That made commits skip the instar-dev gate until someone
|
|
11
|
+
remembered to run the package prepare step in that worktree.
|
|
12
|
+
|
|
13
|
+
The worktree manager now verifies the generated shim after creating a worktree.
|
|
14
|
+
When the project has Husky configured, it runs the package prepare step if the
|
|
15
|
+
shim is missing, then fails loudly if the hook is still not runnable.
|
|
16
|
+
|
|
17
|
+
## What to Tell Your User
|
|
18
|
+
|
|
19
|
+
- **New worktrees start with the quality gate active**: "When I create a new Instar worktree, I now make sure its pre-commit gate is actually installed before using it. If the gate cannot be activated, I stop instead of silently working in an ungated checkout."
|
|
20
|
+
|
|
21
|
+
## Summary of New Capabilities
|
|
22
|
+
|
|
23
|
+
| Capability | How to Use |
|
|
24
|
+
|-----------|------------|
|
|
25
|
+
| Worktree hook activation | Automatic when creating Instar worktrees with the built-in worktree command |
|
|
26
|
+
|
|
27
|
+
## Evidence
|
|
28
|
+
|
|
29
|
+
Dogfooding found worktrees with Git configured for Husky but missing the
|
|
30
|
+
generated hook shim, so commits bypassed the instar-dev precommit gate. Focused
|
|
31
|
+
unit coverage checks the runnable-shim predicate, and integration coverage
|
|
32
|
+
creates a real worktree and asserts the generated pre-commit shim exists and is
|
|
33
|
+
executable before worktree creation returns.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- bump: patch -->
|
|
4
|
+
|
|
5
|
+
## What Changed
|
|
6
|
+
|
|
7
|
+
The self-discovery guidance for capability checks now matches the authenticated
|
|
8
|
+
server contract. Existing instructions told agents to call the capabilities
|
|
9
|
+
endpoint without an authorization header, but the endpoint requires the agent's
|
|
10
|
+
Bearer token. Agents following the documented "know before you claim" step could
|
|
11
|
+
therefore get a 401 instead of the capability matrix.
|
|
12
|
+
|
|
13
|
+
Fresh initialization now renders the authenticated capabilities command, and the
|
|
14
|
+
post-update migrator both adds the authenticated form for stale files missing the
|
|
15
|
+
section and rewrites legacy unauthenticated capability-check commands in
|
|
16
|
+
existing CLAUDE.md files.
|
|
17
|
+
|
|
18
|
+
## What to Tell Your User
|
|
19
|
+
|
|
20
|
+
- **Self-discovery now uses the working authenticated request**: "When I check
|
|
21
|
+
what I can actually do, my local instructions now use the same authenticated
|
|
22
|
+
capabilities call the server expects, so the documented verification step no
|
|
23
|
+
longer fails before it can answer."
|
|
24
|
+
|
|
25
|
+
## Summary of New Capabilities
|
|
26
|
+
|
|
27
|
+
| Capability | How to Use |
|
|
28
|
+
|-----------|------------|
|
|
29
|
+
| Authenticated self-discovery guidance | Existing agents receive the corrected capability-check instruction on update; new agents get it during initialization |
|
|
30
|
+
|
|
31
|
+
## Evidence
|
|
32
|
+
|
|
33
|
+
Unit coverage verifies the post-update migrator rewrites legacy unauthenticated
|
|
34
|
+
capabilities checks and adds the self-discovery section with the authenticated
|
|
35
|
+
form when it is missing.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Side Effects Review — capabilities auth self-discovery
|
|
2
|
+
|
|
3
|
+
## Change
|
|
4
|
+
|
|
5
|
+
Align agent-facing self-discovery instructions with the runtime server contract:
|
|
6
|
+
capability checks require the configured Bearer token.
|
|
7
|
+
|
|
8
|
+
## Surfaces Touched
|
|
9
|
+
|
|
10
|
+
- Fresh init CLAUDE.md generation.
|
|
11
|
+
- Post-update CLAUDE.md migration for existing agents.
|
|
12
|
+
- Built-in manifest regeneration for changed source templates.
|
|
13
|
+
|
|
14
|
+
## Expected Effects
|
|
15
|
+
|
|
16
|
+
- Agents following "know before you claim" get the capability matrix instead of
|
|
17
|
+
an authentication error.
|
|
18
|
+
- Existing stale CLAUDE.md files are corrected during update without requiring a
|
|
19
|
+
full re-init.
|
|
20
|
+
|
|
21
|
+
## Risk Review
|
|
22
|
+
|
|
23
|
+
- The change does not relax API auth or expose capability data publicly.
|
|
24
|
+
- The migrator rewrite targets only unauthenticated localhost capabilities curl
|
|
25
|
+
commands and replaces them with the authenticated form for the configured
|
|
26
|
+
server port.
|
|
27
|
+
- Existing already-authenticated commands are left unchanged.
|
|
28
|
+
|
|
29
|
+
## Validation
|
|
30
|
+
|
|
31
|
+
- Focused unit coverage covers both rewrite and missing-section insertion.
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# Side-Effects Review — Worktree creation activates Husky hooks
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `worktree-husky-hook-shim`
|
|
4
|
+
**Date:** `2026-05-29`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `instar-codey second-pass checklist`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change makes `instar worktree create` ensure the generated Husky
|
|
11
|
+
pre-commit shim exists and is executable in each newly-created Instar worktree.
|
|
12
|
+
If the tracked Husky pre-commit script and package prepare script are present
|
|
13
|
+
but the generated shim is missing, the manager runs the prepare step in the new
|
|
14
|
+
worktree and verifies the shim afterward. If activation fails, worktree creation
|
|
15
|
+
fails instead of returning an ungated checkout.
|
|
16
|
+
|
|
17
|
+
## Decision-point inventory
|
|
18
|
+
|
|
19
|
+
- `createWorktree` — modify — calls hook activation after git identity is set
|
|
20
|
+
and before returning the new worktree.
|
|
21
|
+
- `ensureHuskyHooksActive` — add — detects project Husky configuration, runs
|
|
22
|
+
prepare when needed, and fails closed if the shim remains missing.
|
|
23
|
+
- `hasRunnableHookShim` — add — small predicate for unit coverage and activation
|
|
24
|
+
verification.
|
|
25
|
+
- Worktree integration fixture — modify — simulates Husky prepare and asserts a
|
|
26
|
+
created worktree has the runnable shim.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## 1. Over-block
|
|
31
|
+
|
|
32
|
+
Worktree creation can now fail if a project has a tracked Husky pre-commit
|
|
33
|
+
script and package prepare script but prepare is broken. That is intentional:
|
|
34
|
+
returning a checkout that looks protected while commits bypass the gate is the
|
|
35
|
+
failure class this change fixes.
|
|
36
|
+
|
|
37
|
+
Repositories without a tracked Husky pre-commit script are skipped. This keeps
|
|
38
|
+
the convention repo-specific rather than imposing Husky on unrelated checkouts.
|
|
39
|
+
|
|
40
|
+
## 2. Under-block
|
|
41
|
+
|
|
42
|
+
The check proves the generated shim exists and is executable, not that every
|
|
43
|
+
hook command inside the tracked script will pass. That is the correct boundary
|
|
44
|
+
for worktree creation: it guarantees Git can invoke the hook, while the hook
|
|
45
|
+
itself owns later lint, trace, and migration checks.
|
|
46
|
+
|
|
47
|
+
## 3. Level-of-abstraction fit
|
|
48
|
+
|
|
49
|
+
The manager owns the structural properties of a newly-created agent worktree:
|
|
50
|
+
location, identity, audit ledger, and now hook availability. Keeping this in the
|
|
51
|
+
manager means CLI callers, wrapper callers, and tests share one enforcement
|
|
52
|
+
path.
|
|
53
|
+
|
|
54
|
+
## 4. Signal vs authority compliance
|
|
55
|
+
|
|
56
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
57
|
+
|
|
58
|
+
- [ ] No — this change produces a signal consumed by an existing smart gate.
|
|
59
|
+
- [ ] No — this change has no block/allow surface.
|
|
60
|
+
- [ ] Yes — but the logic is a smart gate with full conversational context.
|
|
61
|
+
- [x] Not applicable to conversational/product judgment — this is structural
|
|
62
|
+
local hook activation for developer worktrees.
|
|
63
|
+
|
|
64
|
+
## 5. Interactions
|
|
65
|
+
|
|
66
|
+
- **Shadowing:** This does not replace the pre-commit hook. It only ensures the
|
|
67
|
+
generated dispatch shim exists so Git can call the tracked hook.
|
|
68
|
+
- **Double-fire:** Prepare runs once during worktree creation only when the shim
|
|
69
|
+
is missing. Existing runnable shims are left alone.
|
|
70
|
+
- **Races:** Concurrent creation of different worktrees runs prepare in separate
|
|
71
|
+
directories, so no shared shim file is mutated.
|
|
72
|
+
- **Feedback loops:** The activation step runs before any user commit, so it
|
|
73
|
+
closes the "remember to install hooks" loop at the source.
|
|
74
|
+
|
|
75
|
+
## 6. External surfaces
|
|
76
|
+
|
|
77
|
+
Agents and developers using the built-in worktree command receive a checkout
|
|
78
|
+
whose pre-commit gate is actually runnable. If hook activation fails, they get a
|
|
79
|
+
clear creation error instead of a silently ungated worktree.
|
|
80
|
+
|
|
81
|
+
## 7. Rollback cost
|
|
82
|
+
|
|
83
|
+
Rollback is a code and test revert. Existing worktrees keep whatever local hook
|
|
84
|
+
state they already have.
|
|
85
|
+
|
|
86
|
+
## Conclusion
|
|
87
|
+
|
|
88
|
+
The diagnosis showed that hook configuration can be present while Husky's
|
|
89
|
+
ignored generated shim is absent. This change makes worktree creation repair
|
|
90
|
+
and verify that local generated state, turning the gate from remembered setup
|
|
91
|
+
into structure.
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Second-pass review (if required)
|
|
96
|
+
|
|
97
|
+
**Reviewer:** instar-codey second-pass checklist
|
|
98
|
+
**Independent read of the artifact:** concur
|
|
99
|
+
|
|
100
|
+
The second pass agrees that the fail-closed behavior is appropriate for the
|
|
101
|
+
official Instar worktree command and that the activation boundary is narrow.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Evidence pointers
|
|
106
|
+
|
|
107
|
+
- `tests/unit/InstarWorktreeManager.test.ts`
|
|
108
|
+
- `tests/integration/instar-worktree-create.test.ts`
|