@ryuenn3123/agentic-senior-core 3.0.37 → 3.0.39
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 +109 -146
- package/.agent-context/rules/frontend-architecture.md +92 -108
- package/.agent-context/state/README.md +26 -0
- package/.agent-context/state/architecture-map.md +32 -17
- package/.agent-context/state/dependency-map.md +31 -22
- package/.cursor/mcp.json +10 -0
- package/.cursor/rules/agentic-senior-core.mdc +48 -0
- package/.cursorrules +22 -88
- package/.gemini/instructions.md +25 -16
- package/.github/copilot-instructions.md +25 -16
- package/.github/instructions/agentic-senior-core.instructions.md +47 -0
- package/.instructions.md +98 -207
- package/.windsurf/rules/agentic-senior-core.md +43 -0
- package/.windsurfrules +22 -88
- package/AGENTS.md +23 -26
- package/CLAUDE.md +43 -0
- package/CONTRIBUTING.md +7 -2
- package/GEMINI.md +43 -0
- package/README.md +25 -7
- package/lib/cli/backup.mjs +4 -4
- package/lib/cli/commands/init/project-context.mjs +101 -0
- package/lib/cli/commands/init/runtime-environment.mjs +59 -0
- package/lib/cli/commands/init/setup-decisions.mjs +83 -0
- package/lib/cli/commands/init.mjs +33 -250
- package/lib/cli/commands/optimize.mjs +1 -1
- package/lib/cli/commands/upgrade.mjs +34 -16
- package/lib/cli/compiler.mjs +59 -17
- package/lib/cli/constants.mjs +5 -0
- package/lib/cli/detector.mjs +4 -0
- package/lib/cli/init-detection-flow.mjs +9 -1
- package/lib/cli/init-selection.mjs +0 -5
- package/lib/cli/preflight.mjs +3 -3
- package/lib/cli/project-scaffolder/design-contract/validation.mjs +789 -0
- package/lib/cli/project-scaffolder/design-contract.mjs +119 -924
- package/lib/cli/project-scaffolder/prompt-builders.mjs +69 -84
- package/lib/cli/project-scaffolder.mjs +0 -2
- package/lib/cli/utils/filesystem.mjs +79 -0
- package/lib/cli/utils/managed-surface.mjs +237 -0
- package/lib/cli/utils/prompting.mjs +44 -0
- package/lib/cli/utils.mjs +33 -335
- package/package.json +21 -2
- package/scripts/bump-version.mjs +15 -13
- package/scripts/clean-local-artifacts.mjs +76 -0
- package/scripts/docs-quality-drift-report.mjs +5 -0
- package/scripts/frontend-usability-audit.mjs +23 -19
- package/scripts/governance-weekly-report.mjs +37 -15
- package/scripts/single-source-lazy-loading-audit.mjs +24 -0
- package/scripts/sync-thin-adapters.mjs +99 -129
- package/scripts/v3-purge-audit.mjs +5 -0
- package/scripts/validate/config.mjs +10 -0
- package/scripts/validate/coverage-checks.mjs +55 -0
- package/scripts/validate.mjs +20 -0
- package/.agent-context/marketplace/trust-tiers.json +0 -114
- package/.agent-context/state/benchmark-analysis.json +0 -431
- package/.agent-context/state/benchmark-evidence-bundle.json +0 -1040
- package/.agent-context/state/benchmark-history.json +0 -75
- package/.agent-context/state/benchmark-trend-report.csv +0 -5
- package/.agent-context/state/benchmark-trend-report.json +0 -140
- package/.agent-context/state/benchmark-writer-judge-matrix.json +0 -462
- package/.agent-context/state/memory-continuity-benchmark.json +0 -132
- package/.agent-context/state/onboarding-report.json +0 -102
- package/.agent-context/state/quality-trend-report.json +0 -89
- package/.agent-context/state/token-optimization-benchmark.json +0 -130
- package/.agent-context/state/weekly-governance-report.json +0 -329
- package/lib/cli/compatibility.mjs +0 -124
- package/scripts/validate-evidence-bundle.mjs +0 -76
package/.instructions.md
CHANGED
|
@@ -1,292 +1,183 @@
|
|
|
1
1
|
# Agentic-Senior-Core: Unified AI Agent Instructions
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
> It indexes the available governance layers so the agent can resolve only the layers the current request actually needs.
|
|
3
|
+
Bootstrap entrypoint. Resolve the smallest relevant layer set for the current request.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
## Role
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
Act as a Principal Engineer. Ship maintainable, validated, production-ready work. Use clear plain language in formal artifacts. Do not use emoji.
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
You use clear, plain language in formal artifacts and do not use emoji.
|
|
9
|
+
## Authority
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
This repository is governed by a strict instruction contract.
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
Use `.instructions.md` as the canonical baseline. Use `.agent-context/` as technical authority for rules, prompts, checklists, state, and policies. Use `README.md` only for overview, setup, and user-facing context when stricter governance files conflict.
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
Write instructions as imperative gates:
|
|
16
|
+
- Use direct commands.
|
|
17
|
+
- Prefer short mechanical checks over descriptive prose.
|
|
18
|
+
- Keep root adapters thin.
|
|
19
|
+
- Move detailed policy into `.agent-context/`.
|
|
20
|
+
- Add validation when a rule can drift.
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
## Bootstrap Receipt
|
|
20
23
|
|
|
21
|
-
For non-trivial coding, review, planning, or governance work,
|
|
24
|
+
For non-trivial coding, review, planning, or governance work, emit a concise Bootstrap Receipt before implementation output or file edits:
|
|
25
|
+
- `loaded_files`: files actually read
|
|
26
|
+
- `selected_rules`: files selected for this scope and why
|
|
27
|
+
- `skipped_rules`: out-of-scope categories left unloaded
|
|
28
|
+
- `unreachable_files`: required files that could not be read
|
|
29
|
+
- `validation_plan`: expected checks before completion
|
|
22
30
|
|
|
23
|
-
|
|
24
|
-
- `loaded_files`: entrypoint, canonical source, and project files actually read.
|
|
25
|
-
- `selected_rules`: rule, prompt, checklist, state, or policy files selected for the current scope, with a short trigger.
|
|
26
|
-
- `skipped_rules`: categories intentionally left unloaded because they are out of scope.
|
|
27
|
-
- `unreachable_files`: required files that could not be read; stop instead of guessing when this list is non-empty.
|
|
28
|
-
- `validation_plan`: commands or checks expected before completion.
|
|
31
|
+
Keep it short. Do not load every rule just to fill it out.
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
## Command Economy
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
Avoid repeated command output. Do not rerun broad inspections unless edits changed the result. Prefer targeted reads, targeted searches, concise diffs, and final validation gates.
|
|
33
36
|
|
|
34
|
-
|
|
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.
|
|
37
|
+
## Layer Index
|
|
39
38
|
|
|
40
39
|
### Layer 1: Rules (15 Files) [SCOPE-RESOLVED]
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
Available engineering rule files:
|
|
45
|
-
|
|
46
|
-
- `naming-conv.md` - No lazy names like `data`, `res`, or `x`
|
|
47
|
-
- `architecture.md` - Separation of concerns, structural boundaries, file-size discipline
|
|
48
|
-
- `security.md` - Validate all input, parameterize queries, no hardcoded secrets
|
|
49
|
-
- `performance.md` - Evidence-based optimization and hard rejection patterns
|
|
50
|
-
- `error-handling.md` - Never swallow errors, use typed error codes
|
|
51
|
-
- `testing.md` - Test pyramid, behavior over implementation
|
|
52
|
-
- `git-workflow.md` - Conventional commits and change hygiene
|
|
53
|
-
- `efficiency-vs-hype.md` - Practical dependency and tooling decisions over trend or avoidance bias
|
|
54
|
-
- `api-docs.md` - OpenAPI 3.1 and public surface documentation
|
|
55
|
-
- `microservices.md` - Evidence-required service splits and distributed-system boundaries
|
|
56
|
-
- `event-driven.md` - Idempotency and event boundaries
|
|
57
|
-
- `database-design.md` - Safe migrations and schema discipline
|
|
58
|
-
- `realtime.md` - Realtime boundaries and pub/sub discipline
|
|
59
|
-
- `frontend-architecture.md` - UI structure, anti-generic boundaries, responsive mutation
|
|
60
|
-
- `docker-runtime.md` - Latest-docs-first Dockerfile and Compose generation
|
|
61
|
-
|
|
62
|
-
**What to do**: Resolve only the rule files relevant to the current task. Do not read the entire rule directory by default. For UI-only work, start with `bootstrap-design.md` and `frontend-architecture.md` and keep backend or DevOps rules unloaded unless the task explicitly crosses those boundaries. 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, use the latest stable compatible dependency set and official setup flow unless a documented compatibility constraint blocks it. New dependencies are allowed when they produce a better practical tradeoff than custom implementation, including meaningful efficiency, delivery-time, correctness, or maintainability gains.
|
|
63
|
-
|
|
64
|
-
### Global Backend/API Governance Routing
|
|
65
|
-
|
|
66
|
-
This is global governance, not a stack-specific adapter system. Do not create Nest, Laravel, FastAPI, Express, Go, Ruby, PHP, Java, or framework-specific baseline adapters from this repository. The LLM may use its general knowledge and current official docs when a concrete project already uses a tool, but the governance layer stays architecture- and runtime-agnostic.
|
|
67
|
-
|
|
68
|
-
When backend/API work is in scope, load only the relevant global rule files:
|
|
69
|
-
|
|
70
|
-
- Data, schema, repository, ORM, query, transaction, migration, pagination, or persistence scope: load `architecture.md`, `database-design.md`, `performance.md`, and `testing.md`.
|
|
71
|
-
- Endpoint, controller, route handler, public API, request/response contract, validation failure, or API error scope: load `architecture.md`, `api-docs.md`, `error-handling.md`, `security.md`, and `testing.md`.
|
|
72
|
-
- Authentication, authorization, secrets, user input, webhook, upload, session, token, or permission scope: load `security.md`, `error-handling.md`, and `testing.md`.
|
|
73
|
-
- Queue, worker, cron, event stream, message broker, async workflow, retry, or cross-system mutation scope: load `event-driven.md`, `database-design.md`, `error-handling.md`, `performance.md`, and `testing.md`.
|
|
74
|
-
- Multi-service, distributed consistency, service boundary, or cross-domain data ownership scope: load `microservices.md`, `event-driven.md`, `database-design.md`, `api-docs.md`, and `architecture.md`.
|
|
75
|
-
|
|
76
|
-
If multiple bullets match, load the union once, then implement against the project framework already present. Do not expand into unrelated stack guides just because a runtime name appears.
|
|
41
|
+
Location: `.agent-context/rules/`.
|
|
77
42
|
|
|
78
|
-
|
|
43
|
+
Load only relevant rule files. Do not read the entire rule directory by default.
|
|
79
44
|
|
|
80
|
-
|
|
45
|
+
Available rules: `naming-conv.md`, `architecture.md`, `security.md`, `performance.md`, `error-handling.md`, `testing.md`, `git-workflow.md`, `efficiency-vs-hype.md`, `api-docs.md`, `microservices.md`, `event-driven.md`, `database-design.md`, `realtime.md`, `frontend-architecture.md`, `docker-runtime.md`.
|
|
81
46
|
|
|
82
|
-
|
|
83
|
-
Do not force the project into a listed stack when repository evidence, delivery constraints, or ecosystem reality require another shape.
|
|
84
|
-
Runtime evidence must not become per-stack governance. Use it to understand the project that already exists, not to choose or inject framework-specific rule adapters.
|
|
47
|
+
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, use the latest stable compatible dependency set and official setup flow unless a documented compatibility constraint blocks it. New dependencies are allowed when they improve efficiency, delivery time, correctness, or maintainability.
|
|
85
48
|
|
|
86
|
-
|
|
49
|
+
Backend/API routing:
|
|
50
|
+
- Data/schema/persistence: `architecture.md`, `database-design.md`, `performance.md`, `testing.md`.
|
|
51
|
+
- Endpoint/API/error contracts: `architecture.md`, `api-docs.md`, `error-handling.md`, `security.md`, `testing.md`.
|
|
52
|
+
- Auth/secrets/uploads/permissions: `security.md`, `error-handling.md`, `testing.md`.
|
|
53
|
+
- Queue/worker/cron/events/retry: `event-driven.md`, `database-design.md`, `error-handling.md`, `performance.md`, `testing.md`.
|
|
54
|
+
- Multi-service/distributed boundaries: `microservices.md`, `event-driven.md`, `database-design.md`, `api-docs.md`, `architecture.md`.
|
|
87
55
|
|
|
88
|
-
|
|
56
|
+
Use the union once when scopes overlap. Do not create framework-specific governance adapters.
|
|
89
57
|
|
|
90
|
-
|
|
58
|
+
### Layer 2: Runtime Decision Signals
|
|
91
59
|
|
|
92
|
-
|
|
60
|
+
Runtime Decision Signals come from project context, repo evidence, and live research. Runtime signals are evidence gates, not style cues or popularity rankings.
|
|
93
61
|
|
|
94
|
-
|
|
62
|
+
For fresh projects, recommend runtime/framework from the brief, constraints, and live official docs before coding. For existing projects, treat detected markers as evidence only. Ignore pattern frequency, external rankings, and remembered defaults.
|
|
95
63
|
|
|
96
|
-
### Layer
|
|
64
|
+
### Layer 3: Structural Planning Signals
|
|
97
65
|
|
|
98
|
-
|
|
66
|
+
Structural Planning Signals use dynamic structural planning from repo context, docs, runtime constraints, and live research. Structural planning signals are not a hard whitelist.
|
|
99
67
|
|
|
100
|
-
|
|
68
|
+
For new projects or modules, extract constraints, boundaries, and required docs first. Do not silently choose frameworks or architecture from offline heuristics. If runtime or architecture is unresolved, produce a short recommendation from evidence and live official documentation before coding.
|
|
101
69
|
|
|
102
|
-
|
|
103
|
-
- **Design contract** - UI intent, responsiveness, and design consistency
|
|
104
|
-
- **Review contract** - defect and risk focused quality review
|
|
105
|
-
- **Release contract** - validation and release posture checks
|
|
70
|
+
### Layer 4: Execution Contracts
|
|
106
71
|
|
|
107
|
-
|
|
72
|
+
Execution Contracts are dynamic execution contracts from prompts, review checklists, and policy thresholds. Resolve the active contract, then enforce mandatory checks before declaring completion.
|
|
108
73
|
|
|
109
|
-
### Layer 5: Prompts
|
|
74
|
+
### Layer 5: Prompts
|
|
110
75
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
Meta-prompts that provide complete workflows for common scenarios:
|
|
76
|
+
Location: `.agent-context/prompts/`.
|
|
114
77
|
|
|
78
|
+
Load the matching prompt only:
|
|
115
79
|
- `init-project.md` -> create, build, new project, scaffold
|
|
116
80
|
- `refactor.md` -> refactor, improve, clean up, fix
|
|
117
81
|
- `review-code.md` -> review, audit, check, analyze
|
|
118
82
|
- `bootstrap-design.md` -> ui, ux, layout, screen, tailwind, frontend, redesign
|
|
119
83
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### Layer 6: Governance Modes (Dynamic)
|
|
84
|
+
For UI-only work, load `bootstrap-design.md` and `frontend-architecture.md` first; do not eagerly load unrelated backend-only rules unless the request crosses that boundary. The valid style context is current repo evidence, current brief, and current project docs. External references, prior-chat memory, unrelated-project visuals, and remembered screenshots are tainted unless the user makes them current-task constraints. Treat WCAG 2.2 AA as the hard compliance floor and APCA as advisory perceptual tuning only. Do not require screenshot capture as a baseline dependency.
|
|
123
85
|
|
|
124
|
-
|
|
86
|
+
### Layer 6: Governance Modes
|
|
125
87
|
|
|
126
|
-
|
|
88
|
+
Governance Modes use dynamic governance context from state files, policies, and repo norms. Apply matching defaults only when relevant.
|
|
127
89
|
|
|
128
90
|
### Layer 7: State and Benchmarks
|
|
129
91
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Use these files for risk zones, dependency boundaries, benchmarks, and continuity metadata when the task actually needs them.
|
|
92
|
+
Use `.agent-context/state/` only when the task needs risk zones, dependency boundaries, benchmarks, or continuity metadata.
|
|
133
93
|
|
|
134
94
|
### Layer 8: Policies and Thresholds
|
|
135
95
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
Use policy files such as `llm-judge-threshold.json` for quality gates, release thresholds, and audit posture.
|
|
139
|
-
|
|
140
|
-
### Layer 9: Project Context (Optional)
|
|
141
|
-
|
|
142
|
-
**Location**: `docs/`
|
|
143
|
-
|
|
144
|
-
If project-specific docs exist, treat them as the source of truth for what to build:
|
|
145
|
-
|
|
146
|
-
- `project-brief.md`
|
|
147
|
-
- `architecture-decision-record.md`
|
|
148
|
-
- `database-schema.md`
|
|
149
|
-
- `api-contract.md`
|
|
150
|
-
- `flow-overview.md`
|
|
151
|
-
- `DESIGN.md`
|
|
152
|
-
- `design-intent.json`
|
|
153
|
-
|
|
154
|
-
### MCP Servers
|
|
96
|
+
Use `.agent-context/policies/` for quality gates, release thresholds, and audit posture.
|
|
155
97
|
|
|
156
|
-
|
|
98
|
+
### Layer 9: Project Context
|
|
157
99
|
|
|
158
|
-
Use
|
|
159
|
-
|
|
160
|
-
---
|
|
100
|
+
Use `docs/` when present: `project-brief.md`, `architecture-decision-record.md`, `database-schema.md`, `api-contract.md`, `flow-overview.md`, `DESIGN.md`, `design-intent.json`.
|
|
161
101
|
|
|
162
102
|
## Mandatory Triggers
|
|
163
103
|
|
|
164
104
|
### 1. Documentation-First Mode
|
|
165
105
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
**Workflow**:
|
|
106
|
+
Trigger: docs, documentation, dokumen, `docs/*`, architecture docs, flow docs, API docs, or "lengkapkan docs".
|
|
169
107
|
|
|
170
|
-
1. Load `architecture.md
|
|
171
|
-
2. Create or refine
|
|
172
|
-
3. Write formal project docs in English by default unless the user
|
|
173
|
-
4. Stop after documentation when the user only asked for docs. Do not write application, firmware, or UI code until the user
|
|
108
|
+
1. Load `architecture.md`, `api-docs.md`, and only additional rules required by scope.
|
|
109
|
+
2. Create or refine required docs first: `docs/project-brief.md`, `docs/architecture-decision-record.md`, `docs/flow-overview.md`, `docs/api-contract.md` for APIs/firmware/CLI/web flows, `docs/database-schema.md` for persistent data, and `docs/DESIGN.md` plus `docs/design-intent.json` for UI scope.
|
|
110
|
+
3. Write formal project docs in English by default unless the user asks otherwise.
|
|
111
|
+
4. Stop after documentation when the user only asked for docs. Do not write application, firmware, or UI code until the user asks or approves implementation.
|
|
174
112
|
|
|
175
113
|
### 2. New Project Planning
|
|
176
114
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
**Workflow**:
|
|
115
|
+
Trigger: create, build, new project, scaffold.
|
|
180
116
|
|
|
181
|
-
1. Resolve
|
|
182
|
-
2. Read
|
|
183
|
-
3. Infer
|
|
184
|
-
4.
|
|
185
|
-
5.
|
|
117
|
+
1. Resolve relevant rules.
|
|
118
|
+
2. Read `init-project.md`.
|
|
119
|
+
3. Infer constraints, required docs, and boundaries from requirements, repo evidence, docs, and live research.
|
|
120
|
+
4. Recommend runtime/architecture when unresolved.
|
|
121
|
+
5. WAIT for user approval before generating code.
|
|
186
122
|
|
|
187
|
-
### 3. Refactor Mode
|
|
123
|
+
### 3. Refactor Mode
|
|
188
124
|
|
|
189
|
-
|
|
125
|
+
Trigger: refactor, improve, fix, clean up.
|
|
190
126
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
4. Propose plan before executing changes.
|
|
197
|
-
5. **WAIT for approval**.
|
|
127
|
+
1. Resolve relevant rules.
|
|
128
|
+
2. Read `refactor.md`.
|
|
129
|
+
3. Apply active prompt/checklist contracts.
|
|
130
|
+
4. Propose a plan before edits.
|
|
131
|
+
5. WAIT for approval.
|
|
198
132
|
|
|
199
133
|
### 4. Code Review Mode
|
|
200
134
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
**Workflow**:
|
|
135
|
+
Trigger: review, audit, check, analyze.
|
|
204
136
|
|
|
205
|
-
|
|
206
|
-
2. Load `.agent-context/review-checklists/architecture-review.md`.
|
|
207
|
-
3. Execute review against the active rules and contracts.
|
|
208
|
-
4. Generate a structured report.
|
|
137
|
+
Load `pr-checklist.md` and `architecture-review.md`, then report defects, risks, regressions, and missing tests first.
|
|
209
138
|
|
|
210
139
|
### 5. UI Design Mode
|
|
211
140
|
|
|
212
|
-
|
|
141
|
+
Trigger: ui, ux, layout, screen, tailwind, frontend, redesign.
|
|
213
142
|
|
|
214
|
-
|
|
143
|
+
1. Read `bootstrap-design.md` and `frontend-architecture.md`.
|
|
144
|
+
2. Read UI-relevant repo evidence from state, current UI code, and `docs/*`.
|
|
145
|
+
3. Include a one-line Motion/Palette Decision before UI code; product categories are heuristics, not style presets.
|
|
146
|
+
4. Before UI code, record one real-world anchor, one signature motion behavior, and one typographic role contrast.
|
|
147
|
+
5. Ensure `docs/design-intent.json` includes `conceptualAnchor.anchorReference`, top-level `derivedTokenLogic`, `libraryResearchStatus`, `libraryDecisions[]`, and motion/palette decisions.
|
|
148
|
+
6. Generate or refine `docs/DESIGN.md` plus `docs/design-intent.json` before UI implementation.
|
|
149
|
+
7. Keep context isolated; do not eagerly load unrelated backend-only rules.
|
|
215
150
|
|
|
216
|
-
|
|
217
|
-
2. Read `.agent-context/rules/frontend-architecture.md`.
|
|
218
|
-
3. Read UI-relevant repository evidence from `.agent-context/state/onboarding-report.json`, current UI code, and `docs/*`.
|
|
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.
|
|
151
|
+
## Reasoning Chain
|
|
224
152
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
## The Reasoning Chain (MANDATORY)
|
|
228
|
-
|
|
229
|
-
Every time you reject an approach or enforce a rule:
|
|
153
|
+
When rejecting an approach or enforcing a rule, use:
|
|
230
154
|
|
|
231
155
|
```text
|
|
232
156
|
REASONING CHAIN
|
|
233
|
-
Problem: [
|
|
234
|
-
Required Action: [
|
|
235
|
-
Why Required: [
|
|
157
|
+
Problem: [risk]
|
|
158
|
+
Required Action: [boundary]
|
|
159
|
+
Why Required: [project protection]
|
|
236
160
|
```
|
|
237
161
|
|
|
238
|
-
---
|
|
239
|
-
|
|
240
162
|
## Definition of Done
|
|
241
163
|
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
5. MCP validation passed (`npm run validate`).
|
|
249
|
-
|
|
250
|
-
---
|
|
164
|
+
Never claim done without:
|
|
165
|
+
1. Relevant rules applied.
|
|
166
|
+
2. PR and architecture checklists considered.
|
|
167
|
+
3. Universal SOP gates satisfied: `docs/architecture-decision-record.md`, plus `docs/DESIGN.md` and `docs/design-intent.json` for UI scope.
|
|
168
|
+
4. If `.agent-context/state/active-memory.json` exists and material project progress happened, refresh it while preserving privacy rules and user-owned entries.
|
|
169
|
+
5. MCP validation passed through `npm run validate`.
|
|
251
170
|
|
|
252
171
|
## Knowledge Inventory Checklist
|
|
253
172
|
|
|
254
|
-
Verify
|
|
255
|
-
|
|
256
|
-
- Layer 1: Rules
|
|
257
|
-
- Layer 2: Runtime Decision Signals
|
|
258
|
-
- Layer 3: Structural Planning Signals
|
|
259
|
-
- Layer 4: Execution Contracts
|
|
260
|
-
- Layer 5: Prompts
|
|
261
|
-
- Layer 6: Governance Modes
|
|
262
|
-
- Layer 7: State
|
|
263
|
-
- Layer 8: Policies
|
|
264
|
-
- Layer 9: Project Context
|
|
265
|
-
|
|
266
|
-
If a required layer is unreachable, report it instead of pretending the context exists.
|
|
267
|
-
|
|
268
|
-
---
|
|
269
|
-
|
|
270
|
-
## How Injection Works
|
|
271
|
-
|
|
272
|
-
1. A thin adapter or IDE entrypoint resolves to this file as the canonical baseline.
|
|
273
|
-
2. If `.agent-instructions.md` exists, read it next as the compiled project-specific snapshot.
|
|
274
|
-
3. Use the layer index to determine what is available.
|
|
275
|
-
4. Load only the domain-specific layers required by the request.
|
|
276
|
-
5. Apply the active contracts and checks before shipping.
|
|
277
|
-
|
|
278
|
-
**Result**: full context availability without forcing eager loading or irrelevant governance noise.
|
|
279
|
-
|
|
280
|
-
---
|
|
173
|
+
Verify reachability when relevant: Layer 1 Rules, Layer 2 Runtime Decision Signals, Layer 3 Structural Planning Signals, Layer 4 Execution Contracts, Layer 5 Prompts, Layer 6 Governance Modes, Layer 7 State, Layer 8 Policies, Layer 9 Project Context.
|
|
281
174
|
|
|
282
175
|
## Operating Gates
|
|
283
176
|
|
|
284
|
-
-
|
|
285
|
-
-
|
|
286
|
-
-
|
|
287
|
-
-
|
|
288
|
-
-
|
|
289
|
-
|
|
290
|
-
---
|
|
177
|
+
- Before code: resolve active rules and contract.
|
|
178
|
+
- Before PR: run review checklists.
|
|
179
|
+
- Before deploy: check policy thresholds.
|
|
180
|
+
- Before major refactor: read `architecture-map.md`.
|
|
181
|
+
- Before UI implementation: confirm valid style context, design contract, and required docs.
|
|
291
182
|
|
|
292
|
-
|
|
183
|
+
Start here. If `.agent-instructions.md` exists, read it next. Otherwise continue into the relevant layers.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Windsurf Rule - Thin Adapter
|
|
2
|
+
|
|
3
|
+
Adapter Mode: thin
|
|
4
|
+
Adapter Source: .instructions.md
|
|
5
|
+
Canonical Snapshot SHA256: 75652106d1fc453e9407eb9301e7f38de2e0159190dc47fb0b6e377859d91a46
|
|
6
|
+
|
|
7
|
+
This repository is governed by a strict instruction contract.
|
|
8
|
+
Use [.instructions.md](../../.instructions.md) as the canonical policy source.
|
|
9
|
+
Use .agent-context/ for technical rules, prompts, checklists, policies, and state.
|
|
10
|
+
Treat README.md as overview/install/user context only when governance files conflict.
|
|
11
|
+
|
|
12
|
+
## Critical Bootstrap Floor
|
|
13
|
+
|
|
14
|
+
- If your host stops at this file, continue the chain manually before coding.
|
|
15
|
+
- Read `.agent-instructions.md` next when it exists.
|
|
16
|
+
- Memory continuity does not replace bootstrap loading.
|
|
17
|
+
- For UI, UX, layout, screen, tailwind, frontend, or redesign requests, load [bootstrap-design.md](../../.agent-context/prompts/bootstrap-design.md) and [frontend-architecture.md](../../.agent-context/rules/frontend-architecture.md) before code edits.
|
|
18
|
+
- For UI scope, include a one-line Motion/Palette Decision in the Bootstrap Receipt; product categories are heuristics, not style presets.
|
|
19
|
+
- For UI scope, create or refine `docs/DESIGN.md` and `docs/design-intent.json` before UI implementation.
|
|
20
|
+
- 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.
|
|
21
|
+
- For backend, API, data, auth, error, event, queue, worker, or distributed-system requests, load only relevant global rules from .agent-context/rules/ ([link](../../.agent-context/rules)).
|
|
22
|
+
- For ecosystem, framework, dependency, or Docker claims, perform live web research.
|
|
23
|
+
- Resolve runtime choices from project evidence and live official documentation; resolve structural planning from constraints and architecture boundaries.
|
|
24
|
+
|
|
25
|
+
## Mandatory Bootstrap Chain
|
|
26
|
+
|
|
27
|
+
1. Load [.instructions.md](../../.instructions.md).
|
|
28
|
+
2. Load `.agent-instructions.md` when present.
|
|
29
|
+
3. Load only relevant files from .agent-context/rules/ ([link](../../.agent-context/rules)).
|
|
30
|
+
4. Apply matching prompts from .agent-context/prompts/ ([link](../../.agent-context/prompts)).
|
|
31
|
+
5. Enforce .agent-context/review-checklists/ ([link](../../.agent-context/review-checklists/pr-checklist.md)).
|
|
32
|
+
6. Use .agent-context/state/ ([link](../../.agent-context/state)) and .agent-context/policies/ ([link](../../.agent-context/policies)) only when relevant.
|
|
33
|
+
7. Use project docs and live evidence for runtime, dependency, and architecture claims.
|
|
34
|
+
|
|
35
|
+
## Bootstrap Receipt
|
|
36
|
+
|
|
37
|
+
For non-trivial coding, review, planning, or governance work, produce a short Bootstrap Receipt before implementation output: `loaded_files`, `selected_rules`, `skipped_rules`, `unreachable_files`, and `validation_plan`.
|
|
38
|
+
|
|
39
|
+
## Completion Gate
|
|
40
|
+
|
|
41
|
+
Run [pr-checklist.md](../../.agent-context/review-checklists/pr-checklist.md) before declaring work complete.
|
|
42
|
+
|
|
43
|
+
If this adapter drifts from canonical behavior, refresh from [.instructions.md](../../.instructions.md) and update the hash metadata.
|
package/.windsurfrules
CHANGED
|
@@ -1,92 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# .windsurfrules - Legacy Thin Adapter
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## GOVERNANCE PRECEDENCE
|
|
8
|
-
1. Follow this compiled rulebook as the primary source.
|
|
9
|
-
2. Resolve exceptions from .agent-override.md only when explicitly defined.
|
|
10
|
-
3. Use architecture-map.md and dependency-map.md as change safety boundaries.
|
|
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.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.39
|
|
4
|
+
Adapter Mode: legacy-thin
|
|
5
|
+
Adapter Source: .agent-instructions.md when present; fallback .instructions.md
|
|
6
|
+
Canonical baseline: .instructions.md
|
|
17
7
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
2. Resolve runtime and architecture signals from project context, repo evidence, and live research.
|
|
22
|
-
3. .agent-context/prompts/
|
|
23
|
-
4. Dynamic runtime and architecture decision 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)
|
|
8
|
+
This file is kept only for older Windsurf discovery.
|
|
9
|
+
Read .agent-instructions.md for the compiled rulebook when present.
|
|
10
|
+
Use .instructions.md as the canonical policy source.
|
|
27
11
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
|
12
|
+
Mandatory load floor:
|
|
13
|
+
1. Read .agent-instructions.md when present; otherwise read .instructions.md.
|
|
14
|
+
2. Load only relevant .agent-context/rules/ by task scope.
|
|
15
|
+
3. Apply matching .agent-context/prompts/ contracts.
|
|
16
|
+
4. Enforce .agent-context/review-checklists/ before completion.
|
|
17
|
+
5. Use .agent-context/state/ and .agent-context/policies/ only when relevant.
|
|
18
|
+
6. Resolve Runtime Decision Signals from repo evidence and live official docs.
|
|
19
|
+
7. Resolve Structural Planning Signals from constraints and architecture boundaries.
|
|
48
20
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## LAYER 2 POLICY: LAZY RULE LOADING
|
|
56
|
-
Primary runtime constraint: unresolved until agent recommendation is approved
|
|
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
|
-
## LAYER 5: EXECUTION PROMPTS AND UI TRIGGERS
|
|
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
|
|
63
|
-
1. .agent-context/prompts/init-project.md -> create, build, new project, scaffold
|
|
64
|
-
2. .agent-context/prompts/refactor.md -> refactor, improve, clean up, fix
|
|
65
|
-
3. .agent-context/prompts/review-code.md -> review, audit, check, analyze
|
|
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.
|
|
71
|
-
UI trigger policy:
|
|
72
|
-
- Load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md first.
|
|
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.
|
|
74
|
-
- For UI scope, materialize docs/DESIGN.md and docs/design-intent.json before implementing UI surfaces.
|
|
75
|
-
## LAYER 3: ARCHITECTURE DECISION REQUIRED
|
|
76
|
-
No architecture blueprint was selected by the user.
|
|
77
|
-
The AI agent must propose the architecture from the product brief, repo evidence, required docs, and live research before implementation.
|
|
78
|
-
Do not map detected runtime markers into a blueprint automatically.
|
|
79
|
-
## LAYER 3B: CI/CD GUARDRAILS
|
|
80
|
-
Load these CI blueprints when pipeline or release logic is touched:
|
|
81
|
-
1. ci-github-actions.md (dynamic CI policy signal)
|
|
82
|
-
2. ci-gitlab.md (dynamic CI policy signal)
|
|
83
|
-
## LAYER 7: STATE AWARENESS (MANDATORY)
|
|
84
|
-
Load these files before touching critical paths:
|
|
85
|
-
1. .agent-context/state/architecture-map.md
|
|
86
|
-
2. .agent-context/state/dependency-map.md
|
|
87
|
-
Use these maps to prevent unsafe cross-module changes.
|
|
88
|
-
## REVIEW CHECKLISTS (MANDATORY)
|
|
89
|
-
1. .agent-context/review-checklists/pr-checklist.md
|
|
90
|
-
2. .agent-context/review-checklists/architecture-review.md
|
|
91
|
-
Security and performance checks are consolidated inside these two checklist files.
|
|
92
|
-
Do not claim done before checklist pass.
|
|
21
|
+
Current bridges:
|
|
22
|
+
- Cursor: .cursor/rules/agentic-senior-core.mdc
|
|
23
|
+
- Windsurf: .windsurf/rules/agentic-senior-core.md
|
|
24
|
+
- Claude: CLAUDE.md
|
|
25
|
+
- Gemini: GEMINI.md and .gemini/instructions.md
|
|
26
|
+
- Copilot: .github/copilot-instructions.md and .github/instructions/agentic-senior-core.instructions.md
|