@ryuenn3123/agentic-senior-core 3.0.14 → 3.0.16
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/bootstrap-design.md +30 -16
- package/.agent-context/prompts/init-project.md +4 -0
- package/.agent-context/rules/architecture.md +13 -0
- package/.agent-context/rules/docker-runtime.md +12 -0
- package/.agent-context/rules/efficiency-vs-hype.md +17 -6
- package/.agent-context/rules/frontend-architecture.md +5 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.agent-context/state/onboarding-report.json +0 -1
- package/.cursorrules +66 -29
- package/.gemini/instructions.md +1 -1
- package/.github/copilot-instructions.md +1 -1
- package/.instructions.md +4 -3
- package/.windsurfrules +66 -29
- package/AGENTS.md +1 -1
- package/lib/cli/architect.mjs +71 -784
- package/lib/cli/commands/init.mjs +32 -98
- package/lib/cli/commands/optimize.mjs +0 -4
- package/lib/cli/commands/upgrade.mjs +2 -5
- package/lib/cli/compiler.mjs +3 -11
- package/lib/cli/constants.mjs +3 -73
- package/lib/cli/detector/design-evidence.mjs +427 -0
- package/lib/cli/detector.mjs +13 -116
- package/lib/cli/init-options.mjs +0 -118
- package/lib/cli/project-scaffolder/constants.mjs +67 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +554 -0
- package/lib/cli/project-scaffolder/discovery.mjs +315 -0
- package/lib/cli/project-scaffolder/prompt-builders.mjs +196 -0
- package/lib/cli/project-scaffolder/storage.mjs +154 -0
- package/lib/cli/project-scaffolder.mjs +32 -1160
- package/lib/cli/utils.mjs +2 -11
- package/package.json +1 -1
- package/scripts/frontend-usability-audit.mjs +53 -0
- package/scripts/validate/config.mjs +401 -0
- package/scripts/validate/coverage-checks.mjs +429 -0
- package/scripts/validate.mjs +44 -754
- package/lib/cli/init-architecture-flow.mjs +0 -233
- package/lib/cli/profile-packs.mjs +0 -108
|
@@ -11,20 +11,25 @@ UI Design Mode is context-isolated by default:
|
|
|
11
11
|
- Load [AGENTS.md](../../AGENTS.md), [frontend-architecture.md](../rules/frontend-architecture.md), this prompt, UI-relevant state files, current UI code, and existing design docs first.
|
|
12
12
|
- Do not eagerly load backend-only rules such as [database-design.md](../rules/database-design.md), [docker-runtime.md](../rules/docker-runtime.md), or [microservices.md](../rules/microservices.md) unless the task explicitly crosses those boundaries.
|
|
13
13
|
- Treat UI consistency, accessibility, and cross-viewport adaptation as first-class constraints, not cosmetic afterthoughts.
|
|
14
|
+
- Start the visual language from the current project context, not from prior website references or remembered layouts from earlier chats.
|
|
14
15
|
|
|
15
16
|
The agent must:
|
|
16
17
|
1. Read [AGENTS.md](../../AGENTS.md) for project context and team roles.
|
|
17
18
|
2. Read [frontend-architecture.md](../rules/frontend-architecture.md) and apply its UI consistency guardrails.
|
|
18
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.
|
|
19
|
-
4.
|
|
20
|
-
5.
|
|
21
|
-
6. If
|
|
22
|
-
7.
|
|
23
|
-
8.
|
|
24
|
-
9.
|
|
25
|
-
10.
|
|
26
|
-
11.
|
|
27
|
-
12.
|
|
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.
|
|
28
33
|
|
|
29
34
|
Required `docs/DESIGN.md` sections:
|
|
30
35
|
1. Design Intent and Product Personality
|
|
@@ -33,12 +38,13 @@ Required `docs/DESIGN.md` sections:
|
|
|
33
38
|
4. Color Science and Semantic Roles
|
|
34
39
|
5. Typographic Engineering and Hierarchy
|
|
35
40
|
6. Spacing, Layout Rhythm, and Density Strategy
|
|
36
|
-
7.
|
|
37
|
-
8.
|
|
38
|
-
9.
|
|
39
|
-
10.
|
|
40
|
-
11.
|
|
41
|
-
12.
|
|
41
|
+
7. Token Architecture and Alias Strategy
|
|
42
|
+
8. Responsive Strategy and Cross-Viewport Adaptation Matrix
|
|
43
|
+
9. Interaction, Motion, and Feedback Rules
|
|
44
|
+
10. Component Language, Morphology, and Shared Patterns
|
|
45
|
+
11. Accessibility Non-Negotiables
|
|
46
|
+
12. Anti-Patterns to Avoid
|
|
47
|
+
13. Implementation Notes for Future UI Tasks
|
|
42
48
|
|
|
43
49
|
Required `docs/design-intent.json` fields:
|
|
44
50
|
- `mode`
|
|
@@ -49,6 +55,7 @@ Required `docs/design-intent.json` fields:
|
|
|
49
55
|
- `antiAdjectives`
|
|
50
56
|
- `visualDirection`
|
|
51
57
|
- `mathSystems`
|
|
58
|
+
- `tokenSystem`
|
|
52
59
|
- `colorTruth`
|
|
53
60
|
- `crossViewportAdaptation`
|
|
54
61
|
- `motionSystem`
|
|
@@ -58,14 +65,21 @@ Required `docs/design-intent.json` fields:
|
|
|
58
65
|
- `validationHints`
|
|
59
66
|
- `requiredDesignSections`
|
|
60
67
|
- `implementation`
|
|
68
|
+
- `repoEvidence` when onboarding or detector evidence exists
|
|
61
69
|
|
|
62
70
|
Output:
|
|
63
71
|
- Create or update both `docs/DESIGN.md` and `docs/design-intent.json`.
|
|
64
72
|
- Keep both files synchronized: the markdown explains the why, the JSON captures the contract in machine-readable form.
|
|
73
|
+
- `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.
|
|
65
74
|
- `docs/design-intent.json` must include deterministic fields for `colorTruth.format`, `colorTruth.allowHexDerivatives`, and `crossViewportAdaptation.mutationRules.mobile/tablet/desktop`.
|
|
66
75
|
- `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.
|
|
76
|
+
- If onboarding or detector evidence exists, preserve it under `repoEvidence.designEvidenceSummary` instead of throwing away the machine-readable snapshot of the current UI system.
|
|
77
|
+
- 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.
|
|
67
78
|
- Color intent must be defined in a perceptual or relational color model first. Hex values may appear only as implementation derivatives.
|
|
68
79
|
- The contract must encode viewport mutation rules, not just breakpoint names.
|
|
69
|
-
- Motion guidance must preserve creativity: allow meaningful animation, define reduced-motion behavior, and
|
|
80
|
+
- Motion guidance must preserve creativity: allow meaningful animation, define reduced-motion behavior, and optimize choreography instead of suppressing it by default.
|
|
81
|
+
- 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.
|
|
82
|
+
- If no approved reference system exists, synthesize the design from zero using current product context, constraints, and content only.
|
|
83
|
+
- The resulting system should feel authored and recognizable in screenshots, not politely interchangeable with common template kits.
|
|
70
84
|
- Use practical, modern, accessible language grounded in the project, not generic SaaS defaults or copycat brand systems.
|
|
71
85
|
- Wait for user approval before generating Figma or code assets.
|
|
@@ -9,6 +9,8 @@ When a new project is created or initialized, the agent should automatically:
|
|
|
9
9
|
1. Read [AGENTS.md](../../AGENTS.md) to understand available roles and knowledge base.
|
|
10
10
|
2. Scan all files in [.agent-context/rules/](../rules/) for mandatory engineering standards.
|
|
11
11
|
3. Review dynamic stack and architecture signals from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [.agent-context/state/stack-research-snapshot.json](../state/stack-research-snapshot.json), available stack and blueprint sources, and task constraints.
|
|
12
|
+
4. If Docker or Compose is in scope, load [docker-runtime.md](../rules/docker-runtime.md) and verify the latest official Docker guidance before authoring container assets. Prefer latest stable compatible images, dependencies, and Compose syntax first; only step down after documenting why.
|
|
13
|
+
5. For framework or package setup, prefer the latest stable compatible dependency set and official framework setup flow first. Only pin older versions after documenting the exact compatibility reason.
|
|
12
14
|
|
|
13
15
|
## Architect Mode (Recommended)
|
|
14
16
|
If the user describes a project or feature, the agent should:
|
|
@@ -32,6 +34,8 @@ If the user specifies a framework/blueprint, the agent should:
|
|
|
32
34
|
- Every file must follow [naming conventions](../rules/naming-conv.md)
|
|
33
35
|
- Every module must follow [architecture.md](../rules/architecture.md)
|
|
34
36
|
- Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficiency-vs-hype.md)
|
|
37
|
+
- Prefer official framework setup commands or canonical starter flows when they produce newer, better-supported dependency defaults than manual package assembly
|
|
38
|
+
- If containerization is selected, Docker assets must follow [docker-runtime.md](../rules/docker-runtime.md) and the latest official Docker docs instead of stale blog-era patterns.
|
|
35
39
|
|
|
36
40
|
## Stacks & Blueprints Reference
|
|
37
41
|
See [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [.cursorrules](../../.cursorrules), and [.windsurfrules](../../.windsurfrules) for the latest shipped stack and blueprint context.
|
|
@@ -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/
|
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Use this rule when Docker is enabled in project context.
|
|
4
4
|
|
|
5
|
+
## 0. Latest Official Docker Guidance First
|
|
6
|
+
- Before generating or changing Dockerfiles, Compose files, or container runbooks, verify the latest official Docker documentation first.
|
|
7
|
+
- Prefer official Docker sources such as [Docker Compose Quickstart](https://docs.docker.com/compose/gettingstarted/), [Compose file reference](https://docs.docker.com/reference/compose-file/), and [Dockerfile best practices](https://docs.docker.com/build/building/best-practices/).
|
|
8
|
+
- Prefer current `docker compose` workflows and `compose.yaml`. Do not default to legacy `docker-compose` commands or stale file naming unless backward compatibility is a stated project requirement.
|
|
9
|
+
- Do not add the top-level Compose `version` field by default. The current Compose reference treats it as obsolete. Use it only when a compatibility requirement is explicit and documented.
|
|
10
|
+
- Prefer the latest stable compatible Docker base image, package-manager flow, and Compose syntax first. If the latest compatible path fails, step down intentionally and document the exact reason for the fallback.
|
|
11
|
+
|
|
5
12
|
## 1. Dynamic Generation Only
|
|
6
13
|
- Do not copy generic Docker templates blindly.
|
|
7
14
|
- Generate Docker assets based on actual stack, package manager, and runtime dependencies in the repository.
|
|
8
15
|
- Re-evaluate Docker instructions when dependencies, build tools, or runtime assumptions change.
|
|
16
|
+
- Prefer the latest stable compatible dependency line first. If an older dependency or base image must be pinned, explain the runtime or compatibility constraint that forced it.
|
|
9
17
|
|
|
10
18
|
## 2. Separate Development and Production Lanes
|
|
11
19
|
- Development lane and production lane are separate concerns.
|
|
@@ -17,13 +25,17 @@ Use this rule when Docker is enabled in project context.
|
|
|
17
25
|
- Use multi-stage builds for production images when possible.
|
|
18
26
|
- Avoid baking secrets into image layers.
|
|
19
27
|
- Keep runtime image free from build-only tooling.
|
|
28
|
+
- Prefer fresh base-image validation with `docker build --pull` and use `--no-cache` when a clean dependency refresh is required.
|
|
29
|
+
- Keep a `.dockerignore` strategy in mind so build contexts stay small and do not leak unnecessary files into the image.
|
|
20
30
|
|
|
21
31
|
## 4. Operational Clarity
|
|
22
32
|
- Docker instructions must document expected entrypoint and exposed ports.
|
|
23
33
|
- Local development command and production deployment command must be explicit.
|
|
24
34
|
- If Docker is not selected for the project, do not force containerization tasks.
|
|
35
|
+
- If Compose is used, document which file is the primary entrypoint, which services are dev-only versus production-facing, and why the chosen layout matches the current Docker docs rather than a legacy blog pattern.
|
|
25
36
|
|
|
26
37
|
## 5. Review Requirements
|
|
27
38
|
- Verify the generated Docker workflow matches selected runtime environment (Linux/WSL, Windows, macOS).
|
|
28
39
|
- Verify development and production instructions are not mixed into one unsafe image path.
|
|
29
40
|
- Ensure API and service health checks are compatible with container startup behavior.
|
|
41
|
+
- When Docker choices depend on official docs or release behavior, cite the Docker source and verification date in the generated docs or explanation so the next update can refresh them safely.
|
|
@@ -3,6 +3,13 @@
|
|
|
3
3
|
> Every dependency is a liability. Every `npm install` is a trust decision.
|
|
4
4
|
> The best dependency is the one you don't need.
|
|
5
5
|
|
|
6
|
+
## Latest-Compatible-First Rule
|
|
7
|
+
|
|
8
|
+
- Start from the latest stable compatible dependency version, not an outdated tutorial version.
|
|
9
|
+
- If the framework has an official scaffolder or setup command that produces current defaults, prefer that path over manually assembling stale `package.json` entries one by one.
|
|
10
|
+
- Only step down to an older dependency version after documenting the exact compatibility, runtime, platform, or ecosystem reason.
|
|
11
|
+
- Treat release notes, official docs, and framework migration guides as the primary source of truth for dependency setup.
|
|
12
|
+
|
|
6
13
|
## The Dependency Decision Framework
|
|
7
14
|
|
|
8
15
|
Before adding ANY dependency, answer these 5 questions:
|
|
@@ -21,7 +28,7 @@ const padded = str.padStart(10, '0');
|
|
|
21
28
|
const flat = nested.flat(Infinity);
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
**Dependency Defense:** If the user asks to install a new library, or if you feel the need to use one, evaluate it against the "stdlib-first" rule. If the functionality can be implemented safely in under 20 lines of code, write it yourself. If a dependency is strictly necessary, you MUST justify it by providing its bundle size, maintenance status,
|
|
31
|
+
**Dependency Defense:** If the user asks to install a new library, or if you feel the need to use one, evaluate it against the "stdlib-first" rule. If the functionality can be implemented safely in under 20 lines of code, write it yourself. If a dependency is strictly necessary, you MUST justify it by providing its bundle size, maintenance status, why the standard library is insufficient, and why the chosen version is the latest stable compatible option.
|
|
25
32
|
|
|
26
33
|
### 2. Is It Maintained? (The Pulse Check)
|
|
27
34
|
| Signal | 🟢 Healthy | 🔴 Dead |
|
|
@@ -94,19 +101,23 @@ Purpose: [what it does in 1 sentence]
|
|
|
94
101
|
Stdlib Alternative: [why it's insufficient — or "none"]
|
|
95
102
|
Bundle Size: [minified + gzipped]
|
|
96
103
|
Maintenance: [last release date, maintainer count]
|
|
104
|
+
Version Source: [official docs, release notes, or framework reference]
|
|
97
105
|
Lock-in Risk: [low/medium/high — how many files would it touch]
|
|
98
106
|
Exit Strategy: [how to remove it if needed]
|
|
107
|
+
Fallback Reason: [only required when not using the latest stable compatible version]
|
|
99
108
|
```
|
|
100
109
|
|
|
101
110
|
---
|
|
102
111
|
|
|
103
112
|
## Dependency Update Strategy
|
|
104
113
|
|
|
105
|
-
1. **
|
|
106
|
-
2. **
|
|
107
|
-
3. **
|
|
108
|
-
4. **
|
|
109
|
-
5. **
|
|
114
|
+
1. **Start from latest stable compatible versions** — older versions need a written reason
|
|
115
|
+
2. **Prefer official framework setup flows** when they yield newer, canonical dependency sets
|
|
116
|
+
3. **Pin exact versions** in lockfiles (already default with package-lock.json, bun.lockb)
|
|
117
|
+
4. **Review changelogs** before major updates — never blindly `npm update`
|
|
118
|
+
5. **Update in isolation** — one dependency per PR, with tests passing
|
|
119
|
+
6. **Security patches immediately** — don't wait for the sprint
|
|
120
|
+
7. **Monthly audit** — run `npm audit` / `bun audit` and address findings
|
|
110
121
|
|
|
111
122
|
---
|
|
112
123
|
|
|
@@ -15,6 +15,8 @@ Mandatory behavior when triggered:
|
|
|
15
15
|
- apply structural checks from `.agent-context/review-checklists/architecture-review.md`
|
|
16
16
|
- score and review generated UI work against visual intent, interaction quality, and conversion clarity
|
|
17
17
|
- reject template-only repetitive outputs and force a distinct layout direction
|
|
18
|
+
- treat prior website memory or old-project visual carryover as invalid evidence unless the user explicitly requests continuity with that exact system
|
|
19
|
+
- do not flatten ambitious visual or motion ideas by default; keep them when they are optimized, intentional, and accessible
|
|
18
20
|
|
|
19
21
|
## UI Consistency Guardrails (Mandatory)
|
|
20
22
|
|
|
@@ -23,6 +25,9 @@ Mandatory behavior when triggered:
|
|
|
23
25
|
- Layout must avoid overlap, clipped text, and misaligned key actions across breakpoints.
|
|
24
26
|
- Responsive quality requires layout mutation and task reprioritization across breakpoints. Shrinking the desktop layout is not enough.
|
|
25
27
|
- Keep spacing and positioning token-driven so repeated outputs stay stable.
|
|
28
|
+
- Distinctive visual direction is allowed. Originality is a quality signal when hierarchy, task clarity, and accessibility still hold.
|
|
29
|
+
- Motion is allowed to be expressive. Judge it by clarity, reduced-motion safety, and rendering cost, not by how restrained it looks.
|
|
30
|
+
- Prefer transform and opacity for rich motion. Treat layout-thrashing animation, uncontrolled autoplay, and heavy continuous effects as optimization problems to solve, not reasons to remove personality from the UI entirely.
|
|
26
31
|
|
|
27
32
|
## 1. File Structure (Feature-Driven Design)
|
|
28
33
|
Organize your application by feature domain, not by file type.
|
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.
|
|
4
|
-
Timestamp: 2026-04-
|
|
5
|
-
Selected profile: beginner
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.16
|
|
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
|
|
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.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5. .agent-context/
|
|
21
|
-
6. .agent-context/
|
|
22
|
-
7.
|
|
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
|
-
|
|
26
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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/.gemini/instructions.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
|
|
6
6
|
|
|
7
7
|
Canonical policy source: [.instructions.md](../.instructions.md).
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
|
|
6
6
|
|
|
7
7
|
The canonical policy source for this repository is [.instructions.md](../.instructions.md).
|
|
8
8
|
|
package/.instructions.md
CHANGED
|
@@ -16,7 +16,7 @@ You use clear, plain language in formal artifacts and do not use emoji.
|
|
|
16
16
|
|
|
17
17
|
Before responding to ANY request, ensure you have loaded ALL of these layers:
|
|
18
18
|
|
|
19
|
-
### Layer 1: Rules (
|
|
19
|
+
### Layer 1: Rules (15 Files) [REQUIRED]
|
|
20
20
|
|
|
21
21
|
**Location**: `.agent-context/rules/`
|
|
22
22
|
|
|
@@ -29,15 +29,16 @@ Universal engineering standards that OVERRIDE everything else:
|
|
|
29
29
|
- `error-handling.md` — Never swallow errors, use typed error codes
|
|
30
30
|
- `testing.md` — Test pyramid, behavior over implementation
|
|
31
31
|
- `git-workflow.md` — Conventional Commits, atomic changes
|
|
32
|
-
- `efficiency-vs-hype.md` —
|
|
32
|
+
- `efficiency-vs-hype.md` — Latest-compatible, stable deps over trendy ones
|
|
33
33
|
- `api-docs.md` — OpenAPI 3.1 mandatory
|
|
34
34
|
- `microservices.md` — Monolith first, strangler fig pattern
|
|
35
35
|
- `event-driven.md` — Event sourcing, CQRS, idempotency
|
|
36
36
|
- `database-design.md` — 3NF default, safe migrations
|
|
37
37
|
- `realtime.md` — WebSocket scaling, strict pub/sub
|
|
38
38
|
- `frontend-architecture.md` — Smart/Dumb UI patterns
|
|
39
|
+
- `docker-runtime.md` - Latest-docs-first Dockerfile and Compose generation
|
|
39
40
|
|
|
40
|
-
**What to do**: Read `.agent-context/rules/` before generating code. Every line you write must comply.
|
|
41
|
+
**What to do**: Read `.agent-context/rules/` before generating code. Every line you write must comply. For Docker or Compose work, load `docker-runtime.md` and verify the latest official Docker docs before authoring container assets. For framework or package setup work, prefer the latest stable compatible dependency set and official setup flow before falling back to older manual versions.
|
|
41
42
|
|
|
42
43
|
---
|
|
43
44
|
|
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.
|
|
4
|
-
Timestamp: 2026-04-
|
|
5
|
-
Selected profile: beginner
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.16
|
|
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
|
|
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.
|
|
18
|
-
3.
|
|
19
|
-
4.
|
|
20
|
-
5. .agent-context/
|
|
21
|
-
6. .agent-context/
|
|
22
|
-
7.
|
|
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
|
-
|
|
26
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
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,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 060b739f87a77375f261a13c3b2b295993ba67b4172420c4223ba1332d47b0a3
|
|
6
6
|
|
|
7
7
|
This file is an adapter entrypoint for agent discovery.
|
|
8
8
|
The canonical policy source is [.instructions.md](.instructions.md).
|