@ryuenn3123/agentic-senior-core 3.0.13 → 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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-21T11:40:14.071Z",
2
+ "generatedAt": "2026-04-21T12:40:20.244Z",
3
3
  "reportName": "memory-continuity-benchmark",
4
4
  "schemaVersion": "1.0.0",
5
5
  "passed": true,
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.13
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
@@ -2,18 +2,19 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: 5de5017263401012b3516c76e68be3cfdc5d1f09a2569d5943cfcd4105e0dde4
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. Apply baseline rules from [.agent-context/rules/](../.agent-context/rules).
13
- 3. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
14
- 4. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
15
- 5. Apply state awareness from [.agent-context/state/](../.agent-context/state) and policy thresholds from [.agent-context/policies/](../.agent-context/policies).
16
- 6. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
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: 5de5017263401012b3516c76e68be3cfdc5d1f09a2569d5943cfcd4105e0dde4
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. Read baseline rules in [.agent-context/rules/](../.agent-context/rules).
13
- 3. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
14
- 4. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
15
- 5. Apply state awareness from [.agent-context/state/](../.agent-context/state) and thresholds from [.agent-context/policies/](../.agent-context/policies).
16
- 6. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
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
 
@@ -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.13
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: 5de5017263401012b3516c76e68be3cfdc5d1f09a2569d5943cfcd4105e0dde4
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 single source of truth.
13
- 2. Read baseline governance from [.agent-context/rules/](.agent-context/rules).
14
- 3. Apply request templates from [.agent-context/prompts/](.agent-context/prompts).
15
- 4. Enforce review contracts from [.agent-context/review-checklists/](.agent-context/review-checklists).
16
- 5. Read change-risk maps and continuity state from [.agent-context/state/](.agent-context/state).
17
- 6. Enforce policy thresholds from [.agent-context/policies/](.agent-context/policies).
18
- 7. Use dynamic stack and architecture reasoning from project context docs and live research signals.
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
 
@@ -892,7 +892,7 @@ export async function runInitCommand(targetDirectoryArgument, initOptions = {})
892
892
  console.log(`- CI/CD quality checks (guardrails): ${includeCiGuardrails ? 'enabled' : 'disabled'}`);
893
893
  console.log(`- Blocking severities: ${formatBlockingSeverities(selectedProfile.blockingSeverities)}`);
894
894
  console.log(`- Setup time: ${formatDuration(setupDurationMs)}`);
895
- console.log('- Generated files: .agent-instructions.md, .cursorrules, .windsurfrules, .clauderc, and .agent-context/state/onboarding-report.json');
895
+ console.log('- Generated files: .instructions.md, .agent-instructions.md, compiled adapters, and .agent-context/state/onboarding-report.json');
896
896
  if (scaffoldingResult?.bootstrapMode === 'ai-synthesis') {
897
897
  console.log(`- Bootstrap prompts: ${(scaffoldingResult.generatedPromptFileNames || []).length} files generated in .agent-context/prompts/`);
898
898
  if ((scaffoldingResult.materializedFileNames || []).length > 0) {
@@ -33,6 +33,7 @@ import {
33
33
  } from '../detector.mjs';
34
34
  import {
35
35
  buildCompiledRulesContent,
36
+ compileDynamicContext,
36
37
  writeSelectedPolicy,
37
38
  writeOnboardingReport,
38
39
  loadOnboardingReportIfExists,
@@ -408,8 +409,15 @@ export async function runUpgradeCommand(targetDirectoryArgument, upgradeOptions
408
409
  supplementalCreatedFileNames.push('docs/design-intent.json');
409
410
  }
410
411
 
411
- await fs.writeFile(currentRulesPath, plannedRulesContent, 'utf8');
412
- await fs.writeFile(path.join(resolvedTargetDirectoryPath, '.windsurfrules'), plannedRulesContent, 'utf8');
412
+ await compileDynamicContext({
413
+ targetDirectoryPath: resolvedTargetDirectoryPath,
414
+ selectedProfileName,
415
+ selectedStackFileName,
416
+ selectedAdditionalStackFileNames,
417
+ selectedBlueprintFileName,
418
+ selectedAdditionalBlueprintFileNames,
419
+ includeCiGuardrails,
420
+ });
413
421
  await writeSelectedPolicy(resolvedTargetDirectoryPath, selectedProfileName);
414
422
 
415
423
  const setupDurationMs = Date.now() - setupStartedAt;
@@ -452,7 +460,7 @@ export async function runUpgradeCommand(targetDirectoryArgument, upgradeOptions
452
460
  supplementalCreatedFileNames.forEach((fileName) => console.log(` [NEW] ${fileName} (seed)`));
453
461
  }
454
462
 
455
- console.log('\nRefreshed files: .cursorrules, .windsurfrules, .agent-context/state/onboarding-report.json');
463
+ console.log('\nRefreshed files: .instructions.md, .agent-instructions.md, compiled adapters, and .agent-context/state/onboarding-report.json');
456
464
  } catch (error) {
457
465
  console.error('\n[FATAL] An error occurred during upgrade. Attempting automatic rollback...');
458
466
  try {
@@ -188,8 +188,8 @@ export async function buildCompiledRulesContent({
188
188
  `6. .agent-context/policies/${POLICY_FILE_NAME}`,
189
189
  '7. docs/ project context (or bootstrap prompts when docs are not materialized)',
190
190
  '',
191
- 'Primary entrypoint: .agent-instructions.md',
192
- 'Adapter entrypoints: .cursorrules, .windsurfrules, .clauderc, .gemini/instructions.md, .github/copilot-instructions.md',
191
+ 'Project-specific compiled snapshot: .agent-instructions.md',
192
+ 'Compiled adapter entrypoints: .cursorrules, .windsurfrules, .clauderc, .gemini/instructions.md, .github/copilot-instructions.md',
193
193
  'Canonical baseline: .instructions.md',
194
194
  ].join('\n')
195
195
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "3.0.13",
3
+ "version": "3.0.14",
4
4
  "type": "module",
5
5
  "description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -10,6 +10,7 @@
10
10
  "bin/",
11
11
  "lib/",
12
12
  "scripts/",
13
+ ".instructions.md",
13
14
  ".agent-context/",
14
15
  ".agents/",
15
16
  ".github/",
@@ -38,13 +38,14 @@ The canonical policy source is [.instructions.md](.instructions.md).
38
38
 
39
39
  ## Mandatory Bootstrap Chain
40
40
 
41
- 1. Load [.instructions.md](.instructions.md) first as the single source of truth.
42
- 2. Read baseline governance from [.agent-context/rules/](.agent-context/rules).
43
- 3. Apply request templates from [.agent-context/prompts/](.agent-context/prompts).
44
- 4. Enforce review contracts from [.agent-context/review-checklists/](.agent-context/review-checklists).
45
- 5. Read change-risk maps and continuity state from [.agent-context/state/](.agent-context/state).
46
- 6. Enforce policy thresholds from [.agent-context/policies/](.agent-context/policies).
47
- 7. Use dynamic stack and architecture reasoning from project context docs and live research signals.
41
+ 1. Load [.instructions.md](.instructions.md) first as the canonical baseline.
42
+ 2. If \`.agent-instructions.md\` exists, read it next as the compiled project-specific snapshot.
43
+ 3. Read baseline governance from [.agent-context/rules/](.agent-context/rules).
44
+ 4. Apply request templates from [.agent-context/prompts/](.agent-context/prompts).
45
+ 5. Enforce review contracts from [.agent-context/review-checklists/](.agent-context/review-checklists).
46
+ 6. Read change-risk maps and continuity state from [.agent-context/state/](.agent-context/state).
47
+ 7. Enforce policy thresholds from [.agent-context/policies/](.agent-context/policies).
48
+ 8. Use dynamic stack and architecture reasoning from project context docs and live research signals.
48
49
 
49
50
  ## Trigger Rules
50
51
 
@@ -67,12 +68,13 @@ The canonical policy source for this repository is [.instructions.md](../.instru
67
68
 
68
69
  ## Required Load Order
69
70
 
70
- 1. Read [.instructions.md](../.instructions.md) first.
71
- 2. Read baseline rules in [.agent-context/rules/](../.agent-context/rules).
72
- 3. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
73
- 4. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
74
- 5. Apply state awareness from [.agent-context/state/](../.agent-context/state) and thresholds from [.agent-context/policies/](../.agent-context/policies).
75
- 6. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
71
+ 1. Read [.instructions.md](../.instructions.md) first as the canonical baseline.
72
+ 2. If \`.agent-instructions.md\` exists, read it next as the compiled project-specific snapshot.
73
+ 3. Read baseline rules in [.agent-context/rules/](../.agent-context/rules).
74
+ 4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
75
+ 5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
76
+ 6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and thresholds from [.agent-context/policies/](../.agent-context/policies).
77
+ 7. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
76
78
 
77
79
  ## Completion Gate
78
80
 
@@ -91,12 +93,13 @@ Canonical policy source: [.instructions.md](../.instructions.md).
91
93
 
92
94
  ## Bootstrap Sequence
93
95
 
94
- 1. Load [.instructions.md](../.instructions.md) first.
95
- 2. Apply baseline rules from [.agent-context/rules/](../.agent-context/rules).
96
- 3. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
97
- 4. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
98
- 5. Apply state awareness from [.agent-context/state/](../.agent-context/state) and policy thresholds from [.agent-context/policies/](../.agent-context/policies).
99
- 6. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
96
+ 1. Load [.instructions.md](../.instructions.md) first as the canonical baseline.
97
+ 2. If \`.agent-instructions.md\` exists, read it next as the compiled project-specific snapshot.
98
+ 3. Apply baseline rules from [.agent-context/rules/](../.agent-context/rules).
99
+ 4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
100
+ 5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
101
+ 6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and policy thresholds from [.agent-context/policies/](../.agent-context/policies).
102
+ 7. Resolve stack and architecture choices dynamically from project context docs plus live evidence.
100
103
 
101
104
  ## Completion Gate
102
105
 
@@ -778,6 +778,12 @@ async function validatePackageMetadata() {
778
778
  } else {
779
779
  pass('package.json has no unnecessary devDependencies');
780
780
  }
781
+
782
+ if (Array.isArray(packageJson.files) && packageJson.files.includes('.instructions.md')) {
783
+ pass('package.json publishes canonical .instructions.md');
784
+ } else {
785
+ fail('package.json must publish .instructions.md so init and upgrade can copy the canonical root instructions file');
786
+ }
781
787
  }
782
788
 
783
789
  async function validatePolicyFile() {