azclaude-copilot 0.4.9 → 0.4.12
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/package.json +2 -2
- package/templates/capabilities/evolution/cycle2-knowledge.md +3 -3
- package/templates/commands/copilot.md +20 -0
- package/templates/commands/evolve.md +2 -2
- package/templates/commands/sentinel.md +25 -7
- package/templates/commands/ship.md +1 -1
- package/templates/hooks/post-tool-use.js +23 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "azclaude-copilot",
|
|
3
|
-
"version": "0.4.
|
|
4
|
-
"description": "AI coding environment —
|
|
3
|
+
"version": "0.4.12",
|
|
4
|
+
"description": "AI coding environment — 27 commands, 8 skills, 13 agents, memory, reflexes, evolution. Install: npm install -g azclaude-copilot@latest, then in Claude Code: azclaude-copilot setup --full",
|
|
5
5
|
"bin": {
|
|
6
6
|
"azclaude": "bin/cli.js",
|
|
7
7
|
"azclaude-copilot": "bin/copilot.js"
|
|
@@ -22,9 +22,9 @@ Read only what's recent and relevant:
|
|
|
22
22
|
|
|
23
23
|
### CONSOLIDATE
|
|
24
24
|
Group harvested content by pattern:
|
|
25
|
-
- Same friction appearing in
|
|
26
|
-
- Same workflow appearing in
|
|
27
|
-
- Same fact referenced in
|
|
25
|
+
- Same friction appearing in 2+ sessions → candidate for re-derivation
|
|
26
|
+
- Same workflow appearing in 2+ sessions → candidate for skill
|
|
27
|
+
- Same fact referenced in 2+ files → candidate for knowledge-index entry
|
|
28
28
|
|
|
29
29
|
Rules:
|
|
30
30
|
- Do not consolidate single-occurrence items — they are noise
|
|
@@ -16,6 +16,26 @@ If `.claude/agents/orchestrator.md` does not exist (fallback — run built-in lo
|
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
+
## Step 0: Intent Check
|
|
20
|
+
|
|
21
|
+
Check if `.claude/copilot-intent.md` exists:
|
|
22
|
+
```bash
|
|
23
|
+
ls .claude/copilot-intent.md 2>/dev/null && echo "intent=found" || echo "intent=missing"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If `intent=missing`:
|
|
27
|
+
```
|
|
28
|
+
⚠ No copilot-intent.md found.
|
|
29
|
+
|
|
30
|
+
Run /dream first to define your product? (recommended — provides test strategy, done criteria, deployment target)
|
|
31
|
+
Or continue inferring intent from CLAUDE.md? (faster, less precise for complex projects)
|
|
32
|
+
|
|
33
|
+
Proceeding without copilot-intent.md — inferring from CLAUDE.md and plan.md.
|
|
34
|
+
```
|
|
35
|
+
Continue to Step 1 either way — do NOT block. Log the absence in goals.md as a note.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
19
39
|
## Step 1: Read State
|
|
20
40
|
|
|
21
41
|
Read these files (skip any that don't exist):
|
|
@@ -35,7 +35,7 @@ ls .claude/agents/loop-controller.md 2>/dev/null
|
|
|
35
35
|
**If loop-controller.md exists**: delegate evolution work to it via Agent tool:
|
|
36
36
|
```
|
|
37
37
|
Run a full evolution cycle: re-derivation check, then Cycle 1 (detect/generate/evaluate),
|
|
38
|
-
Cycle 2 (knowledge consolidation if
|
|
38
|
+
Cycle 2 (knowledge consolidation if 2+ sessions), Cycle 3 (topology if friction detected).
|
|
39
39
|
Show the full cycle report when done.
|
|
40
40
|
```
|
|
41
41
|
**After loop-controller finishes**: continue to Step 7 (Generate Project-Specific Skills and Agents).
|
|
@@ -90,7 +90,7 @@ If PLAN is empty: skip to Cycle 2.
|
|
|
90
90
|
|
|
91
91
|
---
|
|
92
92
|
|
|
93
|
-
## Cycle 2: Knowledge Consolidation (if sessions ≥
|
|
93
|
+
## Cycle 2: Knowledge Consolidation (if sessions ≥ 2 since last consolidation)
|
|
94
94
|
|
|
95
95
|
Read `capabilities/evolution/cycle2-knowledge.md` and run.
|
|
96
96
|
Outputs: consolidated patterns, pruned stale memory, enriched knowledge-index
|
|
@@ -57,12 +57,23 @@ Parse $ARGUMENTS:
|
|
|
57
57
|
Check if hooks were modified outside of AZCLAUDE.
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
# Project-level (preferred) — hooks are registered in .claude/settings.local.json
|
|
61
|
+
PROJECT_INTEGRITY=".claude/.azclaude-integrity"
|
|
62
|
+
PROJECT_SETTINGS=".claude/settings.local.json"
|
|
63
|
+
# Global fallback
|
|
64
|
+
GLOBAL_INTEGRITY="$HOME/.claude/.azclaude-integrity"
|
|
62
65
|
if [ -n "$APPDATA" ]; then
|
|
63
|
-
|
|
66
|
+
GLOBAL_SETTINGS="$APPDATA/Claude/settings.json"
|
|
64
67
|
else
|
|
65
|
-
|
|
68
|
+
GLOBAL_SETTINGS="$HOME/.claude/settings.json"
|
|
69
|
+
fi
|
|
70
|
+
# Use project-level if both project files exist; otherwise fall back to global
|
|
71
|
+
if [ -f "$PROJECT_INTEGRITY" ] && [ -f "$PROJECT_SETTINGS" ]; then
|
|
72
|
+
INTEGRITY="$PROJECT_INTEGRITY"; SETTINGS="$PROJECT_SETTINGS"
|
|
73
|
+
echo "integrity_scope=project"
|
|
74
|
+
else
|
|
75
|
+
INTEGRITY="$GLOBAL_INTEGRITY"; SETTINGS="$GLOBAL_SETTINGS"
|
|
76
|
+
echo "integrity_scope=global"
|
|
66
77
|
fi
|
|
67
78
|
[ -f "$INTEGRITY" ] && echo "integrity_file=found" || echo "integrity_file=missing"
|
|
68
79
|
[ -f "$SETTINGS" ] && echo "settings_file=found" || echo "settings_file=missing"
|
|
@@ -70,9 +81,9 @@ fi
|
|
|
70
81
|
|
|
71
82
|
If both exist:
|
|
72
83
|
```bash
|
|
73
|
-
cat "$
|
|
84
|
+
cat "$INTEGRITY"
|
|
74
85
|
```
|
|
75
|
-
Compute SHA-256 of the `hooks` key in
|
|
86
|
+
Compute SHA-256 of the `hooks` key in `$SETTINGS` and compare.
|
|
76
87
|
- Match → +25 pts — "Hook integrity verified"
|
|
77
88
|
- Mismatch → +0 pts — **BLOCK** "Hook integrity mismatch — hooks modified outside AZCLAUDE"
|
|
78
89
|
- Missing integrity file → +15 pts — "No integrity baseline (run `npx azclaude install` to establish one)"
|
|
@@ -119,7 +130,10 @@ Score: start at 20, subtract per finding: HIGH −8, MEDIUM −3, LOW −1 (floo
|
|
|
119
130
|
|
|
120
131
|
```bash
|
|
121
132
|
cat .mcp.json 2>/dev/null
|
|
122
|
-
|
|
133
|
+
# Windows: %APPDATA%\Claude\mcp.json — Unix/Mac: ~/.claude/mcp.json
|
|
134
|
+
MCP_GLOBAL="${APPDATA:+$APPDATA/Claude/mcp.json}"
|
|
135
|
+
MCP_GLOBAL="${MCP_GLOBAL:-$HOME/.claude/mcp.json}"
|
|
136
|
+
cat "$MCP_GLOBAL" 2>/dev/null
|
|
123
137
|
```
|
|
124
138
|
|
|
125
139
|
For each MCP server entry, check:
|
|
@@ -181,6 +195,10 @@ Also scan for:
|
|
|
181
195
|
- `sk_live_` (Stripe secret), `SG\.` (SendGrid)
|
|
182
196
|
- `-----BEGIN.*PRIVATE KEY` (private keys)
|
|
183
197
|
|
|
198
|
+
**IMPORTANT — Secret redaction in output:** Never print full secret values in the report.
|
|
199
|
+
Always truncate: show first 8 chars + `...` + last 3 chars. Example: `AIzaSyCM...VNM`.
|
|
200
|
+
The report may be logged, shared, or appear in conversation transcripts.
|
|
201
|
+
|
|
184
202
|
If `.env` exists: check it is in `.gitignore`:
|
|
185
203
|
```bash
|
|
186
204
|
grep -q "\.env" .gitignore 2>/dev/null && echo ".env gitignored: yes" || echo ".env gitignored: NO"
|
|
@@ -41,7 +41,7 @@ If problem-architect not installed OR git diff is only docs/config: skip and pro
|
|
|
41
41
|
```bash
|
|
42
42
|
ls .claude/agents/security-auditor.md 2>/dev/null && echo "agent=found" || echo "agent=missing"
|
|
43
43
|
```
|
|
44
|
-
If `agent=found`:
|
|
44
|
+
If `agent=found`: read `.claude/agents/security-auditor.md` and execute the secrets scan inline using its rules. If verdict is `BLOCKED` → STOP.
|
|
45
45
|
```
|
|
46
46
|
✗ Pre-ship blocked: security-auditor found BLOCKED findings. Run /sentinel for details.
|
|
47
47
|
```
|
|
@@ -221,3 +221,26 @@ try { fs.writeFileSync(counterPath, String(editCount)); } catch (_) {}
|
|
|
221
221
|
if (editCount > 0 && editCount % 15 === 0) {
|
|
222
222
|
process.stdout.write(`\n⚠ ${editCount} edits this session — run /snapshot before context compaction loses your reasoning\n`);
|
|
223
223
|
}
|
|
224
|
+
|
|
225
|
+
// ── Rapid-edit detection — same file edited 5+ times in <5 min ───────────────
|
|
226
|
+
// Signal: unclear spec before coding. Warn once, suggest /blueprint.
|
|
227
|
+
if (isFileTool && rel) {
|
|
228
|
+
const rapidPath = path.join(os.tmpdir(), `.azclaude-rapid-${process.ppid || process.pid}`);
|
|
229
|
+
let rapidLog = {};
|
|
230
|
+
try { rapidLog = JSON.parse(fs.readFileSync(rapidPath, 'utf8')); } catch (_) {}
|
|
231
|
+
const fileLog = rapidLog[rel] || { count: 0, firstTs: Date.now(), warned: false };
|
|
232
|
+
const elapsed = Date.now() - fileLog.firstTs;
|
|
233
|
+
if (elapsed > 5 * 60 * 1000) {
|
|
234
|
+
// Reset window
|
|
235
|
+
rapidLog[rel] = { count: 1, firstTs: Date.now(), warned: false };
|
|
236
|
+
} else {
|
|
237
|
+
fileLog.count += 1;
|
|
238
|
+
if (fileLog.count >= 5 && !fileLog.warned) {
|
|
239
|
+
fileLog.warned = true;
|
|
240
|
+
const shortName = path.basename(rel);
|
|
241
|
+
process.stdout.write(`\n⚠ ${fileLog.count} edits to ${shortName} in ${Math.round(elapsed/60000)}min — unclear spec? Consider /blueprint before continuing\n`);
|
|
242
|
+
}
|
|
243
|
+
rapidLog[rel] = fileLog;
|
|
244
|
+
}
|
|
245
|
+
try { fs.writeFileSync(rapidPath, JSON.stringify(rapidLog)); } catch (_) {}
|
|
246
|
+
}
|