@ryuenn3123/agentic-senior-core 3.0.15 → 3.0.17

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.
Files changed (39) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +43 -18
  2. package/.agent-context/rules/architecture.md +13 -0
  3. package/.agent-context/rules/frontend-architecture.md +26 -0
  4. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  5. package/.agent-context/state/onboarding-report.json +0 -1
  6. package/.cursorrules +66 -29
  7. package/.gemini/instructions.md +7 -1
  8. package/.github/copilot-instructions.md +7 -1
  9. package/.instructions.md +3 -0
  10. package/.windsurfrules +66 -29
  11. package/AGENTS.md +13 -1
  12. package/lib/cli/architect.mjs +71 -784
  13. package/lib/cli/commands/init.mjs +30 -100
  14. package/lib/cli/commands/optimize.mjs +0 -4
  15. package/lib/cli/commands/upgrade.mjs +2 -5
  16. package/lib/cli/compiler.mjs +1 -11
  17. package/lib/cli/constants.mjs +3 -73
  18. package/lib/cli/detector/design-evidence.mjs +427 -0
  19. package/lib/cli/detector.mjs +13 -116
  20. package/lib/cli/init-options.mjs +0 -118
  21. package/lib/cli/memory-continuity.mjs +2 -1
  22. package/lib/cli/project-scaffolder/constants.mjs +68 -0
  23. package/lib/cli/project-scaffolder/design-contract.mjs +857 -0
  24. package/lib/cli/project-scaffolder/discovery.mjs +315 -0
  25. package/lib/cli/project-scaffolder/prompt-builders.mjs +213 -0
  26. package/lib/cli/project-scaffolder/storage.mjs +154 -0
  27. package/lib/cli/project-scaffolder.mjs +32 -1210
  28. package/lib/cli/utils.mjs +2 -11
  29. package/package.json +1 -1
  30. package/scripts/documentation-boundary-audit.mjs +5 -2
  31. package/scripts/frontend-usability-audit.mjs +76 -0
  32. package/scripts/release-gate.mjs +22 -0
  33. package/scripts/sync-thin-adapters.mjs +24 -0
  34. package/scripts/ui-design-judge.mjs +365 -7
  35. package/scripts/validate/config.mjs +446 -0
  36. package/scripts/validate/coverage-checks.mjs +429 -0
  37. package/scripts/validate.mjs +44 -854
  38. package/lib/cli/init-architecture-flow.mjs +0 -233
  39. package/lib/cli/profile-packs.mjs +0 -108
@@ -17,18 +17,26 @@ The agent must:
17
17
  1. Read [AGENTS.md](../../AGENTS.md) for project context and team roles.
18
18
  2. Read [frontend-architecture.md](../rules/frontend-architecture.md) and apply its UI consistency guardrails.
19
19
  3. Use repository evidence from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), existing UI code, product copy, route names, component names, and any existing `docs/*` project docs to infer architecture and product background.
20
- 4. When analyzing an existing UI codebase, inspect low-cost evidence such as hardcoded color density, prop-drilling candidates, and breakpoint chaos before declaring the current design direction healthy.
21
- 5. If [docs/DESIGN.md](../../docs/DESIGN.md) or `docs/design-intent.json` already exists, check for drift and improve them instead of rewriting blindly.
22
- 6. If context is incomplete, write explicit assumptions and reversible design bets instead of defaulting to generic SaaS output.
23
- 7. Explore multiple plausible design directions internally, then commit to one cohesive direction with clear rationale tied to the product context and at least one memorable signature move.
24
- 8. Treat any example structure or stylistic inspiration as non-normative. Use it only to judge depth and clarity, never to copy a visual language directly.
25
- 9. All references to docs or rules must be clickable markdown links.
26
- 10. Responsive work must adapt layout, navigation, density, and task order across viewports. Shrinking desktop layouts is not enough.
27
- 11. Motion can be bold, cinematic, or highly expressive when it improves memorability, hierarchy, feedback, or perceived product quality. Do not flatten everything into static screens. Optimize motion first, and only reject it when it harms clarity, accessibility, or runtime performance.
28
- 12. Define how core components morph across interaction states and viewports. Component quality is not only visual styling; it includes behavior under hover, focus, active, loading, error, and constrained layouts.
29
- 13. Do not reuse a color palette, component skin, or motion signature from prior chats, memories, or unrelated projects unless current repo evidence or the active brand brief explicitly asks for that continuity.
30
- 14. Treat prior website memory, old portfolio styles, and remembered screenshots as tainted context unless the user explicitly asks to continue or evolve that specific visual system.
31
- 15. Do not default to balanced card grids, soft startup gradients, safe centered heroes, or neutral dashboard chrome unless the product context explicitly justifies them.
20
+ 4. If `repoEvidence.designEvidenceSummary` exists, treat it as the machine-readable snapshot of the current visual system, token bypasses, and UI surface inventory before proposing a new direction.
21
+ 5. When analyzing an existing UI codebase, inspect low-cost evidence such as hardcoded color density, prop-drilling candidates, breakpoint chaos, CSS variable patterns, and component surface inventory before declaring the current design direction healthy.
22
+ 6. If [docs/DESIGN.md](../../docs/DESIGN.md) or `docs/design-intent.json` already exists, check for drift and improve them instead of rewriting blindly.
23
+ 7. If context is incomplete, write explicit assumptions and reversible design bets instead of defaulting to generic SaaS output.
24
+ 8. Explore multiple plausible design directions internally, then commit to one cohesive direction with clear rationale tied to the product context and at least one memorable signature move.
25
+ 9. Treat any example structure or stylistic inspiration as non-normative. Use it only to judge depth and clarity, never to copy a visual language directly.
26
+ 10. All references to docs or rules must be clickable markdown links.
27
+ 11. Responsive work must adapt layout, navigation, density, and task order across viewports. Shrinking desktop layouts is not enough.
28
+ 12. Motion can be bold, cinematic, or highly expressive when it improves memorability, hierarchy, feedback, or perceived product quality. Do not flatten everything into static screens. Optimize motion first, and only reject it when it harms clarity, accessibility, or runtime performance.
29
+ 13. Define how core components morph across interaction states and viewports. Component quality is not only visual styling; it includes behavior under hover, focus, active, loading, error, and constrained layouts.
30
+ 14. Do not reuse a color palette, component skin, or motion signature from prior chats, memories, or unrelated projects unless current repo evidence or the active brand brief explicitly asks for that continuity.
31
+ 15. Treat prior website memory, old portfolio styles, and remembered screenshots as tainted context unless the user explicitly asks to continue or evolve that specific visual system.
32
+ 16. Do not default to balanced card grids, soft startup gradients, safe centered heroes, or neutral dashboard chrome unless the product context explicitly justifies them.
33
+ 17. For design work, only these count as valid style context by default: current repo evidence, the current user brief, current project docs, and explicitly approved reference systems.
34
+ 18. Design continuity is opt-in. If the user does not explicitly ask for continuity with an older system, prefer fresh synthesis from the current repo and brief.
35
+ 19. Accessibility must be split into a hard compliance floor and an advisory readability layer. Use WCAG 2.2 AA as the blocking baseline, and use APCA only as advisory perceptual tuning. APCA must never waive a WCAG failure.
36
+ 20. Accessibility planning must cover more than color contrast. It must explicitly address focus visibility, focus appearance, target size, keyboard access, accessible authentication, and dynamic state/status access.
37
+ 21. Hybrid visual QA must stay deterministic-first. Define screenshot baseline expectations, dynamic-content masking rules, stability thresholds, viewport coverage, and long-page capture strategy before escalating any visual drift to a semantic judge.
38
+ 22. Do not assume one screenshot is enough for a long page. Require above-fold capture, full-page capture when stable, and anchor-based section or tiled-scroll captures when deep content would otherwise be missed.
39
+ 23. Deterministic visual QA must distinguish rendering noise from meaningful layout or styling drift. If a semantic judge is used later, it should only review diffs that already exceeded the deterministic threshold or lost required coverage.
32
40
 
33
41
  Required `docs/DESIGN.md` sections:
34
42
  1. Design Intent and Product Personality
@@ -37,12 +45,14 @@ Required `docs/DESIGN.md` sections:
37
45
  4. Color Science and Semantic Roles
38
46
  5. Typographic Engineering and Hierarchy
39
47
  6. Spacing, Layout Rhythm, and Density Strategy
40
- 7. Responsive Strategy and Cross-Viewport Adaptation Matrix
41
- 8. Interaction, Motion, and Feedback Rules
42
- 9. Component Language, Morphology, and Shared Patterns
43
- 10. Accessibility Non-Negotiables
44
- 11. Anti-Patterns to Avoid
45
- 12. Implementation Notes for Future UI Tasks
48
+ 7. Token Architecture and Alias Strategy
49
+ 8. Responsive Strategy and Cross-Viewport Adaptation Matrix
50
+ 9. Interaction, Motion, and Feedback Rules
51
+ 10. Component Language, Morphology, and Shared Patterns
52
+ 11. Context Hygiene and Approved Reference Boundaries
53
+ 12. Accessibility Non-Negotiables
54
+ 13. Anti-Patterns to Avoid
55
+ 14. Implementation Notes for Future UI Tasks
46
56
 
47
57
  Required `docs/design-intent.json` fields:
48
58
  - `mode`
@@ -53,26 +63,41 @@ Required `docs/design-intent.json` fields:
53
63
  - `antiAdjectives`
54
64
  - `visualDirection`
55
65
  - `mathSystems`
66
+ - `tokenSystem`
56
67
  - `colorTruth`
57
68
  - `crossViewportAdaptation`
58
69
  - `motionSystem`
59
70
  - `componentMorphology`
71
+ - `accessibilityPolicy`
72
+ - `visualQaPolicy`
73
+ - `contextHygiene`
60
74
  - `experiencePrinciples`
61
75
  - `forbiddenPatterns`
62
76
  - `validationHints`
63
77
  - `requiredDesignSections`
64
78
  - `implementation`
79
+ - `repoEvidence` when onboarding or detector evidence exists
65
80
 
66
81
  Output:
67
82
  - Create or update both `docs/DESIGN.md` and `docs/design-intent.json`.
68
83
  - Keep both files synchronized: the markdown explains the why, the JSON captures the contract in machine-readable form.
84
+ - `docs/design-intent.json` must define a real token system, not just loose style notes. Include primitive, semantic, and component layers plus aliasing rules and naming constraints.
69
85
  - `docs/design-intent.json` must include deterministic fields for `colorTruth.format`, `colorTruth.allowHexDerivatives`, and `crossViewportAdaptation.mutationRules.mobile/tablet/desktop`.
70
86
  - `docs/design-intent.json` must also include `motionSystem` and `componentMorphology` so future UI work preserves state behavior and purposeful motion without collapsing into generic static output.
87
+ - `docs/design-intent.json` must also include `accessibilityPolicy` so the hard compliance floor, advisory contrast model, and blocking-vs-advisory checks stay machine-readable.
88
+ - `docs/design-intent.json` must also include `visualQaPolicy` so deterministic screenshot expectations, masking rules, viewport coverage, long-page capture strategy, stability thresholds, and semantic-escalation boundaries stay machine-readable.
89
+ - `docs/design-intent.json` must include `contextHygiene` so valid design sources, tainted carryover sources, and continuity rules are machine-readable.
90
+ - If onboarding or detector evidence exists, preserve it under `repoEvidence.designEvidenceSummary` instead of throwing away the machine-readable snapshot of the current UI system.
91
+ - Token intent must stay structure-first: primitive tokens hold raw values, semantic tokens carry purpose, and component tokens consume semantic tokens instead of bypassing them with raw values.
71
92
  - Color intent must be defined in a perceptual or relational color model first. Hex values may appear only as implementation derivatives.
72
93
  - The contract must encode viewport mutation rules, not just breakpoint names.
73
94
  - Motion guidance must preserve creativity: allow meaningful animation, define reduced-motion behavior, and optimize choreography instead of suppressing it by default.
95
+ - Accessibility guidance must split hard compliance from advisory tuning: treat WCAG 2.2 AA as the minimum blocking floor and APCA as advisory perceptual guidance for readability nuance, especially in typography and dark mode.
96
+ - Accessibility scope must include focus visibility, focus appearance, target size, accessible authentication, keyboard access, use-of-color-only failures, and dynamic status/state access.
97
+ - Visual QA guidance must define deterministic-first screenshot review, noise thresholds, dynamic masking categories, mobile/tablet/desktop coverage, long-page capture strategy, and when semantic review is allowed to intervene.
74
98
  - Color direction must come from the current project context. Similarity to prior unrelated projects is drift unless the brief or repo evidence explicitly supports it.
75
99
  - If no approved reference system exists, synthesize the design from zero using current product context, constraints, and content only.
100
+ - Explicitly record which sources are allowed to shape the visual language and which sources are tainted unless the user opts into continuity.
76
101
  - The resulting system should feel authored and recognizable in screenshots, not politely interchangeable with common template kits.
77
102
  - Use practical, modern, accessible language grounded in the project, not generic SaaS defaults or copycat brand systems.
78
103
  - Wait for user approval before generating Figma or code assets.
@@ -167,6 +167,19 @@ If these triggers don't exist, microservices are **premature complexity**.
167
167
 
168
168
  ## Project Structure: Feature-Based Grouping
169
169
 
170
+ ## Code Organization and File Size Discipline
171
+
172
+ Keep modules small enough to understand in one focused read.
173
+
174
+ - Prefer grouping by responsibility, not by convenience.
175
+ - One folder should represent one clear area of responsibility.
176
+ - Split discovery, validation, prompt building, persistence, and contract logic into separate modules when they grow.
177
+ - Avoid mixed-purpose mega-files that combine constants, parsing, orchestration, validation, and I/O in one place.
178
+ - Treat files above roughly 1000 lines as a refactor trigger, not a badge of completeness.
179
+ - If a file grows past that threshold, extract stable submodules with clear names before adding more behavior.
180
+ - Preserve one public entrypoint when it helps callers, but move the real implementation behind focused modules.
181
+ - Tests may aggregate scenarios, but shared helpers and repeated setup should move into dedicated support files when the suite becomes hard to scan.
182
+
170
183
  ### ❌ BANNED: Technical Grouping
171
184
  ```
172
185
  src/
@@ -17,6 +17,32 @@ Mandatory behavior when triggered:
17
17
  - reject template-only repetitive outputs and force a distinct layout direction
18
18
  - treat prior website memory or old-project visual carryover as invalid evidence unless the user explicitly requests continuity with that exact system
19
19
  - do not flatten ambitious visual or motion ideas by default; keep them when they are optimized, intentional, and accessible
20
+ - let current repo evidence, the active brief, current project docs, and explicitly approved reference systems outrank remembered style residue every time
21
+
22
+ ## Context Hygiene and Reference Boundaries (Mandatory)
23
+
24
+ - Valid visual-context sources are limited to the current repo evidence, the current user brief, current project docs, and explicitly approved reference systems.
25
+ - Design continuity is opt-in. If the user does not request continuity with a prior visual system, synthesize from the current project context instead.
26
+ - Old project screenshots, remembered website styles, and cross-chat visual residue are tainted context unless the user explicitly authorizes them.
27
+ - When repo evidence and memory residue conflict, repo evidence wins.
28
+ - If a reference system is approved, adapt its reasoning and constraints. Do not copy its surface 1:1.
29
+
30
+ ## Accessibility Split (Mandatory)
31
+
32
+ - Treat WCAG 2.2 AA as the hard compliance floor for release-blocking accessibility issues.
33
+ - Treat APCA as an advisory readability model for perceptual tuning, especially for typography, dark mode, and nuanced contrast review.
34
+ - Advisory APCA findings must never waive a WCAG hard failure.
35
+ - Hard accessibility checks must cover more than contrast alone. They must include focus visibility, focus appearance, target size, keyboard access, use-of-color-only failures, accessible authentication, and status or dynamic state access.
36
+ - Keep accessibility compatible with expressive design. Fix the violation without flattening the interface into generic low-risk layouts unless that is the only safe option.
37
+
38
+ ## Hybrid Visual QA Boundaries (Mandatory)
39
+
40
+ - Visual QA must be deterministic-first. Run screenshot or pixel-diff style checks before escalating to any semantic judge.
41
+ - Treat dynamic masking as explicit policy, not ad hoc cleanup. Time, randomized content, live counters, streaming media, and other unstable regions must be masked deliberately and documented.
42
+ - Define stability thresholds so the system can separate tiny rendering noise from meaningful layout or styling drift.
43
+ - Required visual coverage must include mobile, tablet, and desktop unless the product scope explicitly excludes one of those surfaces.
44
+ - Escalate to semantic review only when deterministic evidence shows meaningful drift, missing required viewport coverage, or another contract-critical visual failure.
45
+ - Do not use semantic review to invent aesthetic problems when deterministic evidence says the surface is stable.
20
46
 
21
47
  ## UI Consistency Guardrails (Mandatory)
22
48
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-21T16:44:50.356Z",
2
+ "generatedAt": "2026-04-22T23:58:57.575Z",
3
3
  "reportName": "memory-continuity-benchmark",
4
4
  "schemaVersion": "1.0.0",
5
5
  "passed": true,
@@ -3,7 +3,6 @@
3
3
  "generatedAt": "2026-04-18T00:00:00.000Z",
4
4
  "operationMode": "upgrade",
5
5
  "selectedProfile": "beginner",
6
- "selectedProfilePack": null,
7
6
  "selectedStack": "typescript.md",
8
7
  "selectedAdditionalStacks": [],
9
8
  "selectedBlueprint": "api-nextjs.md",
package/.cursorrules CHANGED
@@ -1,49 +1,86 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.15
4
- Timestamp: 2026-04-18T00:00:00.000Z
5
- Selected profile: beginner
3
+ Generated by Agentic-Senior-Core CLI v3.0.17
4
+ Timestamp: 2026-04-22T12:30:18.799Z
6
5
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
7
6
 
8
7
  ## GOVERNANCE PRECEDENCE
9
8
  1. Follow this compiled rulebook as the primary source.
10
9
  2. Resolve exceptions from .agent-override.md only when explicitly defined.
11
10
  3. Use architecture-map.md and dependency-map.md as change safety boundaries.
12
- 4. Enforce pr-checklist.md and architecture-review.md before declaring completion.
11
+ 4. Enforce pr-checklist.md before declaring completion.
12
+
13
+ ## OVERRIDE PROTOCOL
14
+ - Default: strict compliance with this file.
15
+ - Exception path: .agent-override.md may explicitly allow narrow deviations.
16
+ - Scope policy: every override must include module scope, rationale, and expiry date.
13
17
 
14
18
  ## BOOTSTRAP CHAIN (MANDATORY)
15
19
  Load every layer before responding. Do not skip steps:
16
20
  1. .agent-context/rules/
17
- 2. Dynamic stack strategy signals from project context and live evidence.
18
- 3. Dynamic architecture playbook signals from requirements and repository state.
19
- 4. .agent-context/prompts/
20
- 5. .agent-context/review-checklists/
21
- 6. .agent-context/state/
22
- 7. .agent-context/policies/llm-judge-threshold.json
23
- 8. docs/ project context (or bootstrap prompts when docs are not materialized)
21
+ 2. Resolve architecture and stack signals from project context and live evidence.
22
+ 3. .agent-context/prompts/
23
+ 4. Dynamic architecture and stack signals (from project context + research evidence)
24
+ 5. .agent-context/state/
25
+ 6. .agent-context/policies/llm-judge-threshold.json
26
+ 7. docs/ project context (or bootstrap prompts when docs are not materialized)
24
27
 
25
- Primary entrypoint: .cursorrules
26
- Mirror entrypoint: .windsurfrules
28
+ Project-specific compiled snapshot: .agent-instructions.md
29
+ Compiled adapter entrypoints: .cursorrules, .windsurfrules, .clauderc, .gemini/instructions.md, .github/copilot-instructions.md
27
30
  Canonical baseline: .instructions.md
28
-
29
31
  ## LAYER 1: UNIVERSAL RULES (MANDATORY)
30
- Read every file under .agent-context/rules/ before implementation.
31
- Conflict resolution: prioritize data safety and API contract integrity first, then writing polish.
32
-
33
- ## LAYER 2 POLICY: DYNAMIC STACK STRATEGY
34
- Resolve stack guidance lazily from project evidence. Do not depend on deleted static stack directories.
35
-
36
- ## LAYER 3 POLICY: DYNAMIC ARCHITECTURE PLAYBOOKS
37
- Resolve architecture guidance lazily from project docs and task boundaries. Do not depend on deleted static blueprint directories.
38
-
39
- ## STATE AWARENESS (MANDATORY)
40
- Load .agent-context/state/architecture-map.md and .agent-context/state/dependency-map.md before touching critical paths.
32
+ Read every file under .agent-context/rules/ before implementation:
33
+ 1. .agent-context/rules/api-docs.md
34
+ 2. .agent-context/rules/architecture.md
35
+ 3. .agent-context/rules/database-design.md
36
+ 4. .agent-context/rules/docker-runtime.md
37
+ 5. .agent-context/rules/efficiency-vs-hype.md
38
+ 6. .agent-context/rules/error-handling.md
39
+ 7. .agent-context/rules/event-driven.md
40
+ 8. .agent-context/rules/frontend-architecture.md
41
+ 9. .agent-context/rules/git-workflow.md
42
+ 10. .agent-context/rules/microservices.md
43
+ 11. .agent-context/rules/naming-conv.md
44
+ 12. .agent-context/rules/performance.md
45
+ 13. .agent-context/rules/realtime.md
46
+ 14. .agent-context/rules/security.md
47
+ 15. .agent-context/rules/testing.md
41
48
 
49
+ Conflict resolution: prioritize data safety and API contract integrity first, then writing polish.
50
+ ## LAYER 2: STACK PROFILE (typescript.md)
51
+ Source: dynamic-research-signal (static stack profile file not required)
52
+ Summary: Dynamic stack strategy signal for typescript.
53
+ Load this stack profile to enforce language-specific conventions.
54
+ ## LAYER 2 POLICY: LAZY RULE LOADING
55
+ Primary stack strategy is always loaded for this project: typescript.md (dynamic mode)
56
+ Additional stack profiles load only when explicitly selected or detected.
57
+ Load stack guidance only when task scope touches that stack.
58
+ Avoid eager loading unrelated stack profiles to prevent instruction conflicts.
59
+ ## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS
60
+ Load these prompt contracts only when their trigger matches the user request:
61
+ 1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold
62
+ 2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix
63
+ 3. .agent-context/prompts/review-code.md -> review, audit, check, analyze
64
+ 4. .agent-context/prompts/bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign
65
+ UI trigger policy:
66
+ - Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.
67
+ - Keep UI-only requests context-isolated and do not eagerly load backend-only rules such as database-design.md, docker-runtime.md, or microservices.md unless the task explicitly crosses those boundaries.
68
+ - For UI scope, materialize docs/DESIGN.md and docs/design-intent.json before implementing UI surfaces.
69
+ ## LAYER 3: BLUEPRINT PROFILE (api-nextjs.md)
70
+ Source: dynamic-research-signal (static blueprint profile file not required)
71
+ Summary: Dynamic architecture strategy signal for api nextjs.
72
+ Load this blueprint when scaffolding or changing architecture boundaries.
73
+ ## LAYER 3B: CI/CD GUARDRAILS
74
+ Load these CI blueprints when pipeline or release logic is touched:
75
+ 1. ci-github-actions.md (dynamic CI policy signal)
76
+ 2. ci-gitlab.md (dynamic CI policy signal)
77
+ ## LAYER 7: STATE AWARENESS (MANDATORY)
78
+ Load these files before touching critical paths:
79
+ 1. .agent-context/state/architecture-map.md
80
+ 2. .agent-context/state/dependency-map.md
81
+ Use these maps to prevent unsafe cross-module changes.
42
82
  ## REVIEW CHECKLISTS (MANDATORY)
43
83
  1. .agent-context/review-checklists/pr-checklist.md
44
84
  2. .agent-context/review-checklists/architecture-review.md
85
+ Security and performance checks are consolidated inside these two checklist files.
45
86
  Do not claim done before checklist pass.
46
-
47
- ## UNIVERSAL SOP HARD GATES
48
- - Stop coding if docs/architecture-decision-record.md (or docs/Architecture-Decision-Record.md) is missing.
49
- - For UI scope, stop coding if docs/DESIGN.md or docs/design-intent.json is missing.
@@ -2,10 +2,16 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
5
+ Canonical Snapshot SHA256: ee64f53171dcf88e10c6f6aae98d75cc541e13880255f0e519fc82736a4af5f4
6
6
 
7
7
  Canonical policy source: [.instructions.md](../.instructions.md).
8
8
 
9
+ If your host stops at this file, follow this minimum floor:
10
+ - Read `.agent-instructions.md` next when it exists.
11
+ - For UI or redesign requests, load [.agent-context/prompts/bootstrap-design.md](../.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](../.agent-context/rules/frontend-architecture.md) before coding.
12
+ - If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
13
+ - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
14
+
9
15
  ## Bootstrap Sequence
10
16
 
11
17
  1. Load [.instructions.md](../.instructions.md) first as the canonical baseline.
@@ -2,10 +2,16 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
5
+ Canonical Snapshot SHA256: ee64f53171dcf88e10c6f6aae98d75cc541e13880255f0e519fc82736a4af5f4
6
6
 
7
7
  The canonical policy source for this repository is [.instructions.md](../.instructions.md).
8
8
 
9
+ If your host stops at this file, follow this minimum floor:
10
+ - Read `.agent-instructions.md` next when it exists.
11
+ - For UI or redesign requests, load [.agent-context/prompts/bootstrap-design.md](../.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](../.agent-context/rules/frontend-architecture.md) before coding.
12
+ - If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
13
+ - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
14
+
9
15
  ## Required Load Order
10
16
 
11
17
  1. Read [.instructions.md](../.instructions.md) first as the canonical baseline.
package/.instructions.md CHANGED
@@ -134,6 +134,9 @@ Meta-prompts that provide complete workflows for common scenarios:
134
134
 
135
135
  **What to do**: When user request matches a trigger, load the full prompt to understand the workflow.
136
136
  For UI-only requests, keep context isolated: load `bootstrap-design.md` and `frontend-architecture.md` first, and do not eagerly load unrelated backend-only rules such as `database-design.md`, `docker-runtime.md`, or `microservices.md` unless the request explicitly crosses those boundaries.
137
+ For design work, treat only the current repo evidence, the current brief, current project docs, and explicitly approved reference systems as valid style context. Do not let prior-chat or unrelated-project visual memory steer the result unless the user explicitly asks for continuity.
138
+ For accessibility in UI work, treat WCAG 2.2 AA as the hard compliance floor and APCA as advisory perceptual tuning only.
139
+ For visual QA in UI work, treat deterministic screenshot or diff evidence as the first layer, then escalate only meaningful visual drift to a semantic judge.
137
140
 
138
141
  ---
139
142
 
package/.windsurfrules CHANGED
@@ -1,49 +1,86 @@
1
1
  # AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
2
2
 
3
- Generated by Agentic-Senior-Core CLI v3.0.15
4
- Timestamp: 2026-04-18T00:00:00.000Z
5
- Selected profile: beginner
3
+ Generated by Agentic-Senior-Core CLI v3.0.17
4
+ Timestamp: 2026-04-22T12:30:18.799Z
6
5
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
7
6
 
8
7
  ## GOVERNANCE PRECEDENCE
9
8
  1. Follow this compiled rulebook as the primary source.
10
9
  2. Resolve exceptions from .agent-override.md only when explicitly defined.
11
10
  3. Use architecture-map.md and dependency-map.md as change safety boundaries.
12
- 4. Enforce pr-checklist.md and architecture-review.md before declaring completion.
11
+ 4. Enforce pr-checklist.md before declaring completion.
12
+
13
+ ## OVERRIDE PROTOCOL
14
+ - Default: strict compliance with this file.
15
+ - Exception path: .agent-override.md may explicitly allow narrow deviations.
16
+ - Scope policy: every override must include module scope, rationale, and expiry date.
13
17
 
14
18
  ## BOOTSTRAP CHAIN (MANDATORY)
15
19
  Load every layer before responding. Do not skip steps:
16
20
  1. .agent-context/rules/
17
- 2. Dynamic stack strategy signals from project context and live evidence.
18
- 3. Dynamic architecture playbook signals from requirements and repository state.
19
- 4. .agent-context/prompts/
20
- 5. .agent-context/review-checklists/
21
- 6. .agent-context/state/
22
- 7. .agent-context/policies/llm-judge-threshold.json
23
- 8. docs/ project context (or bootstrap prompts when docs are not materialized)
21
+ 2. Resolve architecture and stack signals from project context and live evidence.
22
+ 3. .agent-context/prompts/
23
+ 4. Dynamic architecture and stack signals (from project context + research evidence)
24
+ 5. .agent-context/state/
25
+ 6. .agent-context/policies/llm-judge-threshold.json
26
+ 7. docs/ project context (or bootstrap prompts when docs are not materialized)
24
27
 
25
- Primary entrypoint: .cursorrules
26
- Mirror entrypoint: .windsurfrules
28
+ Project-specific compiled snapshot: .agent-instructions.md
29
+ Compiled adapter entrypoints: .cursorrules, .windsurfrules, .clauderc, .gemini/instructions.md, .github/copilot-instructions.md
27
30
  Canonical baseline: .instructions.md
28
-
29
31
  ## LAYER 1: UNIVERSAL RULES (MANDATORY)
30
- Read every file under .agent-context/rules/ before implementation.
31
- Conflict resolution: prioritize data safety and API contract integrity first, then writing polish.
32
-
33
- ## LAYER 2 POLICY: DYNAMIC STACK STRATEGY
34
- Resolve stack guidance lazily from project evidence. Do not depend on deleted static stack directories.
35
-
36
- ## LAYER 3 POLICY: DYNAMIC ARCHITECTURE PLAYBOOKS
37
- Resolve architecture guidance lazily from project docs and task boundaries. Do not depend on deleted static blueprint directories.
38
-
39
- ## STATE AWARENESS (MANDATORY)
40
- Load .agent-context/state/architecture-map.md and .agent-context/state/dependency-map.md before touching critical paths.
32
+ Read every file under .agent-context/rules/ before implementation:
33
+ 1. .agent-context/rules/api-docs.md
34
+ 2. .agent-context/rules/architecture.md
35
+ 3. .agent-context/rules/database-design.md
36
+ 4. .agent-context/rules/docker-runtime.md
37
+ 5. .agent-context/rules/efficiency-vs-hype.md
38
+ 6. .agent-context/rules/error-handling.md
39
+ 7. .agent-context/rules/event-driven.md
40
+ 8. .agent-context/rules/frontend-architecture.md
41
+ 9. .agent-context/rules/git-workflow.md
42
+ 10. .agent-context/rules/microservices.md
43
+ 11. .agent-context/rules/naming-conv.md
44
+ 12. .agent-context/rules/performance.md
45
+ 13. .agent-context/rules/realtime.md
46
+ 14. .agent-context/rules/security.md
47
+ 15. .agent-context/rules/testing.md
41
48
 
49
+ Conflict resolution: prioritize data safety and API contract integrity first, then writing polish.
50
+ ## LAYER 2: STACK PROFILE (typescript.md)
51
+ Source: dynamic-research-signal (static stack profile file not required)
52
+ Summary: Dynamic stack strategy signal for typescript.
53
+ Load this stack profile to enforce language-specific conventions.
54
+ ## LAYER 2 POLICY: LAZY RULE LOADING
55
+ Primary stack strategy is always loaded for this project: typescript.md (dynamic mode)
56
+ Additional stack profiles load only when explicitly selected or detected.
57
+ Load stack guidance only when task scope touches that stack.
58
+ Avoid eager loading unrelated stack profiles to prevent instruction conflicts.
59
+ ## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS
60
+ Load these prompt contracts only when their trigger matches the user request:
61
+ 1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold
62
+ 2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix
63
+ 3. .agent-context/prompts/review-code.md -> review, audit, check, analyze
64
+ 4. .agent-context/prompts/bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign
65
+ UI trigger policy:
66
+ - Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.
67
+ - Keep UI-only requests context-isolated and do not eagerly load backend-only rules such as database-design.md, docker-runtime.md, or microservices.md unless the task explicitly crosses those boundaries.
68
+ - For UI scope, materialize docs/DESIGN.md and docs/design-intent.json before implementing UI surfaces.
69
+ ## LAYER 3: BLUEPRINT PROFILE (api-nextjs.md)
70
+ Source: dynamic-research-signal (static blueprint profile file not required)
71
+ Summary: Dynamic architecture strategy signal for api nextjs.
72
+ Load this blueprint when scaffolding or changing architecture boundaries.
73
+ ## LAYER 3B: CI/CD GUARDRAILS
74
+ Load these CI blueprints when pipeline or release logic is touched:
75
+ 1. ci-github-actions.md (dynamic CI policy signal)
76
+ 2. ci-gitlab.md (dynamic CI policy signal)
77
+ ## LAYER 7: STATE AWARENESS (MANDATORY)
78
+ Load these files before touching critical paths:
79
+ 1. .agent-context/state/architecture-map.md
80
+ 2. .agent-context/state/dependency-map.md
81
+ Use these maps to prevent unsafe cross-module changes.
42
82
  ## REVIEW CHECKLISTS (MANDATORY)
43
83
  1. .agent-context/review-checklists/pr-checklist.md
44
84
  2. .agent-context/review-checklists/architecture-review.md
85
+ Security and performance checks are consolidated inside these two checklist files.
45
86
  Do not claim done before checklist pass.
46
-
47
- ## UNIVERSAL SOP HARD GATES
48
- - Stop coding if docs/architecture-decision-record.md (or docs/Architecture-Decision-Record.md) is missing.
49
- - For UI scope, stop coding if docs/DESIGN.md or docs/design-intent.json is missing.
package/AGENTS.md CHANGED
@@ -2,11 +2,23 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
5
+ Canonical Snapshot SHA256: ee64f53171dcf88e10c6f6aae98d75cc541e13880255f0e519fc82736a4af5f4
6
6
 
7
7
  This file is an adapter entrypoint for agent discovery.
8
8
  The canonical policy source is [.instructions.md](.instructions.md).
9
9
 
10
+ If your host stops at this file instead of following the full chain, obey the Critical Bootstrap Floor below before coding.
11
+
12
+ ## Critical Bootstrap Floor
13
+
14
+ - If `.agent-instructions.md` exists, prefer it immediately after this file because it is the compiled project-specific snapshot.
15
+ - Memory continuity does not replace bootstrap loading. It is host-dependent project memory, not a guarantee that instructions were reloaded for this session.
16
+ - For UI, UX, layout, screen, tailwind, frontend, or redesign requests: load [.agent-context/prompts/bootstrap-design.md](.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](.agent-context/rules/frontend-architecture.md) before editing code.
17
+ - For UI scope: if `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize or refine them before implementing UI changes.
18
+ - For refactor, improve, clean up, or fix requests: inspect the active rules and propose a plan before editing.
19
+ - For new project or module requests: propose architecture before generating code.
20
+ - For ecosystem, framework, dependency, or Docker claims: perform live web research instead of relying on stale local heuristics.
21
+
10
22
  ## Mandatory Bootstrap Chain
11
23
 
12
24
  1. Load [.instructions.md](.instructions.md) first as the canonical baseline.