claude-blueprint 2.0.2 → 2.0.3
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/.claude-plugin/plugin.json +1 -1
- package/hooks/hooks.json +3 -3
- package/hooks/retro-suggest.js +39 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blueprint",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"description": "Architecture Decision Records with teeth — 39 commands, 21 agents, 15 architecture paradigms. DDD bounded contexts, DCAR forces evaluation, reflexion model conformance, epistemic status tracking, Wardley strategic analysis, C4 diagrams, ATAM tradeoff analysis, risk heat maps, cross-repo federation, and configurable governance tiers. All with a cranky senior engineer persona.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "pragnition"
|
package/hooks/hooks.json
CHANGED
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"matcher": "Bash",
|
|
34
34
|
"hooks": [
|
|
35
35
|
{
|
|
36
|
-
"type": "
|
|
37
|
-
"
|
|
36
|
+
"type": "command",
|
|
37
|
+
"command": "node \"${CLAUDE_PLUGIN_ROOT}/hooks/retro-suggest.js\"",
|
|
38
38
|
"timeout": 5
|
|
39
39
|
}
|
|
40
40
|
],
|
|
41
|
-
"_comment": "Retro-suggest after fix
|
|
41
|
+
"_comment": "Retro-suggest after fix commits only (ADR-0034). Uses deterministic script instead of prompt to avoid LLM false positives on non-commit Bash commands."
|
|
42
42
|
},
|
|
43
43
|
{
|
|
44
44
|
"matcher": "Skill",
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// PostToolUse:Bash hook — suggest /blueprint:retro after fix commits.
|
|
3
|
+
// Deterministic script replaces prompt-based hook to avoid false positives
|
|
4
|
+
// where the LLM would explain its reasoning on non-matching commands.
|
|
5
|
+
|
|
6
|
+
let input = '';
|
|
7
|
+
const timeout = setTimeout(() => process.exit(0), 5000);
|
|
8
|
+
process.stdin.setEncoding('utf8');
|
|
9
|
+
process.stdin.on('data', chunk => input += chunk);
|
|
10
|
+
process.stdin.on('end', () => {
|
|
11
|
+
clearTimeout(timeout);
|
|
12
|
+
try {
|
|
13
|
+
const data = JSON.parse(input);
|
|
14
|
+
const toolName = data.tool_name || '';
|
|
15
|
+
const toolInput = data.tool_input || {};
|
|
16
|
+
const toolOutput = data.tool_output || '';
|
|
17
|
+
|
|
18
|
+
// Only match git commit commands
|
|
19
|
+
const cmd = toolInput.command || '';
|
|
20
|
+
if (!cmd.match(/\bgit\s+commit\b/)) {
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Only match if commit succeeded and message contains fix keywords
|
|
25
|
+
const output = typeof toolOutput === 'string' ? toolOutput : JSON.stringify(toolOutput);
|
|
26
|
+
if (/\b(fix|bugfix|hotfix|patch)\b/i.test(output) && !output.includes('nothing to commit')) {
|
|
27
|
+
const result = {
|
|
28
|
+
hookSpecificOutput: {
|
|
29
|
+
hookEventName: "PostToolUse",
|
|
30
|
+
additionalContext: "A bug fix was just committed. Consider running /blueprint:retro to classify the root cause and check if this warrants an ADR."
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
process.stdout.write(JSON.stringify(result));
|
|
34
|
+
}
|
|
35
|
+
// Otherwise: zero output = silent pass-through
|
|
36
|
+
} catch (e) {
|
|
37
|
+
process.exit(0);
|
|
38
|
+
}
|
|
39
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-blueprint",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Architecture Decision Records with teeth — lifecycle management, 15 architecture paradigms, DDD context scoping, DCAR forces evaluation, reflexion models, Wardley mapping, C4 diagrams, ATAM tradeoff analysis, and 19 specialized agents for Claude Code.",
|
|
6
6
|
"bin": {
|