@ryuenn3123/agentic-senior-core 3.0.25 → 3.0.27

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.
Files changed (38) hide show
  1. package/.agent-context/prompts/bootstrap-design.md +3 -3
  2. package/.agent-context/prompts/refactor.md +2 -0
  3. package/.agent-context/prompts/review-code.md +2 -2
  4. package/.agent-context/review-checklists/architecture-review.md +12 -0
  5. package/.agent-context/review-checklists/pr-checklist.md +10 -2
  6. package/.agent-context/rules/api-docs.md +4 -0
  7. package/.agent-context/rules/architecture.md +3 -3
  8. package/.agent-context/rules/database-design.md +9 -0
  9. package/.agent-context/rules/error-handling.md +8 -0
  10. package/.agent-context/rules/event-driven.md +3 -0
  11. package/.agent-context/rules/frontend-architecture.md +2 -2
  12. package/.agent-context/rules/microservices.md +2 -0
  13. package/.agent-context/rules/security.md +11 -0
  14. package/.agent-context/rules/testing.md +8 -0
  15. package/.agent-context/state/memory-continuity-benchmark.json +1 -1
  16. package/.agent-context/state/weekly-governance-report.json +234 -31
  17. package/.cursorrules +1 -1
  18. package/.gemini/instructions.md +3 -2
  19. package/.github/copilot-instructions.md +3 -2
  20. package/.instructions.md +16 -1
  21. package/.windsurfrules +1 -1
  22. package/AGENTS.md +4 -3
  23. package/README.md +6 -5
  24. package/lib/cli/commands/init.mjs +6 -0
  25. package/lib/cli/commands/upgrade.mjs +13 -0
  26. package/lib/cli/compiler.mjs +9 -8
  27. package/lib/cli/memory-continuity.mjs +137 -0
  28. package/lib/cli/project-scaffolder/design-contract.mjs +3 -3
  29. package/lib/cli/project-scaffolder/prompt-builders.mjs +2 -2
  30. package/lib/cli/token-optimization.mjs +56 -0
  31. package/package.json +1 -1
  32. package/scripts/governance-weekly-report.mjs +138 -1
  33. package/scripts/release-gate/audit-checks.mjs +1 -1
  34. package/scripts/release-gate/constants.mjs +11 -0
  35. package/scripts/rules-guardian-audit.mjs +1 -1
  36. package/scripts/single-source-lazy-loading-audit.mjs +10 -8
  37. package/scripts/sync-thin-adapters.mjs +7 -4
  38. package/scripts/ui-design-judge/prompting.mjs +1 -1
@@ -15,7 +15,7 @@ The agent must:
15
15
  2. If `docs/DESIGN.md` or `docs/design-intent.json` exists, refine them instead of replacing them blindly.
16
16
  3. If either design doc is missing, create it before UI implementation.
17
17
  4. Use current repo evidence, product copy, route names, component names, user goals, and existing constraints as the source of truth.
18
- 5. Treat prior-chat visuals, unrelated project memory, benchmark screenshots, and famous-product aesthetics as tainted unless the user explicitly asks for continuity.
18
+ 5. Treat prior-chat visuals, unrelated project memory, benchmark screenshots, and famous-product aesthetics as tainted context unless the user explicitly asks for continuity.
19
19
  6. When choosing a new UI, animation, styling, or component library, research current official docs and choose the latest stable compatible option for this project. Do not rely on offline defaults.
20
20
  7. Keep external references non-copying: extract constraints and reasoning only, never clone the surface.
21
21
 
@@ -41,7 +41,7 @@ The final anchor must come from broad non-template domains such as complex physi
41
41
 
42
42
  Write the chosen anchor into `docs/design-intent.json` as `conceptualAnchor`, including agentResearchMode, sourceDomain, rationale, derivedTokenLogic, visualRiskBudget, motionRiskBudget, and cohesionChecks. Typography, spacing, density, color behavior, morphology, motion, and responsive composition must logically derive from that single anchor. If a later design choice does not follow from the anchor, revise the contract before coding.
43
43
 
44
- Motion is not a garnish. The agent may use rich animation, fluid transitions, spatial reveals, scroll choreography, micro-interactions, and modern motion libraries when they support the anchor, remain performant, and include reduced-motion fallbacks. Do not suppress motion merely to look safe.
44
+ Motion is not a garnish. Default to a rich motion plan: fluid transitions, spatial reveals, scroll choreography, micro-interactions, and modern motion libraries are expected when they strengthen the anchor and product experience. Keep reduced-motion fallbacks instead of suppressing motion, and solve performance deliberately instead of using safety language as a reason to stay static.
45
45
 
46
46
  ## Zero-Based Redesign Protocol
47
47
 
@@ -62,7 +62,7 @@ The UI must feel authored by a strong UI/UX designer, not assembled from default
62
62
  Do:
63
63
  - Synthesize a visual direction from the project context and explain why it fits.
64
64
  - Choose color, typography, spacing, motion, density, and component morphology dynamically from the product and audience.
65
- - Use modern, expressive interaction when it improves hierarchy, feedback, delight, confidence, or memorability.
65
+ - Use modern, expressive interaction and motion as part of the core design language, especially when it improves hierarchy, feedback, delight, confidence, or memorability.
66
66
  - Keep frontend code clean, componentized, accessible, and easy to maintain.
67
67
  - Use tokens and semantic aliases so future changes do not require rewriting components.
68
68
  - Make design decisions explicit before coding, then implement consistently.
@@ -13,6 +13,8 @@ Before editing:
13
13
  5. If the change touches a dependency, framework, Docker, runtime, or ecosystem claim, verify current official docs before choosing.
14
14
  6. Enforce Universal SOP hard gate: stop implementation if `docs/architecture-decision-record.md` is missing, and for UI scope stop if `docs/DESIGN.md` or `docs/design-intent.json` is missing.
15
15
  7. Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.
16
+ 8. For backend/API scope, enforce layered boundaries, zero-trust input validation, safe centralized error responses, bounded list reads, transaction safety for multi-write mutations, idempotency for sensitive mutations, and behavior-focused API tests.
17
+ 9. Backend/API governance is global and stack-agnostic. Do not create stack-specific adapters or framework-specific rule branches; apply the global rules through the framework already present in the target project.
16
18
 
17
19
  Refactor rules:
18
20
  - Improve clarity, boundaries, naming, validation, error handling, tests, and docs.
@@ -12,7 +12,7 @@ Before reviewing:
12
12
  4. Load only the rules relevant to the changed scope.
13
13
  5. For UI changes, load .agent-context/prompts/bootstrap-design.md, .agent-context/rules/frontend-architecture.md, docs/DESIGN.md, and docs/design-intent.json when present.
14
14
  6. Enforce Universal SOP hard gate: block coding flow when required project docs are missing (`docs/architecture-decision-record.md`, and for UI scope `docs/DESIGN.md` plus `docs/design-intent.json`).
15
- 7. Enforce single-source and lazy-loading policy: canonical rule source must be explicitly enforced, language-specific guidance must load lazily based on detected scope, and conflicting duplicate rule instructions must not appear during normal flow.
15
+ 7. Enforce single-source and lazy-loading policy: canonical rule source must be explicitly enforced, global domain governance must load lazily based on touched scope, and conflicting duplicate rule instructions must not appear during normal flow.
16
16
 
17
17
  Prioritize findings in this order:
18
18
  1. Correctness, data loss, security, privacy, auth, and permission risks.
@@ -27,5 +27,5 @@ For every finding:
27
27
  - reference the rule or contract only when it materially supports the finding
28
28
  - propose the smallest safe fix
29
29
 
30
- Do not invent stack-specific concerns unless the repo or changed files prove they apply.
30
+ Do not create stack-specific governance concerns. Use project framework details only for concrete implementation risks proven by changed code, docs, or current official documentation.
31
31
  ```
@@ -6,6 +6,10 @@ Use this when module structure, feature shape, public contracts, topology, or re
6
6
 
7
7
  - [ ] The changed code has clear transport, application, domain, and infrastructure boundaries where those layers exist.
8
8
  - [ ] Business policy is not hidden in transport handlers, UI adapters, database queries, framework glue, or generated code.
9
+ - [ ] Controllers and route handlers only translate protocol input/output, enforce edge checks, and delegate business flow.
10
+ - [ ] Service or use-case code owns orchestration, transactions, state transitions, and idempotency decisions.
11
+ - [ ] Repository or adapter code owns persistence and external IO details without hiding product policy in queries.
12
+ - [ ] Global backend/API governance is used directly; no stack-specific adapter or framework-specific rule fork was introduced.
9
13
  - [ ] Internal models do not leak across public API, event, CLI, library, or UI contracts without a deliberate mapping.
10
14
  - [ ] Modules import through public entrypoints instead of deep internal paths.
11
15
  - [ ] Circular dependencies are absent or explicitly removed.
@@ -35,6 +39,10 @@ Use this when module structure, feature shape, public contracts, topology, or re
35
39
  - [ ] API, event, CLI, library, data, and UI contracts are documented before or alongside implementation.
36
40
  - [ ] Schema and validation strategy matches the project’s chosen runtime and official docs.
37
41
  - [ ] Error contracts are safe, stable, and do not leak internals.
42
+ - [ ] List endpoints have bounded pagination, limits, or streaming behavior documented.
43
+ - [ ] Sensitive mutations have documented idempotency, retry, and duplicate-submit behavior.
44
+ - [ ] Error contracts document stable codes, safe trace or correlation identifiers, and any Problem Details-style fields when exposed.
45
+ - [ ] Async/event contracts document retry, ordering, duplicate handling, and dead-letter or recovery behavior.
38
46
  - [ ] Migration and rollback plans exist for risky data or public contract changes.
39
47
 
40
48
  ## Operational Review
@@ -43,3 +51,7 @@ Use this when module structure, feature shape, public contracts, topology, or re
43
51
  - [ ] Observability, logging, and health checks match the project’s runtime and risk level.
44
52
  - [ ] Security assumptions are documented and enforced at trust boundaries.
45
53
  - [ ] Performance-sensitive paths avoid avoidable repeated work, unbounded lists, and hidden blocking operations.
54
+ - [ ] Relational reads avoid N+1 patterns or include an explicit query-shape rationale.
55
+ - [ ] Multi-table or cross-resource writes are transactional or include a documented compensating recovery path.
56
+ - [ ] Dual-write database plus message flows use an outbox or equivalent atomicity and replay strategy.
57
+ - [ ] Cross-service consistency avoids default two-phase commit and defines saga, compensation, or recovery behavior when needed.
@@ -24,6 +24,10 @@ Run this before declaring a task done. Apply only the sections relevant to the c
24
24
  - [ ] No clever hacks in backend and shared core modules
25
25
  - [ ] No premature abstraction (base classes/util layers created only after repeated stable patterns)
26
26
  - [ ] Readability over brevity for maintainability
27
+ - [ ] Controllers, route handlers, and transport adapters do not contain business policy, raw queries, or cross-resource orchestration.
28
+ - [ ] Services or use cases own business flow, transaction boundaries, and mutation safety.
29
+ - [ ] Repositories or adapters own persistence/external IO details without hiding business decisions.
30
+ - [ ] Backend/API governance was applied through global domain rules, not stack-specific adapters or framework-only branches.
27
31
  - [ ] Code is grouped by feature/domain where that improves maintainability.
28
32
  - [ ] Cross-module access uses public contracts instead of internal file reach-through.
29
33
  - [ ] Files above roughly 1000 lines were split or explicitly justified.
@@ -32,14 +36,18 @@ Run this before declaring a task done. Apply only the sections relevant to the c
32
36
  ## 4. Security And Privacy
33
37
 
34
38
  - [ ] External input is validated at trust boundaries using the project’s chosen validation approach.
39
+ - [ ] Body, query, params, headers, cookies, uploads, webhooks, and job payloads are treated as untrusted until validated and normalized.
35
40
  - [ ] Secrets, tokens, credentials, and private data are not committed or logged.
36
41
  - [ ] Authorization is enforced at a trusted boundary.
37
42
  - [ ] Error responses and logs do not leak internals.
43
+ - [ ] Least privilege, resource-level authorization, and secret handling are preserved where sensitive data or privileged actions are touched.
38
44
  - [ ] Dependency or platform security claims are based on current official docs or repo evidence.
39
45
 
40
46
  ## 5. Testing
41
47
 
42
48
  - [ ] Changed behavior has appropriate tests at the smallest useful level.
49
+ - [ ] API changes cover validation, authorization, documented error shape, pagination defaults, and empty states where relevant.
50
+ - [ ] Sensitive mutations include idempotency or duplicate-submit coverage where duplicate side effects would be harmful.
43
51
  - [ ] Tests assert behavior and contracts, not implementation trivia.
44
52
  - [ ] Critical flows include failure-path coverage.
45
53
  - [ ] Test fixtures are readable and do not hide the behavior under test.
@@ -65,7 +73,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
65
73
  - [ ] Visual direction is project-specific and not a template/default component-kit habit.
66
74
  - [ ] Responsive behavior recomposes content and priority, not only shrinking desktop layout.
67
75
  - [ ] Accessibility hard requirements are preserved: keyboard access, focus visibility, contrast, target size, status feedback, and no color-only meaning.
68
- - [ ] Motion is purposeful, reduced-motion-safe, and justified by product value.
76
+ - [ ] Motion is treated as part of the design language for modern UI work, with reduced-motion and performance safeguards instead of defaulting to static screens.
69
77
 
70
78
  ## 8. Dependencies And Runtime
71
79
 
@@ -88,7 +96,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
88
96
  - [ ] State internals are exposed only on explicit request.
89
97
  - [ ] Diagnostic mode can explain relevant state decisions when needed.
90
98
  - [ ] Canonical rule source is explicitly defined and enforced
91
- - [ ] Language-specific guidance is loaded lazily based on detected scope
99
+ - [ ] Global domain governance is loaded lazily based on touched scope
92
100
  - [ ] No conflicting duplicate rule instructions during normal flow
93
101
  - [ ] Canonical rule source is explicit and duplicate/conflicting instructions are avoided.
94
102
 
@@ -9,6 +9,10 @@ If a change affects an API, CLI command, exported library behavior, schema, even
9
9
  - Document the public surface before or alongside implementation.
10
10
  - Machine-readable API contracts should use the current project standard. If unresolved, the LLM must recommend a current maintained option from official docs.
11
11
  - HTTP APIs should prefer OpenAPI 3.1 when no stronger project standard exists.
12
+ - List endpoints must document pagination, limits, filtering, sorting, and empty-state behavior.
13
+ - Sensitive mutation endpoints must document idempotency behavior, retry safety, duplicate-submit handling, and any required idempotency key or request fingerprint.
14
+ - Public error contracts must document stable machine-readable codes and any RFC 9457 Problem Details-style fields the project exposes, including safe trace or correlation identifiers when present.
15
+ - Async, webhook, and event contracts must document idempotency, retry, ordering, dead-letter or recovery behavior, and duplicate-message handling.
12
16
  - Event APIs should define producer, consumer, payload, versioning, retry, and failure behavior.
13
17
  - CLI/library public behavior must update README, help text, changelog, or docs as appropriate.
14
18
  - Do not write "see code" as the contract.
@@ -50,9 +50,9 @@ The `.agent-context/rules/` directory is the default guidance source for impleme
50
50
 
51
51
  - Canonical rule source is .instructions.md.
52
52
  - Adapter entry files stay thin and must point to the canonical source.
53
- - Load language-specific stack guidance lazily based on detected scope.
54
- - Load language-specific or framework-specific guidance lazily based on changed files, explicit constraints, and repo evidence.
55
- - Do not preload unrelated stack profiles during normal flow.
53
+ - Load global domain rules lazily based on touched scope.
54
+ - Do not create or load stack-specific governance adapters as the baseline.
55
+ - Runtime or framework evidence can clarify implementation details, but it must not replace the global architecture, security, data, API, error, event, and testing boundaries.
56
56
  - Keep rule-loading output deterministic for init and release validation.
57
57
 
58
58
  ## Architecture Decision Boundary
@@ -10,4 +10,13 @@ Reject these bad habits:
10
10
  - raw query construction that bypasses safe parameterization
11
11
  - destructive data changes without backup, migration, or deployment sequencing notes
12
12
 
13
+ Backend data access rules:
14
+ - Relational reads must avoid N+1 query patterns. Use eager loading, joins, batching, or explicit query-shape rationale based on the project's ORM or database driver.
15
+ - List endpoints and exports must paginate, limit, stream, or otherwise bound growable datasets by default.
16
+ - Use cursor pagination for large or frequently changing datasets when the project contract allows it; offset pagination is acceptable for small, stable, explicitly bounded collections.
17
+ - Define maximum page size, payload size, and export limits so list responses cannot exhaust memory or connection pools.
18
+ - Mutations that write more than one table, aggregate, queue, or external consistency boundary must run inside a transaction or document the compensating recovery path.
19
+ - Repository and data-access layers own persistence mechanics. They must not hide business policy that belongs in application or domain logic.
20
+ - Cross-domain persistence must respect ownership boundaries. Independent services must not share database tables as an integration contract; modular monoliths may share one database only when module ownership and access paths stay explicit.
21
+
13
22
  Docs must record entity ownership, relationships, constraints, data lifecycle, migration risk, and assumptions to validate.
@@ -9,4 +9,12 @@ Reject these failure patterns:
9
9
  - retries without transient-failure evidence, limits, backoff, and a clear final outcome
10
10
  - logs that say only "something failed" without action, target, actor, or trace context
11
11
 
12
+ Backend API error rules:
13
+ - Use the framework's normal centralized error boundary or middleware for HTTP/API responses.
14
+ - Do not return raw exception messages, stack traces, SQL, provider payloads, file paths, secrets, or infrastructure details to callers.
15
+ - Public API errors must use a stable JSON shape with at least `code` and `message`; include `details` only when the data is safe, documented, and useful to the caller. HTTP APIs may use an RFC 9457 Problem Details-style shape when it fits the project contract.
16
+ - Domain and validation errors should keep machine-readable codes so tests, clients, and operators can distinguish expected failures from defects.
17
+ - API boundary errors should include a safe correlation or trace identifier when observability exists, while protected logs keep the internal exception, actor, target, and trace context.
18
+ - Distributed systems should preserve trace context across ingress and egress using the project's tracing standard, such as W3C Trace Context or OpenTelemetry propagation.
19
+
12
20
  At boundaries, validate early, return safe user-facing errors, and keep machine-readable error context for operators and callers.
@@ -17,6 +17,9 @@ Hard rules:
17
17
  - consumers are idempotent
18
18
  - retries are bounded and dead-letter or recovery behavior is defined
19
19
  - transactional publishing uses an outbox or equivalent safety pattern when data consistency matters
20
+ - dual-write flows that update local state and publish a message must use a transactional outbox or document an equivalent atomicity and replay strategy
21
+ - distributed transactions and two-phase commit are not the default recovery model; prefer local transactions plus saga, choreography, orchestration, or explicit compensating actions when consistency crosses service boundaries
22
+ - message handlers must record processed message identifiers or use another duplicate-detection strategy when the delivery model can retry or redeliver
20
23
  - event catalogs or docs identify producer, consumers, ownership, and schema evolution rules
21
24
 
22
25
  If event tooling is unresolved, the LLM must recommend a current project-fit broker or managed service from official docs before implementation.
@@ -58,7 +58,7 @@ Do not use this file to teach generic frontend basics the model already knows.
58
58
  - Before UI code, choose one agent-synthesized conceptual anchor from high-variance non-software domains and record only the final anchor in `docs/design-intent.json`.
59
59
  - Internally reject the safest dashboard, portal, card-grid, admin-shell, or minimalist-web-app mental model before writing CSS.
60
60
  - Typography, spacing, morphology, motion, and responsive recomposition must derive from the chosen anchor, not from framework defaults.
61
- - Rich motion, spatial transitions, and micro-interactions are allowed when they support the anchor and include reduced-motion and performance safeguards.
61
+ - Default to an expressive motion plan derived from the anchor. Use spatial transitions, micro-interactions, scroll choreography, and modern animation libraries when they improve the experience; include reduced-motion and performance safeguards without using them as an excuse for a static UI.
62
62
 
63
63
  ## Responsive Mutation Requirements
64
64
 
@@ -72,7 +72,7 @@ Do not use this file to teach generic frontend basics the model already knows.
72
72
  - Define the primary user task or reading path from current evidence before arranging surfaces.
73
73
  - Supporting surfaces must earn their placement through role, priority, or behavior. They must not feel like cloned modules.
74
74
  - Component states must preserve identity under hover, focus, loading, success, empty, and error. Do not let everything collapse into anonymous rounded panels.
75
- - Motion may be expressive, but it must strengthen hierarchy, feedback, or memorability while staying reduced-motion-safe and performant.
75
+ - Motion should be expressive by default for modern UI work. Make it strengthen hierarchy, feedback, or memorability, then keep it reduced-motion-safe and performant.
76
76
 
77
77
  ## Implementation Boundaries
78
78
 
@@ -35,7 +35,9 @@ Hard rules:
35
35
  - Each service owns its data boundary.
36
36
  - Public service contracts must be documented before implementation or extraction.
37
37
  - Cross-service calls need timeout, retry, idempotency, observability, and recovery behavior.
38
+ - Independent services must not use shared tables as their integration contract; communicate through documented APIs, events, or async workflows owned by the source domain.
38
39
  - Avoid synchronous call chains that turn services into a distributed monolith.
40
+ - Critical cross-service mutations should prefer local transactions plus outbox, saga, choreography, orchestration, or compensating actions over two-phase commit by default.
39
41
  - Prefer incremental extraction over rewrites.
40
42
 
41
43
  If the evidence is unclear, document the uncertainty and keep the topology agent-recommended instead of pretending an offline default is correct.
@@ -10,5 +10,16 @@ Hard rules:
10
10
  - enforce authorization at the server or trusted boundary, not only in UI state
11
11
  - return safe client-facing errors and keep sensitive detail in protected logs
12
12
  - document auth, permission, data exposure, rate-limit, and abuse assumptions before changing sensitive flows
13
+ - apply least privilege to service accounts, API tokens, database users, background jobs, and operator/admin actions
14
+ - retrieve secrets through environment, runtime secret injection, or the project's secret manager; do not store static secrets in source or plaintext config
15
+ - keep `.env` and local secret files covered by `.gitignore`; commit only safe examples such as `.env.example`
16
+ - treat transport encryption, secure cookies, and trusted proxy boundaries as deployment assumptions that must be documented when sensitive traffic is involved
17
+
18
+ Zero-trust API input rules:
19
+ - Treat body, query, params, headers, cookies, uploaded files, webhook payloads, and background job payloads as untrusted until validated.
20
+ - Validate and normalize input at the outer boundary before it reaches service, use-case, repository, or domain logic.
21
+ - Services should receive typed, already-validated values and still enforce domain invariants for security-sensitive rules.
22
+ - Sanitization must match the sink: SQL, shell, file path, log, HTML, template, and URL contexts need different protections.
23
+ - Authorization must be resource-aware when data ownership matters. Prefer row, tenant, account, organization, or resource-level checks over role-only checks for sensitive records.
13
24
 
14
25
  For high-risk changes, check current framework security docs and record the relevant source or assumption in the implementation notes.
@@ -8,6 +8,14 @@ Test what can break:
8
8
  - regressions around bugs being fixed
9
9
  - critical accessibility or responsive behavior when UI is in scope
10
10
 
11
+ Backend/API test rules:
12
+ - API tests must cover request validation, authorization boundaries, success responses, documented error shapes, pagination defaults, and empty states for touched endpoints.
13
+ - Sensitive mutations such as payments, orders, status changes, inventory adjustments, and account/security changes must include duplicate-submit or retry tests when idempotency is required.
14
+ - Data-access changes must include evidence for query shape, transaction behavior, rollback or recovery paths, and N+1 prevention when relational reads are touched.
15
+ - Event or worker changes must test retry, duplicate-message handling, dead-letter or recovery behavior, and outbox relay semantics when those paths exist.
16
+ - Distributed consistency changes must test the local transaction, publish/retry behavior, and compensating action or recovery path rather than only the happy path.
17
+ - Tests should make the API contract obvious from the fixture names, inputs, and expected response shape.
18
+
11
19
  Do not test framework internals, third-party library behavior, private implementation trivia, or snapshots that only freeze noise.
12
20
 
13
21
  Tests should describe behavior, keep setup readable, and mock only at real boundaries such as network, filesystem, clock, database, or external services.
@@ -1,5 +1,5 @@
1
1
  {
2
- "generatedAt": "2026-04-24T17:20:37.769Z",
2
+ "generatedAt": "2026-04-25T10:16:51.159Z",
3
3
  "reportName": "memory-continuity-benchmark",
4
4
  "schemaVersion": "1.0.0",
5
5
  "passed": true,
@@ -1,16 +1,27 @@
1
1
  {
2
- "generatedAt": "2026-04-11T12:21:37.776Z",
2
+ "generatedAt": "2026-04-25T09:59:20.980Z",
3
3
  "reportName": "weekly-governance-report",
4
4
  "methodology": {
5
5
  "qualityTrendSource": "state-file",
6
6
  "qualityTrendGeneratedAt": "2026-04-11T12:21:35.779Z",
7
7
  "commitWindowDays": 7,
8
8
  "requiredVerifiedDomains": [
9
- "cli",
10
- "frontend",
11
- "fullstack",
12
- "distribution",
13
- "review-quality"
9
+ "canonical-instructions",
10
+ "frontend-design-contract",
11
+ "frontend-architecture",
12
+ "backend-architecture",
13
+ "backend-security",
14
+ "backend-data-access",
15
+ "backend-error-handling",
16
+ "backend-api-contract",
17
+ "backend-testing",
18
+ "backend-performance",
19
+ "backend-idempotency",
20
+ "backend-risk-map",
21
+ "pr-checklist",
22
+ "architecture-review",
23
+ "mcp-server",
24
+ "state-continuity"
14
25
  ]
15
26
  },
16
27
  "qualitySignals": {
@@ -31,64 +42,236 @@
31
42
  "skillTrust": {
32
43
  "domains": [
33
44
  {
34
- "domain": "backend",
35
- "tier": "experimental",
36
- "score": 25
45
+ "domain": "architecture-review",
46
+ "tier": "verified",
47
+ "score": 100,
48
+ "sourcePath": ".agent-context/review-checklists/architecture-review.md"
49
+ },
50
+ {
51
+ "domain": "backend-api-contract",
52
+ "tier": "verified",
53
+ "score": 100,
54
+ "sourcePath": ".agent-context/rules/api-docs.md"
55
+ },
56
+ {
57
+ "domain": "backend-architecture",
58
+ "tier": "verified",
59
+ "score": 100,
60
+ "sourcePath": ".agent-context/rules/architecture.md"
61
+ },
62
+ {
63
+ "domain": "backend-data-access",
64
+ "tier": "verified",
65
+ "score": 100,
66
+ "sourcePath": ".agent-context/rules/database-design.md"
67
+ },
68
+ {
69
+ "domain": "backend-error-handling",
70
+ "tier": "verified",
71
+ "score": 100,
72
+ "sourcePath": ".agent-context/rules/error-handling.md"
73
+ },
74
+ {
75
+ "domain": "backend-idempotency",
76
+ "tier": "verified",
77
+ "score": 100,
78
+ "sourcePath": ".agent-context/rules/event-driven.md"
37
79
  },
38
80
  {
39
- "domain": "cli",
81
+ "domain": "backend-performance",
40
82
  "tier": "verified",
41
- "score": 100
83
+ "score": 100,
84
+ "sourcePath": ".agent-context/rules/performance.md"
42
85
  },
43
86
  {
44
- "domain": "distribution",
87
+ "domain": "backend-risk-map",
45
88
  "tier": "verified",
46
- "score": 100
89
+ "score": 100,
90
+ "sourcePath": ".agent-context/state/architecture-map.md"
47
91
  },
48
92
  {
49
- "domain": "frontend",
93
+ "domain": "backend-security",
50
94
  "tier": "verified",
51
- "score": 100
95
+ "score": 100,
96
+ "sourcePath": ".agent-context/rules/security.md"
52
97
  },
53
98
  {
54
- "domain": "fullstack",
99
+ "domain": "backend-testing",
55
100
  "tier": "verified",
56
- "score": 100
101
+ "score": 100,
102
+ "sourcePath": ".agent-context/rules/testing.md"
57
103
  },
58
104
  {
59
- "domain": "review-quality",
105
+ "domain": "canonical-instructions",
60
106
  "tier": "verified",
61
- "score": 100
107
+ "score": 100,
108
+ "sourcePath": ".instructions.md"
109
+ },
110
+ {
111
+ "domain": "frontend-architecture",
112
+ "tier": "verified",
113
+ "score": 100,
114
+ "sourcePath": ".agent-context/rules/frontend-architecture.md"
115
+ },
116
+ {
117
+ "domain": "frontend-design-contract",
118
+ "tier": "verified",
119
+ "score": 100,
120
+ "sourcePath": ".agent-context/prompts/bootstrap-design.md"
121
+ },
122
+ {
123
+ "domain": "mcp-server",
124
+ "tier": "verified",
125
+ "score": 100,
126
+ "sourcePath": "scripts/mcp-server.mjs"
127
+ },
128
+ {
129
+ "domain": "pr-checklist",
130
+ "tier": "verified",
131
+ "score": 100,
132
+ "sourcePath": ".agent-context/review-checklists/pr-checklist.md"
133
+ },
134
+ {
135
+ "domain": "state-continuity",
136
+ "tier": "verified",
137
+ "score": 100,
138
+ "sourcePath": ".agent-context/state"
62
139
  }
63
140
  ],
64
141
  "tierCounts": {
65
- "verified": 5,
142
+ "verified": 16,
66
143
  "community": 0,
67
- "experimental": 1
144
+ "experimental": 0
68
145
  },
69
146
  "requiredVerifiedDomains": [
70
- "cli",
71
- "frontend",
72
- "fullstack",
73
- "distribution",
74
- "review-quality"
147
+ "canonical-instructions",
148
+ "frontend-design-contract",
149
+ "frontend-architecture",
150
+ "backend-architecture",
151
+ "backend-security",
152
+ "backend-data-access",
153
+ "backend-error-handling",
154
+ "backend-api-contract",
155
+ "backend-testing",
156
+ "backend-performance",
157
+ "backend-idempotency",
158
+ "backend-risk-map",
159
+ "pr-checklist",
160
+ "architecture-review",
161
+ "mcp-server",
162
+ "state-continuity"
75
163
  ],
76
164
  "requiredVerifiedDomainFailures": [],
77
165
  "allRequiredVerified": true
78
166
  },
167
+ "backendGovernance": {
168
+ "status": "verified",
169
+ "summary": "Backend governance is verified across architecture, security, data access, error handling, API contracts, testing, performance, idempotency, and risk-map surfaces.",
170
+ "requiredSurfaceCount": 9,
171
+ "verifiedSurfaceCount": 9,
172
+ "missingSurfaceNames": [],
173
+ "coverage": [
174
+ {
175
+ "constraint": "Layered architecture and separation of concerns",
176
+ "status": "covered",
177
+ "sourcePaths": [
178
+ ".agent-context/rules/architecture.md",
179
+ ".agent-context/review-checklists/architecture-review.md"
180
+ ],
181
+ "signal": "Transport, application, domain, and infrastructure boundaries are explicit."
182
+ },
183
+ {
184
+ "constraint": "Global backend/API rule routing",
185
+ "status": "strengthened",
186
+ "sourcePaths": [
187
+ ".instructions.md",
188
+ ".agent-context/rules/architecture.md",
189
+ ".agent-context/prompts/refactor.md"
190
+ ],
191
+ "signal": "Backend/API governance routes by problem domain and stays stack-agnostic; no stack-specific governance adapters are created."
192
+ },
193
+ {
194
+ "constraint": "Zero-trust input validation",
195
+ "status": "strengthened",
196
+ "sourcePaths": [
197
+ ".agent-context/rules/security.md",
198
+ ".agent-context/review-checklists/pr-checklist.md"
199
+ ],
200
+ "signal": "User-controlled body, query, params, headers, cookies, files, webhooks, and job payloads must be validated before service logic."
201
+ },
202
+ {
203
+ "constraint": "Data access performance and integrity",
204
+ "status": "strengthened",
205
+ "sourcePaths": [
206
+ ".agent-context/rules/database-design.md",
207
+ ".agent-context/rules/performance.md",
208
+ ".agent-context/state/architecture-map.md"
209
+ ],
210
+ "signal": "Backend reads must avoid N+1 and unbounded list responses; multi-write mutations need transaction or recovery evidence."
211
+ },
212
+ {
213
+ "constraint": "Distributed consistency and outbox safety",
214
+ "status": "strengthened",
215
+ "sourcePaths": [
216
+ ".agent-context/rules/event-driven.md",
217
+ ".agent-context/rules/database-design.md",
218
+ ".agent-context/rules/microservices.md"
219
+ ],
220
+ "signal": "Dual-write flows need outbox or equivalent replay safety, and cross-service consistency must define saga, compensation, or recovery behavior instead of defaulting to two-phase commit."
221
+ },
222
+ {
223
+ "constraint": "Safe centralized API errors",
224
+ "status": "strengthened",
225
+ "sourcePaths": [
226
+ ".agent-context/rules/error-handling.md",
227
+ ".agent-context/rules/api-docs.md"
228
+ ],
229
+ "signal": "HTTP/API responses use safe machine-readable error shapes, may align with RFC 9457 Problem Details, and preserve safe trace/correlation identifiers without leaking internals."
230
+ },
231
+ {
232
+ "constraint": "Sensitive mutation idempotency",
233
+ "status": "strengthened",
234
+ "sourcePaths": [
235
+ ".agent-context/rules/api-docs.md",
236
+ ".agent-context/rules/testing.md",
237
+ ".agent-context/rules/event-driven.md"
238
+ ],
239
+ "signal": "Payments, orders, status changes, and other risky mutations must document and test duplicate-submit behavior."
240
+ },
241
+ {
242
+ "constraint": "API contract and behavior testing",
243
+ "status": "strengthened",
244
+ "sourcePaths": [
245
+ ".agent-context/rules/testing.md",
246
+ ".agent-context/review-checklists/pr-checklist.md"
247
+ ],
248
+ "signal": "API tests cover validation, auth, documented error shapes, pagination defaults, empty states, and mutation retry safety."
249
+ }
250
+ ],
251
+ "developmentFocus": [
252
+ {
253
+ "focus": "Keep backend guidance global and stack-agnostic.",
254
+ "reason": "The repo should enforce architecture, security, API, data, error, event, and testing thinking without building Nest, Laravel, FastAPI, Express, Go, or other stack-specific governance adapters."
255
+ },
256
+ {
257
+ "focus": "Use framework facts only when implementing inside an existing project.",
258
+ "reason": "LLMs can apply current ecosystem knowledge directly; governance should route the relevant global constraints instead of acting as a stack detector."
259
+ }
260
+ ]
261
+ },
79
262
  "commitSignals": {
80
263
  "windowDays": 7,
81
- "commitCount": 18,
82
- "releaseCommitCount": 7,
264
+ "commitCount": 30,
265
+ "releaseCommitCount": 18,
83
266
  "rollbackCommitCount": 1,
84
- "releaseFrequencyPercent": 38.89,
85
- "rollbackFrequencyPercent": 5.56,
267
+ "releaseFrequencyPercent": 60,
268
+ "rollbackFrequencyPercent": 3.33,
86
269
  "error": null
87
270
  },
88
271
  "releaseReadiness": {
89
272
  "isReady": true,
90
273
  "blockers": [],
91
- "summary": "Weekly governance posture is ready for maintenance releases."
274
+ "summary": "Weekly governance posture is ready for maintenance releases with frontend and backend governance surfaces verified."
92
275
  },
93
276
  "artifact": {
94
277
  "path": "E:\\Project\\Agentic-Senior-Core\\.agent-context\\state\\weekly-governance-report.json",
@@ -121,6 +304,26 @@
121
304
  "verifiedSkillDomainCount": 5,
122
305
  "releaseFrequencyPercent": 38.89,
123
306
  "rollbackFrequencyPercent": 5.56
307
+ },
308
+ {
309
+ "generatedAt": "2026-04-25T06:41:17.654Z",
310
+ "readinessStatus": "ready",
311
+ "blockerCount": 0,
312
+ "gatePassRatePercent": 100,
313
+ "verifiedSkillDomainCount": 16,
314
+ "backendVerifiedSurfaceCount": 9,
315
+ "releaseFrequencyPercent": 60,
316
+ "rollbackFrequencyPercent": 3.33
317
+ },
318
+ {
319
+ "generatedAt": "2026-04-25T09:59:20.980Z",
320
+ "readinessStatus": "ready",
321
+ "blockerCount": 0,
322
+ "gatePassRatePercent": 100,
323
+ "verifiedSkillDomainCount": 16,
324
+ "backendVerifiedSurfaceCount": 9,
325
+ "releaseFrequencyPercent": 60,
326
+ "rollbackFrequencyPercent": 3.33
124
327
  }
125
328
  ]
126
329
  }
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.25
3
+ Generated by Agentic-Senior-Core CLI v3.0.27
4
4
  Timestamp: 2026-04-24T06:02:48.303Z
5
5
  Selected policy file: .agent-context/policies/llm-judge-threshold.json
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Adapter Mode: thin
4
4
  Adapter Source: .instructions.md
5
- Canonical Snapshot SHA256: e6984d32169e98e32c9e6b6d6209bb2613b63b22d1e66af63a70788be00c55d5
5
+ Canonical Snapshot SHA256: 11eeafb3ff6a0977785e3668a704c6bba543b515d2828c02de8276f6cf1c391c
6
6
 
7
7
  Canonical policy source: [.instructions.md](../.instructions.md).
8
8
 
@@ -10,6 +10,7 @@ If your host stops at this file, follow this minimum floor:
10
10
  - Read `.agent-instructions.md` next when it exists.
11
11
  - For UI or redesign requests, load [.agent-context/prompts/bootstrap-design.md](../.agent-context/prompts/bootstrap-design.md) and [.agent-context/rules/frontend-architecture.md](../.agent-context/rules/frontend-architecture.md) before coding.
12
12
  - If UI scope and `docs/DESIGN.md` or `docs/design-intent.json` is missing, materialize them before UI implementation.
13
+ - For backend/API/data/auth/event requests, load relevant global rules from [.agent-context/rules/](../.agent-context/rules) and do not create stack-specific governance adapters.
13
14
  - Memory continuity is host-dependent project memory and does not replace bootstrap loading.
14
15
 
15
16
  ## Bootstrap Sequence
@@ -20,7 +21,7 @@ If your host stops at this file, follow this minimum floor:
20
21
  4. Load request templates from [.agent-context/prompts/](../.agent-context/prompts).
21
22
  5. Apply review contracts from [.agent-context/review-checklists/](../.agent-context/review-checklists).
22
23
  6. Apply state awareness from [.agent-context/state/](../.agent-context/state) and policy thresholds from [.agent-context/policies/](../.agent-context/policies).
23
- 7. Resolve stack, structure, and dependency choices from project context docs plus live evidence.
24
+ 7. Resolve runtime, structure, and dependency choices from project context docs plus live evidence.
24
25
 
25
26
  ## Completion Gate
26
27