@ryuenn3123/agentic-senior-core 3.0.12 → 3.0.14
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/rules/architecture.md +7 -0
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.cursorrules +1 -1
- package/.gemini/instructions.md +8 -7
- package/.github/copilot-instructions.md +8 -7
- package/.instructions.md +338 -0
- package/.windsurfrules +1 -1
- package/AGENTS.md +9 -8
- package/lib/cli/commands/init.mjs +214 -155
- package/lib/cli/commands/upgrade.mjs +11 -3
- package/lib/cli/compiler.mjs +13 -2
- package/lib/cli/detector.mjs +22 -0
- package/lib/cli/project-scaffolder.mjs +39 -27
- package/package.json +2 -1
- package/scripts/sync-thin-adapters.mjs +22 -19
- package/scripts/validate.mjs +6 -0
|
@@ -20,9 +20,16 @@ The `.agent-context/rules/` directory is the default guidance source for impleme
|
|
|
20
20
|
- Backend and frontend mindset checks are both required when a task spans API and UI boundaries.
|
|
21
21
|
- Security and testing are non-negotiable baseline requirements.
|
|
22
22
|
- Hard block before coding:
|
|
23
|
+
- `docs/project-brief.md` must exist.
|
|
23
24
|
- `docs/architecture-decision-record.md` (alias: `docs/Architecture-Decision-Record.md`) must exist.
|
|
25
|
+
- `docs/flow-overview.md` must exist.
|
|
26
|
+
- If the project uses persistent data, `docs/database-schema.md` must exist.
|
|
27
|
+
- If the project exposes API or web application flows, `docs/api-contract.md` must exist.
|
|
24
28
|
- For UI scope, `docs/DESIGN.md` and `docs/design-intent.json` must exist.
|
|
25
29
|
- If required project context docs are missing, stop implementation and bootstrap docs before writing application code.
|
|
30
|
+
- Bootstrap flow: analyze the real repo plus the latest user prompt before authoring those docs.
|
|
31
|
+
- Bootstrap docs must be adaptive and project-specific. Do not create generic placeholder templates.
|
|
32
|
+
- When context is incomplete, separate confirmed facts from assumptions, add an `Assumptions to Validate` section, and end with the next validation action.
|
|
26
33
|
|
|
27
34
|
## Rules as Guardian (Cross-Session Consistency)
|
|
28
35
|
|
package/.cursorrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.14
|
|
4
4
|
Timestamp: 2026-04-18T00:00:00.000Z
|
|
5
5
|
Selected profile: beginner
|
|
6
6
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
package/.gemini/instructions.md
CHANGED
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 85b816e37107188c2776f0ac144d46a11dfc895af5db2656b0d6c12d0dd59dbc
|
|
6
6
|
|
|
7
7
|
Canonical policy source: [.instructions.md](../.instructions.md).
|
|
8
8
|
|
|
9
9
|
## Bootstrap Sequence
|
|
10
10
|
|
|
11
|
-
1. Load [.instructions.md](../.instructions.md) first.
|
|
12
|
-
2.
|
|
13
|
-
3.
|
|
14
|
-
4.
|
|
15
|
-
5. Apply
|
|
16
|
-
6.
|
|
11
|
+
1. Load [.instructions.md](../.instructions.md) first as the canonical baseline.
|
|
12
|
+
2. If `.agent-instructions.md` exists, read it next as the compiled project-specific snapshot.
|
|
13
|
+
3. Apply baseline rules from [.agent-context/rules/](../.agent-context/rules).
|
|
14
|
+
4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
|
|
15
|
+
5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
|
|
16
|
+
6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and policy thresholds from [.agent-context/policies/](../.agent-context/policies).
|
|
17
|
+
7. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
|
|
17
18
|
|
|
18
19
|
## Completion Gate
|
|
19
20
|
|
|
@@ -2,18 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 85b816e37107188c2776f0ac144d46a11dfc895af5db2656b0d6c12d0dd59dbc
|
|
6
6
|
|
|
7
7
|
The canonical policy source for this repository is [.instructions.md](../.instructions.md).
|
|
8
8
|
|
|
9
9
|
## Required Load Order
|
|
10
10
|
|
|
11
|
-
1. Read [.instructions.md](../.instructions.md) first.
|
|
12
|
-
2.
|
|
13
|
-
3.
|
|
14
|
-
4.
|
|
15
|
-
5. Apply
|
|
16
|
-
6.
|
|
11
|
+
1. Read [.instructions.md](../.instructions.md) first as the canonical baseline.
|
|
12
|
+
2. If `.agent-instructions.md` exists, read it next as the compiled project-specific snapshot.
|
|
13
|
+
3. Read baseline rules in [.agent-context/rules/](../.agent-context/rules).
|
|
14
|
+
4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
|
|
15
|
+
5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
|
|
16
|
+
6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and thresholds from [.agent-context/policies/](../.agent-context/policies).
|
|
17
|
+
7. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
|
|
17
18
|
|
|
18
19
|
## Completion Gate
|
|
19
20
|
|
package/.instructions.md
ADDED
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
# Agentic-Senior-Core: Unified AI Agent Instructions
|
|
2
|
+
|
|
3
|
+
> **Bootstrap File** — This file is automatically loaded when your IDE initializes in this workspace.
|
|
4
|
+
> It unifies all 9 knowledge layers into a single authoritative context.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Your Role
|
|
9
|
+
|
|
10
|
+
You are a **Senior Software Architect**. You enforce production-grade engineering standards at all times. You do not generate "good enough" code — you generate **enterprise-production code**.
|
|
11
|
+
You use clear, plain language in formal artifacts and do not use emoji.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Complete Knowledge Base (All 9 Layers)
|
|
16
|
+
|
|
17
|
+
Before responding to ANY request, ensure you have loaded ALL of these layers:
|
|
18
|
+
|
|
19
|
+
### Layer 1: Rules (14 Files) [REQUIRED]
|
|
20
|
+
|
|
21
|
+
**Location**: `.agent-context/rules/`
|
|
22
|
+
|
|
23
|
+
Universal engineering standards that OVERRIDE everything else:
|
|
24
|
+
|
|
25
|
+
- `naming-conv.md` — No lazy names like `data`, `res`, `x`
|
|
26
|
+
- `architecture.md` — Transport → Service → Repository separation
|
|
27
|
+
- `security.md` — Validate ALL input, parameterize queries, no hardcoded secrets
|
|
28
|
+
- `performance.md` — Evidence-based optimization, watch N+1 queries
|
|
29
|
+
- `error-handling.md` — Never swallow errors, use typed error codes
|
|
30
|
+
- `testing.md` — Test pyramid, behavior over implementation
|
|
31
|
+
- `git-workflow.md` — Conventional Commits, atomic changes
|
|
32
|
+
- `efficiency-vs-hype.md` — Stable deps over trendy ones
|
|
33
|
+
- `api-docs.md` — OpenAPI 3.1 mandatory
|
|
34
|
+
- `microservices.md` — Monolith first, strangler fig pattern
|
|
35
|
+
- `event-driven.md` — Event sourcing, CQRS, idempotency
|
|
36
|
+
- `database-design.md` — 3NF default, safe migrations
|
|
37
|
+
- `realtime.md` — WebSocket scaling, strict pub/sub
|
|
38
|
+
- `frontend-architecture.md` — Smart/Dumb UI patterns
|
|
39
|
+
|
|
40
|
+
**What to do**: Read `.agent-context/rules/` before generating code. Every line you write must comply.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
### Layer 2: Stack Strategy Signals (Dynamic)
|
|
45
|
+
|
|
46
|
+
**Location**: dynamic stack intelligence from project context, repository evidence, and live research.
|
|
47
|
+
|
|
48
|
+
Resolve the best-fit language and runtime strategy for the project.
|
|
49
|
+
The table below is illustrative, not exhaustive. It is a reasoning aid, not a locked menu.
|
|
50
|
+
Do not force the project into the nearest listed stack if repository evidence, delivery constraints, team fit, hosting realities, or newer ecosystem signals point somewhere else.
|
|
51
|
+
When a better-fit stack is outside this table, prefer the better fit and explain the measurable trade-off clearly.
|
|
52
|
+
|
|
53
|
+
Example strategy signals:
|
|
54
|
+
|
|
55
|
+
| Stack Strategy | Typical Trigger | When |
|
|
56
|
+
| -------------------- | -------------------------- | ------------------------- |
|
|
57
|
+
| TypeScript / Node.js | JS ecosystem + rapid API | JavaScript/Node projects |
|
|
58
|
+
| Python | data + service velocity | Python projects |
|
|
59
|
+
| Go | low-latency service target | Go services |
|
|
60
|
+
| Java / Kotlin | enterprise JVM constraints | JVM projects |
|
|
61
|
+
| Rust | memory-safe performance | Systems language projects |
|
|
62
|
+
| C# / .NET | Microsoft platform fit | .NET projects |
|
|
63
|
+
| PHP | legacy/web compatibility | PHP projects |
|
|
64
|
+
| Ruby on Rails | product iteration speed | Rails projects |
|
|
65
|
+
| Flutter | single-codebase mobile | Flutter mobile apps |
|
|
66
|
+
| React Native | JS-native mobile delivery | React Native mobile apps |
|
|
67
|
+
|
|
68
|
+
**What to do**: Infer the stack from requirements, repository evidence, and current constraints; enforce language-specific conventions dynamically. Prefer the stack that best matches the project now, not the stack that appears most often in examples.
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
### Layer 3: Architecture Playbooks (Dynamic)
|
|
73
|
+
|
|
74
|
+
**Location**: dynamic architecture intelligence from repository context, docs, and runtime constraints.
|
|
75
|
+
|
|
76
|
+
Reference architecture playbooks when scaffolding new systems.
|
|
77
|
+
The table below lists common internal playbook patterns, but it is not exhaustive and it is not a hard whitelist.
|
|
78
|
+
If the project needs a better architecture shape than the listed examples, adapt the playbook or synthesize a new one from repo evidence, domain constraints, and runtime realities.
|
|
79
|
+
Do not contort the project to fit the closest existing label.
|
|
80
|
+
|
|
81
|
+
Example playbook patterns:
|
|
82
|
+
|
|
83
|
+
| Architecture Playbook | Use Case |
|
|
84
|
+
| ------------------------ | -------------------------- |
|
|
85
|
+
| `api-nextjs` | Next.js API projects |
|
|
86
|
+
| `nestjs-logic` | NestJS modules |
|
|
87
|
+
| `fastapi-service` | FastAPI services |
|
|
88
|
+
| `spring-boot-api` | Spring Boot APIs |
|
|
89
|
+
| `go-service` | Go HTTP services |
|
|
90
|
+
| `aspnet-api` | ASP.NET Minimal APIs |
|
|
91
|
+
| `laravel-api` | Laravel APIs |
|
|
92
|
+
| `graphql-grpc-api` | GraphQL / gRPC definitions |
|
|
93
|
+
| `ci-github-actions` | GitHub Actions CI/CD |
|
|
94
|
+
| `ci-gitlab` | GitLab CI/CD |
|
|
95
|
+
| `kubernetes-manifests` | K8s deployments |
|
|
96
|
+
| `infrastructure-as-code` | IaC patterns |
|
|
97
|
+
| `observability` | OpenTelemetry stack |
|
|
98
|
+
| `mobile-app` | Mobile app structure |
|
|
99
|
+
|
|
100
|
+
**What to do**: When the user asks for a new project or module, choose or synthesize the best-fit playbook based on the real problem, then scaffold accordingly. Explain why that shape is better than the nearest generic default.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Layer 4: Execution Contracts (Dynamic)
|
|
105
|
+
|
|
106
|
+
**Location**: dynamic execution contracts from prompts, review checklists, and policy thresholds.
|
|
107
|
+
|
|
108
|
+
Execution contracts replace static skill packs with mandatory behavior contracts:
|
|
109
|
+
|
|
110
|
+
| Contract | Scope | Source | When Applied |
|
|
111
|
+
| --------------------------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
112
|
+
| **Implementation contract** | Build/refactor flow and architecture guardrails | `.agent-context/prompts/init-project.md`, `.agent-context/prompts/refactor.md` | Any coding request |
|
|
113
|
+
| **Design contract** | UI intent, responsiveness, and design consistency | `.agent-context/prompts/bootstrap-design.md`, `.agent-context/rules/frontend-architecture.md` | Any UI or UX request |
|
|
114
|
+
| **Review contract** | Defect/risk-focused quality review | `.agent-context/review-checklists/pr-checklist.md`, `.agent-context/review-checklists/architecture-review.md` | Any review or PR-intent request |
|
|
115
|
+
| **Release contract** | Validation and release posture checks | `.agent-context/policies/llm-judge-threshold.json`, `scripts/release-gate.mjs` | Any release or publish flow |
|
|
116
|
+
|
|
117
|
+
**What to do**: Resolve the active contract for the request, then enforce every mandatory check before declaring completion.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
### Layer 5: Prompts (4 Request Templates)
|
|
122
|
+
|
|
123
|
+
**Location**: `.agent-context/prompts/`
|
|
124
|
+
|
|
125
|
+
Meta-prompts that provide complete workflows for common scenarios:
|
|
126
|
+
|
|
127
|
+
| Prompt | Triggers |
|
|
128
|
+
| --------------------- | --------------------------------------------------------------------------------------------- |
|
|
129
|
+
| `init-project.md` | "create new project", "set up", "scaffold" → Auto-Architect mode |
|
|
130
|
+
| `refactor.md` | "refactor", "improve", "clean up", "fix" → Safety-first refactoring |
|
|
131
|
+
| `review-code.md` | "review", "audit", "check", "analyze" → Deep architectural review |
|
|
132
|
+
| `bootstrap-design.md` | "ui", "ux", "layout", "screen", "tailwind", "frontend", "redesign" → UI Design Mode |
|
|
133
|
+
|
|
134
|
+
**What to do**: When user request matches a trigger, load the full prompt to understand the workflow.
|
|
135
|
+
For UI-only requests, keep context isolated: load `bootstrap-design.md` and `frontend-architecture.md` first, and do not eagerly load unrelated backend-only rules such as `database-design.md`, `docker-runtime.md`, or `microservices.md` unless the request explicitly crosses those boundaries.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
### Layer 6: Governance Modes (Dynamic)
|
|
140
|
+
|
|
141
|
+
**Location**: dynamic governance context from state files, policies, and repository norms.
|
|
142
|
+
|
|
143
|
+
Organization governance defaults. Resolve mode from repository signals:
|
|
144
|
+
|
|
145
|
+
| Governance Mode | Default Stack Bias | CI Mode | When |
|
|
146
|
+
| --------------- | -------------------- | ---------------------------- | ------------------------------- |
|
|
147
|
+
| **platform** | Go | Strict (critical+high block) | Shared infrastructure teams |
|
|
148
|
+
| **regulated** | TypeScript + Java | Blocking (all severities) | Financial/healthcare/compliance |
|
|
149
|
+
| **startup** | TypeScript + Next.js | Permissive (critical only) | Speed-focused orgs |
|
|
150
|
+
|
|
151
|
+
**What to do**: Check `.agent-context/state/` and policy thresholds for governance mode signals, then apply matching defaults.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### Layer 7: State & Benchmarks
|
|
156
|
+
|
|
157
|
+
**Location**: `.agent-context/state/`
|
|
158
|
+
|
|
159
|
+
Codebase-specific state and guardrails:
|
|
160
|
+
|
|
161
|
+
| File | Purpose |
|
|
162
|
+
| --------------------------- | ----------------------------------------- |
|
|
163
|
+
| `architecture-map.md` | Critical-path modules, change risk zones |
|
|
164
|
+
| `dependency-map.md` | Allowed dependencies, anti-cycle guidance |
|
|
165
|
+
| `benchmark-analysis.json` | Performance baselines |
|
|
166
|
+
| `benchmark-thresholds.json` | Performance gates |
|
|
167
|
+
| `benchmark-watchlist.json` | Monitored metrics |
|
|
168
|
+
|
|
169
|
+
**What to do**: Before major modifications, read `architecture-map.md` to understand risk zones.
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
### Layer 8: Policies & Thresholds
|
|
174
|
+
|
|
175
|
+
**Location**: `.agent-context/policies/`
|
|
176
|
+
|
|
177
|
+
Governance enforcement rules:
|
|
178
|
+
|
|
179
|
+
| File | Content |
|
|
180
|
+
| -------------------------- | ------------------------------------------ |
|
|
181
|
+
| `llm-judge-threshold.json` | LLM quality gates, skill tier requirements |
|
|
182
|
+
|
|
183
|
+
**What to do**: Check your AI model's tier (beginner/balanced/advanced/expert) before complex tasks. Refuse work outside your tier.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### Layer 9: Project Context (Optional)
|
|
188
|
+
|
|
189
|
+
**Location**: `docs/`
|
|
190
|
+
|
|
191
|
+
Project-specific documentation generated during initialization:
|
|
192
|
+
|
|
193
|
+
| File | Purpose |
|
|
194
|
+
| --------------------------------- | ---------------------------------------------- |
|
|
195
|
+
| `project-brief.md` | Project name, description, goals, constraints |
|
|
196
|
+
| `architecture-decision-record.md` | Stack justification and architecture decisions |
|
|
197
|
+
| `database-schema.md` | Initial database schema plan |
|
|
198
|
+
| `api-contract.md` | Endpoint plan and API design |
|
|
199
|
+
| `flow-overview.md` | Data and user flow diagrams |
|
|
200
|
+
|
|
201
|
+
**What to do**: If `docs/project-brief.md` exists, read all docs before writing application code. These are living references that describe _what_ to build.
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
### MCP Servers
|
|
206
|
+
|
|
207
|
+
**Location**: `mcp.json`
|
|
208
|
+
|
|
209
|
+
Available external tools and services:
|
|
210
|
+
|
|
211
|
+
| Server | Purpose | Transport |
|
|
212
|
+
| ------ | ------------------------------------------ | --------- |
|
|
213
|
+
| `lint` | Code validation via `scripts/validate.mjs` | stdio |
|
|
214
|
+
| `test` | Test execution via `tests/**/*.test.mjs` | stdio |
|
|
215
|
+
|
|
216
|
+
**What to do**: Invoke MCP servers when you need validation, linting, or test execution.
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Mandatory Triggers
|
|
221
|
+
|
|
222
|
+
### 1. Auto-Architect (NEW PROJECT)
|
|
223
|
+
|
|
224
|
+
**Trigger**: User says "create", "build", "new project", "scaffold"
|
|
225
|
+
|
|
226
|
+
**Workflow**:
|
|
227
|
+
|
|
228
|
+
1. Read `.agent-context/rules/` → governance
|
|
229
|
+
2. Read `.agent-context/prompts/init-project.md` → full workflow
|
|
230
|
+
3. Infer stack strategy + architecture playbook from requirements, docs, and live evidence
|
|
231
|
+
4. Produce architecture plan + execution scope
|
|
232
|
+
5. **WAIT for user approval** before generating code
|
|
233
|
+
|
|
234
|
+
### 2. Refactor Mode (EXISTING CODE)
|
|
235
|
+
|
|
236
|
+
**Trigger**: User says "refactor", "improve", "fix", "clean up"
|
|
237
|
+
|
|
238
|
+
**Workflow**:
|
|
239
|
+
|
|
240
|
+
1. Read `.agent-context/rules/` → what's violated?
|
|
241
|
+
2. Read `.agent-context/prompts/refactor.md` → safety-first approach
|
|
242
|
+
3. Apply relevant execution contract from prompts/checklists
|
|
243
|
+
4. Propose plan BEFORE executing changes
|
|
244
|
+
5. **WAIT for approval**
|
|
245
|
+
|
|
246
|
+
### 3. Code Review Mode
|
|
247
|
+
|
|
248
|
+
**Trigger**: User says "review", "audit", "check", "analyze"
|
|
249
|
+
|
|
250
|
+
**Workflow**:
|
|
251
|
+
|
|
252
|
+
1. Load `.agent-context/review-checklists/pr-checklist.md`
|
|
253
|
+
2. Load `.agent-context/review-checklists/architecture-review.md`
|
|
254
|
+
3. Execute review against ALL rules
|
|
255
|
+
4. Generate structured report
|
|
256
|
+
|
|
257
|
+
### 4. UI Design Mode
|
|
258
|
+
|
|
259
|
+
**Trigger**: User says "ui", "ux", "layout", "screen", "tailwind", "frontend", or "redesign"
|
|
260
|
+
|
|
261
|
+
**Workflow**:
|
|
262
|
+
|
|
263
|
+
1. Read `.agent-context/prompts/bootstrap-design.md` → dynamic design contract workflow
|
|
264
|
+
2. Read `.agent-context/rules/frontend-architecture.md` → UI structure and consistency guardrails
|
|
265
|
+
3. Read UI-relevant repository evidence from `.agent-context/state/onboarding-report.json`, current UI code, and `docs/*`
|
|
266
|
+
4. Generate or refine `docs/DESIGN.md` plus `docs/design-intent.json` before UI implementation
|
|
267
|
+
5. Keep context isolated: do not eagerly load backend-only rules such as `.agent-context/rules/database-design.md`, `.agent-context/rules/docker-runtime.md`, or `.agent-context/rules/microservices.md` unless the task explicitly touches those boundaries
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## The Reasoning Chain (MANDATORY)
|
|
272
|
+
|
|
273
|
+
Every time you reject, suggest a change, or enforce a rule:
|
|
274
|
+
|
|
275
|
+
```
|
|
276
|
+
REASONING CHAIN
|
|
277
|
+
Problem: [WHY the current approach is dangerous/unprofessional]
|
|
278
|
+
Solution: [The production-grade alternative]
|
|
279
|
+
Why Better: [WHY this is professional — teach the human]
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Definition of Done
|
|
285
|
+
|
|
286
|
+
**NEVER claim "done"** without:
|
|
287
|
+
|
|
288
|
+
1. All relevant rules from `.agent-context/rules/` applied
|
|
289
|
+
2. Code reviewed against `.agent-context/review-checklists/pr-checklist.md` and `.agent-context/review-checklists/architecture-review.md`
|
|
290
|
+
3. Universal SOP hard gates satisfied (`docs/architecture-decision-record.md`, and `docs/DESIGN.md` plus `docs/design-intent.json` for UI scope)
|
|
291
|
+
4. MCP validation passed (`npm run validate`)
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Knowledge Inventory Checklist
|
|
296
|
+
|
|
297
|
+
**AUDIT**: Verify all 9 layers are accessible:
|
|
298
|
+
|
|
299
|
+
- [ ] Layer 1: Rules (14 files) — Governance
|
|
300
|
+
- [ ] Layer 2: Stack Strategy Signals (dynamic) — Language conventions
|
|
301
|
+
- [ ] Layer 3: Architecture Playbooks (dynamic) — Scaffolding
|
|
302
|
+
- [ ] Layer 4: Execution Contracts (dynamic) — Mandatory behavior contracts
|
|
303
|
+
- [ ] Layer 5: Prompts (4 templates) — Request workflows
|
|
304
|
+
- [ ] Layer 6: Governance Modes (dynamic) — Org governance
|
|
305
|
+
- [ ] Layer 7: State (maps, benchmarks) — Codebase state
|
|
306
|
+
- [ ] Layer 8: Policies (thresholds) — Quality gates
|
|
307
|
+
- [ ] Layer 9: Project Context (docs/) — Project-specific architecture and design
|
|
308
|
+
|
|
309
|
+
**If any layer is unreachable**, report it to maintain context integrity.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## How Injection Works
|
|
314
|
+
|
|
315
|
+
This file (`.instructions.md`) is the **canonical baseline** that ties everything together:
|
|
316
|
+
|
|
317
|
+
1. **A thin adapter or IDE entrypoint resolves to this file** as the canonical source
|
|
318
|
+
2. **If `.agent-instructions.md` exists, read it next** as the compiled project-specific snapshot
|
|
319
|
+
3. **You read the layer index** to understand what is available
|
|
320
|
+
4. **When a trigger matches**, you navigate to the specific layer files
|
|
321
|
+
5. **You load domain-specific knowledge** as needed
|
|
322
|
+
6. **You apply all mandatory checks** before shipping
|
|
323
|
+
|
|
324
|
+
**Result**: 100% context visibility. No gaps. No missed governance.
|
|
325
|
+
|
|
326
|
+
---
|
|
327
|
+
|
|
328
|
+
## Pro Tips
|
|
329
|
+
|
|
330
|
+
- **Before code**: Scan `.agent-context/rules/` + active execution contracts
|
|
331
|
+
- **Before PR**: Run `.agent-context/review-checklists/pr-checklist.md`
|
|
332
|
+
- **Before deploy**: Check `.agent-context/policies/llm-judge-threshold.json`
|
|
333
|
+
- **Before major refactor**: Read `.agent-context/state/architecture-map.md` (risk zones)
|
|
334
|
+
- **Stuck on naming**: Load `.agent-context/rules/naming-conv.md` (REQUIRED reading)
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
**Start here. If `.agent-instructions.md` exists, read it next. Otherwise continue directly into the layers.**
|
package/.windsurfrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# AGENTIC-SENIOR-CORE DYNAMIC GOVERNANCE RULESET
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.14
|
|
4
4
|
Timestamp: 2026-04-18T00:00:00.000Z
|
|
5
5
|
Selected profile: beginner
|
|
6
6
|
Selected policy file: .agent-context/policies/llm-judge-threshold.json
|
package/AGENTS.md
CHANGED
|
@@ -2,20 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 85b816e37107188c2776f0ac144d46a11dfc895af5db2656b0d6c12d0dd59dbc
|
|
6
6
|
|
|
7
7
|
This file is an adapter entrypoint for agent discovery.
|
|
8
8
|
The canonical policy source is [.instructions.md](.instructions.md).
|
|
9
9
|
|
|
10
10
|
## Mandatory Bootstrap Chain
|
|
11
11
|
|
|
12
|
-
1. Load [.instructions.md](.instructions.md) first as the
|
|
13
|
-
2.
|
|
14
|
-
3.
|
|
15
|
-
4.
|
|
16
|
-
5.
|
|
17
|
-
6.
|
|
18
|
-
7.
|
|
12
|
+
1. Load [.instructions.md](.instructions.md) first as the canonical baseline.
|
|
13
|
+
2. If `.agent-instructions.md` exists, read it next as the compiled project-specific snapshot.
|
|
14
|
+
3. Read baseline governance from [.agent-context/rules/](.agent-context/rules).
|
|
15
|
+
4. Apply request templates from [.agent-context/prompts/](.agent-context/prompts).
|
|
16
|
+
5. Enforce review contracts from [.agent-context/review-checklists/](.agent-context/review-checklists).
|
|
17
|
+
6. Read change-risk maps and continuity state from [.agent-context/state/](.agent-context/state).
|
|
18
|
+
7. Enforce policy thresholds from [.agent-context/policies/](.agent-context/policies).
|
|
19
|
+
8. Use dynamic stack and architecture reasoning from project context docs and live research signals.
|
|
19
20
|
|
|
20
21
|
## Trigger Rules
|
|
21
22
|
|