@ryuenn3123/agentic-senior-core 2.5.9 → 2.5.11
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/refactor.md +6 -0
- package/.agent-context/review-checklists/architecture-review.md +6 -0
- package/.agent-context/review-checklists/frontend-excellence-rubric.md +9 -0
- package/.agent-context/review-checklists/pr-checklist.md +3 -0
- package/.agent-context/rules/architecture.md +10 -0
- package/.agent-context/rules/frontend-architecture.md +14 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.windsurfrules +1 -1
- package/package.json +1 -1
- package/scripts/frontend-usability-audit.mjs +17 -0
- package/scripts/release-gate.mjs +87 -0
|
@@ -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
|
```
|
|
@@ -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
|
|
@@ -43,6 +43,15 @@ Release recommendation:
|
|
|
43
43
|
- [ ] Error, empty, and loading states provide clear next actions.
|
|
44
44
|
- [ ] User journey avoids dead ends and hidden critical actions.
|
|
45
45
|
|
|
46
|
+
## 7. Template Diversity and Originality
|
|
47
|
+
- [ ] Output is not a copy of a generic starter template or repeated AI layout pattern.
|
|
48
|
+
- [ ] Layout composition shows intentional variation in structure and hierarchy.
|
|
49
|
+
- [ ] Visual intent, interaction quality, and conversion clarity are all explicitly reviewed together.
|
|
50
|
+
|
|
51
|
+
## Low-Diversity Template Output Policy
|
|
52
|
+
- If output is judged as low-diversity template output, release is blocked until layout direction is revised.
|
|
53
|
+
- Reviewer must record the failing dimensions and expected redesign direction before re-run.
|
|
54
|
+
|
|
46
55
|
## Benchmark Expectation
|
|
47
56
|
- Treat MiniMax frontend references as baseline, not target ceiling.
|
|
48
57
|
- Target visual and interaction quality aligned with top award-grade manual design workflows (Awwwards-level reference quality).
|
|
@@ -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)
|
|
@@ -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."**
|
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
> A complex UI is built from simple, mathematically robust functions. State is dangerous; isolate it.
|
|
4
4
|
|
|
5
|
+
## 0. Frontend Designer Mode (Auto Activation)
|
|
6
|
+
When the user request is UI-facing, frontend design governance activates automatically. No manual mode toggle is required.
|
|
7
|
+
|
|
8
|
+
UI scope trigger signals (any one is enough):
|
|
9
|
+
- keywords such as: ui, ux, page, screen, component, layout, landing, dashboard, form, onboarding, animation, interaction
|
|
10
|
+
- explicit requests to improve visual quality, conversion clarity, or interaction behavior
|
|
11
|
+
- feature requests that include frontend deliverables even when backend changes are also included
|
|
12
|
+
|
|
13
|
+
Mandatory behavior when triggered:
|
|
14
|
+
- apply frontend excellence rubric checks from `.agent-context/review-checklists/frontend-excellence-rubric.md`
|
|
15
|
+
- apply usability checks from `.agent-context/review-checklists/frontend-usability.md`
|
|
16
|
+
- score and review generated UI work against visual intent, interaction quality, and conversion clarity
|
|
17
|
+
- reject template-only repetitive outputs and force a distinct layout direction
|
|
18
|
+
|
|
5
19
|
## 1. File Structure (Feature-Driven Design)
|
|
6
20
|
Organize your application by feature domain, not by file type.
|
|
7
21
|
- **BANNED:** Monolithic directories like `/components` (with 500 files), `/hooks`, `/api`.
|
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.11
|
|
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.11
|
|
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
|
@@ -20,6 +20,7 @@ const REQUIRED_FILES = [
|
|
|
20
20
|
'docs/roadmap.md',
|
|
21
21
|
'docs/v1.7-issue-breakdown.md',
|
|
22
22
|
'docs/v1.7-execution-playbook.md',
|
|
23
|
+
'.agent-context/rules/frontend-architecture.md',
|
|
23
24
|
'.agent-context/review-checklists/frontend-usability.md',
|
|
24
25
|
'.agent-context/review-checklists/frontend-excellence-rubric.md',
|
|
25
26
|
];
|
|
@@ -43,9 +44,19 @@ const REQUIRED_EXCELLENCE_RUBRIC_SNIPPETS = [
|
|
|
43
44
|
'Typography Quality',
|
|
44
45
|
'Color System Diversity and Contrast',
|
|
45
46
|
'Interaction Choreography',
|
|
47
|
+
'UX Narrative and Conversion Clarity',
|
|
48
|
+
'Template Diversity and Originality',
|
|
49
|
+
'Low-Diversity Template Output Policy',
|
|
46
50
|
'Awwwards-level reference quality',
|
|
47
51
|
];
|
|
48
52
|
|
|
53
|
+
const REQUIRED_FRONTEND_RULE_SNIPPETS = [
|
|
54
|
+
'Frontend Designer Mode (Auto Activation)',
|
|
55
|
+
'UI scope trigger signals',
|
|
56
|
+
'visual intent, interaction quality, and conversion clarity',
|
|
57
|
+
'template-only repetitive outputs',
|
|
58
|
+
];
|
|
59
|
+
|
|
49
60
|
function assertFileExists(relativeFilePath, failures) {
|
|
50
61
|
const absoluteFilePath = resolve(REPOSITORY_ROOT, relativeFilePath);
|
|
51
62
|
if (!existsSync(absoluteFilePath)) {
|
|
@@ -69,6 +80,7 @@ function runAudit() {
|
|
|
69
80
|
}
|
|
70
81
|
|
|
71
82
|
const roadmapPath = 'docs/roadmap.md';
|
|
83
|
+
const frontendRulePath = '.agent-context/rules/frontend-architecture.md';
|
|
72
84
|
const checklistPath = '.agent-context/review-checklists/frontend-usability.md';
|
|
73
85
|
const excellenceRubricPath = '.agent-context/review-checklists/frontend-excellence-rubric.md';
|
|
74
86
|
|
|
@@ -82,6 +94,11 @@ function runAudit() {
|
|
|
82
94
|
assertContains('Checklist', checklistPath, checklistContent, REQUIRED_CHECKLIST_SNIPPETS, failures);
|
|
83
95
|
}
|
|
84
96
|
|
|
97
|
+
if (existsSync(resolve(REPOSITORY_ROOT, frontendRulePath))) {
|
|
98
|
+
const frontendRuleContent = readFileSync(resolve(REPOSITORY_ROOT, frontendRulePath), 'utf8');
|
|
99
|
+
assertContains('Frontend rule', frontendRulePath, frontendRuleContent, REQUIRED_FRONTEND_RULE_SNIPPETS, failures);
|
|
100
|
+
}
|
|
101
|
+
|
|
85
102
|
if (existsSync(resolve(REPOSITORY_ROOT, excellenceRubricPath))) {
|
|
86
103
|
const excellenceRubricContent = readFileSync(resolve(REPOSITORY_ROOT, excellenceRubricPath), 'utf8');
|
|
87
104
|
assertContains(
|
package/scripts/release-gate.mjs
CHANGED
|
@@ -30,6 +30,9 @@ 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 BACKEND_ARCHITECTURE_RULE_PATH = '.agent-context/rules/architecture.md';
|
|
34
|
+
const BACKEND_REVIEW_CHECKLIST_PATH = '.agent-context/review-checklists/pr-checklist.md';
|
|
35
|
+
const REFACTOR_PROMPT_PATH = '.agent-context/prompts/refactor.md';
|
|
33
36
|
const REQUIRED_FRONTEND_PARITY_SNIPPETS = [
|
|
34
37
|
'Architecture and Composition',
|
|
35
38
|
'Interaction and Motion',
|
|
@@ -37,11 +40,29 @@ const REQUIRED_FRONTEND_PARITY_SNIPPETS = [
|
|
|
37
40
|
'UX Narrative and Conversion Clarity',
|
|
38
41
|
'Release Evidence',
|
|
39
42
|
];
|
|
43
|
+
const REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS = [
|
|
44
|
+
'No clever hacks.',
|
|
45
|
+
'No premature abstraction.',
|
|
46
|
+
'Readability over brevity.',
|
|
47
|
+
'backend and shared core modules',
|
|
48
|
+
];
|
|
49
|
+
const REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS = [
|
|
50
|
+
'No clever hacks in backend and shared core modules',
|
|
51
|
+
'No premature abstraction (base classes/util layers created only after repeated stable patterns)',
|
|
52
|
+
'Readability over brevity for maintainability',
|
|
53
|
+
];
|
|
54
|
+
const REQUIRED_REFACTOR_PROMPT_SNIPPETS = [
|
|
55
|
+
'Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.',
|
|
56
|
+
'Prioritize maintainability over compressed one-liners.',
|
|
57
|
+
];
|
|
40
58
|
const REQUIRED_FRONTEND_EXCELLENCE_RUBRIC_SNIPPETS = [
|
|
41
59
|
'Visual Direction and Identity',
|
|
42
60
|
'Typography Quality',
|
|
43
61
|
'Color System Diversity and Contrast',
|
|
44
62
|
'Interaction Choreography',
|
|
63
|
+
'UX Narrative and Conversion Clarity',
|
|
64
|
+
'Template Diversity and Originality',
|
|
65
|
+
'Low-Diversity Template Output Policy',
|
|
45
66
|
'Awwwards-level reference quality',
|
|
46
67
|
];
|
|
47
68
|
const BENCHMARK_GATE_SCRIPT_PATH = 'scripts/benchmark-gate.mjs';
|
|
@@ -250,6 +271,72 @@ function runReleaseGate() {
|
|
|
250
271
|
);
|
|
251
272
|
}
|
|
252
273
|
|
|
274
|
+
const backendArchitectureRuleContent = readText(BACKEND_ARCHITECTURE_RULE_PATH);
|
|
275
|
+
if (!backendArchitectureRuleContent) {
|
|
276
|
+
pushResult(results, false, 'backend-universal-principles-rule-exists', `Missing ${BACKEND_ARCHITECTURE_RULE_PATH}`);
|
|
277
|
+
} else {
|
|
278
|
+
pushResult(results, true, 'backend-universal-principles-rule-exists', `${BACKEND_ARCHITECTURE_RULE_PATH} is present`);
|
|
279
|
+
|
|
280
|
+
const missingBackendArchitectureRuleSnippets = REQUIRED_BACKEND_ARCHITECTURE_RULE_SNIPPETS.filter(
|
|
281
|
+
(requiredSnippet) => !backendArchitectureRuleContent.includes(requiredSnippet)
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
if (missingBackendArchitectureRuleSnippets.length === 0) {
|
|
285
|
+
pushResult(results, true, 'backend-universal-principles-rule-coverage', 'Backend universal rule snippets are complete');
|
|
286
|
+
} else {
|
|
287
|
+
pushResult(
|
|
288
|
+
results,
|
|
289
|
+
false,
|
|
290
|
+
'backend-universal-principles-rule-coverage',
|
|
291
|
+
`Missing backend universal rule snippets: ${missingBackendArchitectureRuleSnippets.join(', ')}`
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
const backendReviewChecklistContent = readText(BACKEND_REVIEW_CHECKLIST_PATH);
|
|
297
|
+
if (!backendReviewChecklistContent) {
|
|
298
|
+
pushResult(results, false, 'backend-universal-principles-checklist-exists', `Missing ${BACKEND_REVIEW_CHECKLIST_PATH}`);
|
|
299
|
+
} else {
|
|
300
|
+
pushResult(results, true, 'backend-universal-principles-checklist-exists', `${BACKEND_REVIEW_CHECKLIST_PATH} is present`);
|
|
301
|
+
|
|
302
|
+
const missingBackendChecklistSnippets = REQUIRED_BACKEND_REVIEW_CHECKLIST_SNIPPETS.filter(
|
|
303
|
+
(requiredSnippet) => !backendReviewChecklistContent.includes(requiredSnippet)
|
|
304
|
+
);
|
|
305
|
+
|
|
306
|
+
if (missingBackendChecklistSnippets.length === 0) {
|
|
307
|
+
pushResult(results, true, 'backend-universal-principles-checklist-coverage', 'Backend review checklist snippets are complete');
|
|
308
|
+
} else {
|
|
309
|
+
pushResult(
|
|
310
|
+
results,
|
|
311
|
+
false,
|
|
312
|
+
'backend-universal-principles-checklist-coverage',
|
|
313
|
+
`Missing backend review checklist snippets: ${missingBackendChecklistSnippets.join(', ')}`
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
const refactorPromptContent = readText(REFACTOR_PROMPT_PATH);
|
|
319
|
+
if (!refactorPromptContent) {
|
|
320
|
+
pushResult(results, false, 'backend-universal-principles-refactor-guidance-exists', `Missing ${REFACTOR_PROMPT_PATH}`);
|
|
321
|
+
} else {
|
|
322
|
+
pushResult(results, true, 'backend-universal-principles-refactor-guidance-exists', `${REFACTOR_PROMPT_PATH} is present`);
|
|
323
|
+
|
|
324
|
+
const missingRefactorPromptSnippets = REQUIRED_REFACTOR_PROMPT_SNIPPETS.filter(
|
|
325
|
+
(requiredSnippet) => !refactorPromptContent.includes(requiredSnippet)
|
|
326
|
+
);
|
|
327
|
+
|
|
328
|
+
if (missingRefactorPromptSnippets.length === 0) {
|
|
329
|
+
pushResult(results, true, 'backend-universal-principles-refactor-guidance-coverage', 'Backend refactor guidance snippets are complete');
|
|
330
|
+
} else {
|
|
331
|
+
pushResult(
|
|
332
|
+
results,
|
|
333
|
+
false,
|
|
334
|
+
'backend-universal-principles-refactor-guidance-coverage',
|
|
335
|
+
`Missing backend refactor guidance snippets: ${missingRefactorPromptSnippets.join(', ')}`
|
|
336
|
+
);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
253
340
|
const frontendParityChecklistContent = readText(FRONTEND_PARITY_CHECKLIST_PATH);
|
|
254
341
|
if (!frontendParityChecklistContent) {
|
|
255
342
|
pushResult(results, false, 'frontend-parity-checklist-exists', `Missing ${FRONTEND_PARITY_CHECKLIST_PATH}`);
|