@ryuenn3123/agentic-senior-core 2.5.10 → 2.5.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.
@@ -14,12 +14,18 @@ Before making changes:
14
14
  2. Read .agent-context/rules/naming-conv.md — fix all naming violations.
15
15
  3. Read .agent-context/rules/error-handling.md — fix error handling patterns.
16
16
  4. Read .agent-context/stacks/typescript.md — fix TypeScript-specific issues.
17
+ 5. Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.
17
18
 
18
19
  For every change you make, provide a Reasoning Chain:
19
20
  - What was wrong (rule reference)
20
21
  - Why it was wrong (explain the risk/problem)
21
22
  - What you changed (show the improvement)
22
23
 
24
+ Refactor guidance:
25
+ - Prioritize maintainability over compressed one-liners.
26
+ - Prefer explicit readable control flow when short forms hide intent.
27
+ - Do not introduce shared abstractions before patterns are repeated and stable.
28
+
23
29
  Maintain ALL existing functionality. This is a refactor, not a rewrite.
24
30
  Add or update tests if the refactored code changes behavior contracts.
25
31
  ```
@@ -15,6 +15,7 @@ Use these checklists:
15
15
  2. Read .agent-context/review-checklists/security-audit.md — apply every item.
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
+ 5. Enforce documentation hard blockers on changed boundaries: public surface changes, API contract changes, and database structure changes must include synchronized documentation updates.
18
19
 
19
20
  For EVERY violation found:
20
21
  - State the exact file and line
@@ -29,6 +29,12 @@ Evaluate every item against the current project structure. For each violation, e
29
29
  - [ ] **Shared code is genuinely shared** — Not domain-specific code disguised as "common"
30
30
  - [ ] **Module size is reasonable** — If a module has 20+ files, consider splitting
31
31
 
32
+ ## Backend Universal Principles
33
+
34
+ - [ ] **No clever hacks in backend and shared core modules** — Prefer explicit flow over language tricks that hide intent
35
+ - [ ] **No premature abstraction** — Introduce shared abstractions only after repeated, stable patterns emerge
36
+ - [ ] **Readability over brevity** — Prefer clear multi-line logic over compressed one-liners
37
+
32
38
  ## Dependency Management
33
39
 
34
40
  - [ ] **No God classes** — No class/file with 500+ lines or 10+ dependencies
@@ -40,6 +40,9 @@ VERDICT: PASS / FAIL (X/Y items passed)
40
40
  - [ ] Dependencies flow inward (transport → service → repository)
41
41
  - [ ] Module boundaries respected (no reaching into another module's internals)
42
42
  - [ ] Domain layer has zero external dependencies
43
+ - [ ] No clever hacks in backend and shared core modules (prefer explicit control flow)
44
+ - [ ] No premature abstraction (base classes/util layers created only after repeated stable patterns)
45
+ - [ ] Readability over brevity for maintainability (no compressed one-liners that hide intent)
43
46
 
44
47
  ### 3. Type Safety (→ stacks/typescript.md)
45
48
  - [ ] No `any` type anywhere (use `unknown` + narrowing)
@@ -93,6 +96,10 @@ VERDICT: PASS / FAIL (X/Y items passed)
93
96
  ### 10. Documentation
94
97
  - [ ] Scope applied: This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations
95
98
  - [ ] Style scope review is advisory and does not block merge when API docs are synced in the same commit and contract details are correct
99
+ - [ ] Public surface changes fail review if documentation updates are missing or stale in the same scope
100
+ - [ ] API endpoint/contract changes include synchronized API/OpenAPI documentation updates
101
+ - [ ] Database structure changes include synchronized schema or migration documentation updates
102
+ - [ ] Documentation checks stay boundary-aware and only enforce touched scopes
96
103
  - [ ] API endpoints have OpenAPI/Swagger documentation
97
104
  - [ ] Complex business logic has comments explaining WHY
98
105
  - [ ] Public functions/methods have JSDoc/docstrings
@@ -211,6 +211,25 @@ The spec is a contract. If the contract is wrong, consumers will break.
211
211
  "I'll update the docs later" means "the docs will never be updated."
212
212
  ```
213
213
 
214
+ ## Documentation as Hard Rule (Boundary-Aware)
215
+
216
+ Documentation checks are hard-blocking for contract accuracy, but scope-aware to avoid unnecessary overhead.
217
+
218
+ ### Boundary Triggers
219
+ 1. Public surface boundary: exported/public behavior changes in CLI, library, or runtime scripts.
220
+ 2. API contract boundary: endpoint, route, controller, or OpenAPI contract changes.
221
+ 3. Database structure boundary: schema, migration, repository contract, or persistence model changes.
222
+
223
+ ### Boundary-Aware Enforcement
224
+ 1. Only triggered boundaries require synchronized documentation updates.
225
+ 2. Untouched boundaries are ignored during the same review run.
226
+ 3. Missing docs for a triggered boundary is a blocking failure.
227
+
228
+ ### Required Same-Scope Sync
229
+ 1. Public surface changes must update user-facing docs (`README.md`, `CHANGELOG.md`, or `docs/*`).
230
+ 2. API contract changes must update API/OpenAPI docs in the same scope.
231
+ 3. Database structure changes must update schema/migration documentation in the same scope.
232
+
214
233
  ### Enforcement
215
234
  1. API docs live next to the code (same module, same directory)
216
235
  2. Docs update in the SAME commit as the endpoint change
@@ -3,6 +3,16 @@
3
3
  > If your service file imports an HTTP library, your architecture is broken.
4
4
  > If your controller contains SQL, you've already lost.
5
5
 
6
+ ## Universal Backend Principles (Mandatory)
7
+
8
+ These principles are mandatory for backend and shared core modules.
9
+
10
+ - No clever hacks. Prefer explicit control flow over language tricks that hide intent.
11
+ - No premature abstraction. Extract shared utilities or base types only after repeated, stable patterns appear.
12
+ - Readability over brevity. Reject compressed one-liners when clearer multi-line logic is easier to review.
13
+
14
+ If a short and a clear implementation are functionally equivalent, choose the clear implementation.
15
+
6
16
  ## The Core Principle
7
17
 
8
18
  **Every layer has ONE job. Layer leaks are bugs — not "pragmatic shortcuts."**
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-17T08:10:30.670Z",
2
+ "generatedAt": "2026-04-17T09:57:09.275Z",
3
3
  "reportName": "memory-continuity-benchmark",
4
4
  "schemaVersion": "1.0.0",
5
5
  "passed": true,
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.10
3
+ Generated by Agentic-Senior-Core CLI v2.5.12
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.10
3
+ Generated by Agentic-Senior-Core CLI v2.5.12
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.10",
3
+ "version": "2.5.12",
4
4
  "type": "module",
5
5
  "description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -43,6 +43,7 @@
43
43
  "scripts": {
44
44
  "init": "node ./bin/agentic-senior-core.js init",
45
45
  "audit:frontend-usability": "node ./scripts/frontend-usability-audit.mjs",
46
+ "audit:documentation-boundary": "node ./scripts/documentation-boundary-audit.mjs",
46
47
  "gate:release": "node ./scripts/release-gate.mjs && node ./scripts/forbidden-content-check.mjs",
47
48
  "prepublishOnly": "npm run gate:release",
48
49
  "sbom:generate": "node ./scripts/generate-sbom.mjs",
@@ -0,0 +1,201 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * documentation-boundary-audit.mjs
5
+ *
6
+ * Enforces documentation sync only on changed scope boundaries.
7
+ * If public surface, API contract, or database structure files change,
8
+ * matching documentation updates must be present in the same change scope.
9
+ */
10
+
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 CORE_DOCUMENTATION_FILES = new Set(['README.md', 'CHANGELOG.md']);
20
+
21
+ const BOUNDARY_RULES = [
22
+ {
23
+ boundaryName: 'public-surface',
24
+ requirement: 'Public surface changes must update README.md, CHANGELOG.md, or docs/* in the same scope.',
25
+ trigger(filePath) {
26
+ return /^(bin\/|lib\/|scripts\/)/.test(filePath) && !isDocumentationFilePath(filePath);
27
+ },
28
+ docsMatcher(filePath) {
29
+ return filePath === 'README.md' || filePath === 'CHANGELOG.md' || filePath.startsWith('docs/');
30
+ },
31
+ },
32
+ {
33
+ boundaryName: 'api-contract',
34
+ requirement: 'API endpoint or contract changes must update API/OpenAPI documentation in the same scope.',
35
+ trigger(filePath) {
36
+ return !isDocumentationFilePath(filePath)
37
+ && /(api|openapi|contract|controller|route|endpoint)/i.test(filePath);
38
+ },
39
+ docsMatcher(filePath) {
40
+ return filePath === '.agent-context/rules/api-docs.md'
41
+ || /^(docs\/.*(api|contract|openapi))/i.test(filePath)
42
+ || filePath === 'README.md';
43
+ },
44
+ },
45
+ {
46
+ boundaryName: 'database-structure',
47
+ requirement: 'Database structure changes must update schema or migration documentation in the same scope.',
48
+ trigger(filePath) {
49
+ return !isDocumentationFilePath(filePath)
50
+ && /(database|schema|migration|repository|sql|prisma|typeorm|knex)/i.test(filePath);
51
+ },
52
+ docsMatcher(filePath) {
53
+ return filePath === '.agent-context/rules/database-design.md'
54
+ || /^(docs\/.*(database|schema|migration))/i.test(filePath)
55
+ || filePath === 'README.md';
56
+ },
57
+ },
58
+ ];
59
+
60
+ function normalizeFilePath(filePath) {
61
+ return filePath.replace(/\\/g, '/').replace(/^\.\//, '');
62
+ }
63
+
64
+ function parseGitFileList(rawOutput) {
65
+ if (typeof rawOutput !== 'string' || rawOutput.trim().length === 0) {
66
+ return [];
67
+ }
68
+
69
+ return rawOutput
70
+ .split(/\r?\n/)
71
+ .map((filePath) => filePath.trim())
72
+ .filter((filePath) => filePath.length > 0)
73
+ .map(normalizeFilePath);
74
+ }
75
+
76
+ function runGitFileQuery(commandArguments) {
77
+ try {
78
+ const rawOutput = execFileSync('git', commandArguments, {
79
+ cwd: REPOSITORY_ROOT,
80
+ encoding: 'utf8',
81
+ maxBuffer: 1024 * 1024,
82
+ });
83
+
84
+ return parseGitFileList(rawOutput);
85
+ } catch {
86
+ return [];
87
+ }
88
+ }
89
+
90
+ function uniqueSorted(filePaths) {
91
+ return Array.from(new Set(filePaths)).sort((leftPath, rightPath) => leftPath.localeCompare(rightPath));
92
+ }
93
+
94
+ function collectChangedFiles() {
95
+ const workingTreeFiles = runGitFileQuery(['diff', '--name-only']);
96
+ const stagedFiles = runGitFileQuery(['diff', '--name-only', '--cached']);
97
+ const workingScopeFiles = uniqueSorted([...workingTreeFiles, ...stagedFiles]);
98
+
99
+ if (workingScopeFiles.length > 0) {
100
+ return {
101
+ source: 'working-tree-and-index',
102
+ files: workingScopeFiles,
103
+ };
104
+ }
105
+
106
+ const latestCommitRangeFiles = runGitFileQuery(['diff', '--name-only', 'HEAD~1..HEAD']);
107
+ if (latestCommitRangeFiles.length > 0) {
108
+ return {
109
+ source: 'latest-commit-range',
110
+ files: uniqueSorted(latestCommitRangeFiles),
111
+ };
112
+ }
113
+
114
+ const headCommitFiles = runGitFileQuery(['show', '--pretty=format:', '--name-only', 'HEAD']);
115
+ if (headCommitFiles.length > 0) {
116
+ return {
117
+ source: 'head-commit',
118
+ files: uniqueSorted(headCommitFiles),
119
+ };
120
+ }
121
+
122
+ return {
123
+ source: 'none',
124
+ files: [],
125
+ };
126
+ }
127
+
128
+ function isDocumentationFilePath(filePath) {
129
+ return CORE_DOCUMENTATION_FILES.has(filePath)
130
+ || filePath.startsWith('docs/')
131
+ || filePath.startsWith('.agent-context/review-checklists/')
132
+ || filePath === '.agent-context/rules/api-docs.md'
133
+ || filePath === '.agent-context/rules/database-design.md';
134
+ }
135
+
136
+ function evaluateBoundary(boundaryRule, changedFiles, changedDocumentationFiles) {
137
+ const boundaryChangedFiles = changedFiles.filter((filePath) => boundaryRule.trigger(filePath));
138
+
139
+ if (boundaryChangedFiles.length === 0) {
140
+ return {
141
+ boundaryName: boundaryRule.boundaryName,
142
+ requirement: boundaryRule.requirement,
143
+ triggered: false,
144
+ passed: true,
145
+ changedFiles: [],
146
+ documentationFiles: [],
147
+ details: 'Boundary not triggered by changed scope.',
148
+ };
149
+ }
150
+
151
+ const matchingDocumentationFiles = changedDocumentationFiles.filter((filePath) => boundaryRule.docsMatcher(filePath));
152
+ const boundaryPassed = matchingDocumentationFiles.length > 0;
153
+
154
+ const details = boundaryPassed
155
+ ? `Boundary triggered and synchronized with documentation updates: ${matchingDocumentationFiles.join(', ')}`
156
+ : 'Boundary triggered without required documentation updates.';
157
+
158
+ return {
159
+ boundaryName: boundaryRule.boundaryName,
160
+ requirement: boundaryRule.requirement,
161
+ triggered: true,
162
+ passed: boundaryPassed,
163
+ changedFiles: boundaryChangedFiles,
164
+ documentationFiles: matchingDocumentationFiles,
165
+ details,
166
+ };
167
+ }
168
+
169
+ function runDocumentationBoundaryAudit() {
170
+ const changedScope = collectChangedFiles();
171
+ const changedFiles = changedScope.files;
172
+ const changedDocumentationFiles = changedFiles.filter(isDocumentationFilePath);
173
+
174
+ const boundaryResults = BOUNDARY_RULES.map((boundaryRule) => (
175
+ evaluateBoundary(boundaryRule, changedFiles, changedDocumentationFiles)
176
+ ));
177
+
178
+ const failures = boundaryResults
179
+ .filter((boundaryResult) => boundaryResult.triggered && !boundaryResult.passed)
180
+ .map((boundaryResult) => {
181
+ const affectedFiles = boundaryResult.changedFiles.join(', ');
182
+ return `${boundaryResult.boundaryName}: ${boundaryResult.requirement} Changed files: ${affectedFiles}`;
183
+ });
184
+
185
+ const reportPayload = {
186
+ generatedAt: new Date().toISOString(),
187
+ auditName: 'documentation-boundary-audit',
188
+ source: changedScope.source,
189
+ changedFileCount: changedFiles.length,
190
+ changedFiles,
191
+ boundaryResults,
192
+ passed: failures.length === 0,
193
+ failureCount: failures.length,
194
+ failures,
195
+ };
196
+
197
+ console.log(JSON.stringify(reportPayload, null, 2));
198
+ process.exit(reportPayload.passed ? 0 : 1);
199
+ }
200
+
201
+ runDocumentationBoundaryAudit();
@@ -30,6 +30,10 @@ const REQUIRED_SKILL_DOMAINS = [
30
30
  const FRONTEND_PARITY_CHECKLIST_PATH = '.agent-context/review-checklists/frontend-skill-parity.md';
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
+ const DOCUMENTATION_BOUNDARY_AUDIT_SCRIPT_PATH = 'scripts/documentation-boundary-audit.mjs';
34
+ const BACKEND_ARCHITECTURE_RULE_PATH = '.agent-context/rules/architecture.md';
35
+ const BACKEND_REVIEW_CHECKLIST_PATH = '.agent-context/review-checklists/pr-checklist.md';
36
+ const REFACTOR_PROMPT_PATH = '.agent-context/prompts/refactor.md';
33
37
  const REQUIRED_FRONTEND_PARITY_SNIPPETS = [
34
38
  'Architecture and Composition',
35
39
  'Interaction and Motion',
@@ -37,6 +41,21 @@ const REQUIRED_FRONTEND_PARITY_SNIPPETS = [
37
41
  'UX Narrative and Conversion Clarity',
38
42
  'Release Evidence',
39
43
  ];
44
+ const REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS = [
45
+ 'No clever hacks.',
46
+ 'No premature abstraction.',
47
+ 'Readability over brevity.',
48
+ 'backend and shared core modules',
49
+ ];
50
+ const REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS = [
51
+ 'No clever hacks in backend and shared core modules',
52
+ 'No premature abstraction (base classes/util layers created only after repeated stable patterns)',
53
+ 'Readability over brevity for maintainability',
54
+ ];
55
+ const REQUIRED_REFACTOR_PROMPT_SNIPPETS = [
56
+ 'Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.',
57
+ 'Prioritize maintainability over compressed one-liners.',
58
+ ];
40
59
  const REQUIRED_FRONTEND_EXCELLENCE_RUBRIC_SNIPPETS = [
41
60
  'Visual Direction and Identity',
42
61
  'Typography Quality',
@@ -253,6 +272,110 @@ function runReleaseGate() {
253
272
  );
254
273
  }
255
274
 
275
+ const backendArchitectureRuleContent = readText(BACKEND_ARCHITECTURE_RULE_PATH);
276
+ if (!backendArchitectureRuleContent) {
277
+ pushResult(results, false, 'backend-universal-principles-rule-exists', `Missing ${BACKEND_ARCHITECTURE_RULE_PATH}`);
278
+ } else {
279
+ pushResult(results, true, 'backend-universal-principles-rule-exists', `${BACKEND_ARCHITECTURE_RULE_PATH} is present`);
280
+
281
+ const missingBackendArchitectureRuleSnippets = REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS.filter(
282
+ (requiredSnippet) => !backendArchitectureRuleContent.includes(requiredSnippet)
283
+ );
284
+
285
+ if (missingBackendArchitectureRuleSnippets.length === 0) {
286
+ pushResult(results, true, 'backend-universal-principles-rule-coverage', 'Backend universal rule snippets are complete');
287
+ } else {
288
+ pushResult(
289
+ results,
290
+ false,
291
+ 'backend-universal-principles-rule-coverage',
292
+ `Missing backend universal rule snippets: ${missingBackendArchitectureRuleSnippets.join(', ')}`
293
+ );
294
+ }
295
+ }
296
+
297
+ const backendReviewChecklistContent = readText(BACKEND_REVIEW_CHECKLIST_PATH);
298
+ if (!backendReviewChecklistContent) {
299
+ pushResult(results, false, 'backend-universal-principles-checklist-exists', `Missing ${BACKEND_REVIEW_CHECKLIST_PATH}`);
300
+ } else {
301
+ pushResult(results, true, 'backend-universal-principles-checklist-exists', `${BACKEND_REVIEW_CHECKLIST_PATH} is present`);
302
+
303
+ const missingBackendChecklistSnippets = REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS.filter(
304
+ (requiredSnippet) => !backendReviewChecklistContent.includes(requiredSnippet)
305
+ );
306
+
307
+ if (missingBackendChecklistSnippets.length === 0) {
308
+ pushResult(results, true, 'backend-universal-principles-checklist-coverage', 'Backend review checklist snippets are complete');
309
+ } else {
310
+ pushResult(
311
+ results,
312
+ false,
313
+ 'backend-universal-principles-checklist-coverage',
314
+ `Missing backend review checklist snippets: ${missingBackendChecklistSnippets.join(', ')}`
315
+ );
316
+ }
317
+ }
318
+
319
+ const refactorPromptContent = readText(REFACTOR_PROMPT_PATH);
320
+ if (!refactorPromptContent) {
321
+ pushResult(results, false, 'backend-universal-principles-refactor-guidance-exists', `Missing ${REFACTOR_PROMPT_PATH}`);
322
+ } else {
323
+ pushResult(results, true, 'backend-universal-principles-refactor-guidance-exists', `${REFACTOR_PROMPT_PATH} is present`);
324
+
325
+ const missingRefactorPromptSnippets = REQUIRED_REFACTOR_PROMPT_SNIPPETS.filter(
326
+ (requiredSnippet) => !refactorPromptContent.includes(requiredSnippet)
327
+ );
328
+
329
+ if (missingRefactorPromptSnippets.length === 0) {
330
+ pushResult(results, true, 'backend-universal-principles-refactor-guidance-coverage', 'Backend refactor guidance snippets are complete');
331
+ } else {
332
+ pushResult(
333
+ results,
334
+ false,
335
+ 'backend-universal-principles-refactor-guidance-coverage',
336
+ `Missing backend refactor guidance snippets: ${missingRefactorPromptSnippets.join(', ')}`
337
+ );
338
+ }
339
+ }
340
+
341
+ const documentationBoundaryAuditExecution = runMachineReadableScript(DOCUMENTATION_BOUNDARY_AUDIT_SCRIPT_PATH);
342
+ if (!documentationBoundaryAuditExecution.report) {
343
+ const failureDetails = documentationBoundaryAuditExecution.executionErrorMessage
344
+ ? `Documentation boundary audit execution failed before producing a machine-readable report: ${documentationBoundaryAuditExecution.executionErrorMessage}`
345
+ : 'Documentation boundary audit did not produce machine-readable JSON output';
346
+ pushResult(results, false, 'documentation-boundary-audit', failureDetails);
347
+ } else {
348
+ diagnostics.documentationBoundaryAudit = documentationBoundaryAuditExecution.report;
349
+ pushResult(
350
+ results,
351
+ true,
352
+ 'documentation-boundary-audit',
353
+ `documentation-boundary-audit executed (passed=${documentationBoundaryAuditExecution.report.passed}, failures=${documentationBoundaryAuditExecution.report.failureCount})`
354
+ );
355
+
356
+ if (documentationBoundaryAuditExecution.report.passed === true) {
357
+ pushResult(
358
+ results,
359
+ true,
360
+ 'documentation-boundary-hard-rule',
361
+ 'Documentation hard-rule passed for all triggered boundaries'
362
+ );
363
+ } else {
364
+ const failedDocumentationBoundaries = Array.isArray(documentationBoundaryAuditExecution.report.failures)
365
+ ? documentationBoundaryAuditExecution.report.failures
366
+ : [];
367
+ const failureSummary = failedDocumentationBoundaries.length > 0
368
+ ? failedDocumentationBoundaries.join('; ')
369
+ : 'Documentation boundary audit failed without boundary failure details';
370
+ pushResult(
371
+ results,
372
+ false,
373
+ 'documentation-boundary-hard-rule',
374
+ `Documentation hard-rule failed: ${failureSummary}`
375
+ );
376
+ }
377
+ }
378
+
256
379
  const frontendParityChecklistContent = readText(FRONTEND_PARITY_CHECKLIST_PATH);
257
380
  if (!frontendParityChecklistContent) {
258
381
  pushResult(results, false, 'frontend-parity-checklist-exists', `Missing ${FRONTEND_PARITY_CHECKLIST_PATH}`);
@@ -171,6 +171,7 @@ async function validateRequiredFiles() {
171
171
  'scripts/governance-weekly-report.mjs',
172
172
  'scripts/mcp-server.mjs',
173
173
  'scripts/frontend-usability-audit.mjs',
174
+ 'scripts/documentation-boundary-audit.mjs',
174
175
  'scripts/release-gate.mjs',
175
176
  'scripts/generate-sbom.mjs',
176
177
  'scripts/init-project.sh',