pumuki-ast-hooks 5.3.21 → 5.3.23
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/VIOLATIONS_RESOLUTION_PLAN.md +11 -10
- package/package.json +2 -1
- package/scripts/hooks-system/application/services/RealtimeGuardService.js +1 -1
- package/scripts/hooks-system/application/services/installation/McpConfigurator.js +1 -1
- package/scripts/hooks-system/application/services/monitoring/EvidenceMonitorService.js +1 -1
- package/scripts/hooks-system/application/services/token/TokenMetricsService.js +1 -1
- package/scripts/hooks-system/infrastructure/ast/ast-core.js +1 -1
- package/scripts/hooks-system/infrastructure/ast/ast-intelligence.js +1 -1
- package/scripts/hooks-system/infrastructure/hooks/skill-activation-prompt.js +1 -1
- package/scripts/hooks-system/infrastructure/logging/UnifiedLoggerFactory.js +1 -1
- package/scripts/hooks-system/infrastructure/orchestration/intelligent-audit.js +1 -1
- package/scripts/hooks-system/infrastructure/telemetry/metrics-server.js +1 -1
- package/scripts/hooks-system/infrastructure/validators/enforce-english-literals.js +1 -1
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
12
|
## 📊 Executive Summary
|
|
13
|
-
- **Current status:** ⚠️ Action required (
|
|
14
|
-
- **Branch:** `feature/add-prometheus-metrics`
|
|
13
|
+
- **Current status:** ⚠️ Action required (3 critical, 6 high, 272 medium, 213 low)
|
|
14
|
+
- **Branch:** `main` (merged from `feature/add-prometheus-metrics`)
|
|
15
15
|
- **Start date:** 2025-12-30 — **Overall ETA:** 2026-01-15
|
|
16
16
|
- **Goal:** Reduce CRITICAL/HIGH to 0 and bring total < 20 before allowing commits without bypass.
|
|
17
17
|
- **Risks:**
|
|
@@ -45,22 +45,22 @@ gantt
|
|
|
45
45
|
## 🔴 Phase 1: BLOCKER Violations (CRITICAL + HIGH)
|
|
46
46
|
| Status | Severity | Count | Owner | DOD (Definition of Done) | Source |
|
|
47
47
|
|--------|-----------|-------|-------------|--------------------------|--------|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
48
|
+
| 🚧 | CRITICAL | 3 | BE | Resolve CRITICAL violations in repository (0 CRITICAL to unblock) | `.audit_tmp/ast-summary.json` / `.violations-by-priority.md` |
|
|
49
|
+
| 🚧 | HIGH | 6 | BE | Resolve HIGH violations in repository (0 HIGH to unblock) | `.audit_tmp/ast-summary.json` / `.violations-by-priority.md` |
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
53
|
-
## 🟠 Phase 2: MEDIUM Violations (
|
|
53
|
+
## 🟠 Phase 2: MEDIUM Violations (272)
|
|
54
54
|
| Status | Violation | Count | Owner | DOD | Doc |
|
|
55
55
|
|--------|-----------|-------|-------------|-----|-----|
|
|
56
|
-
|
|
|
56
|
+
| 🚧 | MEDIUM | 272 | BE | Resolve remaining medium-complexity violations | [Medium violations](../docs/medium-violations.md) |
|
|
57
57
|
|
|
58
58
|
---
|
|
59
59
|
|
|
60
|
-
## 🔵 Phase 3: LOW Violations (
|
|
60
|
+
## 🔵 Phase 3: LOW Violations (213)
|
|
61
61
|
| Status | Violation | Count | Owner | DOD | Doc |
|
|
62
62
|
|--------|-----------|-------|-------------|-----|-----|
|
|
63
|
-
|
|
|
63
|
+
| 🚧 | LOW | 213 | BE/FE | Resolve remaining low-priority violations | [Low violations](../docs/low-violations.md) |
|
|
64
64
|
|
|
65
65
|
---
|
|
66
66
|
|
|
@@ -93,5 +93,6 @@ gantt
|
|
|
93
93
|
|
|
94
94
|
**Collaborative notes:**
|
|
95
95
|
- Add notes under each table when closing tasks (use the legend to update status).
|
|
96
|
-
- Progress on Prometheus metrics: automatic sweep applied over `scripts/hooks-system/application/services/**`; the audit still reports
|
|
97
|
-
- Last scan (
|
|
96
|
+
- Progress on Prometheus metrics: automatic sweep applied over `scripts/hooks-system/application/services/**`; the audit still reports 61 (`backend.metrics.missing_prometheus`) and 29 (`backend.observability.missing_prometheus`) pending.
|
|
97
|
+
- Last scan (02/01/2026 09:58): 457 files, 494 total violations (3 critical, 6 high, 272 medium, 213 low).
|
|
98
|
+
- **Major improvement**: CRITICAL violations reduced from 211 to 3 (98.6% reduction) due to fixes in guards, hooks installation, and MCP singleton.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.23",
|
|
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": {
|
|
@@ -101,6 +101,7 @@
|
|
|
101
101
|
"files": [
|
|
102
102
|
"bin/",
|
|
103
103
|
"scripts/hooks-system/",
|
|
104
|
+
"scripts/hooks-system/config/",
|
|
104
105
|
"presentation/",
|
|
105
106
|
"skills/",
|
|
106
107
|
"hooks/",
|
|
@@ -3,7 +3,7 @@ const path = require('path');
|
|
|
3
3
|
const { getGitTreeState, isTreeBeyondLimit } = require('./GitTreeState');
|
|
4
4
|
const AuditLogger = require('./logging/AuditLogger');
|
|
5
5
|
const { recordMetric } = require('../../infrastructure/telemetry/metrics-logger');
|
|
6
|
-
const env = require('
|
|
6
|
+
const env = require('../../../config/env');
|
|
7
7
|
|
|
8
8
|
class RealtimeGuardService {
|
|
9
9
|
/**
|
|
@@ -3,7 +3,7 @@ const path = require('path');
|
|
|
3
3
|
const { execSync } = require('child_process');
|
|
4
4
|
const crypto = require('crypto');
|
|
5
5
|
const os = require('os');
|
|
6
|
-
const env = require('
|
|
6
|
+
const env = require('../../../config/env');
|
|
7
7
|
|
|
8
8
|
const COLORS = {
|
|
9
9
|
reset: '\x1b[0m',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const fs = require('fs');
|
|
2
2
|
const path = require('path');
|
|
3
3
|
const { execSync } = require('child_process');
|
|
4
|
-
const env = require('
|
|
4
|
+
const env = require('../../../config/env');
|
|
5
5
|
|
|
6
6
|
function resolveUpdateEvidenceScript(repoRoot) {
|
|
7
7
|
const candidates = [
|
|
@@ -54,7 +54,7 @@ class TokenMetricsService {
|
|
|
54
54
|
if (untrusted) {
|
|
55
55
|
level = 'ok';
|
|
56
56
|
}
|
|
57
|
-
const env = require('
|
|
57
|
+
const env = require('../../../config/env');
|
|
58
58
|
const forceLevel = (env.get('TOKEN_MONITOR_FORCE_LEVEL', '') || '').toLowerCase();
|
|
59
59
|
if (forceLevel === 'warning' || forceLevel === 'critical' || forceLevel === 'ok') {
|
|
60
60
|
level = forceLevel;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
const { Project, Node, SyntaxKind, ScriptTarget, ModuleKind } = require("ts-morph");
|
|
3
3
|
const path = require("path");
|
|
4
4
|
const fs = require("fs");
|
|
5
|
-
const env = require("
|
|
5
|
+
const env = require("../../../config/env");
|
|
6
6
|
|
|
7
7
|
let SeverityEvaluator = null;
|
|
8
8
|
let severityEvaluatorInstance = null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
const path = require("path");
|
|
3
3
|
const fs = require("fs");
|
|
4
|
-
const env = require("
|
|
4
|
+
const env = require("../../../config/env");
|
|
5
5
|
|
|
6
6
|
const astModulesPath = __dirname;
|
|
7
7
|
const { createProject, platformOf, mapToLevel } = require(path.join(astModulesPath, "ast-core"));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const fs = require('fs');
|
|
4
4
|
const path = require('path');
|
|
5
5
|
const { execSync } = require('child_process');
|
|
6
|
-
const env = require('
|
|
6
|
+
const env = require('../../../config/env');
|
|
7
7
|
|
|
8
8
|
const projectDir = env.get('CLAUDE_PROJECT_DIR', process.cwd());
|
|
9
9
|
const rulesPath = path.join(projectDir, '.cursor', 'ai-skills', 'skill-rules.json');
|
|
@@ -8,7 +8,7 @@ const { TokenManager } = require('../utils/token-manager');
|
|
|
8
8
|
const { toErrorMessage } = require('../utils/error-utils');
|
|
9
9
|
const fs = require('fs');
|
|
10
10
|
const path = require('path');
|
|
11
|
-
const env = require('
|
|
11
|
+
const env = require('../../../config/env');
|
|
12
12
|
|
|
13
13
|
function resolveAuditTmpDir() {
|
|
14
14
|
const configured = (env.get('AUDIT_TMP', '') || '').trim();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const http = require('http');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
|
-
const env = require('
|
|
6
|
+
const env = require('../../../config/env');
|
|
7
7
|
|
|
8
8
|
const PORT = env.getNumber('HOOK_METRICS_PORT', 9464);
|
|
9
9
|
const METRICS_FILE = path.join(process.cwd(), env.get('HOOK_METRICS_FILE', '.audit_tmp/hook-metrics.jsonl'));
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const { execSync } = require('child_process');
|
|
7
|
-
const env = require('
|
|
7
|
+
const env = require('../../../config/env');
|
|
8
8
|
|
|
9
9
|
const REPO_ROOT = env.get('HOOK_GUARD_REPO_ROOT', process.cwd());
|
|
10
10
|
const CONFIG_PATH = path.join(REPO_ROOT, 'scripts', 'hooks-system', 'config', 'language-guard.json');
|