@ryuenn3123/agentic-senior-core 4.4.0 → 5.2.0

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 (201) hide show
  1. package/.agents/plugins/agentic-senior-core/plugin.json +3 -0
  2. package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
  3. package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
  4. package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
  5. package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
  6. package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
  7. package/.agents/rules/agentic-senior-core.md +131 -0
  8. package/.claude-plugin/marketplace.json +17 -0
  9. package/.claude-plugin/plugin.json +17 -0
  10. package/.clinerules/agentic-senior-core.md +94 -0
  11. package/.codex-plugin/plugin.json +24 -0
  12. package/.cursor/rules/agentic-senior-core.mdc +99 -0
  13. package/.devin-plugin/plugin.json +13 -0
  14. package/.github/copilot-instructions.md +94 -0
  15. package/.github/plugin/marketplace.json +20 -0
  16. package/.github/plugin/plugin.json +16 -0
  17. package/.kiro/steering/agentic-senior-core.md +94 -0
  18. package/.openclaw/skills/asc/SKILL.md +23 -0
  19. package/.openclaw/skills/asc-audit/SKILL.md +28 -0
  20. package/.openclaw/skills/asc-review/SKILL.md +54 -0
  21. package/.opencode/plugins/agentic-senior-core.mjs +31 -0
  22. package/.windsurf/rules/agentic-senior-core.md +94 -0
  23. package/AGENTS.md +126 -127
  24. package/CONTRIBUTING.md +93 -63
  25. package/README.md +190 -110
  26. package/__init__.py +61 -0
  27. package/bin/agentic-senior-core.js +42 -41
  28. package/commands/asc-audit.md +1 -0
  29. package/commands/asc-audit.toml +2 -0
  30. package/commands/asc-help.md +9 -0
  31. package/commands/asc-help.toml +2 -0
  32. package/commands/asc-refactor.md +1 -0
  33. package/commands/asc-refactor.toml +2 -0
  34. package/commands/asc-review.md +1 -0
  35. package/commands/asc-review.toml +2 -0
  36. package/gemini-extension.json +10 -0
  37. package/hooks/copilot-hooks.json +21 -0
  38. package/hooks/hooks.json +31 -0
  39. package/hooks/session-start.js +36 -0
  40. package/hooks/subagent-start.js +38 -0
  41. package/lib/cli/commands/adapter.mjs +109 -0
  42. package/lib/cli/commands/clean.mjs +63 -0
  43. package/lib/cli/commands/status.mjs +94 -0
  44. package/package.json +43 -60
  45. package/plugin.yaml +16 -0
  46. package/scripts/uninstall.js +38 -0
  47. package/skills/asc/SKILL.md +16 -0
  48. package/skills/asc-audit/SKILL.md +28 -0
  49. package/skills/asc-refactor/SKILL.md +35 -0
  50. package/skills/asc-review/SKILL.md +54 -0
  51. package/.agent-context/policies/llm-judge-threshold.json +0 -29
  52. package/.agent-context/prompts/bootstrap-design.md +0 -63
  53. package/.agent-context/prompts/compact-natural-mode.md +0 -100
  54. package/.agent-context/prompts/init-project.md +0 -60
  55. package/.agent-context/prompts/refactor.md +0 -38
  56. package/.agent-context/prompts/review-code.md +0 -31
  57. package/.agent-context/review-checklists/architecture-review.md +0 -57
  58. package/.agent-context/review-checklists/pr-checklist.md +0 -134
  59. package/.agent-context/rules/api-docs.md +0 -24
  60. package/.agent-context/rules/api-versioning.md +0 -16
  61. package/.agent-context/rules/architecture.md +0 -38
  62. package/.agent-context/rules/background-jobs.md +0 -17
  63. package/.agent-context/rules/config-and-flags.md +0 -16
  64. package/.agent-context/rules/database-design.md +0 -18
  65. package/.agent-context/rules/docker-runtime.md +0 -17
  66. package/.agent-context/rules/error-handling.md +0 -16
  67. package/.agent-context/rules/event-driven.md +0 -16
  68. package/.agent-context/rules/frontend-architecture.md +0 -54
  69. package/.agent-context/rules/microservices.md +0 -16
  70. package/.agent-context/rules/migrations.md +0 -16
  71. package/.agent-context/rules/observability.md +0 -16
  72. package/.agent-context/rules/performance.md +0 -16
  73. package/.agent-context/rules/realtime.md +0 -16
  74. package/.agent-context/rules/resilience.md +0 -18
  75. package/.agent-context/rules/security.md +0 -18
  76. package/.agent-context/rules/testing.md +0 -16
  77. package/.agent-context/state/README.md +0 -25
  78. package/.agent-context/state/architecture-map.md +0 -40
  79. package/.agent-context/state/benchmark-comparison-schema.json +0 -181
  80. package/.agent-context/state/benchmark-reproducibility.json +0 -87
  81. package/.agent-context/state/benchmark-thresholds.json +0 -10
  82. package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
  83. package/.agent-context/state/dependency-map.md +0 -41
  84. package/.agent-context/state/memory-adapter-contract.json +0 -52
  85. package/.agent-context/state/memory-schema-v1.json +0 -88
  86. package/GEMINI.md +0 -1
  87. package/benchmarks/README.md +0 -60
  88. package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
  89. package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
  90. package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
  91. package/lib/cli/adaptive-context/catalog.mjs +0 -394
  92. package/lib/cli/adaptive-context/file-signals.mjs +0 -100
  93. package/lib/cli/adaptive-context/implications.mjs +0 -44
  94. package/lib/cli/adaptive-context.mjs +0 -151
  95. package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
  96. package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
  97. package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
  98. package/lib/cli/backup.mjs +0 -210
  99. package/lib/cli/commands/context.mjs +0 -140
  100. package/lib/cli/commands/init/project-context.mjs +0 -60
  101. package/lib/cli/commands/init/runtime-environment.mjs +0 -59
  102. package/lib/cli/commands/init/setup-decisions.mjs +0 -83
  103. package/lib/cli/commands/init.mjs +0 -654
  104. package/lib/cli/commands/launch.mjs +0 -76
  105. package/lib/cli/commands/optimize.mjs +0 -284
  106. package/lib/cli/commands/rollback.mjs +0 -64
  107. package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
  108. package/lib/cli/commands/upgrade.mjs +0 -451
  109. package/lib/cli/compiler.mjs +0 -187
  110. package/lib/cli/constants.mjs +0 -136
  111. package/lib/cli/detector/constants.mjs +0 -135
  112. package/lib/cli/detector/design-evidence/collector.mjs +0 -256
  113. package/lib/cli/detector/design-evidence/constants.mjs +0 -39
  114. package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
  115. package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
  116. package/lib/cli/detector/design-evidence/summary.mjs +0 -109
  117. package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
  118. package/lib/cli/detector/design-evidence.mjs +0 -25
  119. package/lib/cli/detector/stack-detection.mjs +0 -243
  120. package/lib/cli/detector/ui-signals.mjs +0 -150
  121. package/lib/cli/detector/workspace-scan.mjs +0 -177
  122. package/lib/cli/detector.mjs +0 -23
  123. package/lib/cli/init-detection-flow.mjs +0 -48
  124. package/lib/cli/init-options.mjs +0 -237
  125. package/lib/cli/init-selection.mjs +0 -29
  126. package/lib/cli/memory-continuity.mjs +0 -537
  127. package/lib/cli/preflight.mjs +0 -76
  128. package/lib/cli/project-scaffolder/constants.mjs +0 -69
  129. package/lib/cli/project-scaffolder/discovery.mjs +0 -272
  130. package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
  131. package/lib/cli/project-scaffolder/storage.mjs +0 -144
  132. package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
  133. package/lib/cli/project-scaffolder.mjs +0 -29
  134. package/lib/cli/rollback.mjs +0 -66
  135. package/lib/cli/token-optimization.mjs +0 -401
  136. package/lib/cli/utils/filesystem.mjs +0 -81
  137. package/lib/cli/utils/managed-surface.mjs +0 -280
  138. package/lib/cli/utils/prompting.mjs +0 -44
  139. package/lib/cli/utils.mjs +0 -479
  140. package/mcp.json +0 -134
  141. package/scripts/adaptive-context/fixtures.mjs +0 -183
  142. package/scripts/adaptive-context-benchmark.mjs +0 -9
  143. package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
  144. package/scripts/benchmark-evidence-bundle.mjs +0 -645
  145. package/scripts/benchmark-gate.mjs +0 -121
  146. package/scripts/benchmark-intelligence.mjs +0 -33
  147. package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
  148. package/scripts/build-release-benchmark-bundle.mjs +0 -202
  149. package/scripts/bump-version.mjs +0 -103
  150. package/scripts/clean-local-artifacts.mjs +0 -78
  151. package/scripts/compact-natural-mode-benchmark.mjs +0 -9
  152. package/scripts/context-triggered-audit.mjs +0 -391
  153. package/scripts/detection-benchmark.mjs +0 -127
  154. package/scripts/docs-quality-drift-report.mjs +0 -358
  155. package/scripts/documentation-boundary-audit.mjs +0 -305
  156. package/scripts/explain-on-demand-audit.mjs +0 -427
  157. package/scripts/forbidden-content-check.mjs +0 -123
  158. package/scripts/frontend-usability-audit.mjs +0 -243
  159. package/scripts/generate-sbom.mjs +0 -61
  160. package/scripts/governance-weekly-report.mjs +0 -466
  161. package/scripts/llm-judge/checklist-loader.mjs +0 -45
  162. package/scripts/llm-judge/constants.mjs +0 -66
  163. package/scripts/llm-judge/diff-collection.mjs +0 -74
  164. package/scripts/llm-judge/prompting.mjs +0 -78
  165. package/scripts/llm-judge/providers.mjs +0 -111
  166. package/scripts/llm-judge/verdict.mjs +0 -134
  167. package/scripts/llm-judge.mjs +0 -200
  168. package/scripts/memory-continuity-benchmark.mjs +0 -322
  169. package/scripts/quality-trend-report.mjs +0 -289
  170. package/scripts/release-gate/audit-checks.mjs +0 -441
  171. package/scripts/release-gate/constants.mjs +0 -53
  172. package/scripts/release-gate/runtime.mjs +0 -63
  173. package/scripts/release-gate/static-checks.mjs +0 -182
  174. package/scripts/release-gate.mjs +0 -42
  175. package/scripts/rules-guardian-audit.mjs +0 -580
  176. package/scripts/single-source-lazy-loading-audit.mjs +0 -449
  177. package/scripts/sync-thin-adapters.mjs +0 -72
  178. package/scripts/token-optimization-benchmark.mjs +0 -252
  179. package/scripts/ui-design-judge/constants.mjs +0 -13
  180. package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
  181. package/scripts/ui-design-judge/git-input.mjs +0 -134
  182. package/scripts/ui-design-judge/prompting.mjs +0 -52
  183. package/scripts/ui-design-judge/providers.mjs +0 -102
  184. package/scripts/ui-design-judge/reporting.mjs +0 -183
  185. package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
  186. package/scripts/ui-design-judge/rubric-goldset.json +0 -188
  187. package/scripts/ui-design-judge.mjs +0 -319
  188. package/scripts/ui-rubric-calibration.mjs +0 -35
  189. package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
  190. package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
  191. package/scripts/validate/audits/file-size.mjs +0 -158
  192. package/scripts/validate/audits/reflection-citations.mjs +0 -130
  193. package/scripts/validate/audits/release-bundle.mjs +0 -135
  194. package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
  195. package/scripts/validate/config.mjs +0 -501
  196. package/scripts/validate/coverage-checks.mjs +0 -446
  197. package/scripts/validate/file-structure.mjs +0 -158
  198. package/scripts/validate/markdown-content.mjs +0 -109
  199. package/scripts/validate/project-metadata.mjs +0 -166
  200. package/scripts/validate/utils.mjs +0 -52
  201. package/scripts/validate.mjs +0 -267
@@ -1,38 +0,0 @@
1
- ---
2
- id_prefix: ARCH
3
- domain: architecture
4
- priority: critical
5
- scope: all-tasks
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [architecture, arch, boundary, system]
8
- ---
9
-
10
- # Architecture Boundary
11
-
12
- ## ARCH-001: Execution Rules
13
- 1. Rely on ESLint/Linters for structural enforcement.
14
- 2. Require README.md and docs/doc-index.md.
15
- 3. Run `npm run validate` to enforce architecture invariants.
16
- 4. Do not invent custom crypto, custom state management, or custom routing. Use standard libraries.
17
-
18
- ## ARCH-005: Rules as Guardian (Cross-Session Consistency)
19
- 1. Session handoff must include active architecture contract summary.
20
- 2. Detect drift before changing runtime choices, topology, public contracts, or core patterns.
21
- 3. Direction changes require explicit user confirmation before applying changes.
22
-
23
- ## ARCH-006: Invisible State Management with Explain-on-Demand
24
- 1. Default responses must avoid unnecessary state-file internals.
25
- 2. State internals are exposed only on explicit user request.
26
- 3. Diagnostic mode explains relevant state decisions when needed.
27
-
28
- ## ARCH-007: Single Source of Truth and Lazy Rule Loading
29
- 1. Canonical rule source is AGENTS.md.
30
- 2. Load global domain rules lazily based on touched scope.
31
- 3. Do not create or load stack-specific governance adapters as the baseline.
32
-
33
- ## ARCH-008: AI-Optimized Code Style (Simplicity, Modularity, Elegance)
34
- 1. No Clever Hacks: Do not use code golfing, deeply nested ternaries, or tricky functional chains that destroy readability.
35
- 2. No Premature Abstraction: Avoid over-engineering (excessive helper functions, layers, or abstraction classes) when a direct procedural flow is easier for an LLM to comprehend.
36
- 3. Explicit Variable Naming: Use descriptive and functional variable names. Avoid cryptic abbreviations.
37
- 4. Natural Implementation Pass: Keep the main flow traceable, use early returns to reduce nesting, and avoid abstraction chains unless a real duplication pattern exists.
38
-
@@ -1,17 +0,0 @@
1
- ---
2
- id_prefix: JOB
3
- domain: background-jobs
4
- priority: medium
5
- scope: backend
6
- applies_to: [backend, fullstack]
7
- keywords: [background-jobs, worker, cron, queue]
8
- ---
9
-
10
- # Background Jobs Boundary
11
-
12
- ## JOB-001: Execution Rules
13
- 1. All jobs must be idempotent.
14
- 2. Offload heavy processing (>500ms) to background queues.
15
- 3. Use dead-letter queues (DLQ) for failed jobs.
16
- 4. Emit telemetry on job failure/success.
17
- 5. Jobs must have timeouts and retry limits.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: CFG
3
- domain: config-and-flags
4
- priority: high
5
- scope: backend
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [configuration, feature-flags, environment, secrets]
8
- ---
9
-
10
- # Configuration Boundary
11
-
12
- ## CFG-001: Execution Rules
13
- 1. Inject secrets via environment variables.
14
- 2. Never store secrets in code. Use .env.example for templates.
15
- 3. Use feature flags for incremental rollouts.
16
- 4. Validate config shapes at startup. Fail fast if invalid.
@@ -1,18 +0,0 @@
1
- ---
2
- id_prefix: DATA
3
- domain: database-design
4
- priority: high
5
- scope: data
6
- applies_to: [backend, fullstack]
7
- keywords: [database-design, data, schema]
8
- ---
9
-
10
- # Data Design Boundary
11
-
12
- ## DATA-001: Execution Rules
13
- 1. Avoid N+1 queries. Use eager loading or batching.
14
- 2. Paginate growable datasets.
15
- 3. Multi-table mutations must run inside transactions.
16
- 4. Monetary amounts must be integer (minor units) or exact decimal. NO floats.
17
- 5. Store real-world timestamps in UTC. NO naive timestamps.
18
- 6. Use optimistic concurrency tokens (ETag/version) for shared mutable resources.
@@ -1,17 +0,0 @@
1
- ---
2
- id_prefix: DOCK
3
- domain: docker-runtime
4
- priority: high
5
- scope: infra
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [docker-runtime, docker, runtime]
8
- ---
9
-
10
- # Docker Runtime Boundary
11
-
12
- ## DOCK-001: Execution Rules
13
- 1. ALWAYS perform Live Research / Web Search for latest official Docker documentation before writing configuration.
14
- 2. Keep Dev and Prod stages separate.
15
- 3. Use minimal trusted base images. Avoid running as root in Prod.
16
- 4. Never bake secrets into image layers.
17
- 5. Define explicit healthchecks in production compose files.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: ERR
3
- domain: error-handling
4
- priority: high
5
- scope: backend
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [error-handling, errors, exception]
8
- ---
9
-
10
- # Error Handling Boundary
11
-
12
- ## ERR-001: Execution Rules
13
- 1. Fail fast on invalid input.
14
- 2. Do not leak stack traces to clients. Log them securely.
15
- 3. Use standardized machine-readable error codes (RFC 9457).
16
- 4. Distinguish client errors (4xx) from server errors (5xx).
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: EVT
3
- domain: event-driven
4
- priority: medium
5
- scope: backend
6
- applies_to: [backend, fullstack]
7
- keywords: [event-driven, events, kafka, rabbitmq]
8
- ---
9
-
10
- # Event Driven Boundary
11
-
12
- ## EVT-001: Execution Rules
13
- 1. Events must be immutable.
14
- 2. Consumers must be idempotent.
15
- 3. Handle out-of-order events securely.
16
- 4. Always implement Dead Letter Queues (DLQ) for poison messages.
@@ -1,54 +0,0 @@
1
- ---
2
- id_prefix: FE
3
- domain: frontend-architecture
4
- priority: high
5
- scope: ui
6
- last_validated: 2026-05-17
7
- applies_to: [frontend, fullstack]
8
- keywords: [frontend-architecture, fe, ui, engineering]
9
- ---
10
-
11
- # Frontend Engineering Invariants (Tier 2)
12
-
13
- Load this rule for UI-facing engineering work. This file contains strict engineering constraints.
14
-
15
- ## FE-009: Accessibility
16
- 1. WCAG 2.2 AA is the hard floor. APCA is advisory perceptual tuning only.
17
- 2. Hard checks: focus visibility, target size, keyboard access, color-only meaning.
18
-
19
- ## FE-010: CSS Production Hardening
20
- 1. Plan overflow, wrapping, truncation, empty, loading, and error behavior.
21
- 2. Prefer logical composition primitives (container queries, subgrid).
22
-
23
- ## FE-011: Implementation Boundaries
24
- 1. Follow the shipped project stack and current repo patterns.
25
- 2. Do not hardcode framework-specific state management or data fetching libraries, or rigid component doctrines.
26
-
27
- ## FE-012: Data State Surface
28
- 1. Explicitly handle empty, loading, error, and offline states.
29
- 2. Reject "spinner everywhere".
30
-
31
- ## FE-013: Background and Wallpaper Discipline
32
- 1. Decorative geometry are invalid as wallpaper.
33
- 2. Use grids/lines only for specific functional roles (alignment, map, crop).
34
-
35
- ## FE-014: Production Content Policy
36
- 1. No visible testing, demo, sample, placeholder, lorem, or TODO labels in production UI.
37
-
38
- ## FE-015: Motion Implementation Budget
39
- 1. Keep reduced-motion, keyboard, loading, performance, and mobile fallbacks explicit.
40
-
41
- ## FE-016: Library and Design-Intent Discipline
42
- 1. Use component kits or headless primitives for behavior and accessibility when they fit.
43
-
44
- ## FE-017: Interactivity Priority
45
- 1. The interactive boundary must be drawn deliberately. Keep client-side state boundaries small.
46
- 2. Measure responsiveness through Interaction to Next Paint (INP).
47
-
48
- ## FE-018: Internationalization as Layout
49
- 1. Direction-sensitive spacing, alignment, and positioning must use CSS logical properties (e.g., `margin-inline-start`).
50
- 2. Plan a documented text-expansion budget for target locales.
51
-
52
- ## FE-019: Theme as Context
53
- 1. A theme switch is a change in lighting and surface model, not a color inversion. Re-derive tokens per theme.
54
- 2. Brand colors carried across themes must be individually verified against the active theme's contrast floor.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: SVC
3
- domain: microservices
4
- priority: medium
5
- scope: backend
6
- applies_to: [backend, fullstack]
7
- keywords: [microservices, monolith]
8
- ---
9
-
10
- # Microservices Boundary
11
-
12
- ## SVC-001: Execution Rules
13
- 1. Default to modular monoliths unless scale explicitly dictates microservices.
14
- 2. Independent services must own their data. NO shared databases.
15
- 3. Cross-service calls must have timeouts and retries.
16
- 4. Prefer async choreographies over distributed two-phase commits.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: MIG
3
- domain: migrations
4
- priority: high
5
- scope: data
6
- applies_to: [backend, fullstack]
7
- keywords: [migrations, schema, database]
8
- ---
9
-
10
- # Migrations Boundary
11
-
12
- ## MIG-001: Execution Rules
13
- 1. Schema changes MUST have a versioned migration.
14
- 2. Migrations must be reversible (down-migrations) or have a recovery plan.
15
- 3. Never modify past migrations once merged. Create a new one.
16
- 4. Use concurrent index builds in production.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: OBS
3
- domain: observability
4
- priority: high
5
- scope: backend
6
- applies_to: [backend, fullstack]
7
- keywords: [observability, telemetry, logs, metrics]
8
- ---
9
-
10
- # Observability Boundary
11
-
12
- ## OBS-001: Execution Rules
13
- 1. Emit telemetry for failures, degraded states, and security events.
14
- 2. Inject correlation IDs on inbound requests and propagate them downstream.
15
- 3. Do not log PII, secrets, or credentials.
16
- 4. Measure latency, traffic, errors, and saturation.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: PERF
3
- domain: performance
4
- priority: medium
5
- scope: backend
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [performance, perf, optimization]
8
- ---
9
-
10
- # Performance Boundary
11
-
12
- ## PERF-001: Execution Rules
13
- 1. Optimize DB queries before adding caches.
14
- 2. Compress network payloads.
15
- 3. Bound memory usage (paginate, stream). No unbounded arrays.
16
- 4. Cache aggressively but define explicit cache invalidation.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: RT
3
- domain: realtime
4
- priority: medium
5
- scope: backend
6
- applies_to: [backend, fullstack]
7
- keywords: [realtime, websockets, sse]
8
- ---
9
-
10
- # Realtime Boundary
11
-
12
- ## RT-001: Execution Rules
13
- 1. Use SSE for one-way server-to-client streams. Use WebSockets only for true bi-directional.
14
- 2. Realtime connections must gracefully degrade to polling if blocked.
15
- 3. Implement ping/pong heartbeats to drop dead connections.
16
- 4. Scale pub/sub via Redis or dedicated brokers.
@@ -1,18 +0,0 @@
1
- ---
2
- id_prefix: RES
3
- domain: resilience
4
- priority: critical
5
- scope: backend
6
- applies_to: [backend, fullstack]
7
- keywords: [resilience, timeout, retry]
8
- ---
9
-
10
- # Resilience Boundary
11
-
12
- ## RES-001: Execution Rules
13
- 1. Every outbound network call MUST have a strict timeout.
14
- 2. Retries MUST use exponential backoff with jitter and max attempt limits.
15
- 3. Only retry idempotent operations.
16
- 4. Fail fast using Circuit Breakers / Load Shedding on unhealthy dependencies.
17
- 5. Provide graceful degradation on non-critical dependency failures.
18
- 6. Enforce backpressure on bounded consumers.
@@ -1,18 +0,0 @@
1
- ---
2
- id_prefix: SEC
3
- domain: security
4
- priority: critical
5
- scope: all-tasks
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [security, boundary, zero-trust]
8
- ---
9
-
10
- # Security Boundary
11
-
12
- ## SEC-001: Execution Rules
13
- 1. Validate and normalize ALL inputs.
14
- 2. Parameterize all SQL queries. Never interpolate input into DB or Shell.
15
- 3. Hash passwords with Argon2/Bcrypt. NEVER store plain text or use MD5/SHA.
16
- 4. NEVER commit secrets, tokens, or credentials.
17
- 5. Implement resource-aware authorization (Row-Level), not just Authentication.
18
- 6. Verify service-to-service cryptographic identity.
@@ -1,16 +0,0 @@
1
- ---
2
- id_prefix: TEST
3
- domain: testing
4
- priority: medium
5
- scope: all-tasks
6
- applies_to: [backend, frontend, fullstack]
7
- keywords: [testing, tests, coverage]
8
- ---
9
-
10
- # Testing Boundary
11
-
12
- ## TEST-001: Execution Rules
13
- 1. Write tests for business logic and boundary failures.
14
- 2. Test error states, not just the happy path.
15
- 3. Use deterministic mocks for external services.
16
- 4. Ensure CI pipelines block on test failures.
@@ -1,25 +0,0 @@
1
- # State Artifacts
2
-
3
- Use this directory as a typed governance state surface, not as a dump folder.
4
-
5
- Tracked seed/config artifacts:
6
- - `architecture-map.md`
7
- - `dependency-map.md`
8
- - `benchmark-comparison-schema.json`
9
- - `benchmark-reproducibility.json`
10
- - `benchmark-thresholds.json`
11
- - `benchmark-writer-judge-config.json`
12
- - `memory-adapter-contract.json`
13
- - `memory-schema-v1.json`
14
-
15
- Tracked operational artifact:
16
- - `onboarding-report.json` stays tracked in this repository because internal audits read it as the current repository onboarding state. In installed projects, `init` and `upgrade` regenerate this file.
17
-
18
- Local-only/generated artifacts:
19
- - `active-memory.json`
20
- - `llm-judge-report.json`
21
- - `token-saver/`
22
- - `token-optimization-report.json`
23
- - benchmark, trend, weekly governance, and quality report outputs
24
-
25
- Do not treat generated reports or archived research as current project truth. Rerun the matching `npm run benchmark:*`, `npm run report:*`, or `npm run audit:*` command when fresh evidence is needed.
@@ -1,40 +0,0 @@
1
- # Architecture Map
2
-
3
- Use this file as repo-local agent context. It records the current governance architecture and the boundaries agents must protect.
4
-
5
- ## Boundary Classification
6
-
7
- | Surface | Criticality | Change Policy | Required Checks |
8
- | --- | --- | --- | --- |
9
- | `AGENTS.md`, `CLAUDE.md`, `GEMINI.md` | critical | Keep `AGENTS.md` canonical and native bridges minimal | `npm run sync:adapters`, `npm run check:adapters`, `npm run validate` |
10
- | `.agent-context/rules/**`, `.agent-context/prompts/**`, `.agent-context/review-checklists/**` | critical | Keep rules imperative, compact, scope-resolved, and non-duplicative | adapter sync, validation, targeted smoke tests |
11
- | `.agent-context/state/**` | high | Track only seed/config and current operational state; keep generated reports local-only | `npm pack --dry-run`, state README review |
12
- | `scripts/sync-thin-adapters.mjs` | critical | Preserve minimal import bridge compatibility for Claude and Gemini | adapter tests, smoke tests, validation |
13
- | `lib/cli/commands/init.mjs`, `lib/cli/commands/upgrade.mjs` | high | Preserve fresh-project and existing-project behavior without silent stack/style decisions | CLI smoke tests, onboarding report checks |
14
- | `lib/cli/project-scaffolder/**` | high | Preserve docs-first and design-contract behavior without hardcoded house style | design/detection smoke tests, validation |
15
- | `scripts/validate*.mjs`, `scripts/validate/**` | high | Keep validation mechanical and aligned with current shipped surfaces | `node ./scripts/validate.mjs`, targeted script checks |
16
- | `tests/**` | high | Test behavior and contracts, not private implementation trivia | `npm test` |
17
- | `package.json`, `package-lock.json`, package allowlist | high | Keep release metadata and tarball contents synchronized | `npm pack --dry-run`, release gate |
18
-
19
- ## Frontend Governance Context
20
-
21
- - Frontend guidance is efficient enough for the current architecture because it is scope-resolved: UI tasks load `bootstrap-design.md` and `frontend-architecture.md`; backend-only tasks do not.
22
- - Keep the current design contract. It does not prescribe a palette or layout; it requires product evidence, anchor-derived tokens, motion/spatial fit decisions, and accessibility.
23
- - Do not reduce motion, 3D, canvas, WebGL, or animation guidance. These are capability unlocks, not mandatory decoration.
24
- - Treat product categories as heuristics only. They must not become style presets.
25
- - Treat grid, line, glow, blob, and abstract-logo backgrounds as review findings unless they serve a named product function.
26
-
27
- ## Backend Governance Context
28
-
29
- - Backend guidance is efficient enough for the current architecture because backend/API rules are lazy-loaded by scope.
30
- - Keep global backend principles stack-agnostic: architecture boundaries, validation, safe errors, security, testing, event boundaries, and data design.
31
- - Do not add framework-specific governance adapters unless real repo evidence proves a repeated project need.
32
- - New dependencies are allowed when they improve efficiency, delivery time, correctness, or maintainability, and current official docs support the choice.
33
-
34
- ## Agent Behavior
35
-
36
- 1. Load the smallest relevant rule set.
37
- 2. Use README only for public and developer overview, setup, usage, and user-facing context when governance files conflict.
38
- 3. Preserve native import bridge sync before release.
39
- 4. Treat stale generated state, dual lockfiles, and obsolete V2/V3 transition files as cleanup findings.
40
- 5. Before claiming done, run the relevant validation gate and report any skipped checks.
@@ -1,181 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "title": "Benchmark Before-vs-After Comparison",
4
- "description": "Schema for comparing benchmark results across releases or configuration changes. Each entry captures quality, bug signal, runtime, and token metrics for a before and after snapshot.",
5
- "type": "object",
6
- "required": ["schemaVersion", "comparisonId", "generatedAt", "before", "after", "delta"],
7
- "properties": {
8
- "schemaVersion": {
9
- "type": "string",
10
- "const": "1.0.0"
11
- },
12
- "comparisonId": {
13
- "type": "string",
14
- "description": "Unique identifier for this comparison run."
15
- },
16
- "generatedAt": {
17
- "type": "string",
18
- "format": "date-time"
19
- },
20
- "baselineVersion": {
21
- "type": "string",
22
- "description": "Package version of the before snapshot."
23
- },
24
- "candidateVersion": {
25
- "type": "string",
26
- "description": "Package version of the after snapshot."
27
- },
28
- "comparisonType": {
29
- "type": "string",
30
- "enum": ["release-to-release", "config-change", "model-swap", "manual"],
31
- "description": "What triggered this comparison."
32
- },
33
- "before": { "$ref": "#/$defs/snapshot" },
34
- "after": { "$ref": "#/$defs/snapshot" },
35
- "delta": { "$ref": "#/$defs/deltaReport" },
36
- "verdict": {
37
- "type": "string",
38
- "enum": ["pass", "warn", "fail"],
39
- "description": "Overall comparison verdict based on threshold policy."
40
- },
41
- "verdictReason": {
42
- "type": "string",
43
- "description": "Human-readable explanation of the verdict."
44
- }
45
- },
46
- "$defs": {
47
- "snapshot": {
48
- "type": "object",
49
- "required": ["capturedAt", "quality", "runtime"],
50
- "properties": {
51
- "capturedAt": {
52
- "type": "string",
53
- "format": "date-time"
54
- },
55
- "packageVersion": {
56
- "type": "string"
57
- },
58
- "quality": {
59
- "type": "object",
60
- "properties": {
61
- "top1Accuracy": {
62
- "type": "number",
63
- "minimum": 0,
64
- "maximum": 1,
65
- "description": "Fraction of scenarios where the top-ranked output was correct."
66
- },
67
- "manualCorrectionRate": {
68
- "type": "number",
69
- "minimum": 0,
70
- "maximum": 1,
71
- "description": "Fraction of outputs requiring human correction."
72
- },
73
- "averageJudgeScore": {
74
- "type": "number",
75
- "minimum": 0,
76
- "maximum": 10,
77
- "description": "Mean score across all judge dimensions."
78
- },
79
- "scenarioCount": {
80
- "type": "integer",
81
- "minimum": 1
82
- }
83
- }
84
- },
85
- "bugSignal": {
86
- "type": "object",
87
- "properties": {
88
- "validationFailures": {
89
- "type": "integer",
90
- "minimum": 0,
91
- "description": "Number of validation check failures."
92
- },
93
- "securityWarnings": {
94
- "type": "integer",
95
- "minimum": 0
96
- },
97
- "deprecationWarnings": {
98
- "type": "integer",
99
- "minimum": 0
100
- }
101
- }
102
- },
103
- "runtime": {
104
- "type": "object",
105
- "properties": {
106
- "totalDurationMs": {
107
- "type": "number",
108
- "description": "Total benchmark suite execution time in milliseconds."
109
- },
110
- "averageScenarioDurationMs": {
111
- "type": "number"
112
- },
113
- "peakMemoryMb": {
114
- "type": "number"
115
- }
116
- }
117
- },
118
- "token": {
119
- "type": "object",
120
- "properties": {
121
- "nativeSavingsPercent": {
122
- "type": "number",
123
- "description": "Token savings from native optimization."
124
- },
125
- "proxySavingsPercent": {
126
- "type": "number",
127
- "description": "Token savings from external proxy optimization."
128
- },
129
- "totalInputTokens": {
130
- "type": "integer"
131
- },
132
- "totalOutputTokens": {
133
- "type": "integer"
134
- }
135
- }
136
- }
137
- }
138
- },
139
- "deltaReport": {
140
- "type": "object",
141
- "properties": {
142
- "top1AccuracyChange": {
143
- "type": "number",
144
- "description": "After minus before. Positive means improvement."
145
- },
146
- "manualCorrectionRateChange": {
147
- "type": "number",
148
- "description": "After minus before. Negative means improvement."
149
- },
150
- "averageJudgeScoreChange": {
151
- "type": "number"
152
- },
153
- "validationFailureChange": {
154
- "type": "integer"
155
- },
156
- "totalDurationMsChange": {
157
- "type": "number"
158
- },
159
- "nativeSavingsChange": {
160
- "type": "number"
161
- },
162
- "regressionDetected": {
163
- "type": "boolean",
164
- "description": "True if any metric crossed a threshold in the wrong direction."
165
- },
166
- "regressionDetails": {
167
- "type": "array",
168
- "items": {
169
- "type": "object",
170
- "properties": {
171
- "metric": { "type": "string" },
172
- "threshold": { "type": "number" },
173
- "actual": { "type": "number" },
174
- "direction": { "type": "string", "enum": ["increase", "decrease"] }
175
- }
176
- }
177
- }
178
- }
179
- }
180
- }
181
- }