@ryuenn3123/agentic-senior-core 4.0.0 → 4.0.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "type": "module",
5
5
  "description": "Force your AI Agent to code like a Staff Engineer, not a Junior.",
6
6
  "bin": {
@@ -83,7 +83,7 @@
83
83
  "report:governance-weekly": "node ./scripts/governance-weekly-report.mjs",
84
84
  "clean:local": "node ./scripts/clean-local-artifacts.mjs",
85
85
  "validate": "node ./scripts/validate.mjs",
86
- "test": "node --test ./tests/cli-smoke.test.mjs ./tests/mcp-server.test.mjs ./tests/llm-judge.test.mjs ./tests/ui-rubric-calibration.test.mjs ./tests/operations.test.mjs ./tests/knowledge-injection.test.mjs ./tests/migrate-rule-format.test.mjs ./tests/audit-caching-scope-hygiene.test.mjs ./benchmarks/token-usage/lib/token-counter.test.mjs ./benchmarks/token-usage/lib/provider-cache-matrix.test.mjs ./benchmarks/token-usage/lib/cache-layer-contract.test.mjs ./benchmarks/token-usage/lib/cache-economics.test.mjs"
86
+ "test": "node --test ./tests/cli-smoke.test.mjs ./tests/mcp-server.test.mjs ./tests/llm-judge.test.mjs ./tests/ui-rubric-calibration.test.mjs ./tests/operations.test.mjs ./tests/knowledge-injection.test.mjs ./tests/migrate-rule-format.test.mjs ./tests/audit-caching-scope-hygiene.test.mjs ./tests/research-dossier-migration.test.mjs ./benchmarks/token-usage/lib/token-counter.test.mjs ./benchmarks/token-usage/lib/provider-cache-matrix.test.mjs ./benchmarks/token-usage/lib/cache-layer-contract.test.mjs ./benchmarks/token-usage/lib/cache-economics.test.mjs"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@anthropic-ai/sdk": "^0.96.0",
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Phase 5 drift catcher. Scans user-facing surfaces (README, AGENTS.md, FAQ,
8
8
  * integration playbook, CHANGELOG) for caching numerical claims and verifies
9
- * that each claim is integration-scoped per `docs/plan/research-foundation.md`
9
+ * that each claim is integration-scoped per `docs/architecture/decisions-foundation.md`
10
10
  * D4 "Per-Tool Caching Scope Matrix".
11
11
  *
12
12
  * The rule: never publish a single universal "X% caching saving" figure that
@@ -16,8 +16,8 @@
16
16
  * (direct API, Claude Code SDK programmatic, Cursor, Windsurf, Codex CLI,
17
17
  * Kiro, IDE wrapper) within +/- 600 characters of the figure, OR
18
18
  * 2. live in a documented exempt context (Phase 1 aggregate-cap CHANGELOG
19
- * rationale, plan files under docs/plan/, benchmark JSON under
20
- * benchmarks/results/, the canonical D4 matrix itself).
19
+ * rationale, archived plan files under docs/archive/, benchmark JSON
20
+ * under benchmarks/results/, the canonical D4 matrix itself).
21
21
  */
22
22
 
23
23
  import { existsSync, readFileSync } from 'node:fs';
@@ -200,7 +200,7 @@ export function runCachingScopeHygieneAudit(options = {}) {
200
200
  file: surfacePath,
201
201
  line: lineNumber,
202
202
  kind: 'caching-claim.missing-integration-scope',
203
- detail: `Caching saving claim "${claim.matchedText.trim()}" lacks an integration-mode marker within +/- ${CONTEXT_WINDOW_RADIUS} chars. Add a per-tool / direct-API / IDE-wrapper label, or move the figure under a clearly-scoped paragraph. Source of truth: docs/plan/research-foundation.md D4.`,
203
+ detail: `Caching saving claim "${claim.matchedText.trim()}" lacks an integration-mode marker within +/- ${CONTEXT_WINDOW_RADIUS} chars. Add a per-tool / direct-API / IDE-wrapper label, or move the figure under a clearly-scoped paragraph. Source of truth: docs/architecture/decisions-foundation.md D4.`,
204
204
  });
205
205
  }
206
206
  }
@@ -31,7 +31,7 @@ const SOURCE_ARTIFACTS = [
31
31
  artifactId: 'phase-2-cache',
32
32
  relativePath: 'benchmarks/results/cache-phase-2-2026-05-16.json',
33
33
  role: 'cache-simulation',
34
- description: 'Phase 2 offline warm-cache simulation. Direct provider API integration mode; see docs/plan/research-foundation.md D4 for the per-tool scope matrix.',
34
+ description: 'Phase 2 offline warm-cache simulation. Direct provider API integration mode; see docs/architecture/decisions-foundation.md D4 for the per-tool scope matrix.',
35
35
  },
36
36
  {
37
37
  artifactId: 'phase-3-anti-halu',
@@ -145,12 +145,12 @@ export function buildReleaseBenchmarkBundle(options = {}) {
145
145
  generated_at: new Date().toISOString(),
146
146
  description: 'Phase 5 release benchmark bundle. References Phase 0-3 locked artifacts plus the Phase 5 supply-chain snapshot. No artifact is regenerated by this bundle. Artifact integrity is verified by SHA-256 hash via scripts/audit-release-bundle.mjs.',
147
147
  sources: {
148
- research_foundation: 'docs/plan/research-foundation.md',
149
- d4_caching_scope_matrix: 'docs/plan/research-foundation.md#d4',
148
+ research_foundation: 'docs/architecture/decisions-foundation.md',
149
+ d4_caching_scope_matrix: 'docs/architecture/decisions-foundation.md#d4',
150
150
  caching_reporting_format: 'docs/benchmark-reference.md',
151
- phase_2_outcome: 'docs/plan/phase-2-outcome.md',
152
- phase_3_outcome: 'docs/plan/phase-3-outcome.md',
153
- phase_5_plan: 'docs/plan/phase-5-hardening.md',
151
+ phase_2_outcome: 'docs/archive/phase-2-outcome.md',
152
+ phase_3_outcome: 'docs/archive/phase-3-outcome.md',
153
+ phase_5_plan: 'docs/archive/phase-5-hardening.md',
154
154
  },
155
155
  integrity: {
156
156
  hash_algorithm: 'SHA-256',
@@ -74,6 +74,19 @@ const BOUNDARY_RULES = [
74
74
  'README.md',
75
75
  ],
76
76
  trigger(filePath) {
77
+ // Path-based exclusion: design-contract JSON shape lives under
78
+ // lib/cli/project-scaffolder/. Files like research-dossier-migration.mjs
79
+ // describe agent-prompt JSON contract migrations, not database schema
80
+ // or persistent-store migrations, so they must not trigger this boundary
81
+ // even when the filename contains the words "schema" or "migration".
82
+ // Tests for those design-contract migrations are excluded for the same
83
+ // reason.
84
+ if (filePath.startsWith('lib/cli/project-scaffolder/')) {
85
+ return false;
86
+ }
87
+ if (filePath.startsWith('tests/') && /research-dossier|design-contract/i.test(filePath)) {
88
+ return false;
89
+ }
77
90
  return !isDocumentationFilePath(filePath)
78
91
  && /(database|schema|migration|repository|sql|prisma|typeorm|knex)/i.test(filePath);
79
92
  },
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
 
3
3
  /**
4
- * Locked ID prefix table per `docs/plan/format-spec.md` section 3.
4
+ * Locked ID prefix table per `docs/architecture/format-spec.md` section 3.
5
5
  * The migration helper reads this map to assign frontmatter and section IDs.
6
6
  * Lock new entries here when adding a new rule file; never invent prefixes inline.
7
7
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * Renders a parsed legacy rule file plus a prefix-table entry into the v4
5
- * canonical format defined in `docs/plan/format-spec.md`.
5
+ * canonical format defined in `docs/architecture/format-spec.md`.
6
6
  *
7
7
  * Section IDs auto-assign sequentially starting at 001. The renderer never
8
8
  * skips integers; humans introduce gaps manually during review by editing
@@ -5,7 +5,7 @@
5
5
  * scripts/migrate-rule-format.mjs
6
6
  *
7
7
  * Phase 1 Task 1.2 migration helper. Converts a legacy v3 rule file into the
8
- * canonical v4 format defined in docs/plan/format-spec.md. Output is written
8
+ * canonical v4 format defined in docs/architecture/format-spec.md. Output is written
9
9
  * to a `.candidate.md` sibling so the human migrator can review the diff
10
10
  * before replacing the original.
11
11
  *
@@ -79,7 +79,12 @@ export function runStaticReleaseChecks(results, diagnostics) {
79
79
  stackFileName: 'agent-decision-runtime.md',
80
80
  blueprintFileName: 'agent-decision-architecture.md',
81
81
  },
82
- status: 'release-gate-seed-validation',
82
+ // Seed status so `tokenContinuityClassification: pending-research`
83
+ // is a valid placeholder. This probe asserts seed-shape completeness,
84
+ // not active-contract behavior; an agent or user fills the contract
85
+ // with anchor-derived / continuity-retained / newly-introduced once
86
+ // the dossier is filled.
87
+ status: 'seed-needs-design-synthesis',
83
88
  }));
84
89
  const designContractIssues = validateDesignContractCompleteness(designIntentSeed);
85
90
 
@@ -301,6 +301,12 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
301
301
  'Motion/Palette Decision',
302
302
  'product categories are heuristics',
303
303
  'perform live web research',
304
+ 'research-design.md',
305
+ 'researchDossier.metadata',
306
+ 'researchVerifiedAt',
307
+ 'freshnessWindowDays',
308
+ 'Anti-repeat ledger',
309
+ 'user-explicit redesign',
304
310
  ],
305
311
  },
306
312
  {
@@ -352,6 +358,31 @@ export const REQUIRED_UI_DESIGN_AUTOMATION_SNIPPETS = [
352
358
  'A new dependency, package count, or vague performance concern is not a blocker by itself.',
353
359
  'default component-kit styling without product rationale',
354
360
  'genericity findings that cannot name the exact drift signal',
361
+ 'research-design.md',
362
+ 'Section 3-5 gates from `research-design.md`',
363
+ ],
364
+ },
365
+ {
366
+ path: '.agent-context/prompts/research-design.md',
367
+ snippets: [
368
+ '# Research-Design Brief',
369
+ '## Section 3 — Category Code Identification',
370
+ '## Section 4 — Morphological Exploration',
371
+ '## Section 5 — Anchor Candidates',
372
+ 'specificity self-test',
373
+ 'uncomfortable combination',
374
+ 'STRONG PASS',
375
+ 'DISCARD',
376
+ 'Anti-Repeat Ledger Gate',
377
+ 'previousAnchors',
378
+ 'previousMotionSignatures',
379
+ 'Dimensional split',
380
+ 'typographyClusters',
381
+ 'paletteClusters',
382
+ 'layoutClusters',
383
+ 'motionClusters',
384
+ 'imageryClusters',
385
+ 'tokenContinuityClassification',
355
386
  ],
356
387
  },
357
388
  {
@@ -158,6 +158,7 @@ async function validateRequiredFiles() {
158
158
  'scripts/release-gate.mjs',
159
159
  'scripts/generate-sbom.mjs',
160
160
  '.agent-context/policies/llm-judge-threshold.json',
161
+ '.agent-context/prompts/research-design.md',
161
162
  'mcp.json',
162
163
  'AGENTS.md',
163
164
  'CLAUDE.md',