azclaude-copilot 0.3.8 → 0.3.9
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/README.md +24 -5
- package/package.json +1 -1
- package/templates/hooks/user-prompt.js +48 -0
package/README.md
CHANGED
|
@@ -380,7 +380,16 @@ Three layers work silently. Context compaction stops being a problem.
|
|
|
380
380
|
| Reasoning snapshot | /snapshot -> checkpoints/ | Yes -- WHY decisions were made | Manual, every 15-20 turns |
|
|
381
381
|
| Session narrative | /persist -> sessions/ | Yes -- full summary + next actions | Manual, before closing |
|
|
382
382
|
|
|
383
|
-
`UserPromptSubmit` hook injects
|
|
383
|
+
`UserPromptSubmit` hook injects before your first message every session:
|
|
384
|
+
|
|
385
|
+
| What | When | Profile |
|
|
386
|
+
|------|------|---------|
|
|
387
|
+
| `goals.md` (capped at 20 done + 30 in-progress) | Every session | all |
|
|
388
|
+
| Latest checkpoint (capped at 50 lines) | Every session | all |
|
|
389
|
+
| Plan status: `X/N done, Y in-progress, Z blocked` | Copilot mode only | standard + strict |
|
|
390
|
+
| Learned reflexes (confidence ≥ 0.8, max 5) | Always | strict only |
|
|
391
|
+
|
|
392
|
+
Token cost: ~500 tokens fixed. goals.md is bounded at 80 lines by auto-rotation — same cost at session 5 or session 500.
|
|
384
393
|
|
|
385
394
|
---
|
|
386
395
|
|
|
@@ -404,9 +413,19 @@ Control hook behavior via environment variable:
|
|
|
404
413
|
```bash
|
|
405
414
|
AZCLAUDE_HOOK_PROFILE=minimal claude # goals.md tracking only
|
|
406
415
|
AZCLAUDE_HOOK_PROFILE=standard claude # all features (default)
|
|
407
|
-
AZCLAUDE_HOOK_PROFILE=strict claude # all
|
|
416
|
+
AZCLAUDE_HOOK_PROFILE=strict claude # all + reflex guidance injection
|
|
408
417
|
```
|
|
409
418
|
|
|
419
|
+
| Feature | minimal | standard | strict |
|
|
420
|
+
|---------|---------|----------|--------|
|
|
421
|
+
| goals.md tracking | ✓ | ✓ | ✓ |
|
|
422
|
+
| Checkpoint injection | ✓ | ✓ | ✓ |
|
|
423
|
+
| Reflex observations | — | ✓ | ✓ |
|
|
424
|
+
| Cost tracking | — | ✓ | ✓ |
|
|
425
|
+
| Plan status (copilot) | — | ✓ | ✓ |
|
|
426
|
+
| Reflex guidance (≥0.8) | — | — | ✓ |
|
|
427
|
+
| Memory rotation | ✓ | ✓ | ✓ |
|
|
428
|
+
|
|
410
429
|
### Doctor Audit
|
|
411
430
|
|
|
412
431
|
```bash
|
|
@@ -450,7 +469,7 @@ azclaude-copilot/
|
|
|
450
469
|
├── DOCS.md <- full user guide
|
|
451
470
|
├── SECURITY.md <- security policy + architecture
|
|
452
471
|
├── tests/
|
|
453
|
-
│ └── test-features.sh ←
|
|
472
|
+
│ └── test-features.sh ← 1070 tests
|
|
454
473
|
```
|
|
455
474
|
|
|
456
475
|
---
|
|
@@ -476,11 +495,11 @@ The runner is stateless. These files ARE the state.
|
|
|
476
495
|
|
|
477
496
|
## Verified
|
|
478
497
|
|
|
479
|
-
|
|
498
|
+
1070 tests. Every template, command, capability, agent, and CLI feature verified.
|
|
480
499
|
|
|
481
500
|
```bash
|
|
482
501
|
bash tests/test-features.sh
|
|
483
|
-
# Results:
|
|
502
|
+
# Results: 1070 passed, 0 failed, 1070 total
|
|
484
503
|
```
|
|
485
504
|
|
|
486
505
|
---
|
package/package.json
CHANGED
|
@@ -94,3 +94,51 @@ if (fs.existsSync(checkpointDir)) {
|
|
|
94
94
|
console.log('--- END CHECKPOINT ---');
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
|
+
|
|
98
|
+
// ── Plan status (standard + strict, copilot mode only) ────────────────────────
|
|
99
|
+
// Only fires when .claude/copilot-intent.md exists — copilot mode signal
|
|
100
|
+
if (HOOK_PROFILE !== 'minimal') {
|
|
101
|
+
const intentPath = path.join('.claude', 'copilot-intent.md');
|
|
102
|
+
if (fs.existsSync(intentPath)) {
|
|
103
|
+
const planPath = path.join('.claude', 'plan.md');
|
|
104
|
+
if (fs.existsSync(planPath)) {
|
|
105
|
+
try {
|
|
106
|
+
const planContent = fs.readFileSync(planPath, 'utf8');
|
|
107
|
+
const doneCount = (planContent.match(/Status:\s*done/gi) || []).length;
|
|
108
|
+
const blockedCount = (planContent.match(/Status:\s*blocked/gi) || []).length;
|
|
109
|
+
const ipCount = (planContent.match(/Status:\s*in-progress/gi) || []).length;
|
|
110
|
+
const pendingCount = (planContent.match(/Status:\s*pending/gi) || []).length;
|
|
111
|
+
const total = doneCount + blockedCount + ipCount + pendingCount;
|
|
112
|
+
if (total > 0) {
|
|
113
|
+
console.log('');
|
|
114
|
+
console.log(`--- PLAN STATUS: ${doneCount}/${total} done, ${ipCount} in-progress, ${blockedCount} blocked ---`);
|
|
115
|
+
}
|
|
116
|
+
} catch (_) {}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// ── Reflex guidance (strict profile only — confidence >= 0.8) ─────────────────
|
|
122
|
+
if (HOOK_PROFILE === 'strict') {
|
|
123
|
+
const reflexDir = path.join('.claude', 'memory', 'reflexes');
|
|
124
|
+
if (fs.existsSync(reflexDir)) {
|
|
125
|
+
try {
|
|
126
|
+
const reflexFiles = fs.readdirSync(reflexDir).filter(f => f.endsWith('.md'));
|
|
127
|
+
const strongReflexes = [];
|
|
128
|
+
for (const rf of reflexFiles) {
|
|
129
|
+
const rfContent = fs.readFileSync(path.join(reflexDir, rf), 'utf8');
|
|
130
|
+
const confMatch = rfContent.match(/confidence:\s*([\d.]+)/);
|
|
131
|
+
if (confMatch && parseFloat(confMatch[1]) >= 0.8) {
|
|
132
|
+
const actionMatch = rfContent.match(/action:\s*"?(.+?)"?\s*$/m);
|
|
133
|
+
if (actionMatch) strongReflexes.push(`• ${actionMatch[1].trim()}`);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (strongReflexes.length > 0) {
|
|
137
|
+
console.log('');
|
|
138
|
+
console.log('--- LEARNED REFLEXES (confidence >= 0.8) ---');
|
|
139
|
+
console.log(strongReflexes.slice(0, 5).join('\n'));
|
|
140
|
+
console.log('--- END REFLEXES ---');
|
|
141
|
+
}
|
|
142
|
+
} catch (_) {}
|
|
143
|
+
}
|
|
144
|
+
}
|