pumuki-ast-hooks 5.5.42 → 5.5.43
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/docs/USAGE.md
CHANGED
|
@@ -61,7 +61,33 @@ Done! You now have AST Intelligence working in your project.
|
|
|
61
61
|
|
|
62
62
|
### Code Analysis
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
### Evidence Guard (auto-refresh)
|
|
65
|
+
|
|
66
|
+
The Evidence Guard daemon refreshes `.AI_EVIDENCE.json` periodically (default: every 180s).
|
|
67
|
+
|
|
68
|
+
Notes:
|
|
69
|
+
- The refresh updates evidence and records the current quality gate status.
|
|
70
|
+
- In auto-refresh mode, a failing quality gate does not break the daemon.
|
|
71
|
+
|
|
72
|
+
Useful commands:
|
|
73
|
+
```bash
|
|
74
|
+
# Daemon control
|
|
75
|
+
npm run ast:guard:start
|
|
76
|
+
npm run ast:guard:stop
|
|
77
|
+
npm run ast:guard:status
|
|
78
|
+
npm run ast:guard:logs
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Gate scope:
|
|
82
|
+
```bash
|
|
83
|
+
# Default is staging (only staged files)
|
|
84
|
+
AI_GATE_SCOPE=staging bash ./scripts/hooks-system/bin/update-evidence.sh --auto
|
|
85
|
+
|
|
86
|
+
# Repository-wide gate evaluation
|
|
87
|
+
AI_GATE_SCOPE=repo bash ./scripts/hooks-system/bin/update-evidence.sh --auto
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Interactive Menu (Recommended)
|
|
65
91
|
|
|
66
92
|
The library includes an **interactive menu** for selecting audit options:
|
|
67
93
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.5.
|
|
3
|
+
"version": "5.5.43",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -254,6 +254,9 @@ async function runIntelligentAudit() {
|
|
|
254
254
|
const rawViolations = loadRawViolations();
|
|
255
255
|
console.log(`[Intelligent Audit] Loaded ${rawViolations.length} violations from AST`);
|
|
256
256
|
|
|
257
|
+
const autoEvidenceTrigger = String(env.get('AUTO_EVIDENCE_TRIGGER', process.env.AUTO_EVIDENCE_TRIGGER || '') || '').trim().toLowerCase();
|
|
258
|
+
const isAutoEvidenceRefresh = autoEvidenceTrigger === 'auto';
|
|
259
|
+
|
|
257
260
|
const gateScope = String(env.get('AI_GATE_SCOPE', 'staging') || 'staging').trim().toLowerCase();
|
|
258
261
|
const isRepoScope = gateScope === 'repo' || gateScope === 'repository';
|
|
259
262
|
|
|
@@ -311,6 +314,11 @@ async function runIntelligentAudit() {
|
|
|
311
314
|
const gatePolicies = new GatePolicies();
|
|
312
315
|
const gateResult = gatePolicies.apply(enhancedViolations);
|
|
313
316
|
|
|
317
|
+
if (isAutoEvidenceRefresh && !gateResult.passed) {
|
|
318
|
+
console.log('[Intelligent Audit] ℹ️ Auto evidence refresh: preserving gate status but not failing process exit code');
|
|
319
|
+
gateResult.exitCode = 0;
|
|
320
|
+
}
|
|
321
|
+
|
|
314
322
|
console.log(`[Intelligent Audit] Gate status: ${gateResult.passed ? '✅ PASSED' : '❌ FAILED'}`);
|
|
315
323
|
if (gateResult.blockedBy) {
|
|
316
324
|
console.log(`[Intelligent Audit] Blocked by: ${gateResult.blockedBy} violations`);
|