@ryuenn3123/agentic-senior-core 2.5.12 → 2.5.14
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/.agent-context/prompts/review-code.md +2 -0
- package/.agent-context/review-checklists/performance-audit.md +6 -0
- package/.agent-context/review-checklists/pr-checklist.md +10 -0
- package/.agent-context/review-checklists/security-audit.md +6 -0
- package/.agent-context/rules/architecture.md +10 -0
- package/.agent-context/rules/performance.md +10 -0
- package/.agent-context/rules/security.md +10 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/package.json +3 -1
- package/scripts/context-triggered-audit.mjs +395 -0
- package/scripts/release-gate.mjs +135 -2
- package/scripts/rules-guardian-audit.mjs +576 -0
- package/scripts/validate.mjs +2 -0
|
@@ -16,6 +16,8 @@ Use these checklists:
|
|
|
16
16
|
3. Apply documentation scope rules exactly: This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations.
|
|
17
17
|
4. Treat scope-style findings as advisory unless they hide factual errors, contract mismatches, or non-negotiable violations.
|
|
18
18
|
5. Enforce documentation hard blockers on changed boundaries: public surface changes, API contract changes, and database structure changes must include synchronized documentation updates.
|
|
19
|
+
6. Enforce context-triggered strict audits: review requests, PR-intent workflows, and major feature completion must run strict security and performance audits; small edits stay lightweight unless strict mode is explicitly forced.
|
|
20
|
+
7. Enforce cross-session consistency guardian: session handoff must include active architecture contract summary, drift detection must warn before direction changes, and direction changes require explicit user confirmation.
|
|
19
21
|
|
|
20
22
|
For EVERY violation found:
|
|
21
23
|
- State the exact file and line
|
|
@@ -11,6 +11,12 @@ Evaluate every item below. For each finding, rate impact:
|
|
|
11
11
|
- **MEDIUM** — Wasted resources, fix in this sprint
|
|
12
12
|
- **LOW** — Optimization opportunity, track for later
|
|
13
13
|
|
|
14
|
+
## Context Trigger Policy
|
|
15
|
+
|
|
16
|
+
- Strict performance audit auto-runs for review requests, PR-intent workflows, and major feature completion.
|
|
17
|
+
- Small edits default to lightweight mode unless strict mode is explicitly forced.
|
|
18
|
+
- User can force strict mode manually at any time.
|
|
19
|
+
|
|
14
20
|
---
|
|
15
21
|
|
|
16
22
|
## Database & Queries
|
|
@@ -109,3 +109,13 @@ VERDICT: PASS / FAIL (X/Y items passed)
|
|
|
109
109
|
- [ ] Performance/quality claims include source and timestamp
|
|
110
110
|
- [ ] Acronyms are expanded on first use
|
|
111
111
|
- [ ] Facts and assumptions are explicitly separated
|
|
112
|
+
|
|
113
|
+
### 11. Context-Triggered Audit Mode
|
|
114
|
+
- [ ] Strict audit mode activates automatically on review and PR-intent workflows
|
|
115
|
+
- [ ] Small edits avoid heavy checks by default unless strict mode is explicitly requested
|
|
116
|
+
- [ ] User can always force strict audit mode manually
|
|
117
|
+
|
|
118
|
+
### 12. Rules as Guardian (Cross-Session Consistency)
|
|
119
|
+
- [ ] Session handoff includes active architecture contract summary
|
|
120
|
+
- [ ] Drift detection warns before direction changes
|
|
121
|
+
- [ ] Direction changes require explicit user confirmation
|
|
@@ -24,6 +24,12 @@ Output format:
|
|
|
24
24
|
VERDICT: X findings (🔴 N critical, 🟠 N high, 🟡 N medium, 🟢 N low)
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
## Context Trigger Policy
|
|
28
|
+
|
|
29
|
+
- Strict security audit auto-runs for review requests, PR-intent workflows, and major feature completion.
|
|
30
|
+
- Small edits default to lightweight mode unless strict mode is explicitly forced.
|
|
31
|
+
- User can force strict mode manually at any time.
|
|
32
|
+
|
|
27
33
|
---
|
|
28
34
|
|
|
29
35
|
## A1: Injection (SQL, NoSQL, OS, LDAP)
|
|
@@ -13,6 +13,16 @@ These principles are mandatory for backend and shared core modules.
|
|
|
13
13
|
|
|
14
14
|
If a short and a clear implementation are functionally equivalent, choose the clear implementation.
|
|
15
15
|
|
|
16
|
+
## Rules as Guardian (Cross-Session Consistency)
|
|
17
|
+
|
|
18
|
+
These guardrails are mandatory to preserve architecture direction across sessions.
|
|
19
|
+
|
|
20
|
+
- Session handoff must include active architecture contract summary.
|
|
21
|
+
- Contract summary must include declared stack, blueprint, profile, and active core patterns.
|
|
22
|
+
- Detect drift before changing declared stack or core patterns.
|
|
23
|
+
- Direction changes require explicit user confirmation before applying changes.
|
|
24
|
+
- When confirmation is provided, record the rationale in session notes or PR context.
|
|
25
|
+
|
|
16
26
|
## The Core Principle
|
|
17
27
|
|
|
18
28
|
**Every layer has ONE job. Layer leaks are bugs — not "pragmatic shortcuts."**
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
**Do NOT optimize without evidence.** CPU time is cheap. Developer time is expensive.
|
|
9
9
|
|
|
10
|
+
## Context-Triggered Strict Audit Mode
|
|
11
|
+
|
|
12
|
+
Strict performance audits must activate automatically for:
|
|
13
|
+
- review requests
|
|
14
|
+
- PR-intent workflows (pull request preparation and merge readiness)
|
|
15
|
+
- major feature completion
|
|
16
|
+
|
|
17
|
+
Small edits stay in lightweight mode by default to avoid unnecessary heavy checks.
|
|
18
|
+
Users can always force strict performance mode manually.
|
|
19
|
+
|
|
10
20
|
BUT — there are patterns so obviously bad that they don't need benchmarks to reject.
|
|
11
21
|
Those are listed below as **Death Penalties**.
|
|
12
22
|
|
|
@@ -7,6 +7,16 @@
|
|
|
7
7
|
|
|
8
8
|
**ALL data crossing a system boundary is untrusted until validated.**
|
|
9
9
|
|
|
10
|
+
## Context-Triggered Strict Audit Mode
|
|
11
|
+
|
|
12
|
+
Strict security audits must activate automatically for:
|
|
13
|
+
- review requests
|
|
14
|
+
- PR-intent workflows (pull request preparation and merge readiness)
|
|
15
|
+
- major feature completion
|
|
16
|
+
|
|
17
|
+
Small edits stay in lightweight mode by default to avoid unnecessary heavy checks.
|
|
18
|
+
Users can always force strict security mode manually.
|
|
19
|
+
|
|
10
20
|
System boundaries include:
|
|
11
21
|
- HTTP request bodies, query params, headers, cookies
|
|
12
22
|
- URL path parameters
|
package/.cursorrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v2.5.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v2.5.14
|
|
4
4
|
Timestamp: 2026-04-15T00:14:51.184Z
|
|
5
5
|
Selected profile: beginner
|
|
6
6
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
package/.windsurfrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v2.5.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v2.5.14
|
|
4
4
|
Timestamp: 2026-04-15T00:14:51.184Z
|
|
5
5
|
Selected profile: beginner
|
|
6
6
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ryuenn3123/agentic-senior-core",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
|
|
6
6
|
"bin": {
|
|
@@ -44,6 +44,8 @@
|
|
|
44
44
|
"init": "node ./bin/agentic-senior-core.js init",
|
|
45
45
|
"audit:frontend-usability": "node ./scripts/frontend-usability-audit.mjs",
|
|
46
46
|
"audit:documentation-boundary": "node ./scripts/documentation-boundary-audit.mjs",
|
|
47
|
+
"audit:context-triggered": "node ./scripts/context-triggered-audit.mjs",
|
|
48
|
+
"audit:rules-guardian": "node ./scripts/rules-guardian-audit.mjs",
|
|
47
49
|
"gate:release": "node ./scripts/release-gate.mjs && node ./scripts/forbidden-content-check.mjs",
|
|
48
50
|
"prepublishOnly": "npm run gate:release",
|
|
49
51
|
"sbom:generate": "node ./scripts/generate-sbom.mjs",
|
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* context-triggered-audit.mjs
|
|
5
|
+
*
|
|
6
|
+
* Determines whether strict security/performance audits should run based on
|
|
7
|
+
* workflow context, changed scope size, and explicit user override.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
11
|
+
import { execFileSync } from 'node:child_process';
|
|
12
|
+
import { dirname, resolve } from 'node:path';
|
|
13
|
+
import { fileURLToPath } from 'node:url';
|
|
14
|
+
|
|
15
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
16
|
+
const __dirname = dirname(__filename);
|
|
17
|
+
const REPOSITORY_ROOT = resolve(__dirname, '..');
|
|
18
|
+
|
|
19
|
+
const SECURITY_CHECKLIST_PATH = '.agent-context/review-checklists/security-audit.md';
|
|
20
|
+
const PERFORMANCE_CHECKLIST_PATH = '.agent-context/review-checklists/performance-audit.md';
|
|
21
|
+
const DEFAULT_WORKFLOW = 'auto';
|
|
22
|
+
const SMALL_EDIT_MAX_FILES = 3;
|
|
23
|
+
const MAJOR_FEATURE_MIN_SIGNIFICANT_FILES = 4;
|
|
24
|
+
|
|
25
|
+
const STRICT_WORKFLOWS = new Set([
|
|
26
|
+
'review-request',
|
|
27
|
+
'pr-intent',
|
|
28
|
+
'pr-preparation',
|
|
29
|
+
'major-feature-completion',
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
const SUPPORTED_WORKFLOWS = new Set([
|
|
33
|
+
DEFAULT_WORKFLOW,
|
|
34
|
+
...STRICT_WORKFLOWS,
|
|
35
|
+
'small-edit',
|
|
36
|
+
'standard',
|
|
37
|
+
]);
|
|
38
|
+
|
|
39
|
+
const REQUIRED_SECURITY_CHECKLIST_SNIPPETS = [
|
|
40
|
+
'## Context Trigger Policy',
|
|
41
|
+
'Strict security audit auto-runs for review requests, PR-intent workflows, and major feature completion.',
|
|
42
|
+
'Small edits default to lightweight mode unless strict mode is explicitly forced.',
|
|
43
|
+
'User can force strict mode manually at any time.',
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
const REQUIRED_PERFORMANCE_CHECKLIST_SNIPPETS = [
|
|
47
|
+
'## Context Trigger Policy',
|
|
48
|
+
'Strict performance audit auto-runs for review requests, PR-intent workflows, and major feature completion.',
|
|
49
|
+
'Small edits default to lightweight mode unless strict mode is explicitly forced.',
|
|
50
|
+
'User can force strict mode manually at any time.',
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
function pushResult(results, isPassed, checkName, details) {
|
|
54
|
+
results.push({
|
|
55
|
+
checkName,
|
|
56
|
+
passed: isPassed,
|
|
57
|
+
details,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function normalizeFilePath(filePath) {
|
|
62
|
+
return filePath.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function parseGitFileList(rawOutput) {
|
|
66
|
+
if (typeof rawOutput !== 'string' || rawOutput.trim().length === 0) {
|
|
67
|
+
return [];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return rawOutput
|
|
71
|
+
.split(/\r?\n/)
|
|
72
|
+
.map((filePath) => filePath.trim())
|
|
73
|
+
.filter((filePath) => filePath.length > 0)
|
|
74
|
+
.map(normalizeFilePath);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function runGitFileQuery(commandArguments) {
|
|
78
|
+
try {
|
|
79
|
+
const rawOutput = execFileSync('git', commandArguments, {
|
|
80
|
+
cwd: REPOSITORY_ROOT,
|
|
81
|
+
encoding: 'utf8',
|
|
82
|
+
maxBuffer: 1024 * 1024,
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return parseGitFileList(rawOutput);
|
|
86
|
+
} catch {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function uniqueSorted(filePaths) {
|
|
92
|
+
return Array.from(new Set(filePaths)).sort((leftPath, rightPath) => leftPath.localeCompare(rightPath));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function collectChangedFiles() {
|
|
96
|
+
const workingTreeFiles = runGitFileQuery(['diff', '--name-only']);
|
|
97
|
+
const stagedFiles = runGitFileQuery(['diff', '--name-only', '--cached']);
|
|
98
|
+
const workingScopeFiles = uniqueSorted([...workingTreeFiles, ...stagedFiles]);
|
|
99
|
+
|
|
100
|
+
if (workingScopeFiles.length > 0) {
|
|
101
|
+
return {
|
|
102
|
+
source: 'working-tree-and-index',
|
|
103
|
+
files: workingScopeFiles,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const latestCommitRangeFiles = runGitFileQuery(['diff', '--name-only', 'HEAD~1..HEAD']);
|
|
108
|
+
if (latestCommitRangeFiles.length > 0) {
|
|
109
|
+
return {
|
|
110
|
+
source: 'latest-commit-range',
|
|
111
|
+
files: uniqueSorted(latestCommitRangeFiles),
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const headCommitFiles = runGitFileQuery(['show', '--pretty=format:', '--name-only', 'HEAD']);
|
|
116
|
+
if (headCommitFiles.length > 0) {
|
|
117
|
+
return {
|
|
118
|
+
source: 'head-commit',
|
|
119
|
+
files: uniqueSorted(headCommitFiles),
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
return {
|
|
124
|
+
source: 'none',
|
|
125
|
+
files: [],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function parseCliArguments(argumentList) {
|
|
130
|
+
let workflow = DEFAULT_WORKFLOW;
|
|
131
|
+
let strict = false;
|
|
132
|
+
|
|
133
|
+
for (let argumentIndex = 0; argumentIndex < argumentList.length; argumentIndex += 1) {
|
|
134
|
+
const argumentValue = argumentList[argumentIndex];
|
|
135
|
+
|
|
136
|
+
if (argumentValue === '--strict') {
|
|
137
|
+
strict = true;
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if (argumentValue === '--workflow') {
|
|
142
|
+
const nextArgumentValue = argumentList[argumentIndex + 1];
|
|
143
|
+
if (nextArgumentValue && !nextArgumentValue.startsWith('--')) {
|
|
144
|
+
workflow = nextArgumentValue;
|
|
145
|
+
argumentIndex += 1;
|
|
146
|
+
}
|
|
147
|
+
continue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
if (argumentValue.startsWith('--workflow=')) {
|
|
151
|
+
workflow = argumentValue.slice('--workflow='.length);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const normalizedWorkflow = String(workflow).trim().toLowerCase() || DEFAULT_WORKFLOW;
|
|
156
|
+
|
|
157
|
+
return {
|
|
158
|
+
workflow: SUPPORTED_WORKFLOWS.has(normalizedWorkflow) ? normalizedWorkflow : DEFAULT_WORKFLOW,
|
|
159
|
+
strict,
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function isLightweightFilePath(filePath) {
|
|
164
|
+
return filePath.endsWith('.md')
|
|
165
|
+
|| filePath.startsWith('docs/')
|
|
166
|
+
|| filePath.startsWith('.agent-context/review-checklists/')
|
|
167
|
+
|| filePath.startsWith('.agent-context/rules/')
|
|
168
|
+
|| filePath.startsWith('.agent-context/prompts/')
|
|
169
|
+
|| filePath === 'CHANGELOG.md'
|
|
170
|
+
|| filePath === 'README.md';
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function countSignificantChangedFiles(changedFiles) {
|
|
174
|
+
return changedFiles.filter((filePath) => (
|
|
175
|
+
filePath.startsWith('bin/')
|
|
176
|
+
|| filePath.startsWith('lib/')
|
|
177
|
+
|| filePath.startsWith('scripts/')
|
|
178
|
+
|| filePath.startsWith('tests/')
|
|
179
|
+
)).length;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function detectSmallEdit(changedFiles) {
|
|
183
|
+
const nonLightweightChangedFiles = changedFiles.filter((filePath) => !isLightweightFilePath(filePath));
|
|
184
|
+
return nonLightweightChangedFiles.length <= 1 && changedFiles.length <= SMALL_EDIT_MAX_FILES;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function detectMajorFeatureCompletion(changedFiles) {
|
|
188
|
+
const significantChangedFileCount = countSignificantChangedFiles(changedFiles);
|
|
189
|
+
return significantChangedFileCount >= MAJOR_FEATURE_MIN_SIGNIFICANT_FILES;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function detectReviewIntentFromEnvironment() {
|
|
193
|
+
const githubEventName = String(process.env.GITHUB_EVENT_NAME || '').toLowerCase();
|
|
194
|
+
const githubEventAction = String(process.env.GITHUB_EVENT_ACTION || '').toLowerCase();
|
|
195
|
+
const gitlabMergeRequestId = String(process.env.CI_MERGE_REQUEST_IID || '').trim();
|
|
196
|
+
const ciPullRequestMarker = String(process.env.CI_PULL_REQUEST || '').toLowerCase();
|
|
197
|
+
const auditWorkflowHint = String(process.env.AUDIT_WORKFLOW || '').toLowerCase();
|
|
198
|
+
|
|
199
|
+
if (githubEventName.includes('pull_request') || githubEventAction.includes('pull_request')) {
|
|
200
|
+
return true;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (gitlabMergeRequestId.length > 0) {
|
|
204
|
+
return true;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if (ciPullRequestMarker === 'true' || ciPullRequestMarker === '1') {
|
|
208
|
+
return true;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
return auditWorkflowHint.includes('review') || auditWorkflowHint.includes('pr');
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function resolveAuditMode(options) {
|
|
215
|
+
const {
|
|
216
|
+
workflow,
|
|
217
|
+
manualForceStrict,
|
|
218
|
+
changedFiles,
|
|
219
|
+
} = options;
|
|
220
|
+
|
|
221
|
+
const smallEditDetected = detectSmallEdit(changedFiles);
|
|
222
|
+
const majorFeatureDetected = detectMajorFeatureCompletion(changedFiles);
|
|
223
|
+
|
|
224
|
+
if (manualForceStrict) {
|
|
225
|
+
return {
|
|
226
|
+
strictAuditMode: true,
|
|
227
|
+
triggerReason: 'manual-force-strict',
|
|
228
|
+
smallEditDetected,
|
|
229
|
+
majorFeatureDetected,
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
if (STRICT_WORKFLOWS.has(workflow)) {
|
|
234
|
+
return {
|
|
235
|
+
strictAuditMode: true,
|
|
236
|
+
triggerReason: `workflow-${workflow}`,
|
|
237
|
+
smallEditDetected,
|
|
238
|
+
majorFeatureDetected,
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
if (workflow === 'small-edit') {
|
|
243
|
+
return {
|
|
244
|
+
strictAuditMode: false,
|
|
245
|
+
triggerReason: 'workflow-small-edit-lightweight',
|
|
246
|
+
smallEditDetected: true,
|
|
247
|
+
majorFeatureDetected,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (workflow === 'standard') {
|
|
252
|
+
return {
|
|
253
|
+
strictAuditMode: false,
|
|
254
|
+
triggerReason: 'workflow-standard-lightweight',
|
|
255
|
+
smallEditDetected,
|
|
256
|
+
majorFeatureDetected,
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
if (detectReviewIntentFromEnvironment()) {
|
|
261
|
+
return {
|
|
262
|
+
strictAuditMode: true,
|
|
263
|
+
triggerReason: 'auto-review-or-pr-intent',
|
|
264
|
+
smallEditDetected,
|
|
265
|
+
majorFeatureDetected,
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
if (majorFeatureDetected) {
|
|
270
|
+
return {
|
|
271
|
+
strictAuditMode: true,
|
|
272
|
+
triggerReason: 'auto-major-feature-completion',
|
|
273
|
+
smallEditDetected,
|
|
274
|
+
majorFeatureDetected,
|
|
275
|
+
};
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
if (smallEditDetected) {
|
|
279
|
+
return {
|
|
280
|
+
strictAuditMode: false,
|
|
281
|
+
triggerReason: 'auto-small-edit-lightweight',
|
|
282
|
+
smallEditDetected,
|
|
283
|
+
majorFeatureDetected,
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
return {
|
|
288
|
+
strictAuditMode: false,
|
|
289
|
+
triggerReason: 'auto-standard-lightweight',
|
|
290
|
+
smallEditDetected,
|
|
291
|
+
majorFeatureDetected,
|
|
292
|
+
};
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
function assertChecklist(checklistLabel, checklistPath, requiredSnippets, failures, results) {
|
|
296
|
+
const absoluteChecklistPath = resolve(REPOSITORY_ROOT, checklistPath);
|
|
297
|
+
|
|
298
|
+
if (!existsSync(absoluteChecklistPath)) {
|
|
299
|
+
failures.push(`Missing ${checklistLabel} checklist: ${checklistPath}`);
|
|
300
|
+
pushResult(results, false, `${checklistLabel}-checklist-exists`, `Missing ${checklistPath}`);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
pushResult(results, true, `${checklistLabel}-checklist-exists`, `${checklistPath} is present`);
|
|
305
|
+
|
|
306
|
+
const checklistContent = readFileSync(absoluteChecklistPath, 'utf8');
|
|
307
|
+
const missingChecklistSnippets = requiredSnippets.filter(
|
|
308
|
+
(requiredSnippet) => !checklistContent.includes(requiredSnippet)
|
|
309
|
+
);
|
|
310
|
+
|
|
311
|
+
if (missingChecklistSnippets.length > 0) {
|
|
312
|
+
failures.push(`Missing ${checklistLabel} checklist snippets: ${missingChecklistSnippets.join(', ')}`);
|
|
313
|
+
pushResult(
|
|
314
|
+
results,
|
|
315
|
+
false,
|
|
316
|
+
`${checklistLabel}-checklist-coverage`,
|
|
317
|
+
`Missing snippets in ${checklistPath}: ${missingChecklistSnippets.join(', ')}`
|
|
318
|
+
);
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
pushResult(results, true, `${checklistLabel}-checklist-coverage`, `${checklistLabel} checklist snippets are complete`);
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
function runAudit() {
|
|
326
|
+
const parsedArguments = parseCliArguments(process.argv.slice(2));
|
|
327
|
+
const changedScope = collectChangedFiles();
|
|
328
|
+
const changedFiles = changedScope.files;
|
|
329
|
+
|
|
330
|
+
const auditMode = resolveAuditMode({
|
|
331
|
+
workflow: parsedArguments.workflow,
|
|
332
|
+
manualForceStrict: parsedArguments.strict,
|
|
333
|
+
changedFiles,
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
const results = [];
|
|
337
|
+
const failures = [];
|
|
338
|
+
|
|
339
|
+
pushResult(results, true, 'context-workflow', `workflow=${parsedArguments.workflow}`);
|
|
340
|
+
pushResult(
|
|
341
|
+
results,
|
|
342
|
+
true,
|
|
343
|
+
'manual-force-strict-flag',
|
|
344
|
+
parsedArguments.strict ? 'Manual strict mode requested' : 'Manual strict mode not requested'
|
|
345
|
+
);
|
|
346
|
+
|
|
347
|
+
if (auditMode.strictAuditMode) {
|
|
348
|
+
pushResult(results, true, 'strict-audit-activation', `Strict audit mode activated (${auditMode.triggerReason})`);
|
|
349
|
+
|
|
350
|
+
assertChecklist(
|
|
351
|
+
'security',
|
|
352
|
+
SECURITY_CHECKLIST_PATH,
|
|
353
|
+
REQUIRED_SECURITY_CHECKLIST_SNIPPETS,
|
|
354
|
+
failures,
|
|
355
|
+
results
|
|
356
|
+
);
|
|
357
|
+
assertChecklist(
|
|
358
|
+
'performance',
|
|
359
|
+
PERFORMANCE_CHECKLIST_PATH,
|
|
360
|
+
REQUIRED_PERFORMANCE_CHECKLIST_SNIPPETS,
|
|
361
|
+
failures,
|
|
362
|
+
results
|
|
363
|
+
);
|
|
364
|
+
} else {
|
|
365
|
+
pushResult(
|
|
366
|
+
results,
|
|
367
|
+
true,
|
|
368
|
+
'strict-audit-lightweight-mode',
|
|
369
|
+
`Strict audits skipped to avoid heavy mode (${auditMode.triggerReason})`
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
const reportPayload = {
|
|
374
|
+
generatedAt: new Date().toISOString(),
|
|
375
|
+
auditName: 'context-triggered-audit',
|
|
376
|
+
workflow: parsedArguments.workflow,
|
|
377
|
+
source: changedScope.source,
|
|
378
|
+
changedFileCount: changedFiles.length,
|
|
379
|
+
changedFiles,
|
|
380
|
+
userForcedStrictMode: parsedArguments.strict,
|
|
381
|
+
strictAuditMode: auditMode.strictAuditMode,
|
|
382
|
+
triggerReason: auditMode.triggerReason,
|
|
383
|
+
smallEditDetected: auditMode.smallEditDetected,
|
|
384
|
+
majorFeatureDetected: auditMode.majorFeatureDetected,
|
|
385
|
+
passed: failures.length === 0,
|
|
386
|
+
failureCount: failures.length,
|
|
387
|
+
failures,
|
|
388
|
+
results,
|
|
389
|
+
};
|
|
390
|
+
|
|
391
|
+
console.log(JSON.stringify(reportPayload, null, 2));
|
|
392
|
+
process.exit(reportPayload.passed ? 0 : 1);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
runAudit();
|
package/scripts/release-gate.mjs
CHANGED
|
@@ -31,6 +31,8 @@ const FRONTEND_PARITY_CHECKLIST_PATH = '.agent-context/review-checklists/fronten
|
|
|
31
31
|
const FRONTEND_EXCELLENCE_RUBRIC_PATH = '.agent-context/review-checklists/frontend-excellence-rubric.md';
|
|
32
32
|
const FRONTEND_AUDIT_SCRIPT_PATH = 'scripts/frontend-usability-audit.mjs';
|
|
33
33
|
const DOCUMENTATION_BOUNDARY_AUDIT_SCRIPT_PATH = 'scripts/documentation-boundary-audit.mjs';
|
|
34
|
+
const CONTEXT_TRIGGERED_AUDIT_SCRIPT_PATH = 'scripts/context-triggered-audit.mjs';
|
|
35
|
+
const RULES_GUARDIAN_AUDIT_SCRIPT_PATH = 'scripts/rules-guardian-audit.mjs';
|
|
34
36
|
const BACKEND_ARCHITECTURE_RULE_PATH = '.agent-context/rules/architecture.md';
|
|
35
37
|
const BACKEND_REVIEW_CHECKLIST_PATH = '.agent-context/review-checklists/pr-checklist.md';
|
|
36
38
|
const REFACTOR_PROMPT_PATH = '.agent-context/prompts/refactor.md';
|
|
@@ -97,9 +99,9 @@ function parseMachineReadableReport(rawOutput) {
|
|
|
97
99
|
}
|
|
98
100
|
}
|
|
99
101
|
|
|
100
|
-
function runMachineReadableScript(scriptRelativePath) {
|
|
102
|
+
function runMachineReadableScript(scriptRelativePath, scriptArguments = []) {
|
|
101
103
|
try {
|
|
102
|
-
const rawOutput = execFileSync('node', [scriptRelativePath], {
|
|
104
|
+
const rawOutput = execFileSync('node', [scriptRelativePath, ...scriptArguments], {
|
|
103
105
|
cwd: REPOSITORY_ROOT,
|
|
104
106
|
encoding: 'utf8',
|
|
105
107
|
maxBuffer: 1024 * 1024,
|
|
@@ -376,6 +378,137 @@ function runReleaseGate() {
|
|
|
376
378
|
}
|
|
377
379
|
}
|
|
378
380
|
|
|
381
|
+
const contextTriggeredAuditExecution = runMachineReadableScript(
|
|
382
|
+
CONTEXT_TRIGGERED_AUDIT_SCRIPT_PATH,
|
|
383
|
+
['--workflow', 'pr-preparation']
|
|
384
|
+
);
|
|
385
|
+
if (!contextTriggeredAuditExecution.report) {
|
|
386
|
+
const failureDetails = contextTriggeredAuditExecution.executionErrorMessage
|
|
387
|
+
? `Context-triggered audit execution failed before producing a machine-readable report: ${contextTriggeredAuditExecution.executionErrorMessage}`
|
|
388
|
+
: 'Context-triggered audit did not produce machine-readable JSON output';
|
|
389
|
+
pushResult(results, false, 'context-triggered-audit', failureDetails);
|
|
390
|
+
} else {
|
|
391
|
+
diagnostics.contextTriggeredAudit = contextTriggeredAuditExecution.report;
|
|
392
|
+
pushResult(
|
|
393
|
+
results,
|
|
394
|
+
true,
|
|
395
|
+
'context-triggered-audit',
|
|
396
|
+
`context-triggered-audit executed (passed=${contextTriggeredAuditExecution.report.passed}, strict=${contextTriggeredAuditExecution.report.strictAuditMode}, failures=${contextTriggeredAuditExecution.report.failureCount})`
|
|
397
|
+
);
|
|
398
|
+
|
|
399
|
+
if (contextTriggeredAuditExecution.report.strictAuditMode === true) {
|
|
400
|
+
pushResult(
|
|
401
|
+
results,
|
|
402
|
+
true,
|
|
403
|
+
'context-triggered-strict-mode-auto',
|
|
404
|
+
`Strict audit mode activated automatically for workflow=${contextTriggeredAuditExecution.report.workflow}`
|
|
405
|
+
);
|
|
406
|
+
} else {
|
|
407
|
+
pushResult(
|
|
408
|
+
results,
|
|
409
|
+
false,
|
|
410
|
+
'context-triggered-strict-mode-auto',
|
|
411
|
+
`Strict audit mode was not activated for workflow=${contextTriggeredAuditExecution.report.workflow}`
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
if (contextTriggeredAuditExecution.report.passed === true) {
|
|
416
|
+
pushResult(
|
|
417
|
+
results,
|
|
418
|
+
true,
|
|
419
|
+
'context-triggered-security-performance-hard-rule',
|
|
420
|
+
'Context-triggered security and performance audit hard-rule passed'
|
|
421
|
+
);
|
|
422
|
+
} else {
|
|
423
|
+
const failedAuditDetails = Array.isArray(contextTriggeredAuditExecution.report.failures)
|
|
424
|
+
? contextTriggeredAuditExecution.report.failures.join('; ')
|
|
425
|
+
: 'Unknown context-triggered audit failures';
|
|
426
|
+
pushResult(
|
|
427
|
+
results,
|
|
428
|
+
false,
|
|
429
|
+
'context-triggered-security-performance-hard-rule',
|
|
430
|
+
`Context-triggered audit failed: ${failedAuditDetails}`
|
|
431
|
+
);
|
|
432
|
+
}
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
const rulesGuardianAuditExecution = runMachineReadableScript(
|
|
436
|
+
RULES_GUARDIAN_AUDIT_SCRIPT_PATH,
|
|
437
|
+
['--workflow', 'pr-preparation']
|
|
438
|
+
);
|
|
439
|
+
if (!rulesGuardianAuditExecution.report) {
|
|
440
|
+
const failureDetails = rulesGuardianAuditExecution.executionErrorMessage
|
|
441
|
+
? `Rules guardian audit execution failed before producing a machine-readable report: ${rulesGuardianAuditExecution.executionErrorMessage}`
|
|
442
|
+
: 'Rules guardian audit did not produce machine-readable JSON output';
|
|
443
|
+
pushResult(results, false, 'rules-guardian-audit', failureDetails);
|
|
444
|
+
} else {
|
|
445
|
+
diagnostics.rulesGuardianAudit = rulesGuardianAuditExecution.report;
|
|
446
|
+
pushResult(
|
|
447
|
+
results,
|
|
448
|
+
true,
|
|
449
|
+
'rules-guardian-audit',
|
|
450
|
+
`rules-guardian-audit executed (passed=${rulesGuardianAuditExecution.report.passed}, driftDetected=${rulesGuardianAuditExecution.report?.driftDetection?.driftDetected}, failures=${rulesGuardianAuditExecution.report.failureCount})`
|
|
451
|
+
);
|
|
452
|
+
|
|
453
|
+
const sessionHandoffSummary = rulesGuardianAuditExecution.report?.sessionHandoff?.contractSummary;
|
|
454
|
+
const sessionHandoffIncluded = rulesGuardianAuditExecution.report?.sessionHandoff?.included === true
|
|
455
|
+
&& typeof sessionHandoffSummary === 'string'
|
|
456
|
+
&& sessionHandoffSummary.trim().length > 0;
|
|
457
|
+
|
|
458
|
+
if (sessionHandoffIncluded) {
|
|
459
|
+
pushResult(
|
|
460
|
+
results,
|
|
461
|
+
true,
|
|
462
|
+
'rules-guardian-session-handoff',
|
|
463
|
+
'Session handoff includes active architecture contract summary'
|
|
464
|
+
);
|
|
465
|
+
} else {
|
|
466
|
+
pushResult(
|
|
467
|
+
results,
|
|
468
|
+
false,
|
|
469
|
+
'rules-guardian-session-handoff',
|
|
470
|
+
'Rules guardian report is missing session handoff architecture contract summary'
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
const requiresExplicitConfirmation = rulesGuardianAuditExecution.report?.confirmationPolicy?.requiresExplicitUserConfirmation === true;
|
|
475
|
+
|
|
476
|
+
if (requiresExplicitConfirmation) {
|
|
477
|
+
pushResult(
|
|
478
|
+
results,
|
|
479
|
+
true,
|
|
480
|
+
'rules-guardian-confirmation-policy',
|
|
481
|
+
'Direction change policy requires explicit user confirmation'
|
|
482
|
+
);
|
|
483
|
+
} else {
|
|
484
|
+
pushResult(
|
|
485
|
+
results,
|
|
486
|
+
false,
|
|
487
|
+
'rules-guardian-confirmation-policy',
|
|
488
|
+
'Rules guardian report does not enforce explicit user confirmation policy'
|
|
489
|
+
);
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
if (rulesGuardianAuditExecution.report.passed === true) {
|
|
493
|
+
pushResult(
|
|
494
|
+
results,
|
|
495
|
+
true,
|
|
496
|
+
'rules-guardian-drift-confirmation',
|
|
497
|
+
'Rules guardian drift detection and confirmation checks passed'
|
|
498
|
+
);
|
|
499
|
+
} else {
|
|
500
|
+
const failedAuditDetails = Array.isArray(rulesGuardianAuditExecution.report.failures)
|
|
501
|
+
? rulesGuardianAuditExecution.report.failures.join('; ')
|
|
502
|
+
: 'Unknown rules guardian audit failures';
|
|
503
|
+
pushResult(
|
|
504
|
+
results,
|
|
505
|
+
false,
|
|
506
|
+
'rules-guardian-drift-confirmation',
|
|
507
|
+
`Rules guardian audit failed: ${failedAuditDetails}`
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
|
|
379
512
|
const frontendParityChecklistContent = readText(FRONTEND_PARITY_CHECKLIST_PATH);
|
|
380
513
|
if (!frontendParityChecklistContent) {
|
|
381
514
|
pushResult(results, false, 'frontend-parity-checklist-exists', `Missing ${FRONTEND_PARITY_CHECKLIST_PATH}`);
|
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* rules-guardian-audit.mjs
|
|
5
|
+
*
|
|
6
|
+
* Cross-session consistency audit for architecture direction.
|
|
7
|
+
* Ensures session handoff contains an active architecture contract summary,
|
|
8
|
+
* detects direction drift, and requires explicit user confirmation before
|
|
9
|
+
* direction changes are applied.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
13
|
+
import { execFileSync } from 'node:child_process';
|
|
14
|
+
import { dirname, resolve } from 'node:path';
|
|
15
|
+
import { fileURLToPath } from 'node:url';
|
|
16
|
+
|
|
17
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
+
const __dirname = dirname(__filename);
|
|
19
|
+
const REPOSITORY_ROOT = resolve(__dirname, '..');
|
|
20
|
+
|
|
21
|
+
const ONBOARDING_REPORT_PATH = '.agent-context/state/onboarding-report.json';
|
|
22
|
+
const ARCHITECTURE_RULE_PATH = '.agent-context/rules/architecture.md';
|
|
23
|
+
const PR_CHECKLIST_PATH = '.agent-context/review-checklists/pr-checklist.md';
|
|
24
|
+
const REVIEW_PROMPT_PATH = '.agent-context/prompts/review-code.md';
|
|
25
|
+
|
|
26
|
+
const DEFAULT_WORKFLOW = 'standard';
|
|
27
|
+
const SUPPORTED_WORKFLOWS = new Set([
|
|
28
|
+
'auto',
|
|
29
|
+
'standard',
|
|
30
|
+
'review-request',
|
|
31
|
+
'pr-preparation',
|
|
32
|
+
'session-handoff',
|
|
33
|
+
'direction-change',
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
const CORE_PATTERN_SIGNALS = [
|
|
37
|
+
{
|
|
38
|
+
pattern: 'layer-separation',
|
|
39
|
+
snippet: 'Every layer has ONE job.',
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
pattern: 'modular-monolith-default',
|
|
43
|
+
snippet: 'Default Architecture: Modular Monolith',
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
pattern: 'feature-based-grouping',
|
|
47
|
+
snippet: 'Project Structure: Feature-Based Grouping',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
pattern: 'rules-as-guardian-cross-session',
|
|
51
|
+
snippet: 'Rules as Guardian (Cross-Session Consistency)',
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
|
|
55
|
+
const REQUIRED_ARCHITECTURE_RULE_SNIPPETS = [
|
|
56
|
+
'## Rules as Guardian (Cross-Session Consistency)',
|
|
57
|
+
'Session handoff must include active architecture contract summary.',
|
|
58
|
+
'Detect drift before changing declared stack or core patterns.',
|
|
59
|
+
'Direction changes require explicit user confirmation before applying changes.',
|
|
60
|
+
];
|
|
61
|
+
|
|
62
|
+
const REQUIRED_PR_CHECKLIST_SNIPPETS = [
|
|
63
|
+
'Session handoff includes active architecture contract summary',
|
|
64
|
+
'Drift detection warns before direction changes',
|
|
65
|
+
'Direction changes require explicit user confirmation',
|
|
66
|
+
];
|
|
67
|
+
|
|
68
|
+
const REQUIRED_REVIEW_PROMPT_SNIPPETS = [
|
|
69
|
+
'Enforce cross-session consistency guardian: session handoff must include active architecture contract summary, drift detection must warn before direction changes, and direction changes require explicit user confirmation.',
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
function pushResult(results, isPassed, checkName, details) {
|
|
73
|
+
results.push({
|
|
74
|
+
checkName,
|
|
75
|
+
passed: isPassed,
|
|
76
|
+
details,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function normalizeFilePath(filePath) {
|
|
81
|
+
return filePath.replace(/\\/g, '/').replace(/^\.\//, '');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function parseGitFileList(rawOutput) {
|
|
85
|
+
if (typeof rawOutput !== 'string' || rawOutput.trim().length === 0) {
|
|
86
|
+
return [];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
return rawOutput
|
|
90
|
+
.split(/\r?\n/)
|
|
91
|
+
.map((filePath) => filePath.trim())
|
|
92
|
+
.filter((filePath) => filePath.length > 0)
|
|
93
|
+
.map(normalizeFilePath);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function runGitFileQuery(commandArguments) {
|
|
97
|
+
try {
|
|
98
|
+
const rawOutput = execFileSync('git', commandArguments, {
|
|
99
|
+
cwd: REPOSITORY_ROOT,
|
|
100
|
+
encoding: 'utf8',
|
|
101
|
+
maxBuffer: 1024 * 1024,
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
return parseGitFileList(rawOutput);
|
|
105
|
+
} catch {
|
|
106
|
+
return [];
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function runGitRawQuery(commandArguments) {
|
|
111
|
+
try {
|
|
112
|
+
return execFileSync('git', commandArguments, {
|
|
113
|
+
cwd: REPOSITORY_ROOT,
|
|
114
|
+
encoding: 'utf8',
|
|
115
|
+
maxBuffer: 1024 * 1024,
|
|
116
|
+
});
|
|
117
|
+
} catch {
|
|
118
|
+
return '';
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function uniqueSorted(filePaths) {
|
|
123
|
+
return Array.from(new Set(filePaths)).sort((leftPath, rightPath) => leftPath.localeCompare(rightPath));
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function collectChangedFiles() {
|
|
127
|
+
const workingTreeFiles = runGitFileQuery(['diff', '--name-only']);
|
|
128
|
+
const stagedFiles = runGitFileQuery(['diff', '--name-only', '--cached']);
|
|
129
|
+
const workingScopeFiles = uniqueSorted([...workingTreeFiles, ...stagedFiles]);
|
|
130
|
+
|
|
131
|
+
if (workingScopeFiles.length > 0) {
|
|
132
|
+
return {
|
|
133
|
+
source: 'working-tree-and-index',
|
|
134
|
+
files: workingScopeFiles,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
const latestCommitRangeFiles = runGitFileQuery(['diff', '--name-only', 'HEAD~1..HEAD']);
|
|
139
|
+
if (latestCommitRangeFiles.length > 0) {
|
|
140
|
+
return {
|
|
141
|
+
source: 'latest-commit-range',
|
|
142
|
+
files: uniqueSorted(latestCommitRangeFiles),
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
const headCommitFiles = runGitFileQuery(['show', '--pretty=format:', '--name-only', 'HEAD']);
|
|
147
|
+
if (headCommitFiles.length > 0) {
|
|
148
|
+
return {
|
|
149
|
+
source: 'head-commit',
|
|
150
|
+
files: uniqueSorted(headCommitFiles),
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return {
|
|
155
|
+
source: 'none',
|
|
156
|
+
files: [],
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
function readText(relativeFilePath) {
|
|
161
|
+
const absolutePath = resolve(REPOSITORY_ROOT, relativeFilePath);
|
|
162
|
+
if (!existsSync(absolutePath)) {
|
|
163
|
+
return '';
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
return readFileSync(absolutePath, 'utf8');
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
function readPreviousRevisionText(relativeFilePath) {
|
|
170
|
+
const rawOutput = runGitRawQuery(['show', `HEAD~1:${relativeFilePath}`]);
|
|
171
|
+
return typeof rawOutput === 'string' && rawOutput.length > 0
|
|
172
|
+
? rawOutput
|
|
173
|
+
: '';
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
function parseOnboardingReport(onboardingReportContent) {
|
|
177
|
+
if (typeof onboardingReportContent !== 'string' || onboardingReportContent.trim().length === 0) {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
try {
|
|
182
|
+
return JSON.parse(onboardingReportContent);
|
|
183
|
+
} catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
function normalizeCorePatterns(corePatterns) {
|
|
189
|
+
if (!Array.isArray(corePatterns)) {
|
|
190
|
+
return [];
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
return Array.from(new Set(corePatterns
|
|
194
|
+
.map((patternValue) => String(patternValue || '').trim().toLowerCase())
|
|
195
|
+
.filter((patternValue) => patternValue.length > 0))).sort((leftValue, rightValue) => (
|
|
196
|
+
leftValue.localeCompare(rightValue)
|
|
197
|
+
));
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
function detectCorePatterns(architectureRuleContent) {
|
|
201
|
+
return CORE_PATTERN_SIGNALS
|
|
202
|
+
.filter((signalEntry) => architectureRuleContent.includes(signalEntry.snippet))
|
|
203
|
+
.map((signalEntry) => signalEntry.pattern);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
function parseCliArguments(argumentList) {
|
|
207
|
+
let workflow = DEFAULT_WORKFLOW;
|
|
208
|
+
let confirmDirectionChange = false;
|
|
209
|
+
let proposedStack = '';
|
|
210
|
+
let proposedBlueprint = '';
|
|
211
|
+
let proposedCorePatterns = [];
|
|
212
|
+
|
|
213
|
+
for (let argumentIndex = 0; argumentIndex < argumentList.length; argumentIndex += 1) {
|
|
214
|
+
const argumentValue = argumentList[argumentIndex];
|
|
215
|
+
|
|
216
|
+
if (argumentValue === '--confirm-direction-change') {
|
|
217
|
+
confirmDirectionChange = true;
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (argumentValue === '--workflow') {
|
|
222
|
+
const nextArgumentValue = argumentList[argumentIndex + 1];
|
|
223
|
+
if (nextArgumentValue && !nextArgumentValue.startsWith('--')) {
|
|
224
|
+
workflow = nextArgumentValue;
|
|
225
|
+
argumentIndex += 1;
|
|
226
|
+
}
|
|
227
|
+
continue;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (argumentValue.startsWith('--workflow=')) {
|
|
231
|
+
workflow = argumentValue.slice('--workflow='.length);
|
|
232
|
+
continue;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
if (argumentValue === '--proposed-stack') {
|
|
236
|
+
const nextArgumentValue = argumentList[argumentIndex + 1];
|
|
237
|
+
if (nextArgumentValue && !nextArgumentValue.startsWith('--')) {
|
|
238
|
+
proposedStack = nextArgumentValue;
|
|
239
|
+
argumentIndex += 1;
|
|
240
|
+
}
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (argumentValue.startsWith('--proposed-stack=')) {
|
|
245
|
+
proposedStack = argumentValue.slice('--proposed-stack='.length);
|
|
246
|
+
continue;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
if (argumentValue === '--proposed-blueprint') {
|
|
250
|
+
const nextArgumentValue = argumentList[argumentIndex + 1];
|
|
251
|
+
if (nextArgumentValue && !nextArgumentValue.startsWith('--')) {
|
|
252
|
+
proposedBlueprint = nextArgumentValue;
|
|
253
|
+
argumentIndex += 1;
|
|
254
|
+
}
|
|
255
|
+
continue;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
if (argumentValue.startsWith('--proposed-blueprint=')) {
|
|
259
|
+
proposedBlueprint = argumentValue.slice('--proposed-blueprint='.length);
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
if (argumentValue === '--proposed-core-patterns') {
|
|
264
|
+
const nextArgumentValue = argumentList[argumentIndex + 1];
|
|
265
|
+
if (nextArgumentValue && !nextArgumentValue.startsWith('--')) {
|
|
266
|
+
proposedCorePatterns = nextArgumentValue.split(',');
|
|
267
|
+
argumentIndex += 1;
|
|
268
|
+
}
|
|
269
|
+
continue;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
if (argumentValue.startsWith('--proposed-core-patterns=')) {
|
|
273
|
+
proposedCorePatterns = argumentValue.slice('--proposed-core-patterns='.length).split(',');
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
const normalizedWorkflow = String(workflow).trim().toLowerCase() || DEFAULT_WORKFLOW;
|
|
278
|
+
|
|
279
|
+
return {
|
|
280
|
+
workflow: SUPPORTED_WORKFLOWS.has(normalizedWorkflow) ? normalizedWorkflow : DEFAULT_WORKFLOW,
|
|
281
|
+
confirmDirectionChange,
|
|
282
|
+
proposedStack: String(proposedStack || '').trim(),
|
|
283
|
+
proposedBlueprint: String(proposedBlueprint || '').trim(),
|
|
284
|
+
proposedCorePatterns: normalizeCorePatterns(proposedCorePatterns),
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
function parseBooleanFromEnvironment(rawEnvironmentValue) {
|
|
289
|
+
const normalizedEnvironmentValue = String(rawEnvironmentValue || '').trim().toLowerCase();
|
|
290
|
+
return normalizedEnvironmentValue === '1'
|
|
291
|
+
|| normalizedEnvironmentValue === 'true'
|
|
292
|
+
|| normalizedEnvironmentValue === 'yes'
|
|
293
|
+
|| normalizedEnvironmentValue === 'y';
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function buildArchitectureContract(onboardingReport, corePatterns) {
|
|
297
|
+
return {
|
|
298
|
+
stack: String(onboardingReport?.selectedStack || 'unknown').trim() || 'unknown',
|
|
299
|
+
blueprint: String(onboardingReport?.selectedBlueprint || 'unknown').trim() || 'unknown',
|
|
300
|
+
profile: String(onboardingReport?.selectedProfile || 'unknown').trim() || 'unknown',
|
|
301
|
+
corePatterns: normalizeCorePatterns(corePatterns),
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function toComparableContractValue(value) {
|
|
306
|
+
if (Array.isArray(value)) {
|
|
307
|
+
return normalizeCorePatterns(value).join(',');
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
return String(value || '').trim();
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function detectContractDrift(baseContract, targetContract, driftSource) {
|
|
314
|
+
const driftItems = [];
|
|
315
|
+
const fieldNames = ['stack', 'blueprint', 'profile', 'corePatterns'];
|
|
316
|
+
|
|
317
|
+
for (const fieldName of fieldNames) {
|
|
318
|
+
const baseValue = toComparableContractValue(baseContract?.[fieldName]);
|
|
319
|
+
const targetValue = toComparableContractValue(targetContract?.[fieldName]);
|
|
320
|
+
|
|
321
|
+
if (baseValue !== targetValue) {
|
|
322
|
+
driftItems.push({
|
|
323
|
+
field: fieldName,
|
|
324
|
+
from: baseValue,
|
|
325
|
+
to: targetValue,
|
|
326
|
+
source: driftSource,
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
return driftItems;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
function buildSessionHandoffSummary(architectureContract) {
|
|
335
|
+
const corePatternsSummary = architectureContract.corePatterns.length > 0
|
|
336
|
+
? architectureContract.corePatterns.join(', ')
|
|
337
|
+
: 'none';
|
|
338
|
+
|
|
339
|
+
return `Architecture contract summary: stack=${architectureContract.stack}, blueprint=${architectureContract.blueprint}, profile=${architectureContract.profile}, corePatterns=${corePatternsSummary}.`;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
function assertSnippetCoverage(sourceLabel, sourcePath, requiredSnippets, failures, results) {
|
|
343
|
+
const sourceContent = readText(sourcePath);
|
|
344
|
+
|
|
345
|
+
if (!sourceContent) {
|
|
346
|
+
failures.push(`Missing ${sourceLabel} source: ${sourcePath}`);
|
|
347
|
+
pushResult(results, false, `${sourceLabel}-source-exists`, `Missing ${sourcePath}`);
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
pushResult(results, true, `${sourceLabel}-source-exists`, `${sourcePath} is present`);
|
|
352
|
+
|
|
353
|
+
const missingSnippets = requiredSnippets.filter((requiredSnippet) => !sourceContent.includes(requiredSnippet));
|
|
354
|
+
|
|
355
|
+
if (missingSnippets.length > 0) {
|
|
356
|
+
failures.push(`Missing ${sourceLabel} snippets: ${missingSnippets.join(', ')}`);
|
|
357
|
+
pushResult(
|
|
358
|
+
results,
|
|
359
|
+
false,
|
|
360
|
+
`${sourceLabel}-source-coverage`,
|
|
361
|
+
`Missing snippets in ${sourcePath}: ${missingSnippets.join(', ')}`
|
|
362
|
+
);
|
|
363
|
+
return;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
pushResult(results, true, `${sourceLabel}-source-coverage`, `${sourceLabel} snippets are complete`);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
function runAudit() {
|
|
370
|
+
const parsedArguments = parseCliArguments(process.argv.slice(2));
|
|
371
|
+
const changedScope = collectChangedFiles();
|
|
372
|
+
const changedFiles = changedScope.files;
|
|
373
|
+
const results = [];
|
|
374
|
+
const failures = [];
|
|
375
|
+
const warnings = [];
|
|
376
|
+
|
|
377
|
+
const envConfirmationFlag = parseBooleanFromEnvironment(process.env.RULES_GUARDIAN_CONFIRM_DIRECTION_CHANGE);
|
|
378
|
+
const confirmationProvided = parsedArguments.confirmDirectionChange || envConfirmationFlag;
|
|
379
|
+
const confirmationSource = parsedArguments.confirmDirectionChange
|
|
380
|
+
? 'cli-flag'
|
|
381
|
+
: (envConfirmationFlag ? 'environment-variable' : 'none');
|
|
382
|
+
|
|
383
|
+
pushResult(results, true, 'context-workflow', `workflow=${parsedArguments.workflow}`);
|
|
384
|
+
pushResult(
|
|
385
|
+
results,
|
|
386
|
+
true,
|
|
387
|
+
'direction-change-confirmation-flag',
|
|
388
|
+
confirmationProvided
|
|
389
|
+
? `Explicit direction-change confirmation provided via ${confirmationSource}`
|
|
390
|
+
: 'Explicit direction-change confirmation not provided'
|
|
391
|
+
);
|
|
392
|
+
|
|
393
|
+
assertSnippetCoverage(
|
|
394
|
+
'rules-guardian-architecture-rule',
|
|
395
|
+
ARCHITECTURE_RULE_PATH,
|
|
396
|
+
REQUIRED_ARCHITECTURE_RULE_SNIPPETS,
|
|
397
|
+
failures,
|
|
398
|
+
results
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
assertSnippetCoverage(
|
|
402
|
+
'rules-guardian-pr-checklist',
|
|
403
|
+
PR_CHECKLIST_PATH,
|
|
404
|
+
REQUIRED_PR_CHECKLIST_SNIPPETS,
|
|
405
|
+
failures,
|
|
406
|
+
results
|
|
407
|
+
);
|
|
408
|
+
|
|
409
|
+
assertSnippetCoverage(
|
|
410
|
+
'rules-guardian-review-prompt',
|
|
411
|
+
REVIEW_PROMPT_PATH,
|
|
412
|
+
REQUIRED_REVIEW_PROMPT_SNIPPETS,
|
|
413
|
+
failures,
|
|
414
|
+
results
|
|
415
|
+
);
|
|
416
|
+
|
|
417
|
+
const onboardingReportContent = readText(ONBOARDING_REPORT_PATH);
|
|
418
|
+
const onboardingReport = parseOnboardingReport(onboardingReportContent);
|
|
419
|
+
|
|
420
|
+
if (!onboardingReportContent) {
|
|
421
|
+
failures.push(`Missing architecture contract source: ${ONBOARDING_REPORT_PATH}`);
|
|
422
|
+
pushResult(results, false, 'architecture-contract-source', `Missing ${ONBOARDING_REPORT_PATH}`);
|
|
423
|
+
} else if (!onboardingReport) {
|
|
424
|
+
failures.push(`Cannot parse architecture contract source: ${ONBOARDING_REPORT_PATH}`);
|
|
425
|
+
pushResult(results, false, 'architecture-contract-source', `Invalid JSON in ${ONBOARDING_REPORT_PATH}`);
|
|
426
|
+
} else {
|
|
427
|
+
pushResult(results, true, 'architecture-contract-source', `${ONBOARDING_REPORT_PATH} is present and valid`);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
const architectureRuleContent = readText(ARCHITECTURE_RULE_PATH);
|
|
431
|
+
const activeCorePatterns = detectCorePatterns(architectureRuleContent);
|
|
432
|
+
|
|
433
|
+
if (activeCorePatterns.length === 0) {
|
|
434
|
+
failures.push('Cannot resolve active core patterns from architecture rule snippets');
|
|
435
|
+
pushResult(
|
|
436
|
+
results,
|
|
437
|
+
false,
|
|
438
|
+
'architecture-core-patterns',
|
|
439
|
+
`No core pattern signals detected in ${ARCHITECTURE_RULE_PATH}`
|
|
440
|
+
);
|
|
441
|
+
} else {
|
|
442
|
+
pushResult(
|
|
443
|
+
results,
|
|
444
|
+
true,
|
|
445
|
+
'architecture-core-patterns',
|
|
446
|
+
`Resolved ${activeCorePatterns.length} core pattern signals: ${activeCorePatterns.join(', ')}`
|
|
447
|
+
);
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
const activeContract = buildArchitectureContract(onboardingReport, activeCorePatterns);
|
|
451
|
+
const sessionHandoffSummary = buildSessionHandoffSummary(activeContract);
|
|
452
|
+
const sessionHandoffIncluded = sessionHandoffSummary.trim().length > 0;
|
|
453
|
+
|
|
454
|
+
if (sessionHandoffIncluded) {
|
|
455
|
+
pushResult(results, true, 'session-handoff-contract-summary', sessionHandoffSummary);
|
|
456
|
+
} else {
|
|
457
|
+
failures.push('Session handoff summary is missing');
|
|
458
|
+
pushResult(results, false, 'session-handoff-contract-summary', 'Session handoff summary is empty');
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
const previousOnboardingReport = parseOnboardingReport(readPreviousRevisionText(ONBOARDING_REPORT_PATH));
|
|
462
|
+
const previousArchitectureRuleContent = readPreviousRevisionText(ARCHITECTURE_RULE_PATH) || architectureRuleContent;
|
|
463
|
+
const previousCorePatterns = detectCorePatterns(previousArchitectureRuleContent);
|
|
464
|
+
|
|
465
|
+
const previousContract = buildArchitectureContract(
|
|
466
|
+
previousOnboardingReport || onboardingReport,
|
|
467
|
+
previousCorePatterns.length > 0 ? previousCorePatterns : activeCorePatterns
|
|
468
|
+
);
|
|
469
|
+
|
|
470
|
+
const proposedContract = {
|
|
471
|
+
stack: parsedArguments.proposedStack || activeContract.stack,
|
|
472
|
+
blueprint: parsedArguments.proposedBlueprint || activeContract.blueprint,
|
|
473
|
+
profile: activeContract.profile,
|
|
474
|
+
corePatterns: parsedArguments.proposedCorePatterns.length > 0
|
|
475
|
+
? parsedArguments.proposedCorePatterns
|
|
476
|
+
: activeContract.corePatterns,
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
const persistedContractDrift = detectContractDrift(
|
|
480
|
+
previousContract,
|
|
481
|
+
activeContract,
|
|
482
|
+
'persisted-change-since-previous-session'
|
|
483
|
+
);
|
|
484
|
+
const proposedContractDrift = detectContractDrift(
|
|
485
|
+
activeContract,
|
|
486
|
+
proposedContract,
|
|
487
|
+
'proposed-direction-change'
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
const driftItems = [...persistedContractDrift, ...proposedContractDrift];
|
|
491
|
+
const persistedDriftDetected = persistedContractDrift.length > 0;
|
|
492
|
+
const proposedDirectionChangeDetected = proposedContractDrift.length > 0;
|
|
493
|
+
const driftDetected = driftItems.length > 0;
|
|
494
|
+
|
|
495
|
+
if (driftDetected) {
|
|
496
|
+
const driftSummary = driftItems
|
|
497
|
+
.map((driftItem) => `${driftItem.field}: ${driftItem.from} -> ${driftItem.to} (${driftItem.source})`)
|
|
498
|
+
.join('; ');
|
|
499
|
+
warnings.push(`Direction drift detected: ${driftSummary}`);
|
|
500
|
+
pushResult(results, true, 'direction-drift-detection', `Drift detected: ${driftSummary}`);
|
|
501
|
+
} else {
|
|
502
|
+
pushResult(results, true, 'direction-drift-detection', 'No direction drift detected');
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
if (proposedDirectionChangeDetected && !confirmationProvided) {
|
|
506
|
+
failures.push('Direction change detected without explicit user confirmation');
|
|
507
|
+
pushResult(
|
|
508
|
+
results,
|
|
509
|
+
false,
|
|
510
|
+
'direction-change-explicit-confirmation',
|
|
511
|
+
'Direction change detected. Re-run with --confirm-direction-change (or set RULES_GUARDIAN_CONFIRM_DIRECTION_CHANGE=true) after explicit user approval.'
|
|
512
|
+
);
|
|
513
|
+
} else if (proposedDirectionChangeDetected && confirmationProvided) {
|
|
514
|
+
pushResult(
|
|
515
|
+
results,
|
|
516
|
+
true,
|
|
517
|
+
'direction-change-explicit-confirmation',
|
|
518
|
+
`Direction change confirmed explicitly via ${confirmationSource}`
|
|
519
|
+
);
|
|
520
|
+
} else if (persistedDriftDetected) {
|
|
521
|
+
pushResult(
|
|
522
|
+
results,
|
|
523
|
+
true,
|
|
524
|
+
'direction-change-explicit-confirmation',
|
|
525
|
+
'Persisted drift detected from previous session; explicit confirmation is required only for new proposed direction changes'
|
|
526
|
+
);
|
|
527
|
+
} else {
|
|
528
|
+
pushResult(
|
|
529
|
+
results,
|
|
530
|
+
true,
|
|
531
|
+
'direction-change-explicit-confirmation',
|
|
532
|
+
'No direction change detected; explicit confirmation not required'
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
const reportPayload = {
|
|
537
|
+
generatedAt: new Date().toISOString(),
|
|
538
|
+
auditName: 'rules-guardian-audit',
|
|
539
|
+
workflow: parsedArguments.workflow,
|
|
540
|
+
source: changedScope.source,
|
|
541
|
+
changedFileCount: changedFiles.length,
|
|
542
|
+
changedFiles,
|
|
543
|
+
confirmationPolicy: {
|
|
544
|
+
requiresExplicitUserConfirmation: true,
|
|
545
|
+
requiredForProposedDirectionChange: true,
|
|
546
|
+
confirmationProvided,
|
|
547
|
+
confirmationSource,
|
|
548
|
+
},
|
|
549
|
+
sessionHandoff: {
|
|
550
|
+
included: sessionHandoffIncluded,
|
|
551
|
+
contractSummary: sessionHandoffSummary,
|
|
552
|
+
activeArchitectureContract: activeContract,
|
|
553
|
+
previousArchitectureContract: previousContract,
|
|
554
|
+
proposedArchitectureContract: proposedContract,
|
|
555
|
+
},
|
|
556
|
+
driftDetection: {
|
|
557
|
+
driftDetected,
|
|
558
|
+
persistedDriftDetected,
|
|
559
|
+
proposedDirectionChangeDetected,
|
|
560
|
+
driftItemCount: driftItems.length,
|
|
561
|
+
persistedDriftItemCount: persistedContractDrift.length,
|
|
562
|
+
proposedDriftItemCount: proposedContractDrift.length,
|
|
563
|
+
driftItems,
|
|
564
|
+
},
|
|
565
|
+
passed: failures.length === 0,
|
|
566
|
+
failureCount: failures.length,
|
|
567
|
+
failures,
|
|
568
|
+
warnings,
|
|
569
|
+
results,
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
console.log(JSON.stringify(reportPayload, null, 2));
|
|
573
|
+
process.exit(reportPayload.passed ? 0 : 1);
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
runAudit();
|
package/scripts/validate.mjs
CHANGED
|
@@ -172,6 +172,8 @@ async function validateRequiredFiles() {
|
|
|
172
172
|
'scripts/mcp-server.mjs',
|
|
173
173
|
'scripts/frontend-usability-audit.mjs',
|
|
174
174
|
'scripts/documentation-boundary-audit.mjs',
|
|
175
|
+
'scripts/context-triggered-audit.mjs',
|
|
176
|
+
'scripts/rules-guardian-audit.mjs',
|
|
175
177
|
'scripts/release-gate.mjs',
|
|
176
178
|
'scripts/generate-sbom.mjs',
|
|
177
179
|
'scripts/init-project.sh',
|