gabbe-kit 1.0.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 (502) hide show
  1. package/LICENSE +25 -0
  2. package/LICENSE-CODE +202 -0
  3. package/README.md +817 -0
  4. package/agents/AGENTS.md +542 -0
  5. package/agents/CONSTITUTION.md +188 -0
  6. package/agents/guides/00-index.md +142 -0
  7. package/agents/guides/ai/a2ui-protocols.md +71 -0
  8. package/agents/guides/ai/actor-agent-frameworks.md +82 -0
  9. package/agents/guides/ai/agent-communication.md +146 -0
  10. package/agents/guides/ai/agent-identity-trust.md +69 -0
  11. package/agents/guides/ai/agent-only-cognition.md +73 -0
  12. package/agents/guides/ai/agent-only-swarms.md +70 -0
  13. package/agents/guides/ai/agent-operating-ergonomics.md +52 -0
  14. package/agents/guides/ai/agent-ui.md +106 -0
  15. package/agents/guides/ai/ai-agentic.md +309 -0
  16. package/agents/guides/ai/beyond-llms.md +60 -0
  17. package/agents/guides/ai/dynamic-capability-loading.md +121 -0
  18. package/agents/guides/ai/gabbe-innovations.md +111 -0
  19. package/agents/guides/ai/model-customization-decisions.md +78 -0
  20. package/agents/guides/ai/multi-agent-systems.md +85 -0
  21. package/agents/guides/ai/self-evolving-skills.md +137 -0
  22. package/agents/guides/ai/self-healing-summary.md +21 -0
  23. package/agents/guides/ai/visual-mcp-integration.md +106 -0
  24. package/agents/guides/architecture/api-standards.md +61 -0
  25. package/agents/guides/architecture/blockchain-dlt.md +36 -0
  26. package/agents/guides/architecture/critical-systems-arch.md +66 -0
  27. package/agents/guides/architecture/event-driven-architecture.md +39 -0
  28. package/agents/guides/architecture/microservices.md +292 -0
  29. package/agents/guides/architecture/monolith.md +303 -0
  30. package/agents/guides/architecture/orchestration.md +75 -0
  31. package/agents/guides/architecture/system-qualities.md +51 -0
  32. package/agents/guides/architecture/system-scalability.md +47 -0
  33. package/agents/guides/architecture/systems-architecture.md +506 -0
  34. package/agents/guides/data/semantic-web.md +23 -0
  35. package/agents/guides/data/sql-nosql.md +305 -0
  36. package/agents/guides/industry/engineering-standards.md +36 -0
  37. package/agents/guides/industry/global-standards.md +24 -0
  38. package/agents/guides/industry/healthcare-fhir.md +33 -0
  39. package/agents/guides/industry/industrial-iot.md +33 -0
  40. package/agents/guides/industry/telecom-networks.md +34 -0
  41. package/agents/guides/languages/c-sharp.md +66 -0
  42. package/agents/guides/languages/go-lang.md +251 -0
  43. package/agents/guides/languages/java.md +73 -0
  44. package/agents/guides/languages/js-ts-nodejs.md +361 -0
  45. package/agents/guides/languages/nodejs-advanced.md +56 -0
  46. package/agents/guides/languages/php-laravel.md +376 -0
  47. package/agents/guides/languages/python-fastapi-ai.md +257 -0
  48. package/agents/guides/languages/rust.md +73 -0
  49. package/agents/guides/ops/compliance-audit.md +177 -0
  50. package/agents/guides/ops/cost-optimization.md +57 -0
  51. package/agents/guides/ops/dev-environments.md +67 -0
  52. package/agents/guides/ops/dev-workflow.md +44 -0
  53. package/agents/guides/ops/gabbe-cli-workflows.md +252 -0
  54. package/agents/guides/ops/production-health.md +62 -0
  55. package/agents/guides/ops/troubleshooting-guide.md +69 -0
  56. package/agents/guides/patterns/agentic-design-patterns.md +308 -0
  57. package/agents/guides/patterns/agentic-patterns.md +43 -0
  58. package/agents/guides/patterns/ai-native-scenarios.md +71 -0
  59. package/agents/guides/patterns/autonomous-swarm-patterns.md +42 -0
  60. package/agents/guides/patterns/design-patterns.md +68 -0
  61. package/agents/guides/patterns/enterprise-migration-scenario.md +58 -0
  62. package/agents/guides/patterns/enterprise-patterns.md +56 -0
  63. package/agents/guides/patterns/software-design-patterns.md +106 -0
  64. package/agents/guides/patterns/time-complexity-analysis.md +116 -0
  65. package/agents/guides/planning/product-requirements.md +407 -0
  66. package/agents/guides/planning/strategic-analysis.md +98 -0
  67. package/agents/guides/planning/visual-product-specs.md +162 -0
  68. package/agents/guides/principles/clean-code-standards.md +51 -0
  69. package/agents/guides/principles/computing-foundations.md +87 -0
  70. package/agents/guides/principles/diagramming-standards.md +568 -0
  71. package/agents/guides/principles/evaluation-strategy.md +103 -0
  72. package/agents/guides/principles/future-tech.md +35 -0
  73. package/agents/guides/principles/human-agent-collaboration.md +54 -0
  74. package/agents/guides/principles/legacy-tech.md +61 -0
  75. package/agents/guides/principles/mathematical-foundations.md +103 -0
  76. package/agents/guides/principles/modeling-methods.md +97 -0
  77. package/agents/guides/principles/no-code-integration.md +84 -0
  78. package/agents/guides/principles/testing-strategy.md +97 -0
  79. package/agents/guides/principles/visual-design-system.md +44 -0
  80. package/agents/guides/processes/RARV_CYCLE.md +262 -0
  81. package/agents/guides/processes/extension-protocol.md +183 -0
  82. package/agents/guides/processes/full-system-lifecycle.md +47 -0
  83. package/agents/guides/processes/knowledge-integration.md +82 -0
  84. package/agents/guides/processes/loki-sdlc-phases.md +446 -0
  85. package/agents/guides/product/green-software.md +38 -0
  86. package/agents/guides/product/sustainability-checks.md +29 -0
  87. package/agents/guides/security/ai-risk-standards-map.md +98 -0
  88. package/agents/guides/security/api-security.md +51 -0
  89. package/agents/guides/security/cryptography-standards.md +38 -0
  90. package/agents/guides/security/privacy-data-protection.md +41 -0
  91. package/agents/guides/security/secure-architecture.md +43 -0
  92. package/agents/guides/security/threat-modeling.md +46 -0
  93. package/agents/memory/AUDIT_LOG.md +48 -0
  94. package/agents/memory/CONTINUITY.md +49 -0
  95. package/agents/memory/PROJECT_STATE.md +134 -0
  96. package/agents/memory/RESUME_POINTER.md +15 -0
  97. package/agents/memory/episodic/DECISION_LOG_TEMPLATE.md +104 -0
  98. package/agents/memory/semantic/PROJECT_KNOWLEDGE_TEMPLATE.md +194 -0
  99. package/agents/memory/semantic/VECTOR_DB_CONFIG_TEMPLATE.json +46 -0
  100. package/agents/personas/00-index.md +148 -0
  101. package/agents/personas/biz-compliance.md +112 -0
  102. package/agents/personas/biz-legal.md +131 -0
  103. package/agents/personas/eng-api.md +110 -0
  104. package/agents/personas/eng-backend.md +113 -0
  105. package/agents/personas/eng-data.md +50 -0
  106. package/agents/personas/eng-database.md +95 -0
  107. package/agents/personas/eng-frontend.md +75 -0
  108. package/agents/personas/eng-infra.md +105 -0
  109. package/agents/personas/eng-messaging.md +50 -0
  110. package/agents/personas/eng-ml.md +50 -0
  111. package/agents/personas/eng-mobile.md +75 -0
  112. package/agents/personas/eng-perf.md +90 -0
  113. package/agents/personas/eng-qa.md +125 -0
  114. package/agents/personas/eng-tooling.md +49 -0
  115. package/agents/personas/ops-compliance.md +109 -0
  116. package/agents/personas/ops-cost.md +92 -0
  117. package/agents/personas/ops-devops.md +85 -0
  118. package/agents/personas/ops-incident.md +123 -0
  119. package/agents/personas/ops-monitor.md +89 -0
  120. package/agents/personas/ops-release.md +91 -0
  121. package/agents/personas/ops-security.md +104 -0
  122. package/agents/personas/ops-sre.md +85 -0
  123. package/agents/personas/orch-coordinator.md +140 -0
  124. package/agents/personas/orch-judge.md +135 -0
  125. package/agents/personas/orch-planner.md +114 -0
  126. package/agents/personas/orch-researcher.md +165 -0
  127. package/agents/personas/prod-architect.md +110 -0
  128. package/agents/personas/prod-design.md +112 -0
  129. package/agents/personas/prod-ethicist.md +50 -0
  130. package/agents/personas/prod-integration.md +120 -0
  131. package/agents/personas/prod-pm.md +115 -0
  132. package/agents/personas/prod-product-ops.md +128 -0
  133. package/agents/personas/prod-research.md +49 -0
  134. package/agents/personas/prod-safety-engineer.md +28 -0
  135. package/agents/personas/prod-tech-lead.md +119 -0
  136. package/agents/personas/ui-design.md +81 -0
  137. package/agents/scripts/check_skills_docs.py +120 -0
  138. package/agents/scripts/compile_skills.py +284 -0
  139. package/agents/scripts/comprehensive_checker.py +187 -0
  140. package/agents/scripts/dump-context.sh +37 -0
  141. package/agents/scripts/eval_skills.py +268 -0
  142. package/agents/scripts/preflight_summary.sh +80 -0
  143. package/agents/scripts/report_duplicates.py +125 -0
  144. package/agents/scripts/setup-context.ps1 +250 -0
  145. package/agents/scripts/setup-context.sh +398 -0
  146. package/agents/scripts/state_export.sh +84 -0
  147. package/agents/scripts/state_import.sh +99 -0
  148. package/agents/scripts/validate_integrity.py +98 -0
  149. package/agents/scripts/validate_links.py +96 -0
  150. package/agents/scripts/validate_methodology_graph.py +194 -0
  151. package/agents/scripts/validate_skills.py +81 -0
  152. package/agents/scripts/verify_e2e_init_flows.py +246 -0
  153. package/agents/scripts/verify_setup_simulation.py +104 -0
  154. package/agents/scripts/verify_triggers_and_mcps.py +159 -0
  155. package/agents/scripts/verify_use_cases.py +498 -0
  156. package/agents/skills/00-index.md +322 -0
  157. package/agents/skills/ai/a2ui-protocols.skill.md +31 -0
  158. package/agents/skills/ai/actor-agent-frameworks.skill.md +31 -0
  159. package/agents/skills/ai/agent-communication.skill.md +36 -0
  160. package/agents/skills/ai/agent-ui.skill.md +31 -0
  161. package/agents/skills/ai/autonomous-swarm-patterns.skill.md +31 -0
  162. package/agents/skills/ai/beyond-llms.skill.md +31 -0
  163. package/agents/skills/ai/context-engineering.skill.md +79 -0
  164. package/agents/skills/ai/llm-as-judge.skill.md +97 -0
  165. package/agents/skills/ai/multi-agent-systems.skill.md +31 -0
  166. package/agents/skills/ai/rag-evaluation.skill.md +93 -0
  167. package/agents/skills/ai/reasoning-patterns.skill.md +125 -0
  168. package/agents/skills/architecture/adaptive-architecture.skill.md +51 -0
  169. package/agents/skills/architecture/api-design.skill.md +92 -0
  170. package/agents/skills/architecture/api-standards.skill.md +31 -0
  171. package/agents/skills/architecture/arch-debt.skill.md +180 -0
  172. package/agents/skills/architecture/arch-design.skill.md +304 -0
  173. package/agents/skills/architecture/arch-patterns.skill.md +52 -0
  174. package/agents/skills/architecture/arch-review.skill.md +326 -0
  175. package/agents/skills/architecture/architecture-governance.skill.md +62 -0
  176. package/agents/skills/architecture/attribute-driven-design.skill.md +108 -0
  177. package/agents/skills/architecture/blockchain-dlt.skill.md +28 -0
  178. package/agents/skills/architecture/compatibility-design.skill.md +51 -0
  179. package/agents/skills/architecture/critical-systems-arch.skill.md +31 -0
  180. package/agents/skills/architecture/design-patterns.skill.md +59 -0
  181. package/agents/skills/architecture/diagramming.skill.md +380 -0
  182. package/agents/skills/architecture/domain-model.skill.md +294 -0
  183. package/agents/skills/architecture/enterprise-migration-scenario.skill.md +31 -0
  184. package/agents/skills/architecture/enterprise-patterns.skill.md +31 -0
  185. package/agents/skills/architecture/error-handling-strategy.skill.md +58 -0
  186. package/agents/skills/architecture/event-driven-architecture.skill.md +31 -0
  187. package/agents/skills/architecture/event-governance.skill.md +55 -0
  188. package/agents/skills/architecture/fitness-functions.skill.md +111 -0
  189. package/agents/skills/architecture/graphql-schema.skill.md +64 -0
  190. package/agents/skills/architecture/legacy-modernization.skill.md +51 -0
  191. package/agents/skills/architecture/microservices.skill.md +31 -0
  192. package/agents/skills/architecture/middleware-design.skill.md +59 -0
  193. package/agents/skills/architecture/monolith.skill.md +31 -0
  194. package/agents/skills/architecture/realtime-comm.skill.md +52 -0
  195. package/agents/skills/architecture/state-management.skill.md +72 -0
  196. package/agents/skills/architecture/system-qualities.skill.md +31 -0
  197. package/agents/skills/architecture/system-scalability.skill.md +31 -0
  198. package/agents/skills/architecture/systems-architecture.skill.md +31 -0
  199. package/agents/skills/architecture/visual-whiteboarding.skill.md +33 -0
  200. package/agents/skills/brain/README.md +70 -0
  201. package/agents/skills/brain/active-inference.skill.md +74 -0
  202. package/agents/skills/brain/brain-mode.skill.md +125 -0
  203. package/agents/skills/brain/cognitive-architectures.skill.md +53 -0
  204. package/agents/skills/brain/cognitive-testing.skill.md +62 -0
  205. package/agents/skills/brain/consciousness-loop.skill.md +68 -0
  206. package/agents/skills/brain/cost-benefit-router.skill.md +89 -0
  207. package/agents/skills/brain/episodic-consolidation.skill.md +43 -0
  208. package/agents/skills/brain/epistemology-knowledge.skill.md +54 -0
  209. package/agents/skills/brain/global-workspace.skill.md +77 -0
  210. package/agents/skills/brain/learning-adaptation.skill.md +68 -0
  211. package/agents/skills/brain/loki-mode.skill.md +267 -0
  212. package/agents/skills/brain/neuroscience-foundations.skill.md +52 -0
  213. package/agents/skills/brain/scripts/active_inference_loop.py +92 -0
  214. package/agents/skills/brain/scripts/cognition_test.py +80 -0
  215. package/agents/skills/brain/scripts/global_workspace.py +104 -0
  216. package/agents/skills/brain/self-improvement.skill.md +80 -0
  217. package/agents/skills/brain/sensory-motor.skill.md +61 -0
  218. package/agents/skills/brain/sequential-thinking.skill.md +48 -0
  219. package/agents/skills/brain/working-memory.skill.md +47 -0
  220. package/agents/skills/coding/agent-trajectory-eval.skill.md +92 -0
  221. package/agents/skills/coding/artisan-commands.skill.md +52 -0
  222. package/agents/skills/coding/browser-tdd.skill.md +131 -0
  223. package/agents/skills/coding/chaos-fault-injection.skill.md +116 -0
  224. package/agents/skills/coding/ci-autofix.skill.md +53 -0
  225. package/agents/skills/coding/clean-coder.skill.md +58 -0
  226. package/agents/skills/coding/code-review.skill.md +100 -0
  227. package/agents/skills/coding/debug.skill.md +100 -0
  228. package/agents/skills/coding/documentation.skill.md +149 -0
  229. package/agents/skills/coding/eval-driven-development.skill.md +107 -0
  230. package/agents/skills/coding/evals/code-review.eval.yaml +29 -0
  231. package/agents/skills/coding/excalidraw.skill.md +90 -0
  232. package/agents/skills/coding/file-processing.skill.md +55 -0
  233. package/agents/skills/coding/git-workflow.skill.md +153 -0
  234. package/agents/skills/coding/metamorphic-testing.skill.md +113 -0
  235. package/agents/skills/coding/mobile-dev.skill.md +41 -0
  236. package/agents/skills/coding/nodejs-expert.skill.md +23 -0
  237. package/agents/skills/coding/output-validation.skill.md +57 -0
  238. package/agents/skills/coding/pbt-strategy.skill.md +117 -0
  239. package/agents/skills/coding/performant-ai.skill.md +62 -0
  240. package/agents/skills/coding/performant-go.skill.md +61 -0
  241. package/agents/skills/coding/performant-laravel.skill.md +70 -0
  242. package/agents/skills/coding/performant-nodejs.skill.md +67 -0
  243. package/agents/skills/coding/performant-php.skill.md +53 -0
  244. package/agents/skills/coding/performant-python.skill.md +62 -0
  245. package/agents/skills/coding/refactor.skill.md +124 -0
  246. package/agents/skills/coding/secure-coding.skill.md +57 -0
  247. package/agents/skills/coding/sketch-to-diagram.skill.md +106 -0
  248. package/agents/skills/coding/spec-driven-development.skill.md +110 -0
  249. package/agents/skills/coding/tdd-cycle.skill.md +92 -0
  250. package/agents/skills/coding/testing-strategy.skill.md +74 -0
  251. package/agents/skills/coding/time-complexity.skill.md +112 -0
  252. package/agents/skills/coding/tldraw-canvas.skill.md +109 -0
  253. package/agents/skills/coding/tool-construction.skill.md +47 -0
  254. package/agents/skills/coding/ui-gen.skill.md +64 -0
  255. package/agents/skills/coding/vibe-coding.skill.md +63 -0
  256. package/agents/skills/coding/visual-design.skill.md +65 -0
  257. package/agents/skills/coordination/agent-interop.skill.md +72 -0
  258. package/agents/skills/coordination/agent-protocol.skill.md +62 -0
  259. package/agents/skills/coordination/agent-workflow-patterns.skill.md +123 -0
  260. package/agents/skills/coordination/agentic-linter.skill.md +134 -0
  261. package/agents/skills/coordination/agentic-patterns.skill.md +79 -0
  262. package/agents/skills/coordination/meta-optimize.skill.md +62 -0
  263. package/agents/skills/coordination/meta-prompting.skill.md +46 -0
  264. package/agents/skills/coordination/multi-agent-orch.skill.md +78 -0
  265. package/agents/skills/coordination/persona-selector.skill.md +78 -0
  266. package/agents/skills/coordination/self-optimize.skill.md +81 -0
  267. package/agents/skills/coordination/swarm-consensus.skill.md +52 -0
  268. package/agents/skills/core/agent-analytics.skill.md +74 -0
  269. package/agents/skills/core/audit-trail.skill.md +122 -0
  270. package/agents/skills/core/clarify.skill.md +89 -0
  271. package/agents/skills/core/emerging-tech.skill.md +52 -0
  272. package/agents/skills/core/empirical-methods.skill.md +101 -0
  273. package/agents/skills/core/evals/clarify.eval.yaml +29 -0
  274. package/agents/skills/core/evals/integrity-check.eval.yaml +23 -0
  275. package/agents/skills/core/evals/research.eval.yaml +23 -0
  276. package/agents/skills/core/final-review.skill.md +66 -0
  277. package/agents/skills/core/integrity-check.skill.md +149 -0
  278. package/agents/skills/core/knowledge-connect.skill.md +77 -0
  279. package/agents/skills/core/knowledge-gap.skill.md +123 -0
  280. package/agents/skills/core/preflight.skill.md +106 -0
  281. package/agents/skills/core/research.skill.md +107 -0
  282. package/agents/skills/core/retrospective.skill.md +59 -0
  283. package/agents/skills/core/sdlc-checkpoint.skill.md +151 -0
  284. package/agents/skills/core/self-heal.skill.md +163 -0
  285. package/agents/skills/core/session-resume.skill.md +125 -0
  286. package/agents/skills/core/skills-registry.skill.md +65 -0
  287. package/agents/skills/core/state-portability.skill.md +89 -0
  288. package/agents/skills/core/state-preserve.skill.md +76 -0
  289. package/agents/skills/core/system-lifecycle.skill.md +51 -0
  290. package/agents/skills/core/update-scan.skill.md +92 -0
  291. package/agents/skills/data/data-engineering.skill.md +56 -0
  292. package/agents/skills/data/data-governance.skill.md +49 -0
  293. package/agents/skills/data/db-migration.skill.md +136 -0
  294. package/agents/skills/data/semantic-web.skill.md +28 -0
  295. package/agents/skills/data/sql-optimization.skill.md +78 -0
  296. package/agents/skills/industry/engineering-standards.skill.md +31 -0
  297. package/agents/skills/industry/global-standards.skill.md +30 -0
  298. package/agents/skills/industry/healthcare-fhir.skill.md +28 -0
  299. package/agents/skills/industry/industrial-iot.skill.md +30 -0
  300. package/agents/skills/industry/telecom-networks.skill.md +30 -0
  301. package/agents/skills/ops/caching-strategy.skill.md +77 -0
  302. package/agents/skills/ops/capacity-planning.skill.md +67 -0
  303. package/agents/skills/ops/cloud-deploy.skill.md +55 -0
  304. package/agents/skills/ops/configuration-management.skill.md +107 -0
  305. package/agents/skills/ops/cost-optimization.skill.md +39 -0
  306. package/agents/skills/ops/decommission-sunset.skill.md +64 -0
  307. package/agents/skills/ops/dependency-lifecycle.skill.md +63 -0
  308. package/agents/skills/ops/deployment.skill.md +217 -0
  309. package/agents/skills/ops/dev-environments.skill.md +31 -0
  310. package/agents/skills/ops/dev-workflow.skill.md +28 -0
  311. package/agents/skills/ops/docker-dev.skill.md +52 -0
  312. package/agents/skills/ops/enterprise-integration.skill.md +53 -0
  313. package/agents/skills/ops/feature-flag-management.skill.md +59 -0
  314. package/agents/skills/ops/incident-response.skill.md +40 -0
  315. package/agents/skills/ops/infra-devops.skill.md +53 -0
  316. package/agents/skills/ops/k8s-dev.skill.md +51 -0
  317. package/agents/skills/ops/memory-optimization.skill.md +45 -0
  318. package/agents/skills/ops/observability-stack-setup.skill.md +62 -0
  319. package/agents/skills/ops/performance-audit.skill.md +178 -0
  320. package/agents/skills/ops/performance-optimization.skill.md +51 -0
  321. package/agents/skills/ops/production-health.skill.md +85 -0
  322. package/agents/skills/ops/production-verifier.skill.md +50 -0
  323. package/agents/skills/ops/queue-management.skill.md +52 -0
  324. package/agents/skills/ops/release-management.skill.md +39 -0
  325. package/agents/skills/ops/release-validation.skill.md +51 -0
  326. package/agents/skills/ops/reliability-sre.skill.md +51 -0
  327. package/agents/skills/ops/runbook-authoring.skill.md +64 -0
  328. package/agents/skills/ops/system-benchmark.skill.md +69 -0
  329. package/agents/skills/ops/tech-debt.skill.md +143 -0
  330. package/agents/skills/ops/troubleshooting-guide.skill.md +31 -0
  331. package/agents/skills/product/accessibility.skill.md +143 -0
  332. package/agents/skills/product/adr-writer.skill.md +110 -0
  333. package/agents/skills/product/business-case.skill.md +70 -0
  334. package/agents/skills/product/change-management.skill.md +90 -0
  335. package/agents/skills/product/decompose.skill.md +75 -0
  336. package/agents/skills/product/design-thinking.skill.md +62 -0
  337. package/agents/skills/product/estimation-sizing.skill.md +87 -0
  338. package/agents/skills/product/evals/spec-writer.eval.yaml +22 -0
  339. package/agents/skills/product/financial-governance.skill.md +88 -0
  340. package/agents/skills/product/green-software.skill.md +46 -0
  341. package/agents/skills/product/ideation-facilitation.skill.md +87 -0
  342. package/agents/skills/product/market-analysis.skill.md +56 -0
  343. package/agents/skills/product/opportunity-assessment.skill.md +89 -0
  344. package/agents/skills/product/product-analytics.skill.md +92 -0
  345. package/agents/skills/product/professional-practice.skill.md +105 -0
  346. package/agents/skills/product/req-elicitation.skill.md +292 -0
  347. package/agents/skills/product/req-review.skill.md +280 -0
  348. package/agents/skills/product/spec-analyze.skill.md +98 -0
  349. package/agents/skills/product/spec-writer.skill.md +114 -0
  350. package/agents/skills/product/stakeholder-management.skill.md +54 -0
  351. package/agents/skills/product/sustainability-checks.skill.md +29 -0
  352. package/agents/skills/product/systems-thinking.skill.md +56 -0
  353. package/agents/skills/product/user-research-synthesis.skill.md +85 -0
  354. package/agents/skills/product/user-story-mapping.skill.md +54 -0
  355. package/agents/skills/product/visual-specs.skill.md +112 -0
  356. package/agents/skills/security/access-control.skill.md +45 -0
  357. package/agents/skills/security/agent-sandboxing.skill.md +69 -0
  358. package/agents/skills/security/ai-ethics-compliance.skill.md +46 -0
  359. package/agents/skills/security/ai-red-teaming.skill.md +74 -0
  360. package/agents/skills/security/ai-safety-guardrails.skill.md +60 -0
  361. package/agents/skills/security/api-security.skill.md +31 -0
  362. package/agents/skills/security/backup-recovery.skill.md +49 -0
  363. package/agents/skills/security/compliance-review.skill.md +152 -0
  364. package/agents/skills/security/cryptography-standards.skill.md +31 -0
  365. package/agents/skills/security/dependency-security.skill.md +47 -0
  366. package/agents/skills/security/hazard-analysis.skill.md +53 -0
  367. package/agents/skills/security/legal-review.skill.md +41 -0
  368. package/agents/skills/security/log-analysis.skill.md +68 -0
  369. package/agents/skills/security/network-security.skill.md +64 -0
  370. package/agents/skills/security/privacy-audit.skill.md +137 -0
  371. package/agents/skills/security/privacy-data-protection.skill.md +31 -0
  372. package/agents/skills/security/prompt-injection-defense.skill.md +67 -0
  373. package/agents/skills/security/reliability-engineering.skill.md +47 -0
  374. package/agents/skills/security/safety-scan.skill.md +49 -0
  375. package/agents/skills/security/secrets-management.skill.md +65 -0
  376. package/agents/skills/security/secure-architecture.skill.md +31 -0
  377. package/agents/skills/security/security-audit.skill.md +164 -0
  378. package/agents/skills/security/threat-model.skill.md +120 -0
  379. package/agents/skills/security/traceability-audit.skill.md +48 -0
  380. package/agents/templates/00-index.md +162 -0
  381. package/agents/templates/architecture/ADAPTIVE_SYSTEM_TEMPLATE.md +35 -0
  382. package/agents/templates/architecture/ADD_WORKBOOK_TEMPLATE.md +81 -0
  383. package/agents/templates/architecture/ADR_TEMPLATE.md +136 -0
  384. package/agents/templates/architecture/ARCHITECTURE_DECISION_MATRIX.md +169 -0
  385. package/agents/templates/architecture/ARCHITECTURE_REVIEW_TEMPLATE.md +241 -0
  386. package/agents/templates/architecture/ARCHITECTURE_VIEWS_TEMPLATE.md +353 -0
  387. package/agents/templates/architecture/ARCH_DECISION_FRAMEWORK.md +32 -0
  388. package/agents/templates/architecture/C4_ARCHITECTURE_TEMPLATE.md +185 -0
  389. package/agents/templates/architecture/CAPABILITY_MAP_TEMPLATE.md +153 -0
  390. package/agents/templates/architecture/CONTEXT_MAP_TEMPLATE.md +196 -0
  391. package/agents/templates/architecture/DESIGN_PATTERN_USAGE.md +24 -0
  392. package/agents/templates/architecture/DOMAIN_MODEL_TEMPLATE.md +254 -0
  393. package/agents/templates/architecture/FITNESS_FUNCTION_TEMPLATE.md +59 -0
  394. package/agents/templates/architecture/INTEGRATION_SPEC_TEMPLATE.md +38 -0
  395. package/agents/templates/architecture/LEGACY_AUDIT_TEMPLATE.md +34 -0
  396. package/agents/templates/architecture/QUALITY_ATTRIBUTES_TEMPLATE.md +210 -0
  397. package/agents/templates/architecture/SCALABILITY_ANALYSIS_TEMPLATE.md +46 -0
  398. package/agents/templates/architecture/SMART_CONTRACT_TEMPLATE.md +44 -0
  399. package/agents/templates/architecture/SYSTEM_CONTEXT_TEMPLATE.md +197 -0
  400. package/agents/templates/brain/ACTIVE_INFERENCE_LOOP_TEMPLATE.md +42 -0
  401. package/agents/templates/brain/EPISODIC_MEMORY_LOG_TEMPLATE.md +28 -0
  402. package/agents/templates/brain/GLOBAL_WORKSPACE_CONFIG_TEMPLATE.md +44 -0
  403. package/agents/templates/brain/KNOWLEDGE_MAP_TEMPLATE.md +53 -0
  404. package/agents/templates/brain/OODA_LOOP_TRACE_TEMPLATE.md +44 -0
  405. package/agents/templates/brain/PREDICTION_ERROR_LOG_TEMPLATE.md +33 -0
  406. package/agents/templates/brain/PROJECT_CONTEXT_TEMPLATE.md +36 -0
  407. package/agents/templates/brain/SELF_IMPROVEMENT_LOG_TEMPLATE.md +39 -0
  408. package/agents/templates/brain/WORKING_MEMORY_TEMPLATE.md +34 -0
  409. package/agents/templates/coding/CLEAN_CODE_CHECKLIST.md +30 -0
  410. package/agents/templates/coding/DESIGN_TOKENS_TEMPLATE.json +54 -0
  411. package/agents/templates/coding/DEVCONTAINER_TEMPLATE.json +42 -0
  412. package/agents/templates/coding/DEV_SPACE_TEMPLATE.yaml +48 -0
  413. package/agents/templates/coding/E2E_TEST_SUITE_TEMPLATE.md +36 -0
  414. package/agents/templates/coding/EVAL_PLAN_TEMPLATE.md +85 -0
  415. package/agents/templates/coding/EVAL_RUBRIC_TEMPLATE.md +57 -0
  416. package/agents/templates/coding/GOLDEN_DATASET_TEMPLATE.md +73 -0
  417. package/agents/templates/coding/PROPERTY_TEST_CHECKLIST.md +77 -0
  418. package/agents/templates/coding/SKETCH_TO_DIAGRAM_TEMPLATE.md +56 -0
  419. package/agents/templates/coding/TEST_CASE_TEMPLATE.md +28 -0
  420. package/agents/templates/coding/TEST_PLAN_TEMPLATE.md +36 -0
  421. package/agents/templates/coding/TIME_COMPLEXITY_REPORT_TEMPLATE.md +61 -0
  422. package/agents/templates/coordination/AGENTS_TEMPLATE.md +540 -0
  423. package/agents/templates/coordination/AGENT_HANDSHAKE_TEMPLATE.json +37 -0
  424. package/agents/templates/coordination/AGENT_PROFILE_TEMPLATE.md +28 -0
  425. package/agents/templates/coordination/SWARM_ARCHITECTURE_TEMPLATE.md +53 -0
  426. package/agents/templates/coordination/SWARM_CONFIG_TEMPLATE.json +45 -0
  427. package/agents/templates/core/AUDIT_LOG_TEMPLATE.md +75 -0
  428. package/agents/templates/core/BUG_REPORT_TEMPLATE.md +136 -0
  429. package/agents/templates/core/DEPENDENCY_GRAPH_TEMPLATE.md +63 -0
  430. package/agents/templates/core/ESTIMATION_TEMPLATE.md +70 -0
  431. package/agents/templates/core/MCP_CONFIG_TEMPLATE.json +807 -0
  432. package/agents/templates/core/PLAN_TEMPLATE.md +162 -0
  433. package/agents/templates/core/PROJECT_RETROSPECTIVE_TEMPLATE.md +67 -0
  434. package/agents/templates/core/SDLC_TRACKER.md +217 -0
  435. package/agents/templates/core/SESSION_SNAPSHOT_TEMPLATE.md +168 -0
  436. package/agents/templates/core/SYSTEM_ANALYSIS_TEMPLATE.md +52 -0
  437. package/agents/templates/core/TASKS_TEMPLATE.md +104 -0
  438. package/agents/templates/core/TRACEABILITY_MATRIX_TEMPLATE.md +18 -0
  439. package/agents/templates/core/WHITEBOARD_DESIGN_TEMPLATE.md +46 -0
  440. package/agents/templates/data/DATABASE_SCHEMA_TEMPLATE.md +38 -0
  441. package/agents/templates/data/DATA_PIPELINE_TEMPLATE.md +44 -0
  442. package/agents/templates/data/ONTOLOGY_TEMPLATE.md +52 -0
  443. package/agents/templates/industry/ENGINEERING_STANDARDS_REVIEW_TEMPLATE.md +43 -0
  444. package/agents/templates/industry/FHIR_INTEGRATION_TEMPLATE.md +53 -0
  445. package/agents/templates/industry/GLOBAL_STANDARDS_AUDIT_TEMPLATE.md +45 -0
  446. package/agents/templates/industry/IOT_TELEMETRY_TEMPLATE.md +59 -0
  447. package/agents/templates/industry/TELECOM_API_TEMPLATE.md +50 -0
  448. package/agents/templates/ops/BENCHMARK_REPORT_TEMPLATE.md +48 -0
  449. package/agents/templates/ops/CAPACITY_PLAN_TEMPLATE.md +41 -0
  450. package/agents/templates/ops/COST_OPTIMIZATION_REPORT_TEMPLATE.md +40 -0
  451. package/agents/templates/ops/DECOMMISSION_PLAN_TEMPLATE.md +102 -0
  452. package/agents/templates/ops/DEPLOY_CONFIG_TEMPLATE.md +88 -0
  453. package/agents/templates/ops/INCIDENT_POSTMORTEM_TEMPLATE.md +39 -0
  454. package/agents/templates/ops/INFRA_PLAN_TEMPLATE.md +37 -0
  455. package/agents/templates/ops/RELEASE_READINESS_REPORT.md +35 -0
  456. package/agents/templates/ops/RUNBOOK_TEMPLATE.md +103 -0
  457. package/agents/templates/ops/TECH_DEBT_TEMPLATE.md +102 -0
  458. package/agents/templates/product/BUSINESS_CASE_TEMPLATE.md +42 -0
  459. package/agents/templates/product/CHANGE_MANAGEMENT_PLAN_TEMPLATE.md +68 -0
  460. package/agents/templates/product/EMPATHY_MAP_TEMPLATE.md +47 -0
  461. package/agents/templates/product/EXPERIMENT_PLAN_TEMPLATE.md +84 -0
  462. package/agents/templates/product/GREEN_SOFTWARE_REPORT_TEMPLATE.md +42 -0
  463. package/agents/templates/product/IDEATION_LOG_TEMPLATE.md +42 -0
  464. package/agents/templates/product/NFR_TEMPLATE.md +31 -0
  465. package/agents/templates/product/PRD_TEMPLATE.md +222 -0
  466. package/agents/templates/product/PROBLEM_STATEMENT_TEMPLATE.md +32 -0
  467. package/agents/templates/product/REQUIREMENTS_REVIEW_TEMPLATE.md +173 -0
  468. package/agents/templates/product/SPEC_TEMPLATE.md +259 -0
  469. package/agents/templates/product/STAKEHOLDER_REGISTER_TEMPLATE.md +127 -0
  470. package/agents/templates/product/USER_STORY_MAP_TEMPLATE.md +35 -0
  471. package/agents/templates/product/VISUAL_SPEC_PACKAGE_TEMPLATE.md +207 -0
  472. package/agents/templates/security/DATASHEET_TEMPLATE.md +95 -0
  473. package/agents/templates/security/ETHICAL_IMPACT_ASSESSMENT.md +32 -0
  474. package/agents/templates/security/HAZARD_LOG.md +17 -0
  475. package/agents/templates/security/MODEL_CARD_TEMPLATE.md +120 -0
  476. package/agents/templates/security/SAFETY_CASE.md +39 -0
  477. package/agents/templates/security/SAFETY_POLICY.md +25 -0
  478. package/agents/templates/security/SECURITY_CHECKLIST.md +157 -0
  479. package/agents/templates/security/SYSTEM_CARD_TEMPLATE.md +139 -0
  480. package/agents/templates/security/THREAT_MODEL_TEMPLATE.md +171 -0
  481. package/bin/install.js +572 -0
  482. package/docs/CLI_REFERENCE.md +527 -0
  483. package/docs/INSTALL.md +68 -0
  484. package/docs/MCP_CONFIGURATIONS.md +1765 -0
  485. package/docs/PLATFORM_CONTROLS.md +324 -0
  486. package/docs/POST_INSTALL.md +75 -0
  487. package/docs/QUICK_COMMANDS.md +131 -0
  488. package/docs/QUICK_GUIDE.md +914 -0
  489. package/docs/README_FULL.md +1451 -0
  490. package/docs/SCHEMA.md +164 -0
  491. package/docs/V1_RELEASE_CHECKLIST.md +144 -0
  492. package/docs/VERIFICATION_GUIDE.md +283 -0
  493. package/docs/adr/0001-record-architecture-decisions.md +26 -0
  494. package/docs/adr/0002-brain-active-inference-runtime.md +27 -0
  495. package/docs/adr/0003-additive-only-emitter-schema-evolution.md +33 -0
  496. package/docs/assets/GABBE.png +0 -0
  497. package/docs/gabbe.config.example.json +9 -0
  498. package/docs/reports/duplication-report.md +30 -0
  499. package/install.ps1 +90 -0
  500. package/install.sh +89 -0
  501. package/package.json +49 -0
  502. package/scripts/init.py +1036 -0
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: graphql-schema
3
+ description: Schema design, federation, and resolution strategies.
4
+ triggers: [graphql schema]
5
+ tags: [architecture]
6
+ role: eng-api
7
+ context_cost: low
8
+ ---
9
+ # graphql-schema Skill
10
+
11
+ ## Goal
12
+ This skill prevents "Graph Spaghetti" and ensuring performant Graph APIs.
13
+
14
+ ## Steps
15
+ ## 1. Schema Design
16
+ - **Consumption-First**: Design for the UI needs, not the DB schema.
17
+ - **Naming**: `User.posts` (Good), `User.getPosts` (Bad - it's a field, not a method).
18
+ - **Nullability**:
19
+ - Default to **Nullable** for fields (resilience: if one field fails, partial data returns).
20
+ - Use **Non-Null (!)** only for IDs and essential arguments.
21
+
22
+ ## 2. N+1 Problem (The Graph Killer)
23
+ - **Scenario**: Querying `users { posts { comments } }`.
24
+ - **Solution**: **DataLoader** pattern.
25
+ - Batches IDs from multiple resolvers.
26
+ - Runs *one* DB query: `SELECT * FROM posts WHERE user_id IN (1, 2, 3)`.
27
+ - Distributes results back to resolvers.
28
+
29
+ ## 3. Pagination
30
+ - Avoid `offset`/`limit`.
31
+ - Use **Relay Connection Specification** (Cursor-based):
32
+ ```graphql
33
+ users(first: 10, after: "cursor") {
34
+ edges {
35
+ node { name }
36
+ cursor
37
+ }
38
+ pageInfo { hasNextPage }
39
+ }
40
+ ```
41
+
42
+ ## 4. Security
43
+ - **Depth Limiting**: Block queries deeper than 5 levels (prevent cyclic recursion DoS).
44
+ - **Cost Analysis**: Assign points to fields. Block query if Cost > 1000.
45
+ - **Introspection**: Disable in Production.
46
+
47
+ ## 5. Federation (Apollo)
48
+ - Use when splitting Graph across microservices.
49
+ - **Entity**: A type shared across subgraphs (`@key(fields: "id")`).
50
+ - **Gateway**: Composes the Supergraph.
51
+
52
+ ## Security & Guardrails
53
+
54
+ ### 1. Skill Security (GraphQL Schema)
55
+ - **Query Depth & Complexity Enforcement**: The agent must mandate strict limits on GraphQL Query Depth (e.g., max 5 levels) and Query Cost Analysis (assigning point values to resolvers). Without these, an attacker can craft maliciously nested queries (e.g., `author { posts { comments { author { posts... } } } }`) that instantly crash the server (GraphQL DoS).
56
+ - **Introspection Information Disclosure**: The agent must enforce that Introspection queries are strictly clamped or completely disabled in production environments. Leaving Introspection open is equivalent to publishing the entire database schema to attackers, enabling them to perfectly map out BOLA (Broken Object Level Authorization) targets.
57
+
58
+ ### 2. System Integration Security
59
+ - **Resolver-Level Authorization**: The agent must explicitly define authorization checks *inside* the individual field resolvers, not just at the HTTP endpoint level. Because GraphQL allows querying arbitrary fields, granting a user access to the `User` query doesn't mean they should have access to the `User.socialSecurityNumber` field. Field-level RBAC is mandatory.
60
+ - **Mutation Idempotency & Rate Limiting**: The agent must ensure that GraphQL Mutations modify state safely and are subject to distinct rate limiting from standard queries. Mutations should require idempotency keys to prevent double-charging or logic race conditions, especially because GraphQL batches multiple mutations in a single HTTP request.
61
+
62
+ ### 3. LLM & Agent Guardrails
63
+ - **Federation Subgraph Bypass**: When structuring Apollo Federation (Step 5), the LLM might assume the Gateway handles all security and the Subgraphs can trust all incoming traffic. The agent must correct this fatal flaw: Subgraphs must mutually authenticate the Gateway (e.g., via Router tokens) to prevent attackers from bypassing the Gateway's auth layer and hitting a Subgraph directly.
64
+ - **Nullability Masking Hallucination**: The LLM might suggest making sensitive fields (like `passwordHash` or `isSuperAdmin`) accessible but returning `null` if the user is unauthorized. The agent must reject this. From a security perspective, it is better to return an explicit Authorization Error or hide the field via Schema directives (`@auth`) than to silently return `null`.
@@ -0,0 +1,51 @@
1
+ ---
2
+ name: legacy-modernization
3
+ description: Analyze, document, and modernize legacy systems (COBOL, Mainframe, Fortran).
4
+ triggers: [legacy code, cobol, mainframe, fortran, ibm z, jcl, db2, cics, modernization, rewrite, migration]
5
+ tags: [architecture]
6
+ context_cost: medium
7
+ ---
8
+ # Legacy Modernization Skill
9
+
10
+ ## Goal
11
+ To respect the critical nature of legacy systems while safely guiding them toward modernization. **Rule #1: Do no harm.**
12
+
13
+ ## Capabilities
14
+
15
+ ### 1. Code Analysis (The Archaeologist)
16
+ - **Explain Logic**: Translate COBOL/Fortran business logic into plain English or Pseudocode.
17
+ - **Identify Risks**: Spot `GOTO` spaghetti, hardcoded dates (Y2K style), and tight coupling.
18
+ - **Data Mapping**: Map VSAM/Copybooks to JSON/SQL schemas.
19
+
20
+ ### 2. Modernization Patterns
21
+ - **API Wrapping (The Facade)**: Create a REST/gRPC wrapper around the legacy core.
22
+ - **Strangler Fig**: Incrementally replace functions with microservices.
23
+ - **Replatform**: Lift-and-shift to cloud emulators (AWS Mainframe Modernization).
24
+
25
+ ### 3. Testing Legacy
26
+ - **Characterization Tests**: "Lock down" current behavior before changing ANYTHING.
27
+ - **Golden Master**: Capture inputs/outputs of the old system to verify the new one.
28
+
29
+ ## Steps
30
+ 1. **Assume Importance**: If it's running, it's making money. Treat legacy code with reverence.
31
+ 2. **No Big Bang**: Never suggest a full rewrite from scratch unless the system is < 10k LOC.
32
+ 3. **Document First**: most legacy failures happen because nobody knows *what* the code does.
33
+
34
+ ## Deliverables
35
+ - `legacy-analysis.md`: Explanation of flow.
36
+ - `wrapper-api.yaml`: OpenAPI spec for the legacy system.
37
+ - `strangler-plan.md`: Step-by-step migration path.
38
+
39
+ ## Security & Guardrails
40
+
41
+ ### 1. Skill Security (Legacy Modernization)
42
+ - **Golden Master Secrecy**: When the agent assists in creating "Golden Master" tests (capturing inputs/outputs of the old system), it must recognize that mainframe/legacy databases often lack modern column-level encryption. The captured test fixtures will likely contain live PII or financial data. The agent must mandate strict data masking/anonymization before the Golden Master is saved to modern version control.
43
+ - **API Wrapper Credential Injection**: When implementing the "Facade/API Wrapper" (Step 2), the modern microservice often needs a highly privileged service account to interface with the legacy system (e.g., a "God Mode" DB2 user). The agent must verify this credential is injected via a secure Secret Manager at runtime, never encoded in the modernization translation layer.
44
+
45
+ ### 2. System Integration Security
46
+ - **Bypass of Legacy Business Logic Guards**: Legacy systems (like COBOL programs) often intertwine business logic with security validation (e.g., checking if a user's department matches the account prefix within a massive `GOTO` loop). The agent must ensure that the new Strangler Fig endpoints replicate or improve these explicit, undocumented authorization checks, not just the "happy path" data transformation.
47
+ - **Strangler Fig Route Hijacking**: During the migration phase, the routing layer (e.g., an API Gateway) decides whether traffic goes to the Legacy or Modern system. The agent must secure this routing configuration, as unauthorized manipulation could route sensitive transactions to a partially implemented, insecure modern endpoint that lacks full auditing.
48
+
49
+ ### 3. LLM & Agent Guardrails
50
+ - **Automated Refactoring Blindspots**: If the LLM is asked to translate COBOL to Python, it might drop or mistranslate "arcane" or confusing legacy logic that is actually a critical, decades-old security patch for an edge-case exploit. The agent must flag complex, misunderstood blocks for manual human review rather than guessing their intent.
51
+ - **Hallucinated Protocol Security**: The LLM might assume that integrating with a mainframe via standard TN3270 or raw socket connections is inherently secure because it's behind a firewall. The agent must advocate for securing the legacy transit layer (e.g., using IPSec or tunneling) to prevent internal lateral movement from sniffing unencrypted Mainframe traffic.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: microservices
3
+ description: Design and implement microservices architecture
4
+ triggers: [design microservices, split monolith, architect distributed system]
5
+ tags: [architecture]
6
+ context_cost: high
7
+ ---
8
+ # microservices
9
+
10
+ ## Goal
11
+ Design, decouple, and orchestrate microservices architectures using bounded contexts, defining clear API contracts and data segregation.
12
+
13
+ ## Steps
14
+ 1. **Domain boundaries**: Identify bounded contexts using Domain-Driven Design (DDD).
15
+ 2. **Contract Definition**: Establish rigorous API/gRPC contracts and message schemas for inter-service communication.
16
+ 3. **Data Segregation**: Assign each service its own dedicated database schema to prevent coupling.
17
+ 4. **Verification**: Verify that the failure of Service A does not synchronously bring down Service B (circuit breaking).
18
+
19
+ ## Security & Guardrails
20
+
21
+ ### 1. Skill Security
22
+ - **Config Sprawl**: Restrict unbounded creation of new service template folders to prevent filesystem exhaustion.
23
+ - **Dependency Hell**: Forbid circular dependencies between microservices during the design phase.
24
+
25
+ ### 2. System Integration Security
26
+ - **Service-to-Service Auth**: Require mutual TLS (mTLS) or internal JWT validation for all inter-service traffic. No implicit trust boundaries.
27
+ - **Data Leakage**: Ensure that aggregated edge-responses do not accidentally expose internal service identifiers or foreign keys.
28
+
29
+ ### 3. LLM & Agent Guardrails
30
+ - **Distributed Monolith Hallucination**: Prevent the LLM from designing tightly-coupled synchronous systems masquerading as microservices.
31
+ - **Simplification Bias**: The LLM must not omit critical distributed systems concerns (network latency, retries, eventual consistency) from its proposed architecture.
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: middleware-design
3
+ description: Designing robust middleware chains (Auth, Rate Limiting, Logging).
4
+ triggers: [middleware design]
5
+ tags: [architecture]
6
+ role: eng-backend
7
+ context_cost: low
8
+ ---
9
+ # middleware-design Skill
10
+
11
+ ## Goal
12
+ This skill guides the creation of the request processing pipeline ("The Onion Architecture").
13
+
14
+ ## Steps
15
+ ## 1. The Standard Pipeline (Order Matters)
16
+
17
+ 1. **Request ID**: Generate `trace_id` immediately. (Before logs).
18
+ 2. **CORS**: Allow/Block origins. (Before processing).
19
+ 3. **Body Parser**: JSON/Form parsing. (Limit size to prevent DoS).
20
+ 4. **Rate Limiter**: Token Bucket algorithm. (Stop abuse cheaply).
21
+ 5. **Authentication**: Verify JWT/Session. (Who is it?).
22
+ 6. **Authorization**: Check Roles/Scopes. (Can they do it?).
23
+ 7. **Validation**: Zod/Pydantic schema check. (Is input valid?).
24
+ 8. **Controller**: Business Logic.
25
+ 9. **Error Handler**: Catch exceptions, format JSON, scrub sensitive data.
26
+
27
+ ## 2. Implementation Rules
28
+ - **Fail Fast**: If Rate Limit check fails, return 429 immediately. Do not parse body.
29
+ - **Context Passing**: Pass `user` and `trace_id` via Context (Go/React) or Request Object (Express/FastAPI).
30
+ - **No Business Logic**: Middleware should be generic. Don't query `SELECT * FROM orders` in middleware.
31
+
32
+ ## 3. Specific Patterns
33
+
34
+ ### Rate Limiting
35
+ - **Global**: 1000 req/min/IP.
36
+ - **Route-Specific**: Login = 5 req/min/IP.
37
+ - **Storage**: Use Redis. Local memory rate limiting doesn't work in clustered apps.
38
+
39
+ ### Response Interceptors
40
+ - Use for consistent response formatting.
41
+ - `data: { ... }`, `meta: { trace_id: ... }`.
42
+
43
+ ### Error Handling Middleware
44
+ - **NEVER** return raw stack trace to client in Production.
45
+ - **ALWAYS** log raw stack trace to logger.
46
+
47
+ ## Security & Guardrails
48
+
49
+ ### 1. Skill Security (Middleware Design)
50
+ - **Bypass via Pipeline Ordering**: The agent is strictly commanded to never deviate from the defined security ordering (e.g., `RateLimiter -> Authentication -> Authorization`). Placing the `BodyParser` or a complex GraphQL execution context *before* the `RateLimiter` or `Authentication` layer allows unauthenticated attackers to exhaust CPU and RAM parsing massive payloads.
51
+ - **Error Handler Data Leakage**: The agent must mathematically ensure the final `ErrorHandler` middleware catches all uncaught downstream exceptions. Crucially, the handler must strip raw stack traces, database schema names, SQL syntax errors, and internal IP addresses before formatting the RFC 7807 response for the client in production mode.
52
+
53
+ ### 2. System Integration Security
54
+ - **Forged Context Defeat**: The agent must ensure that HTTP headers (like `X-Forwarded-For` or `X-User-Role`) injected by external reverse proxies are aggressively stripped or overwritten by the entry-point middleware if they cannot be cryptographically verified. Trusting spoofed headers allows attackers to gain arbitrary privileges in the `Authorization` middleware.
55
+ - **Auth Token Replay and Expiration**: The `Authentication` middleware must not only validate the cryptographic signature of a JWT but also strictly verify the `exp` (expiration) and `nbf` (not before) claims. If the integration utilizes distributed cache invalidation (like logging out), the middleware must also check a high-speed blacklist (e.g., Redis) to prevent the replay of revoked tokens.
56
+
57
+ ### 3. LLM & Agent Guardrails
58
+ - **Hallucinated "Catch-All" Security**: The LLM might propose a single, massive middleware function that attempts to handle Auth, Logging, and Rate Limiting simultaneously. The agent must reject this spaghetti design, enforcing the Unix philosophy: distinct, highly-focused middleware focused on exactly one security concern (The Onion Architecture).
59
+ - **False Density in Rate Limiting**: If the LLM suggests using basic array structures or local memory (`{}`) for the `RateLimiter` in a Node/Python app, the agent must override this with a distributed storage solution (like Redis). Local memory rate limiting provides a false sense of security in Kubernetes/Load-Balanced environments where traffic is distributed across multiple pods.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: monolith
3
+ description: Design and refactor Monolithic and Modular Monolithic architectures
4
+ triggers: [design monolith, build modular monolith, enforce boundaries]
5
+ tags: [architecture]
6
+ context_cost: medium
7
+ ---
8
+ # monolith
9
+
10
+ ## Goal
11
+ Design strictly structured Modular Monoliths or enforce clean boundaries within an existing monolithic codebase.
12
+
13
+ ## Steps
14
+ 1. **Module Definition**: Identify the core modules and define their public interfaces.
15
+ 2. **Dependency Rules**: Establish strict visibility and dependency rules between modules (e.g., using ArchUnit or Dependency Cruiser).
16
+ 3. **Implementation**: Ensure database transactions and code execution do not bypass module boundaries.
17
+ 4. **Verification**: Run architecture linters to catch dependency violations (e.g., Module A importing internal classes of Module B).
18
+
19
+ ## Security & Guardrails
20
+
21
+ ### 1. Skill Security
22
+ - **Governance Evasion**: Prevent the agent from disabling the CI architectural linters (e.g., `dependency-cruiser.json`) in order to resolve boundary violations.
23
+ - **God-Class Creation**: Prevent the agent from merging domains into single "God Objects" to avoid compilation errors.
24
+
25
+ ### 2. System Integration Security
26
+ - **Shared Memory Poisoning**: If the monolith uses global state or a shared cache, strictly partition keys by module domain.
27
+ - **Privilege Escalation**: Ensure all modules enforce authorization explicitly; one module cannot assume another module has pre-authorized a request.
28
+
29
+ ### 3. LLM & Agent Guardrails
30
+ - **Boundary Hallucination**: The LLM must not invent exceptions to the dependency rules.
31
+ - **Refactor Avalanche**: When fixing a boundary violation, the agent must not initiate a massive, undirected refactoring avalanche across the entire monolithic codebase.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: realtime-comm
3
+ description: WebSocket handling, Pub/Sub patterns, and persistent connections.
4
+ triggers: [realtime comm]
5
+ tags: [architecture]
6
+ role: eng-backend
7
+ context_cost: low
8
+ ---
9
+ # realtime-comm Skill
10
+
11
+ ## Goal
12
+ This skill guides the implementation of bi-directional, stateful communication.
13
+
14
+ ## Steps
15
+ ## 1. Protocol Selection
16
+
17
+ | Protocol | Use Case | Pros | Cons |
18
+ |---|---|---|---|
19
+ | **WebSockets** | Chat, Games, Collaboration | Full Duplex, Low Latency. | Stateful (hard to scale). |
20
+ | **SSE (Server-Sent Events)** | Stock Tickers, Notifications | Simple (HTTP), Auto-reconnect. | One-way (Server -> Client). |
21
+ | **Long Polling** | Legacy Support | Works everywhere. | High server resource usage. |
22
+
23
+ ## 2. Scaling (The Hard Part)
24
+ - **Problem**: Client A connects to Server 1. Client B connects to Server 2. A sends message to B. Server 1 doesn't know B.
25
+ - **Solution**: **Redis Pub/Sub Adapter**.
26
+ - Server 1 publishes event to Redis channel `room:123`.
27
+ - Server 2 subscribes to `room:123` and forwards to Client B.
28
+
29
+ ## 3. Implementation Checklist
30
+ - [ ] **Heartbeats**: Ping/Pong every 30s to keep connection alive through Load Balancers.
31
+ - [ ] **Authentication**: Authenticate *before* upgrade (pass Token in Query Param or Cookie).
32
+ - [ ] **Reconnection logic**: Exponential backoff on client.
33
+ - [ ] **State**: Store `socket_id` -> `user_id` mapping in Redis, not local memory.
34
+
35
+ ## 4. Security
36
+ - **Origin Check**: Validate `Origin` header during handshake.
37
+ - **DoS Protection**: Limit message size (e.g., max 1KB).
38
+ - **Auth**: Validate token on every distinct action if connection is long-lived.
39
+
40
+ ## Security & Guardrails
41
+
42
+ ### 1. Skill Security (Realtime Communication)
43
+ - **Pre-Upgrade Authentication Mandate**: The agent must strictly forbid architectures that upgrade the HTTP connection to a WebSocket *before* verifying authentication. WebSocket connections consume significant stateful resources (RAM/TCP ports) per user. Authenticating *after* the upgrade exposes the server to trivial layer-7 DoS attacks holding open dead connections.
44
+ - **Message Size Limiting (BOMB Deflection)**: The agent must hardcode maximum payload sizes for incoming WebSocket messages (e.g., 1KB for chat, 10KB for sync). Without rigid chunking or drop limits, an attacker can crash the Node.js/Python event loop by streaming a gigabyte-sized JSON payload over a single persistent socket.
45
+
46
+ ### 2. System Integration Security
47
+ - **Cross-Site WebSocket Hijacking (CSWSH)**: Unlike standard CORS, WebSockets do not strictly enforce Same-Origin Policies by default. The agent must explicitly configure the WebSocket server to validate the `Origin` header during the initial HTTP handshake, dropping connections from unapproved external domains attempting to hijack the user's active session.
48
+ - **Pub/Sub Tenant Isolation**: When scaling horizontally via a Redis Pub/Sub adapter (Step 2), the agent must heavily scrutinize channel naming conventions. A flaw in channel names (e.g., `room:user_input`) could allow a malicious user to subscribe to or publish messages to a different tenant's WebSocket stream, breaking data isolation bounds.
49
+
50
+ ### 3. LLM & Agent Guardrails
51
+ - **Hallucinated Stateful Immunity**: The LLM might assume that because a user authenticated at connection time, they are trusted forever. The agent must correct this: if a JWT expires or a user's permissions are revoked mid-session, the architecture must include a mechanism to forcefully sever active WebSocket connections or re-validate authorization on every distinct incoming message.
52
+ - **Protocol Downgrade Exploits**: When configuring fallback mechanisms (e.g., Long Polling if WebSockets fail), the LLM might suggest loosening security rules for the fallback transport. The agent must enforce that all fallback mechanisms require the exact same stringent Authentication and Rate Limiting constraints as the primary WebSocket protocol.
@@ -0,0 +1,72 @@
1
+ ---
2
+ name: state-management
3
+ description: Manage client-side state, side effects, and data flow.
4
+ triggers: [state management]
5
+ tags: [architecture]
6
+ role: eng-frontend
7
+ context_cost: low
8
+ ---
9
+ # state-management Skill
10
+
11
+ ## Goal
12
+ This skill guides the architecture of frontend state, avoiding "prop drilling" and "spaghetti state."
13
+
14
+ ## Steps
15
+ ## 1. Types of State
16
+
17
+ | Type | Definition | Solution |
18
+ |---|---|---|
19
+ | **Server State** | Data from API (Users, Posts). | **React Query / SWR / TanStack Query**. Do not use Redux for this. |
20
+ | **UI State** | Modals open, Sidebar toggle, Form inputs. | **Local `useState`** or **Context API** or **Zustand**. |
21
+ | **Global State** | User session, Theme, Shopping Cart. | **Redux Toolkit / Zustand / Context**. |
22
+ | **URL State** | Filters, Pagination, Search Query. | **URL Query Params**. (The URL is the source of truth). |
23
+
24
+ ## 2. Selection Guide
25
+
26
+ - **Simple App**: `useState` + Context.
27
+ - **Medium App (Dashboard)**: Zustand (UI) + TanStack Query (Server).
28
+ - **Complex App (Editor, Enterprise)**: Redux Toolkit (if strict structure needed) or XState (state machines).
29
+
30
+ ## 3. Implementation Rules
31
+
32
+ ### 1. Minimal State
33
+ - Don't store derived data.
34
+ - **Bad**: `{ firstName: 'John', lastName: 'Doe', fullName: 'John Doe' }`
35
+ - **Good**: `const fullName = firstName + ' ' + lastName;`
36
+
37
+ ### 2. Single Source of Truth
38
+ - If data exists in the URL (`?page=2`), do not duplicate it in a Store.
39
+ - The Store should sync *from* the URL, or the URL acts as the store.
40
+
41
+ ### 3. Immutability
42
+ - Never mutate state directly (`state.value = 1`).
43
+ - Use libraries that enforce this (Immer is built into Redux Toolkit) or spread operators (`...state`).
44
+
45
+ ### 4. Context Performance
46
+ - Don't put everything in one `AppProvider`.
47
+ - Split contexts: `UserProvider`, `ThemeProvider`, `SettingsProvider`.
48
+ - Use `useMemo` for context values to prevent re-renders.
49
+
50
+ ## 4. State Machines (XState)
51
+ - Use for complex logic: Payment Flows, Wizards, Game Logic.
52
+ - Define explicit states: `idle` -> `loading` -> `success` | `error`.
53
+ - Prevents "impossible states" (e.g., `loading: true` AND `error: true`).
54
+
55
+ ## 5. Debugging
56
+ - Use Redux DevTools or Zustand DevTools.
57
+ - Log state changes in development.
58
+ - Monitor render counts (React DevTools Profiler).
59
+
60
+ ## Security & Guardrails
61
+
62
+ ### 1. Skill Security (State Management)
63
+ - **Local Storage / Session Storage Exploitation**: The agent must firmly reject any design that stores highly sensitive data (e.g., unencrypted JWT access tokens, PII, Social Security Numbers) in raw `localStorage`, `sessionStorage`, or an unencrypted Redux/Zustand store persisted to disk. These storage mechanisms are trivial targets for Cross-Site Scripting (XSS) attacks.
64
+ - **XSS via Hydration**: When the state management solution involves Server-Side Rendering (SSR) and state hydration (e.g., Next.js passing initial Redux state to the client window), the agent must ensure the server actively sanitizes the JSON payload. Unsanitized state injection directly into the DOM is a severe XSS vulnerability.
65
+
66
+ ### 2. System Integration Security
67
+ - **State Tampering Check**: The agent must design the frontend state architecture operating under the assumption that the client-side state is completely untrusted and easily modified by an attacker in the browser dev-tools. Redux/Zustand state must act *only* as a UI optimization; all critical authorization, pricing, and workflow validation must occur synchronously on the Backend API.
68
+ - **Predictable State Machine Bypass**: If using XState for complex logic (e.g., a multi-step Checkout process), the agent must replicate the exact state machine transitions on the backend. An attacker can use React DevTools to arbitrarily force the client state machine from `cart_review` directly to `payment_success`. The backend must independently enforce the transition guardrails.
69
+
70
+ ### 3. LLM & Agent Guardrails
71
+ - **Over-Caching Hallucination**: The LLM might suggest caching `Server State` (like User Profiles or Order History) indefinitely in Memory or `localStorage` to reduce API calls. The agent must intercept this and enforce strict Cache Invalidation and Time-to-Live (TTL) rules, preventing the UI from displaying stale, unauthorized data if the user's permission level changes mid-session.
72
+ - **Secret Hardcoding in Global State**: The LLM might naively formulate initial state defaults containing API keys or environment secrets (e.g., `const initialState = { stripeKey: 'sk_live_123...' }`). The agent must mathematically scan all proposed frontend state objects to ensure they are scrubbed of Backend/Administrative credentials before compilation.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: system-qualities
3
+ description: Define and enforce Quality Attributes (Non-Functional Requirements)
4
+ triggers: [define NFRs, analyze system qualities, set SLAs]
5
+ tags: [architecture]
6
+ context_cost: low
7
+ ---
8
+ # system-qualities
9
+
10
+ ## Goal
11
+ Elicit, define, and enforce system Quality Attributes (NFRs) such as performance, scalability, reliability, and security metrics.
12
+
13
+ ## Steps
14
+ 1. **Elicitation**: Parse the `PRD_TEMPLATE.md` to map business goals to technical NFRs.
15
+ 2. **Definition**: Use the `QUALITY_ATTRIBUTES_TEMPLATE.md` to specify exact Service Level Indicators (SLIs) and Service Level Objectives (SLOs).
16
+ 3. **Mapping**: Map these NFRs to architectural decisions (e.g., caching for latency, redundancy for availability).
17
+ 4. **Verification**: Verify that the chosen architecture patterns theoretically support the required SLOs.
18
+
19
+ ## Security & Guardrails
20
+
21
+ ### 1. Skill Security
22
+ - **Metric Overwriting**: Prevent the agent from lowering defined SLOs (e.g., changing 99.9% to 99%) without human rationale and approval.
23
+ - **File Integrity**: Ensure the NFR definitions are strictly parsed as markdown tables/lists and do not execute external scripts.
24
+
25
+ ### 2. System Integration Security
26
+ - **Security as an NFR**: Security and Compliance must always be defined as tier-1 NFRs. The agent cannot deprioritize them below Performance or Feature Velocity.
27
+ - **Audit Logging**: Data retention and immutability must be specified to comply with SOC2/GDPR compliance logging standards.
28
+
29
+ ### 3. LLM & Agent Guardrails
30
+ - **Unrealistic Guarantees**: The LLM must not promise 100% availability or zero-latency for distributed networks (violating the CAP theorem).
31
+ - **Vague Metrics**: The agent must reject vaguely defined NFRs ("system must be fast") and mandate measurable SLIs ("p99 latency < 100ms").
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: system-scalability
3
+ description: Audit and architect scaling boundaries and bottlenecks
4
+ triggers: [scale up, scale out, horizontal scalability, vertical scaling, load balancing, analyze scalability]
5
+ tags: [architecture, ops, scale, performance]
6
+ context_cost: medium
7
+ ---
8
+ # system-scalability
9
+
10
+ ## Goal
11
+ To audit an existing architecture or propose a new one that appropriately utilizes horizontal and vertical scaling techniques, database sharding/partitioning, and decentralized state management to meet projected performance loads.
12
+
13
+ ## Steps
14
+ 1. **Current State Analysis**: Evaluate the system's current boundaries (e.g., monolithic database, stateful web servers).
15
+ 2. **Dimension Scaling**: Determine the optimal approach for the workload:
16
+ - **Vertical Scaling (Scale Up)**: Suggest hardware upgrades (CPU/RAM) where architectural changes are temporally or financially restrictive.
17
+ - **Horizontal Scaling (Scale Out)**: Propose adding more instances via Load Balancers, Kubernetes, or Auto-Scaling Groups. Ensure application state is externalized (e.g., Redis).
18
+ 3. **Database Scaling**: Propose Read Replicas, Sharding (range vs. hash), Partitioning, or NoSQL migrations for data-heavy bottlenecks.
19
+ 4. **Documentation**: Output the findings using `agents/templates/architecture/SCALABILITY_ANALYSIS_TEMPLATE.md`.
20
+
21
+ ## Security & Guardrails
22
+
23
+ ### 1. Skill Security
24
+ - **No Direct Infrastructure Muting**: The agent must output Terraform/Kubernetes manifests for scaling but **cannot** execute apply operations directly against production clusters.
25
+
26
+ ### 2. System Integration Security
27
+ - **Data Locality in Sharding**: When suggesting database sharding, the agent must verify that the sharding key respects any regional data privacy laws (e.g., EU data stays in EU shards).
28
+
29
+ ### 3. LLM & Agent Guardrails
30
+ - **Anti-Overengineering**: Prevent the LLM from suggesting hyper-complex architectures (e.g., microservices + Kafka) for workloads under 100 requests per minute.
31
+ - **Cost Awareness**: Any horizontal scaling proposal must include a FinOps warning about exponential cost increases if unmonitored.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: systems-architecture
3
+ description: Generate comprehensive C4 models and System Architecture documents
4
+ triggers: [generate c4 model, document system architecture, architect entire system]
5
+ tags: [architecture]
6
+ context_cost: high
7
+ ---
8
+ # systems-architecture
9
+
10
+ ## Goal
11
+ Maintain the holistic, high-level structural map of the software system using the C4 model (Context, Container, Component, Code).
12
+
13
+ ## Steps
14
+ 1. **Context Mapping**: Define the System Context (users and external systems).
15
+ 2. **Container Design**: Break the system into deployable containers (Web apps, APIs, Databases).
16
+ 3. **Component Breakdown**: Detail the macro components within each container.
17
+ 4. **Output Verification**: Generate proper `C4_ARCHITECTURE_TEMPLATE.md` diagrams and ensure the Mermaid syntax compiles.
18
+
19
+ ## Security & Guardrails
20
+
21
+ ### 1. Skill Security
22
+ - **Diagram Bomb**: Prevent the generation of massively interconnected Mermaid diagrams that will crash Markdown renderers. Implement a node/edge limit.
23
+ - **Source of Truth Mutation**: The agent must never override existing architecture diagrams without explicitly writing an ADR justifying the change.
24
+
25
+ ### 2. System Integration Security
26
+ - **Boundary Identification**: External, untrusted systems must always be explicitly marked with dashed boundaries or designated red-flag colors.
27
+ - **Data Flow Security**: Every edge on the diagram connecting an external client to an internal container must specify its encryption protocol (e.g., TLS 1.3).
28
+
29
+ ### 3. LLM & Agent Guardrails
30
+ - **Pattern Hallucination**: The LLM must only use project-approved architecture patterns defined in `AGENTS.md` (e.g., sticking to Hexagonal Architecture if mandated).
31
+ - **Silent Dropping**: Ensure the LLM does not silently drop unglamorous but critical system components (like logging clusters, DLQs, or internal admin panels) from the diagrams.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: visual-whiteboarding
3
+ description: Use spatial-canvas MCP servers (Miro, Draw.io, Figma) to map architectures, user flows, and wireframes.
4
+ triggers: [whiteboard, miro, draw.io, figma, canvas, spatial, wireframe]
5
+ tags: [architecture]
6
+ context_cost: low
7
+ ---
8
+ # Visual Whiteboarding Skill
9
+
10
+ To be used when the user requests generating diagrams onto a physical board, canvas, or using external visual diagramming tools (Miro, Draw.io, Figma).
11
+
12
+ ## 1. When to Use Visual Whiteboarding
13
+ * **Complex Architectures**: If a project exceeds 5-7 microservices or involves complex cloud interconnects, suggest a live `Draw.io` or `Miro` synced architecture over text-bound Mermaid.
14
+ * **PRD Syncing**: If a Product Requirements Document (PRD) requires a user flow or journey map, use the `Miro` MCP to generate a spatial flow diagram.
15
+ * **Design to Code**: If tasked with creating a frontend component based on a `Figma` design, use the `Figma` MCP to read the nodes and tokens, maintaining semantic parity.
16
+
17
+ ## 2. Choosing the Right Visual Tool
18
+ | Tool | Best For | MCP Capability |
19
+ | :--- | :--- | :--- |
20
+ | **Draw.io** | C4 Context/Container/Component Diagrams, UML, ERD | Create, read, and write `.drawio` XML directly. |
21
+ | **Miro** | User Flows, Mind Maps, Architectural Whiteboarding, Sticky Note PRDs | Create shapes, sticky notes, connectors on a live board. |
22
+ | **Figma** | High-fidelity UI Design, Component Specs, UI/UX tokens | Read-only extraction of visual semantics to output React/HTML/CSS code. |
23
+ | **Mermaid (Image)** | Quick, stateless, text-to-image rendering | Translates Markdown blocks to SVG/PNG images. |
24
+
25
+ ## 3. Workflow for Generating Canvas Architecture
26
+ 1. **Understand Requirements**: Read the `PLAN.md` or `SYSTEM_ANALYSIS_TEMPLATE.md`.
27
+ 2. **Define Nodes and Edges**: Before calling the visual MCP tools, formulate the topology using the `WHITEBOARD_DESIGN_TEMPLATE.md`.
28
+ 3. **Execute the Drawing**: Use the specific MCP server tool (e.g., `create_shape` in Miro or `write_drawio_xml` in Draw.io) to instantiate the diagram on the board.
29
+ 4. **Verification**: Re-read the canvas or generated XML to ensure no relationships were hallucinated or omitted.
30
+
31
+ ## 4. Avoiding Hallucinations
32
+ * **Spatial Overlap**: Agents must calculate X/Y coordinates carefully to avoid stacking nodes on top of each other. Add an arbitrary offset (e.g., +200px) per new node in a sequence.
33
+ * **Secret Leakage**: NEVER write API keys, database credentials, or real user data onto shared visual canvases like Miro or Figma. Redact all tokens.
@@ -0,0 +1,70 @@
1
+ # Neuro-Cognitive Design Patterns
2
+
3
+ **Software Architecture modeled after the Human Brain.**
4
+
5
+ This directory contains **Skills** and **Architectures** derived from Neuroscience, Cognitive Psychology, and Epistemology. These patterns treat the Software System not as a machine, but as a **Cognitive Entity**.
6
+
7
+ ---
8
+
9
+ ## 🧠 The Complete Cognitive Architecture
10
+
11
+ We model the agent as a **Cognitive Turing Machine** with distinct functional areas:
12
+
13
+ ```mermaid
14
+ graph TD
15
+ subgraph "Sensation & Action (Body)"
16
+ S["Sensors (Logs/Inputs)"] -->|Perception| P[Feature Binding]
17
+ M["Motor (Tools)"] -->|Action| W[World]
18
+ W -->|Feedback| S
19
+ end
20
+
21
+ subgraph "The Conscious Loop (System 2)"
22
+ P -->|Coalitions| GW[Global Workspace]
23
+ GW -->|Broadcast| WM[Working Memory]
24
+ WM -->|OODA Loop| C[Consciousness Controller]
25
+ C -->|Motor Command| M
26
+ end
27
+
28
+ subgraph "Long-Term Memory (System 1)"
29
+ WM <-->|Retrieval| EM[Episodic Memory]
30
+ WM <-->|Habits| BG[Basal Ganglia]
31
+ end
32
+
33
+ subgraph "Self-Improvement (Evolution)"
34
+ C -->|Meta-Cognition| SI[Self-Improvement]
35
+ SI -->|Rewrite| DNA[System Prompts]
36
+ end
37
+ ```
38
+
39
+ ### 1. The Body (Sensation & Action)
40
+ - **Sensory-Motor Skill** ([`sensory-motor.skill.md`](sensory-motor.skill.md)): Treats tools as "muscles" with proprioception (error feedback) and inputs as "senses" (multimodal binding).
41
+ - **Active Inference** ([`active-inference.skill.md`](active-inference.skill.md)): The low-level control loop that minimizes surprise between expectation and tool output.
42
+
43
+ ### 2. The Mind (Consciousness & Control)
44
+ - **Consciousness Loop** ([`consciousness-loop.skill.md`](consciousness-loop.skill.md)): Implementation of the **OODA Loop** (Observe-Orient-Decide-Act) and Hofstadter's "Strange Loop" for self-reference.
45
+ - **Global Workspace** ([`global-workspace.skill.md`](global-workspace.skill.md)): The "Spotlight" where competing inputs form a unified context.
46
+
47
+ ### 3. The Evolution (Learning)
48
+ - **Self-Improvement** ([`self-improvement.skill.md`](self-improvement.skill.md)): The ability to rewrite its own "DNA" (Prompts) based on failure analysis.
49
+ - **Learning & Adaptation** ([`learning-adaptation.skill.md`](learning-adaptation.skill.md)): "Neuroplasticity" mechanisms for strengthening successful paths.
50
+
51
+ ---
52
+
53
+ ## 📚 Skill Reference
54
+
55
+ | Function | Skill / Pattern | Description |
56
+ |---|---|---|
57
+ | **Coordination** | [`global-workspace.skill.md`](global-workspace.skill.md) | Central Blackboard for attention management. |
58
+ | **Control** | [`active-inference.skill.md`](active-inference.skill.md) | Predictive error minimization loop. |
59
+ | **Self-Ref** | [`consciousness-loop.skill.md`](consciousness-loop.skill.md) | Recursive OODA loop for "I" awareness. |
60
+ | **Body** | [`sensory-motor.skill.md`](sensory-motor.skill.md) | Embodied tool use and feedback control. |
61
+ | **Evolution** | [`self-improvement.skill.md`](self-improvement.skill.md) | Recursive self-editing of prompts. |
62
+ | **Memory** | [`working-memory.skill.md`](working-memory.skill.md) | Session state management. |
63
+ | **Storage** | [`episodic-consolidation.skill.md`](episodic-consolidation.skill.md) | Long-term vector storage. |
64
+ | **Routing** | [`cost-benefit-router.skill.md`](cost-benefit-router.skill.md) | Dynamic cost/privacy switching (Local vs Remote). |
65
+ | **Theory** | [`neuroscience-foundations.skill.md`](neuroscience-foundations.skill.md) | Cortico-Thalamic & Basal Ganglia theory. |
66
+ | **Theory** | [`cognitive-architectures.skill.md`](cognitive-architectures.skill.md) | Cognitive Turing Machine patterns. |
67
+ | **Theory** | [`epistemology-knowledge.skill.md`](epistemology-knowledge.skill.md) | Epistemological foundations for AI knowledge. |
68
+ | **Plasticity** | [`learning-adaptation.skill.md`](learning-adaptation.skill.md) | Neuroplasticity and path strengthening. |
69
+
70
+ ---