@ryuenn3123/agentic-senior-core 3.0.32 → 3.0.34
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 +2 -0
- package/.agent-context/prompts/init-project.md +9 -0
- package/.agent-context/review-checklists/pr-checklist.md +3 -0
- package/.agent-context/rules/api-docs.md +4 -0
- package/.agent-context/rules/frontend-architecture.md +9 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +10 -5
- package/.gemini/instructions.md +3 -1
- package/.github/copilot-instructions.md +3 -1
- package/.instructions.md +28 -8
- package/.windsurfrules +10 -5
- package/AGENTS.md +3 -1
- package/lib/cli/compiler.mjs +6 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +10 -1
- package/package.json +1 -1
- package/scripts/sync-thin-adapters.mjs +6 -0
- package/scripts/validate/config.mjs +32 -0
- package/scripts/validate/coverage-checks.mjs +20 -0
|
@@ -18,6 +18,7 @@ The agent must:
|
|
|
18
18
|
5. Treat prior-chat visuals, unrelated project memory, benchmark screenshots, and famous-product aesthetics as tainted context unless the user explicitly asks for continuity.
|
|
19
19
|
6. When choosing a new UI, animation, styling, or component library, research current official docs and choose the latest stable compatible option for this project. Do not rely on offline defaults.
|
|
20
20
|
7. Keep external references non-copying: extract constraints and reasoning only, never clone the surface.
|
|
21
|
+
8. Record a Motion/Palette Decision before UI implementation; product categories are heuristics, not style presets, so override them with task, content density, brand intent, device/performance, and accessibility evidence.
|
|
21
22
|
|
|
22
23
|
## Creative Commitment Gate
|
|
23
24
|
|
|
@@ -144,6 +145,7 @@ For every UI task, define how major surfaces change across mobile, tablet, and d
|
|
|
144
145
|
The JSON must stay machine-readable and project-specific. It should record:
|
|
145
146
|
- the confirmed project context and assumptions to validate
|
|
146
147
|
- agent-chosen visual direction, not scaffold-chosen direction
|
|
148
|
+
- `motionPaletteDecision` with motion density source, required interaction states, palette autopilot risk, and whether 3D/canvas is useful or unnecessary
|
|
147
149
|
- `conceptualAnchor` and how typography, spacing, morphology, motion, and responsive composition derive from it when no external research was provided
|
|
148
150
|
- `derivedTokenLogic` with exact `anchorReference` traceability for color, spacing, typography, and motion tokens
|
|
149
151
|
- `libraryResearchStatus` plus `libraryDecisions[]` with verified source metadata or explicit native/project-local fallbacks
|
|
@@ -20,6 +20,15 @@ If the user describes a project or feature, the agent must:
|
|
|
20
20
|
4. Draft a high-level structure plan plus the docs/bootstrap artifacts that must exist before coding.
|
|
21
21
|
5. Wait for user approval before scaffolding the project.
|
|
22
22
|
|
|
23
|
+
## Documentation-First Requests
|
|
24
|
+
|
|
25
|
+
If the user asks to create, complete, fix, or review project docs, documentation, dokumen, `docs/*`, architecture docs, flow docs, API docs, or "lengkapkan docs", treat the request as documentation-first.
|
|
26
|
+
|
|
27
|
+
The agent must:
|
|
28
|
+
1. Materialize or refine required project docs before implementation: `docs/project-brief.md`, `docs/architecture-decision-record.md`, `docs/flow-overview.md`, `docs/api-contract.md` when APIs, firmware endpoints, CLI commands, or web application flows exist, `docs/database-schema.md` when persistent data exists, and `docs/DESIGN.md` plus `docs/design-intent.json` for UI scope.
|
|
29
|
+
2. Write formal project docs in English by default unless the user explicitly asks for another documentation language.
|
|
30
|
+
3. Stop after docs when the user only asked for docs. Do not write application, firmware, or UI code until the user explicitly asks for implementation or approves the implementation plan.
|
|
31
|
+
|
|
23
32
|
## Direct Constraint Mode
|
|
24
33
|
|
|
25
34
|
If the user specifies a framework, runtime, or architecture constraint, the agent must:
|
|
@@ -60,6 +60,8 @@ Run this before declaring a task done. Apply only the sections relevant to the c
|
|
|
60
60
|
- [ ] Scope applied: This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations
|
|
61
61
|
- [ ] Style scope review is advisory and does not block merge when API docs are synced in the same commit and contract details are correct
|
|
62
62
|
- [ ] Required docs exist before implementation: project brief, architecture decision, flow overview, API/public contract when relevant, data model when relevant, and UI design contract when relevant.
|
|
63
|
+
- [ ] For docs-only or docs-first requests, implementation code was not changed unless the user explicitly asked for it or approved an implementation plan.
|
|
64
|
+
- [ ] Formal project docs use English by default unless the user requested another language or existing docs established one.
|
|
63
65
|
- [ ] Docs cover feature plan, architecture rationale, public contracts, data model, UI/design, security assumptions, testing strategy, delivery flow, and next validation actions where relevant.
|
|
64
66
|
- [ ] API, event, CLI, library, data, and UI contract changes update docs in the same scope.
|
|
65
67
|
- [ ] Public surface changes fail review if documentation updates are missing or stale in the same scope
|
|
@@ -72,6 +74,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
|
|
|
72
74
|
|
|
73
75
|
- [ ] UI work follows `docs/DESIGN.md` and `docs/design-intent.json`.
|
|
74
76
|
- [ ] Visual direction is project-specific and not a template/default component-kit habit.
|
|
77
|
+
- [ ] UI work includes a Motion/Palette Decision, and product categories were treated as heuristics rather than style presets.
|
|
75
78
|
- [ ] Responsive behavior recomposes content and priority, not only shrinking desktop layout.
|
|
76
79
|
- [ ] Accessibility hard requirements are preserved: keyboard access, focus visibility, contrast, target size, status feedback, and no color-only meaning.
|
|
77
80
|
- [ ] Motion is treated as part of the design language for modern UI work, with reduced-motion and performance safeguards instead of defaulting to static screens.
|
|
@@ -24,6 +24,10 @@ If a change affects an API, CLI command, exported library behavior, schema, even
|
|
|
24
24
|
This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations.
|
|
25
25
|
API docs and README updates are included in this scope.
|
|
26
26
|
|
|
27
|
+
### Language Default
|
|
28
|
+
|
|
29
|
+
Write formal project docs in English by default, even when the user prompt is in another language. Use another documentation language only when the user explicitly asks for it or when existing project docs already establish that language.
|
|
30
|
+
|
|
27
31
|
### Style Baseline
|
|
28
32
|
|
|
29
33
|
1. Write for native English speakers.
|
|
@@ -69,6 +69,15 @@ Do not use this file to teach generic frontend basics the model already knows.
|
|
|
69
69
|
- If live research is unavailable, mark `libraryResearchStatus` as `pending-verification`, record the library as `LIBRARY_TO_VERIFY`, and use native CSS, browser APIs, or already-present project dependencies until verification is possible.
|
|
70
70
|
- Each `libraryDecisions[]` entry must have either verification metadata or a concrete `fallbackIfUnavailable`.
|
|
71
71
|
|
|
72
|
+
## Contextual Motion and Palette Intelligence
|
|
73
|
+
|
|
74
|
+
- Product categories are heuristics, not style presets. Use them only as a starting signal, then choose motion density from user task, content density, brand intent, device/performance budget, and accessibility needs.
|
|
75
|
+
- If the category is unclear, infer from the dominant task: reading, scanning, form completion, data comparison, product inspection, storytelling, learning, play, or spatial exploration.
|
|
76
|
+
- For interactive UI, map the required states before coding: default, hover, focus-visible, active/pressed, disabled, loading, empty, error, success, and transition.
|
|
77
|
+
- Do not default to dark slate, cream/beige/tan, purple-blue gradients, monochrome palettes, or uniform card surfaces unless current project evidence supports them. If one of those palettes is used, document why it fits and add enough role contrast that the UI does not read as a template.
|
|
78
|
+
- Use the existing motion stack first. Add animation, 3D, canvas, or scroll dependencies only when they materially improve delivery speed, interaction quality, maintainability, or product understanding.
|
|
79
|
+
- Motion should be absent only for a named reason: repeated high-frequency workflow, long-form reading focus, data-density scanning, reduced-motion need, or performance constraint.
|
|
80
|
+
|
|
72
81
|
## Spatial and 3D Experience Boundary
|
|
73
82
|
|
|
74
83
|
- 3D, WebGL, canvas, and immersive spatial interfaces are allowed as the primary experience when they clarify the product, strengthen the chosen anchor, or make exploration meaningfully better than a flat UI.
|
package/.cursorrules
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
4
|
-
Timestamp: 2026-04-
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.34
|
|
4
|
+
Timestamp: 2026-04-26T23:31:29.580Z
|
|
5
5
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
|
6
6
|
|
|
7
7
|
## GOVERNANCE PRECEDENCE
|
|
@@ -54,15 +54,20 @@ For an existing project, inspect repo markers and current files directly before
|
|
|
54
54
|
Do not silently choose a stack from offline defaults.
|
|
55
55
|
## LAYER 2 POLICY: LAZY RULE LOADING
|
|
56
56
|
Primary runtime constraint: unresolved until agent recommendation is approved
|
|
57
|
-
|
|
58
|
-
Load
|
|
59
|
-
Avoid eager loading unrelated runtime guidance to prevent instruction conflicts.
|
|
57
|
+
No stack-specific governance adapter is loaded by default.
|
|
58
|
+
Load global domain rules only when task scope touches that domain.
|
|
59
|
+
Avoid eager loading unrelated runtime or domain guidance to prevent instruction conflicts.
|
|
60
60
|
## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS
|
|
61
61
|
Load these prompt contracts only when their trigger matches the user request:
|
|
62
|
+
0. Documentation-first mode -> docs, documentation, dokumen, docs/*, architecture docs, flow docs, API docs, lengkapkan docs
|
|
62
63
|
1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold
|
|
63
64
|
2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix
|
|
64
65
|
3. .agent-context/prompts/review-code.md -> review, audit, check, analyze
|
|
65
66
|
4. .agent-context/prompts/bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign
|
|
67
|
+
Documentation-first policy:
|
|
68
|
+
- Create or refine required project docs before implementation: docs/project-brief.md, docs/architecture-decision-record.md, docs/flow-overview.md, docs/api-contract.md when APIs, firmware endpoints, CLI commands, or web application flows exist, docs/database-schema.md when persistent data exists, and docs/DESIGN.md plus docs/design-intent.json for UI scope.
|
|
69
|
+
- Write formal project docs in English by default unless the user explicitly asks for another documentation language.
|
|
70
|
+
- For docs-only/docs-first requests, do not write application, firmware, or UI code until the user asks or approves an implementation plan.
|
|
66
71
|
UI trigger policy:
|
|
67
72
|
- Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.
|
|
68
73
|
- Keep UI-only requests context-isolated and do not eagerly load backend-only rules such as database-design.md, docker-runtime.md, microservices.md, git-workflow.md, or general implementation-theory rules unless the task explicitly crosses those boundaries.
|
package/.gemini/instructions.md
CHANGED
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 06e3f81d1df0e86bad6c3fe2a4623da640a1ea88b3124aecf1c10214cdc178e6
|
|
6
6
|
|
|
7
7
|
Canonical policy source: [.instructions.md](../.instructions.md).
|
|
8
8
|
|
|
9
9
|
If your host stops at this file, follow this minimum floor:
|
|
10
10
|
- Read `.agent-instructions.md` next when it exists.
|
|
11
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
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
12
13
|
- If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
|
|
14
|
+
- For documentation-first requests, create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
13
15
|
- For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
|
|
14
16
|
- Memory continuity is host-dependent project memory and does not replace bootstrap loading.
|
|
15
17
|
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 06e3f81d1df0e86bad6c3fe2a4623da640a1ea88b3124aecf1c10214cdc178e6
|
|
6
6
|
|
|
7
7
|
The canonical policy source for this repository is [.instructions.md](../.instructions.md).
|
|
8
8
|
|
|
9
9
|
If your host stops at this file, follow this minimum floor:
|
|
10
10
|
- Read `.agent-instructions.md` next when it exists.
|
|
11
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
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
12
13
|
- If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
|
|
14
|
+
- For documentation-first requests, create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
13
15
|
- For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
|
|
14
16
|
- Memory continuity is host-dependent project memory and does not replace bootstrap loading.
|
|
15
17
|
|
package/.instructions.md
CHANGED
|
@@ -29,6 +29,14 @@ Required fields:
|
|
|
29
29
|
|
|
30
30
|
Keep the receipt short. Do not load every rule just to fill it out; scoped loading remains mandatory.
|
|
31
31
|
|
|
32
|
+
### Output and Command Economy
|
|
33
|
+
|
|
34
|
+
Avoid repeated command output. Do not rerun the same broad inspection command unless new edits changed its result. Prefer targeted reads, targeted searches, concise diffs, and final validation gates; summarize long logs instead of copying full command output into the response.
|
|
35
|
+
|
|
36
|
+
### UI Motion and Palette Readability Floor
|
|
37
|
+
|
|
38
|
+
For any UI-facing request, `bootstrap-design.md` and `frontend-architecture.md` must appear in `selected_rules` before UI code edits. The plan or receipt must include a one-line Motion/Palette Decision: motion density source, required interaction states, palette autopilot risk, and whether 3D/canvas is useful or unnecessary. Product categories are heuristics, not style presets; override them with user task, content density, brand intent, device/performance, and accessibility evidence.
|
|
39
|
+
|
|
32
40
|
### Layer 1: Rules (15 Files) [SCOPE-RESOLVED]
|
|
33
41
|
|
|
34
42
|
**Location**: `.agent-context/rules/`
|
|
@@ -153,7 +161,18 @@ Use available MCP tools when you need validation, linting, or test execution.
|
|
|
153
161
|
|
|
154
162
|
## Mandatory Triggers
|
|
155
163
|
|
|
156
|
-
### 1.
|
|
164
|
+
### 1. Documentation-First Mode
|
|
165
|
+
|
|
166
|
+
**Trigger**: User asks to create, complete, fix, or review project docs, documentation, dokumen, `docs/*`, architecture docs, flow docs, API docs, or "lengkapkan docs".
|
|
167
|
+
|
|
168
|
+
**Workflow**:
|
|
169
|
+
|
|
170
|
+
1. Load `architecture.md` and `api-docs.md`, then load only additional rules needed by the documented scope.
|
|
171
|
+
2. Create or refine the required project docs before implementation: `docs/project-brief.md`, `docs/architecture-decision-record.md`, `docs/flow-overview.md`, `docs/api-contract.md` when APIs, firmware endpoints, CLI commands, or web application flows exist, `docs/database-schema.md` when persistent data exists, and `docs/DESIGN.md` plus `docs/design-intent.json` for UI scope.
|
|
172
|
+
3. Write formal project docs in English by default unless the user explicitly asks for another documentation language.
|
|
173
|
+
4. Stop after documentation when the user only asked for docs. Do not write application, firmware, or UI code until the user explicitly asks for implementation or approves the implementation plan.
|
|
174
|
+
|
|
175
|
+
### 2. New Project Planning
|
|
157
176
|
|
|
158
177
|
**Trigger**: User says "create", "build", "new project", or "scaffold"
|
|
159
178
|
|
|
@@ -165,7 +184,7 @@ Use available MCP tools when you need validation, linting, or test execution.
|
|
|
165
184
|
4. Produce scope, required docs, implementation boundaries, and a runtime/architecture recommendation when those decisions are unresolved.
|
|
166
185
|
5. **WAIT for user approval** before generating code.
|
|
167
186
|
|
|
168
|
-
###
|
|
187
|
+
### 3. Refactor Mode (EXISTING CODE)
|
|
169
188
|
|
|
170
189
|
**Trigger**: User says "refactor", "improve", "fix", or "clean up"
|
|
171
190
|
|
|
@@ -177,7 +196,7 @@ Use available MCP tools when you need validation, linting, or test execution.
|
|
|
177
196
|
4. Propose plan before executing changes.
|
|
178
197
|
5. **WAIT for approval**.
|
|
179
198
|
|
|
180
|
-
###
|
|
199
|
+
### 4. Code Review Mode
|
|
181
200
|
|
|
182
201
|
**Trigger**: User says "review", "audit", "check", or "analyze"
|
|
183
202
|
|
|
@@ -188,7 +207,7 @@ Use available MCP tools when you need validation, linting, or test execution.
|
|
|
188
207
|
3. Execute review against the active rules and contracts.
|
|
189
208
|
4. Generate a structured report.
|
|
190
209
|
|
|
191
|
-
###
|
|
210
|
+
### 5. UI Design Mode
|
|
192
211
|
|
|
193
212
|
**Trigger**: User says "ui", "ux", "layout", "screen", "tailwind", "frontend", or "redesign"
|
|
194
213
|
|
|
@@ -197,10 +216,11 @@ Use available MCP tools when you need validation, linting, or test execution.
|
|
|
197
216
|
1. Read `.agent-context/prompts/bootstrap-design.md`.
|
|
198
217
|
2. Read `.agent-context/rules/frontend-architecture.md`.
|
|
199
218
|
3. Read UI-relevant repository evidence from `.agent-context/state/onboarding-report.json`, current UI code, and `docs/*`.
|
|
200
|
-
4.
|
|
201
|
-
5.
|
|
202
|
-
6.
|
|
203
|
-
7.
|
|
219
|
+
4. Add a short Motion/Palette Decision before UI implementation; product categories are heuristics, not style presets.
|
|
220
|
+
5. Before UI implementation, record a concrete creative commitment in the design contract: one specific real-world anchor reference, one signature motion behavior, and one typographic decision with meaningful role contrast.
|
|
221
|
+
6. Ensure `docs/design-intent.json` includes `conceptualAnchor.anchorReference`, top-level `derivedTokenLogic`, `libraryResearchStatus`, `libraryDecisions[]`, and motion/palette decisions before UI code.
|
|
222
|
+
7. Generate or refine `docs/DESIGN.md` plus `docs/design-intent.json` before UI implementation.
|
|
223
|
+
8. Keep context isolated and do not eagerly load unrelated backend-only rules unless the task explicitly touches those boundaries.
|
|
204
224
|
|
|
205
225
|
---
|
|
206
226
|
|
package/.windsurfrules
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
4
|
-
Timestamp: 2026-04-
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.34
|
|
4
|
+
Timestamp: 2026-04-26T23:31:29.580Z
|
|
5
5
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
|
6
6
|
|
|
7
7
|
## GOVERNANCE PRECEDENCE
|
|
@@ -54,15 +54,20 @@ For an existing project, inspect repo markers and current files directly before
|
|
|
54
54
|
Do not silently choose a stack from offline defaults.
|
|
55
55
|
## LAYER 2 POLICY: LAZY RULE LOADING
|
|
56
56
|
Primary runtime constraint: unresolved until agent recommendation is approved
|
|
57
|
-
|
|
58
|
-
Load
|
|
59
|
-
Avoid eager loading unrelated runtime guidance to prevent instruction conflicts.
|
|
57
|
+
No stack-specific governance adapter is loaded by default.
|
|
58
|
+
Load global domain rules only when task scope touches that domain.
|
|
59
|
+
Avoid eager loading unrelated runtime or domain guidance to prevent instruction conflicts.
|
|
60
60
|
## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS
|
|
61
61
|
Load these prompt contracts only when their trigger matches the user request:
|
|
62
|
+
0. Documentation-first mode -> docs, documentation, dokumen, docs/*, architecture docs, flow docs, API docs, lengkapkan docs
|
|
62
63
|
1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold
|
|
63
64
|
2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix
|
|
64
65
|
3. .agent-context/prompts/review-code.md -> review, audit, check, analyze
|
|
65
66
|
4. .agent-context/prompts/bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign
|
|
67
|
+
Documentation-first policy:
|
|
68
|
+
- Create or refine required project docs before implementation: docs/project-brief.md, docs/architecture-decision-record.md, docs/flow-overview.md, docs/api-contract.md when APIs, firmware endpoints, CLI commands, or web application flows exist, docs/database-schema.md when persistent data exists, and docs/DESIGN.md plus docs/design-intent.json for UI scope.
|
|
69
|
+
- Write formal project docs in English by default unless the user explicitly asks for another documentation language.
|
|
70
|
+
- For docs-only/docs-first requests, do not write application, firmware, or UI code until the user asks or approves an implementation plan.
|
|
66
71
|
UI trigger policy:
|
|
67
72
|
- Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.
|
|
68
73
|
- Keep UI-only requests context-isolated and do not eagerly load backend-only rules such as database-design.md, docker-runtime.md, microservices.md, git-workflow.md, or general implementation-theory rules unless the task explicitly crosses those boundaries.
|
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: 06e3f81d1df0e86bad6c3fe2a4623da640a1ea88b3124aecf1c10214cdc178e6
|
|
6
6
|
|
|
7
7
|
This file is an adapter entrypoint for agent discovery.
|
|
8
8
|
The canonical policy source is [.instructions.md](.instructions.md).
|
|
@@ -14,7 +14,9 @@ If your host stops at this file instead of following the full chain, obey the Cr
|
|
|
14
14
|
- If `.agent-instructions.md` exists, prefer it immediately after this file because it is the compiled project-specific snapshot.
|
|
15
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
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, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
17
18
|
- For UI scope: if `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize or refine them before implementing UI changes.
|
|
19
|
+
- For documentation-first requests: create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
18
20
|
- For backend, API, data, auth, error, event, queue, worker, or distributed-system requests: load the relevant global rules from [.agent-context/rules/](.agent-context/rules); do not create stack-specific governance adapters.
|
|
19
21
|
- For refactor, improve, clean up, or fix requests: inspect the active rules and propose a plan before editing.
|
|
20
22
|
- For new project or module requests: clarify constraints, runtime decisions, and required docs before generating code.
|
package/lib/cli/compiler.mjs
CHANGED
|
@@ -348,10 +348,15 @@ export async function buildCompiledRulesContent({
|
|
|
348
348
|
[
|
|
349
349
|
'## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS',
|
|
350
350
|
'Load these prompt contracts only when their trigger matches the user request:',
|
|
351
|
+
'0. Documentation-first mode -> docs, documentation, dokumen, docs/*, architecture docs, flow docs, API docs, lengkapkan docs',
|
|
351
352
|
'1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold',
|
|
352
353
|
'2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix',
|
|
353
354
|
'3. .agent-context/prompts/review-code.md -> review, audit, check, analyze',
|
|
354
355
|
'4. .agent-context/prompts/bootstrap-design.md -> ui, ux, layout, screen, tailwind, frontend, redesign',
|
|
356
|
+
'Documentation-first policy:',
|
|
357
|
+
'- Create or refine required project docs before implementation: docs/project-brief.md, docs/architecture-decision-record.md, docs/flow-overview.md, docs/api-contract.md when APIs, firmware endpoints, CLI commands, or web application flows exist, docs/database-schema.md when persistent data exists, and docs/DESIGN.md plus docs/design-intent.json for UI scope.',
|
|
358
|
+
'- Write formal project docs in English by default unless the user explicitly asks for another documentation language.',
|
|
359
|
+
'- For docs-only/docs-first requests, do not write application, firmware, or UI code until the user asks or approves an implementation plan.',
|
|
355
360
|
'UI trigger policy:',
|
|
356
361
|
'- Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.',
|
|
357
362
|
'- Keep UI-only requests context-isolated and do not eagerly load backend-only rules such as database-design.md, docker-runtime.md, microservices.md, git-workflow.md, or general implementation-theory rules unless the task explicitly crosses those boundaries.',
|
|
@@ -536,6 +541,7 @@ export async function buildCompiledRulesContent({
|
|
|
536
541
|
'- docs/flow-overview.md must also exist before coding continues.',
|
|
537
542
|
'- Add docs/database-schema.md when persistent data is involved.',
|
|
538
543
|
'- Add docs/api-contract.md when API or web application flows are involved.',
|
|
544
|
+
'- For docs-only/docs-first requests, stop after docs unless the user asks for implementation or approves an implementation plan.',
|
|
539
545
|
'- If docs/project-brief.md is missing, execute bootstrap-project-context prompt immediately.',
|
|
540
546
|
hasBootstrapDesignPrompt
|
|
541
547
|
? '- For UI scope: if docs/DESIGN.md or docs/design-intent.json is missing, execute bootstrap-design prompt before implementing UI surfaces.'
|
|
@@ -224,6 +224,13 @@ function buildDesignIntentContractObject({
|
|
|
224
224
|
motionDerivationSource: 'Agent must explain how duration, easing, choreography, and reduced-motion alternatives derive from the chosen anchorReference.',
|
|
225
225
|
validationRule: 'Every primitive, semantic, component, typography, spacing, and motion token must trace back to anchorReference; if a token cannot be explained from the anchor, revise the token.',
|
|
226
226
|
},
|
|
227
|
+
motionPaletteDecision: {
|
|
228
|
+
productCategorySignal: 'agent-inferred-starting-heuristic',
|
|
229
|
+
densityDecisionSource: 'Agent must choose motion density from task, content density, brand intent, device/performance, and accessibility evidence; product categories are heuristics, not style presets.',
|
|
230
|
+
requiredInteractionStates: ['default', 'hover', 'focus-visible', 'active', 'disabled', 'loading', 'empty', 'error', 'success', 'transition'],
|
|
231
|
+
paletteAutopilotRisks: ['dark-slate-default', 'cream-beige-default', 'purple-blue-gradient-default', 'monochrome-template-default', 'uniform-card-surface-default'],
|
|
232
|
+
spatialDecision: 'Agent must state whether 3D/canvas/WebGL is useful or unnecessary for product understanding, exploration, or storytelling.',
|
|
233
|
+
},
|
|
227
234
|
libraryResearchStatus: 'pending-verification',
|
|
228
235
|
libraryDecisions: [
|
|
229
236
|
{
|
|
@@ -270,6 +277,7 @@ function buildDesignIntentContractObject({
|
|
|
270
277
|
rolePolicy: 'minimum-semantic-scaffold',
|
|
271
278
|
rolesAreMinimumScaffold: true,
|
|
272
279
|
rolesMustBeAgentDefined: true,
|
|
280
|
+
forbidAutopilotPalettesWithoutEvidence: true,
|
|
273
281
|
intent: inferredKeywords.colorIntent,
|
|
274
282
|
},
|
|
275
283
|
crossViewportAdaptation: {
|
|
@@ -281,13 +289,14 @@ function buildDesignIntentContractObject({
|
|
|
281
289
|
allowMeaningfulMotion: true,
|
|
282
290
|
purpose: inferredKeywords.motionPurpose,
|
|
283
291
|
seedToneLocked: false,
|
|
292
|
+
densitySource: 'task-content-brand-device-accessibility',
|
|
284
293
|
respectReducedMotion: true,
|
|
285
294
|
},
|
|
286
295
|
componentMorphology: {
|
|
287
296
|
requireStateBehaviorMatrix: true,
|
|
288
297
|
preserveIdentityAcrossViewports: true,
|
|
289
298
|
seedBehaviorsRequireRefinement: true,
|
|
290
|
-
stateKeys: ['default', 'focus', 'loading', 'error'],
|
|
299
|
+
stateKeys: ['default', 'hover', 'focus-visible', 'active', 'disabled', 'loading', 'empty', 'error', 'success', 'transition'],
|
|
291
300
|
viewportBehavior: inferredKeywords.componentMorphology,
|
|
292
301
|
},
|
|
293
302
|
accessibilityPolicy: {
|
package/package.json
CHANGED
|
@@ -43,7 +43,9 @@ If your host stops at this file instead of following the full chain, obey the Cr
|
|
|
43
43
|
- If \`.agent-instructions.md\` exists, prefer it immediately after this file because it is the compiled project-specific snapshot.
|
|
44
44
|
- Memory continuity does not replace bootstrap loading. It is host-dependent project memory, not a guarantee that instructions were reloaded for this session.
|
|
45
45
|
- 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.
|
|
46
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
46
47
|
- For UI scope: if \`docs/DESIGN.md\` or \`docs/design-intent.json\` is missing, materialize or refine them before implementing UI changes.
|
|
48
|
+
- For documentation-first requests: create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
47
49
|
- For backend, API, data, auth, error, event, queue, worker, or distributed-system requests: load the relevant global rules from [.agent-context/rules/](.agent-context/rules); do not create stack-specific governance adapters.
|
|
48
50
|
- For refactor, improve, clean up, or fix requests: inspect the active rules and propose a plan before editing.
|
|
49
51
|
- For new project or module requests: clarify constraints, runtime decisions, and required docs before generating code.
|
|
@@ -86,7 +88,9 @@ The canonical policy source for this repository is [.instructions.md](../.instru
|
|
|
86
88
|
If your host stops at this file, follow this minimum floor:
|
|
87
89
|
- Read \`.agent-instructions.md\` next when it exists.
|
|
88
90
|
- 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.
|
|
91
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
89
92
|
- If UI scope and \`docs/DESIGN.md\` or \`docs/design-intent.json\` is missing, materialize them before UI implementation.
|
|
93
|
+
- For documentation-first requests, create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
90
94
|
- For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
|
|
91
95
|
- Memory continuity is host-dependent project memory and does not replace bootstrap loading.
|
|
92
96
|
|
|
@@ -122,7 +126,9 @@ Canonical policy source: [.instructions.md](../.instructions.md).
|
|
|
122
126
|
If your host stops at this file, follow this minimum floor:
|
|
123
127
|
- Read \`.agent-instructions.md\` next when it exists.
|
|
124
128
|
- 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.
|
|
129
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
125
130
|
- If UI scope and \`docs/DESIGN.md\` or \`docs/design-intent.json\` is missing, materialize them before UI implementation.
|
|
131
|
+
- For documentation-first requests, create or refine required project docs in English by default and do not write application, firmware, or UI code until the user asks or approves.
|
|
126
132
|
- For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
|
|
127
133
|
- Memory continuity is host-dependent project memory and does not replace bootstrap loading.
|
|
128
134
|
|
|
@@ -24,6 +24,7 @@ export const REQUIRED_HUMAN_WRITING_SNIPPETS = [
|
|
|
24
24
|
'## Human Writing Standard (Mandatory)',
|
|
25
25
|
'This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations.',
|
|
26
26
|
'Style baseline findings are advisory by default and must not block endpoint-change commits that already include accurate docs/spec updates.',
|
|
27
|
+
'Write formal project docs in English by default',
|
|
27
28
|
'No emoji in formal artifacts.',
|
|
28
29
|
],
|
|
29
30
|
},
|
|
@@ -32,6 +33,7 @@ export const REQUIRED_HUMAN_WRITING_SNIPPETS = [
|
|
|
32
33
|
snippets: [
|
|
33
34
|
'Scope applied: This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations',
|
|
34
35
|
'Style scope review is advisory and does not block merge when API docs are synced in the same commit and contract details are correct',
|
|
36
|
+
'Formal project docs use English by default',
|
|
35
37
|
'No emoji in formal documentation or review summaries',
|
|
36
38
|
'Documentation uses plain English and avoids AI cliches',
|
|
37
39
|
],
|
|
@@ -179,6 +181,14 @@ export const REQUIRED_STACK_DECISION_BOUNDARY_SNIPPETS = [
|
|
|
179
181
|
},
|
|
180
182
|
];
|
|
181
183
|
export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
|
|
184
|
+
{
|
|
185
|
+
path: '.instructions.md',
|
|
186
|
+
snippets: [
|
|
187
|
+
'### 1. Documentation-First Mode',
|
|
188
|
+
'Stop after documentation when the user only asked for docs.',
|
|
189
|
+
'Do not write application, firmware, or UI code',
|
|
190
|
+
],
|
|
191
|
+
},
|
|
182
192
|
{
|
|
183
193
|
path: '.agent-context/rules/architecture.md',
|
|
184
194
|
snippets: [
|
|
@@ -187,6 +197,14 @@ export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
|
|
|
187
197
|
'If required project context docs are missing, stop implementation and bootstrap docs before writing application code.',
|
|
188
198
|
],
|
|
189
199
|
},
|
|
200
|
+
{
|
|
201
|
+
path: '.agent-context/prompts/init-project.md',
|
|
202
|
+
snippets: [
|
|
203
|
+
'## Documentation-First Requests',
|
|
204
|
+
'Stop after docs when the user only asked for docs.',
|
|
205
|
+
'Write formal project docs in English by default',
|
|
206
|
+
],
|
|
207
|
+
},
|
|
190
208
|
{
|
|
191
209
|
path: '.agent-context/review-checklists/pr-checklist.md',
|
|
192
210
|
snippets: [
|
|
@@ -212,6 +230,8 @@ export const REQUIRED_UNIVERSAL_SOP_SNIPPETS = [
|
|
|
212
230
|
snippets: [
|
|
213
231
|
'Universal SOP hard block policy:',
|
|
214
232
|
'Hard block: do not write application code until docs/project-brief.md and docs/architecture-decision-record.md exist.',
|
|
233
|
+
'Documentation-first policy:',
|
|
234
|
+
'For docs-only/docs-first requests, do not write application, firmware, or UI code until the user asks or approves an implementation plan.',
|
|
215
235
|
'For UI scope: if docs/DESIGN.md or docs/design-intent.json is missing, execute bootstrap-design prompt before implementing UI surfaces.',
|
|
216
236
|
],
|
|
217
237
|
},
|
|
@@ -265,6 +285,11 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
265
285
|
'docs/DESIGN.md',
|
|
266
286
|
'docs/design-intent.json',
|
|
267
287
|
'does not replace bootstrap loading',
|
|
288
|
+
'documentation-first requests',
|
|
289
|
+
'English by default',
|
|
290
|
+
'do not write application, firmware, or UI code',
|
|
291
|
+
'Motion/Palette Decision',
|
|
292
|
+
'product categories are heuristics',
|
|
268
293
|
'perform live web research',
|
|
269
294
|
],
|
|
270
295
|
},
|
|
@@ -275,6 +300,8 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
275
300
|
'UI Design Mode',
|
|
276
301
|
'bootstrap-design.md',
|
|
277
302
|
'frontend-architecture.md',
|
|
303
|
+
'Motion/Palette Decision',
|
|
304
|
+
'product categories are heuristics',
|
|
278
305
|
'do not eagerly load unrelated backend-only rules',
|
|
279
306
|
'valid style context',
|
|
280
307
|
'External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted',
|
|
@@ -292,6 +319,8 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
292
319
|
'Responsive Recomposition Plan',
|
|
293
320
|
'source of truth',
|
|
294
321
|
'research current official docs',
|
|
322
|
+
'motionPaletteDecision',
|
|
323
|
+
'product categories are heuristics',
|
|
295
324
|
'Responsive design means recomposition, not resizing.',
|
|
296
325
|
'agent-chosen visual direction',
|
|
297
326
|
'viewport mutation rules',
|
|
@@ -349,9 +378,12 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
|
|
|
349
378
|
'seedPolicy',
|
|
350
379
|
'structure-first-scaffold',
|
|
351
380
|
'colorTruth',
|
|
381
|
+
'motionPaletteDecision',
|
|
382
|
+
'forbidAutopilotPalettesWithoutEvidence',
|
|
352
383
|
'rolesAreMinimumScaffold',
|
|
353
384
|
'crossViewportAdaptation',
|
|
354
385
|
'motionSystem',
|
|
386
|
+
'densitySource',
|
|
355
387
|
'seedToneLocked',
|
|
356
388
|
'componentMorphology',
|
|
357
389
|
'seedBehaviorsRequireRefinement',
|
|
@@ -392,6 +392,10 @@ export async function validateInstructionAdapters(context) {
|
|
|
392
392
|
'unreachable_files',
|
|
393
393
|
'validation_plan',
|
|
394
394
|
];
|
|
395
|
+
const requiredUiReadabilitySnippets = [
|
|
396
|
+
'Motion/Palette Decision',
|
|
397
|
+
'product categories are heuristics',
|
|
398
|
+
];
|
|
395
399
|
|
|
396
400
|
for (const requiredBootstrapReceiptSnippet of requiredBootstrapReceiptSnippets) {
|
|
397
401
|
if (canonicalInstructionContent.includes(requiredBootstrapReceiptSnippet)) {
|
|
@@ -401,6 +405,14 @@ export async function validateInstructionAdapters(context) {
|
|
|
401
405
|
}
|
|
402
406
|
}
|
|
403
407
|
|
|
408
|
+
for (const requiredUiReadabilitySnippet of requiredUiReadabilitySnippets) {
|
|
409
|
+
if (canonicalInstructionContent.includes(requiredUiReadabilitySnippet)) {
|
|
410
|
+
pass(`.instructions.md includes UI readability snippet: ${requiredUiReadabilitySnippet}`);
|
|
411
|
+
} else {
|
|
412
|
+
fail(`.instructions.md is missing UI readability snippet: ${requiredUiReadabilitySnippet}`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
|
|
404
416
|
for (const thinAdapterPath of THIN_ADAPTER_PATHS) {
|
|
405
417
|
const absoluteAdapterPath = join(ROOT_DIR, thinAdapterPath);
|
|
406
418
|
|
|
@@ -428,6 +440,14 @@ export async function validateInstructionAdapters(context) {
|
|
|
428
440
|
}
|
|
429
441
|
}
|
|
430
442
|
|
|
443
|
+
for (const requiredUiReadabilitySnippet of requiredUiReadabilitySnippets) {
|
|
444
|
+
if (thinAdapterContent.includes(requiredUiReadabilitySnippet)) {
|
|
445
|
+
pass(`${thinAdapterPath} includes UI readability snippet: ${requiredUiReadabilitySnippet}`);
|
|
446
|
+
} else {
|
|
447
|
+
fail(`${thinAdapterPath} is missing UI readability snippet: ${requiredUiReadabilitySnippet}`);
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
|
|
431
451
|
const hashMatch = thinAdapterContent.match(/Canonical Snapshot SHA256:\s*([a-f0-9]{64})/);
|
|
432
452
|
if (!hashMatch) {
|
|
433
453
|
fail(`${thinAdapterPath} must declare Canonical Snapshot SHA256`);
|