contextos-agents 2.0.0 → 2.1.1

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 (223) hide show
  1. package/.agents/AGENTS.md +53 -33
  2. package/.agents/adapters/aider/export.js +41 -14
  3. package/.agents/adapters/claude/export.js +54 -3
  4. package/.agents/adapters/copilot/export.js +1 -1
  5. package/.agents/adapters/cursor/export.js +1 -1
  6. package/.agents/adapters/drift-detector.js +86 -10
  7. package/.agents/adapters/gemini/export.js +1 -1
  8. package/.agents/adapters/pure-compiler.js +28 -6
  9. package/.agents/adapters/shared.js +13 -4
  10. package/.agents/adapters/zed/export.js +1 -1
  11. package/.agents/compiled/registry.v2.json +29 -25
  12. package/.agents/compiled/registry.v2.sha256 +1 -1
  13. package/.agents/core/skills/context-os/SKILL.md +34 -37
  14. package/.agents/core/skills/engineering-workflow/SKILL.md +24 -24
  15. package/.agents/core/skills/gemini-precision/EXAMPLES.md +72 -0
  16. package/.agents/core/skills/gemini-precision/SKILL.md +2 -1
  17. package/.agents/core/skills/gemini-precision/TROUBLESHOOTING.md +25 -0
  18. package/.agents/core/skills/gemini-precision/skill.yaml +2 -0
  19. package/.agents/core/skills/gstack-roles/SKILL.md +7 -6
  20. package/.agents/core/skills/security/SKILL.md +44 -16
  21. package/.agents/core/skills/security/skill.yaml +0 -1
  22. package/.agents/ctx.js +20 -14
  23. package/.agents/generated/claude/skills/context-os/SKILL.md +34 -37
  24. package/.agents/generated/claude/skills/engineering-workflow/SKILL.md +24 -24
  25. package/.agents/generated/claude/skills/gemini-precision/SKILL.md +102 -1
  26. package/.agents/generated/claude/skills/gstack-roles/SKILL.md +7 -6
  27. package/.agents/generated/claude/skills/security/SKILL.md +44 -16
  28. package/.agents/generated/gemini/skills/context-os/SKILL.md +34 -37
  29. package/.agents/generated/gemini/skills/engineering-workflow/SKILL.md +24 -24
  30. package/.agents/generated/gemini/skills/gemini-precision/SKILL.md +105 -1
  31. package/.agents/generated/gemini/skills/gstack-roles/SKILL.md +7 -6
  32. package/.agents/generated/gemini/skills/security/SKILL.md +44 -125
  33. package/.agents/plugins.js +105 -8
  34. package/.agents/profiles.js +32 -11
  35. package/.agents/resolver/canonical-resolver.js +7 -7
  36. package/.agents/validate.js +69 -1
  37. package/README.md +81 -24
  38. package/bin/commands/hook.js +167 -0
  39. package/bin/commands/scan.js +77 -0
  40. package/bin/commands.js +39 -1
  41. package/bin/index.js +151 -34
  42. package/bin/lib/gate.js +171 -0
  43. package/bin/lib/git-snapshot.js +214 -0
  44. package/bin/lib/scan.js +461 -0
  45. package/catalog/skills/adapters/EXAMPLES.md +19 -0
  46. package/catalog/skills/adapters/SKILL.md +101 -0
  47. package/catalog/skills/adapters/TROUBLESHOOTING.md +7 -0
  48. package/catalog/skills/adapters/VALIDATION.json +12 -0
  49. package/catalog/skills/adapters/skill.yaml +13 -0
  50. package/catalog/skills/api-design/EXAMPLES.md +91 -0
  51. package/catalog/skills/api-design/SKILL.md +63 -0
  52. package/catalog/skills/api-design/TROUBLESHOOTING.md +54 -0
  53. package/catalog/skills/api-design/VALIDATION.json +11 -0
  54. package/catalog/skills/api-design/skill.yaml +14 -0
  55. package/catalog/skills/architecture-diagrams/SKILL.md +108 -0
  56. package/catalog/skills/architecture-diagrams/VALIDATION.json +12 -0
  57. package/catalog/skills/architecture-diagrams/skill.yaml +9 -0
  58. package/catalog/skills/brutalist-design/EXAMPLES.md +59 -0
  59. package/catalog/skills/brutalist-design/SKILL.md +150 -0
  60. package/catalog/skills/brutalist-design/VALIDATION.json +12 -0
  61. package/catalog/skills/brutalist-design/skill.yaml +10 -0
  62. package/catalog/skills/ci-cd/EXAMPLES.md +79 -0
  63. package/catalog/skills/ci-cd/SKILL.md +69 -0
  64. package/catalog/skills/ci-cd/TROUBLESHOOTING.md +52 -0
  65. package/catalog/skills/ci-cd/VALIDATION.json +11 -0
  66. package/catalog/skills/ci-cd/skill.yaml +13 -0
  67. package/catalog/skills/database/EXAMPLES.md +74 -0
  68. package/catalog/skills/database/SKILL.md +101 -0
  69. package/catalog/skills/database/TROUBLESHOOTING.md +18 -0
  70. package/catalog/skills/database/VALIDATION.json +11 -0
  71. package/catalog/skills/database/skill.yaml +14 -0
  72. package/catalog/skills/ddd/EXAMPLES.md +42 -0
  73. package/catalog/skills/ddd/SKILL.md +247 -0
  74. package/catalog/skills/ddd/TROUBLESHOOTING.md +19 -0
  75. package/catalog/skills/ddd/VALIDATION.json +12 -0
  76. package/catalog/skills/ddd/skill.yaml +14 -0
  77. package/catalog/skills/decisions/EXAMPLES.md +35 -0
  78. package/catalog/skills/decisions/SKILL.md +90 -0
  79. package/catalog/skills/decisions/TROUBLESHOOTING.md +13 -0
  80. package/catalog/skills/decisions/VALIDATION.json +12 -0
  81. package/catalog/skills/decisions/skill.yaml +13 -0
  82. package/catalog/skills/docker/EXAMPLES.md +56 -0
  83. package/catalog/skills/docker/SKILL.md +169 -0
  84. package/catalog/skills/docker/TROUBLESHOOTING.md +18 -0
  85. package/catalog/skills/docker/VALIDATION.json +11 -0
  86. package/catalog/skills/docker/skill.yaml +13 -0
  87. package/catalog/skills/fastapi/EXAMPLES.md +36 -0
  88. package/catalog/skills/fastapi/SKILL.md +171 -0
  89. package/catalog/skills/fastapi/TROUBLESHOOTING.md +19 -0
  90. package/catalog/skills/fastapi/VALIDATION.json +12 -0
  91. package/catalog/skills/fastapi/skill.yaml +14 -0
  92. package/catalog/skills/generators/EXAMPLES.md +19 -0
  93. package/catalog/skills/generators/SKILL.md +110 -0
  94. package/catalog/skills/generators/TROUBLESHOOTING.md +7 -0
  95. package/catalog/skills/generators/VALIDATION.json +12 -0
  96. package/catalog/skills/generators/skill.yaml +22 -0
  97. package/catalog/skills/generators/templates/API.md +77 -0
  98. package/catalog/skills/generators/templates/ARCHITECTURE.md +70 -0
  99. package/catalog/skills/generators/templates/DATABASE.md +42 -0
  100. package/catalog/skills/generators/templates/DECISION.md +46 -0
  101. package/catalog/skills/generators/templates/PRD.md +67 -0
  102. package/catalog/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  103. package/catalog/skills/generators/templates/ROADMAP.md +51 -0
  104. package/catalog/skills/generators/templates/TASKS.md +43 -0
  105. package/catalog/skills/generators/templates/UI.md +73 -0
  106. package/catalog/skills/graphify/EXAMPLES.md +73 -0
  107. package/catalog/skills/graphify/SKILL.md +130 -0
  108. package/catalog/skills/graphify/VALIDATION.json +12 -0
  109. package/catalog/skills/graphify/skill.yaml +13 -0
  110. package/catalog/skills/impeccable-design/EXAMPLES.md +26 -0
  111. package/catalog/skills/impeccable-design/SKILL.md +201 -0
  112. package/catalog/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  113. package/catalog/skills/impeccable-design/VALIDATION.json +12 -0
  114. package/catalog/skills/impeccable-design/skill.yaml +15 -0
  115. package/catalog/skills/interview-me/SKILL.md +97 -0
  116. package/catalog/skills/interview-me/VALIDATION.json +12 -0
  117. package/catalog/skills/interview-me/skill.yaml +9 -0
  118. package/catalog/skills/microservices/EXAMPLES.md +38 -0
  119. package/catalog/skills/microservices/SKILL.md +164 -0
  120. package/catalog/skills/microservices/TROUBLESHOOTING.md +19 -0
  121. package/catalog/skills/microservices/VALIDATION.json +12 -0
  122. package/catalog/skills/microservices/skill.yaml +14 -0
  123. package/catalog/skills/minimalist-design/EXAMPLES.md +58 -0
  124. package/catalog/skills/minimalist-design/SKILL.md +113 -0
  125. package/catalog/skills/minimalist-design/VALIDATION.json +12 -0
  126. package/catalog/skills/minimalist-design/skill.yaml +10 -0
  127. package/catalog/skills/nestjs/EXAMPLES.md +40 -0
  128. package/catalog/skills/nestjs/SKILL.md +139 -0
  129. package/catalog/skills/nestjs/TROUBLESHOOTING.md +19 -0
  130. package/catalog/skills/nestjs/VALIDATION.json +12 -0
  131. package/catalog/skills/nestjs/skill.yaml +14 -0
  132. package/catalog/skills/nextjs/EXAMPLES.md +40 -0
  133. package/catalog/skills/nextjs/SKILL.md +163 -0
  134. package/catalog/skills/nextjs/TROUBLESHOOTING.md +19 -0
  135. package/catalog/skills/nextjs/VALIDATION.json +12 -0
  136. package/catalog/skills/nextjs/skill.yaml +14 -0
  137. package/catalog/skills/node/EXAMPLES.md +80 -0
  138. package/catalog/skills/node/SKILL.md +128 -0
  139. package/catalog/skills/node/TROUBLESHOOTING.md +19 -0
  140. package/catalog/skills/node/VALIDATION.json +12 -0
  141. package/catalog/skills/node/skill.yaml +14 -0
  142. package/catalog/skills/performance/EXAMPLES.md +30 -0
  143. package/catalog/skills/performance/SKILL.md +75 -0
  144. package/catalog/skills/performance/TROUBLESHOOTING.md +19 -0
  145. package/catalog/skills/performance/VALIDATION.json +12 -0
  146. package/catalog/skills/performance/skill.yaml +14 -0
  147. package/catalog/skills/react/EXAMPLES.md +79 -0
  148. package/catalog/skills/react/SKILL.md +132 -0
  149. package/catalog/skills/react/TROUBLESHOOTING.md +19 -0
  150. package/catalog/skills/react/VALIDATION.json +12 -0
  151. package/catalog/skills/react/skill.yaml +14 -0
  152. package/catalog/skills/react-best-practices/SKILL.md +158 -0
  153. package/catalog/skills/react-best-practices/VALIDATION.json +12 -0
  154. package/catalog/skills/react-best-practices/skill.yaml +13 -0
  155. package/catalog/skills/redesign-audit/SKILL.md +117 -0
  156. package/catalog/skills/redesign-audit/VALIDATION.json +12 -0
  157. package/catalog/skills/redesign-audit/skill.yaml +9 -0
  158. package/catalog/skills/security-audit/EXAMPLES.md +79 -0
  159. package/catalog/skills/security-audit/SKILL.md +91 -0
  160. package/catalog/skills/security-audit/TROUBLESHOOTING.md +46 -0
  161. package/catalog/skills/security-audit/VALIDATION.json +11 -0
  162. package/catalog/skills/security-audit/skill.yaml +14 -0
  163. package/catalog/skills/soft-design/EXAMPLES.md +51 -0
  164. package/catalog/skills/soft-design/SKILL.md +108 -0
  165. package/catalog/skills/soft-design/VALIDATION.json +12 -0
  166. package/catalog/skills/soft-design/skill.yaml +10 -0
  167. package/catalog/skills/state-management/EXAMPLES.md +56 -0
  168. package/catalog/skills/state-management/SKILL.md +168 -0
  169. package/catalog/skills/state-management/TROUBLESHOOTING.md +18 -0
  170. package/catalog/skills/state-management/VALIDATION.json +11 -0
  171. package/catalog/skills/state-management/skill.yaml +14 -0
  172. package/catalog/skills/subagent-orchestrator/SKILL.md +117 -0
  173. package/catalog/skills/subagent-orchestrator/VALIDATION.json +12 -0
  174. package/catalog/skills/subagent-orchestrator/skill.yaml +9 -0
  175. package/catalog/skills/system-design/EXAMPLES.md +75 -0
  176. package/catalog/skills/system-design/SKILL.md +419 -0
  177. package/catalog/skills/system-design/TROUBLESHOOTING.md +19 -0
  178. package/catalog/skills/system-design/VALIDATION.json +12 -0
  179. package/catalog/skills/system-design/skill.yaml +14 -0
  180. package/catalog/skills/terraform/EXAMPLES.md +74 -0
  181. package/catalog/skills/terraform/SKILL.md +55 -0
  182. package/catalog/skills/terraform/TROUBLESHOOTING.md +53 -0
  183. package/catalog/skills/terraform/VALIDATION.json +11 -0
  184. package/catalog/skills/terraform/skill.yaml +14 -0
  185. package/catalog/skills/testing/EXAMPLES.md +122 -0
  186. package/catalog/skills/testing/SKILL.md +70 -0
  187. package/catalog/skills/testing/TROUBLESHOOTING.md +18 -0
  188. package/catalog/skills/testing/VALIDATION.json +11 -0
  189. package/catalog/skills/testing/skill.yaml +14 -0
  190. package/catalog/skills/typescript/EXAMPLES.md +64 -0
  191. package/catalog/skills/typescript/SKILL.md +112 -0
  192. package/catalog/skills/typescript/TROUBLESHOOTING.md +19 -0
  193. package/catalog/skills/typescript/VALIDATION.json +12 -0
  194. package/catalog/skills/typescript/skill.yaml +14 -0
  195. package/catalog/skills/ui-design/EXAMPLES.md +21 -0
  196. package/catalog/skills/ui-design/SKILL.md +124 -0
  197. package/catalog/skills/ui-design/TROUBLESHOOTING.md +19 -0
  198. package/catalog/skills/ui-design/VALIDATION.json +12 -0
  199. package/catalog/skills/ui-design/skill.yaml +16 -0
  200. package/catalog/skills/ui-ux-pro/EXAMPLES.md +62 -0
  201. package/catalog/skills/ui-ux-pro/SKILL.md +418 -0
  202. package/catalog/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  203. package/catalog/skills/ui-ux-pro/VALIDATION.json +12 -0
  204. package/catalog/skills/ui-ux-pro/skill.yaml +14 -0
  205. package/catalog/skills/ux-design/EXAMPLES.md +36 -0
  206. package/catalog/skills/ux-design/SKILL.md +116 -0
  207. package/catalog/skills/ux-design/TROUBLESHOOTING.md +19 -0
  208. package/catalog/skills/ux-design/VALIDATION.json +12 -0
  209. package/catalog/skills/ux-design/skill.yaml +16 -0
  210. package/catalog/skills/vercel-optimize/SKILL.md +83 -0
  211. package/catalog/skills/vercel-optimize/VALIDATION.json +12 -0
  212. package/catalog/skills/vercel-optimize/scripts/collect-signals.mjs +131 -0
  213. package/catalog/skills/vercel-optimize/scripts/gate-investigations.mjs +142 -0
  214. package/catalog/skills/vercel-optimize/scripts/merge-signals.mjs +143 -0
  215. package/catalog/skills/vercel-optimize/scripts/scan-codebase.mjs +174 -0
  216. package/catalog/skills/vercel-optimize/skill.yaml +15 -0
  217. package/catalog/skills/web-accessibility/EXAMPLES.md +39 -0
  218. package/catalog/skills/web-accessibility/SKILL.md +151 -0
  219. package/catalog/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  220. package/catalog/skills/web-accessibility/VALIDATION.json +12 -0
  221. package/catalog/skills/web-accessibility/skill.yaml +14 -0
  222. package/package.json +5 -2
  223. package/.agents/core/skills/security/security.md +0 -106
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 2,
3
3
  "compilerVersion": "2.0.0",
4
- "sourceGraphHash": "sha256:c15f3691d9ed833630152b65959fdef465d88a7cf5bb27d44a086621e20c89c1",
4
+ "sourceGraphHash": "sha256:938c5051454535087e03f26af35c434cf194f414d2ec8044b4ae754e8524cf37",
5
5
  "skills": {
6
6
  "context-manager": {
7
7
  "id": "context-manager",
@@ -66,9 +66,9 @@
66
66
  "category": "general",
67
67
  "type": "compiler",
68
68
  "entrypoint": "SKILL.md",
69
- "entrypointHash": "sha256:f28a8b6df5cf6d0dc8b32d8e4149f866b59ee11da0c1c050f766a0009674ca86",
70
- "resourceTreeHash": "sha256:697cd51226283b147f719e2f4074acb058be1f3fe42714a3babb771e52e26a73",
71
- "estimatedTokens": 1227,
69
+ "entrypointHash": "sha256:ab14bcd603573c975a69cb95b5ef8a305de8eb888c81c20c994121313f017239",
70
+ "resourceTreeHash": "sha256:48568f01d27fa53e2e01a6a63afd60eb2d43cabdc9eb2cfe6f02a2b67d0f53e1",
71
+ "estimatedTokens": 1365,
72
72
  "source": ".agents/core/skills/context-os/skill.yaml",
73
73
  "signals": {
74
74
  "aliases": [
@@ -85,7 +85,7 @@
85
85
  },
86
86
  "context": {
87
87
  "priority": 50,
88
- "estimatedTokens": 1227
88
+ "estimatedTokens": 1365
89
89
  },
90
90
  "resources": [
91
91
  {
@@ -137,9 +137,9 @@
137
137
  "category": "general",
138
138
  "type": "instruction-only",
139
139
  "entrypoint": "SKILL.md",
140
- "entrypointHash": "sha256:0985a21360cdd796a2f2970b659b6a7a1cdd55672dd35b0292400f9a0092b556",
141
- "resourceTreeHash": "sha256:6e2e654c903e1043609c1f7f36980a19c1e20e35bc3fa337ad051293f1e9124c",
142
- "estimatedTokens": 3065,
140
+ "entrypointHash": "sha256:88b606d086f63c5e293630ad84ff524d2542f2953fc1a5a451bd77352073b0ad",
141
+ "resourceTreeHash": "sha256:e78a054d8f54a72550cf10d551a82f56015aedb3f16a14021e654574bad5804f",
142
+ "estimatedTokens": 3083,
143
143
  "source": ".agents/core/skills/engineering-workflow/skill.yaml",
144
144
  "signals": {
145
145
  "aliases": [
@@ -156,7 +156,7 @@
156
156
  },
157
157
  "context": {
158
158
  "priority": 50,
159
- "estimatedTokens": 3065
159
+ "estimatedTokens": 3083
160
160
  },
161
161
  "resources": [
162
162
  {
@@ -188,9 +188,9 @@
188
188
  "category": "general",
189
189
  "type": "instruction-only",
190
190
  "entrypoint": "SKILL.md",
191
- "entrypointHash": "sha256:677c7229e8b483990cf4b441b990328f5933127a7c449830fe2786cd232321c4",
192
- "resourceTreeHash": "sha256:38e0e3e512df2855647a083a6e0ae759a3af613b7f2e2848046b8d6998143539",
193
- "estimatedTokens": 1868,
191
+ "entrypointHash": "sha256:bd091c13a5c15c2ac55a8c27b309ffdd8e0a5a8b8260198808b70e45e685b9fd",
192
+ "resourceTreeHash": "sha256:8ae82b8dd89128820c8b28c7e9e8aac878f363381dd2a11043b8aff9d03ae35e",
193
+ "estimatedTokens": 1890,
194
194
  "source": ".agents/core/skills/gemini-precision/skill.yaml",
195
195
  "signals": {
196
196
  "aliases": [
@@ -207,13 +207,21 @@
207
207
  },
208
208
  "context": {
209
209
  "priority": 50,
210
- "estimatedTokens": 1868
210
+ "estimatedTokens": 1890
211
211
  },
212
212
  "resources": [
213
+ {
214
+ "path": "EXAMPLES.md",
215
+ "mode": "on-demand"
216
+ },
213
217
  {
214
218
  "path": "SKILL.md",
215
219
  "mode": "on-demand"
216
220
  },
221
+ {
222
+ "path": "TROUBLESHOOTING.md",
223
+ "mode": "on-demand"
224
+ },
217
225
  {
218
226
  "path": "VALIDATION.json",
219
227
  "mode": "on-demand"
@@ -231,9 +239,9 @@
231
239
  "category": "general",
232
240
  "type": "instruction-only",
233
241
  "entrypoint": "SKILL.md",
234
- "entrypointHash": "sha256:faaa89d02bf41416c173e6387e5c9c5065cfe4d82e76c2ae244b77c6cecd3230",
235
- "resourceTreeHash": "sha256:f83fba0726700070887643c7e20a0584ba29b0f96c2587bcd834860362ce7a95",
236
- "estimatedTokens": 1774,
242
+ "entrypointHash": "sha256:09334359de594f9c3e667ae0660db9a5c977c583b25ccf7de71fe25b7134454e",
243
+ "resourceTreeHash": "sha256:0bcfb511ef61a6782e3394c0779e5f5eed1833aff6e24c7749957df209c6185a",
244
+ "estimatedTokens": 1791,
237
245
  "source": ".agents/core/skills/gstack-roles/skill.yaml",
238
246
  "signals": {
239
247
  "aliases": [
@@ -250,7 +258,7 @@
250
258
  },
251
259
  "context": {
252
260
  "priority": 50,
253
- "estimatedTokens": 1774
261
+ "estimatedTokens": 1791
254
262
  },
255
263
  "resources": [
256
264
  {
@@ -333,9 +341,9 @@
333
341
  "category": "backend",
334
342
  "type": "instruction-only",
335
343
  "entrypoint": "SKILL.md",
336
- "entrypointHash": "sha256:151bc9080230cdec8e1de9d703d03b739ab0767e24fb2551acd5cf58feb4f3ab",
337
- "resourceTreeHash": "sha256:da5be685a6db8c48faeb74722891816960e4b6a86378b680f045a81a204ac572",
338
- "estimatedTokens": 1615,
344
+ "entrypointHash": "sha256:5daec60e9bb1c49a2b66e43d73e897397507e3604ef4bf02588d35cfd59b1903",
345
+ "resourceTreeHash": "sha256:b4302851046e1faffc18bc600c79d92d1da7f31bed03781eee89e84ddedc4956",
346
+ "estimatedTokens": 2237,
339
347
  "source": ".agents/core/skills/security/skill.yaml",
340
348
  "signals": {
341
349
  "aliases": [
@@ -403,7 +411,7 @@
403
411
  },
404
412
  "context": {
405
413
  "priority": 90,
406
- "estimatedTokens": 1615
414
+ "estimatedTokens": 2237
407
415
  },
408
416
  "resources": [
409
417
  {
@@ -421,10 +429,6 @@
421
429
  {
422
430
  "path": "VALIDATION.json",
423
431
  "mode": "on-demand"
424
- },
425
- {
426
- "path": "security.md",
427
- "mode": "on-demand"
428
432
  }
429
433
  ],
430
434
  "deprecated": false,
@@ -1 +1 @@
1
- sha256:c15f3691d9ed833630152b65959fdef465d88a7cf5bb27d44a086621e20c89c1 registry.v2.json
1
+ sha256:938c5051454535087e03f26af35c434cf194f414d2ec8044b4ae754e8524cf37 registry.v2.json
@@ -8,11 +8,11 @@ description: >-
8
8
 
9
9
  ## Overview
10
10
 
11
- Deterministic context compiler and policy engine for AI coding agents. Standardizes software engineering workflows across requirements, architecture, atomic task planning, implementation, verification, and release.
11
+ Deterministic context compiler and policy engine for AI coding agents. Governs repository policy configuration, skill dependency graphs, profile management, and multi-agent configuration export.
12
12
 
13
13
  ## When to Use
14
14
 
15
- Activate as the root meta-orchestrator across all development phases to ensure role consistency, quality gates, and structured execution.
15
+ Activate when managing project configuration, resolving skill dependencies, compiling rules for editors, or defining repository-level agent standards. (For task-specific file and context budgeting, use `context-manager`).
16
16
 
17
17
  ## Rules & Patterns
18
18
 
@@ -46,10 +46,10 @@ intent:
46
46
  For each required layer, load the skill graph:
47
47
 
48
48
  1. Read `skill.yaml` from each relevant skill directory
49
- 2. Resolve `requires` — load mandatory dependencies
50
- 3. Check `conflicts` — ensure no incompatible skills are loaded
51
- 4. Apply `optional` — suggest but don't force
52
- 5. Respect project profile (if set) — apply rules from `profiles/`
49
+ 2. Resolve `requires` - load mandatory dependencies
50
+ 3. Check `conflicts` - ensure no incompatible skills are loaded
51
+ 4. Apply `optional` - suggest but don't force
52
+ 5. Respect project profile (if set) - apply rules from `profiles/`
53
53
 
54
54
  **Dependency resolution example:**
55
55
 
@@ -67,48 +67,45 @@ Suggested: [tailwind, prisma, next-auth]
67
67
 
68
68
  Assemble context from three levels:
69
69
 
70
- **Level 1 — Vision (always available):**
70
+ **Level 1 - Vision (always available):**
71
71
 
72
- - `docs/PRD.md` — what are we building
73
- - `docs/ROADMAP.md` — where are we going
74
- - `docs/PROJECT_GRAPH.md` — project structure
72
+ - `docs/PRD.md` - what are we building
73
+ - `docs/ROADMAP.md` - where are we going
74
+ - `docs/PROJECT_GRAPH.md` - project structure
75
+ - `docs/API.md` - API specification (optional, when backend API layer is present)
76
+ - `docs/UI.md` - UI/UX specification (optional, when UI layer is present)
75
77
 
76
- **Level 2 — Architecture (load when needed):**
78
+ **Level 2 - Architecture (load when needed):**
77
79
 
78
- - `docs/ARCHITECTURE.md` — system design
79
- - `docs/DATABASE.md` — data model
80
- - `docs/API.md` — API contracts
81
- - `docs/decisions/` — prior decisions
80
+ - `docs/ARCHITECTURE.md` - system design and boundaries
81
+ - `docs/decisions/` - architecture decision records (ADRs)
82
+ - `docs/PRODUCT_BOUNDARIES.md` - maturity boundaries and non-promises
83
+ - `references/context-rules.md` - dynamic context selection and compilation rules
82
84
 
83
- **Level 3 — Development (load per task):**
85
+ **Level 3 - Task-Specific Context (load per task):**
84
86
 
85
- - Relevant skill `.md` files
86
- - `docs/UI.md` — for frontend tasks
87
- - `docs/TASKS.md` — current sprint
87
+ - Relevant skill documents from `.agents/skills/`
88
+ - Target code and test files within planned blast radius
88
89
 
89
- **Context Filtering Rules:**
90
- See `references/context-rules.md` for the full mapping of task types to required documents.
90
+ ### Stage 4: Focused Context Selection
91
91
 
92
- ### Stage 4: Prompt Optimization
92
+ Before sending context to the AI coding assistant:
93
93
 
94
- Before sending to the AI agent:
94
+ 1. Select only skills relevant to the task domain and touched files
95
+ 2. Prioritize: task goal > architectural constraints > project conventions
96
+ 3. Include active Decision Records that affect the target component
97
+ 4. Enforce quality guardrails and verification criteria
95
98
 
96
- 1. Remove sections not relevant to the current task
97
- 2. Prioritize: current task context > architecture > vision
98
- 3. Include recent Decision Records that affect the current task
99
- 4. Add coding rules from the loaded skills
100
-
101
- ## Commands
99
+ ## Core CLI Commands
102
100
 
103
101
  | Command | Action |
104
102
  | --- | --- |
105
- | `ctx init` | Analyze project idea, generate all docs |
106
- | `ctx plan` | Generate development plan from PRD |
107
- | `ctx compile` | Compile context for a specific task |
108
- | `ctx update` | Update changed documents |
109
- | `ctx graph` | Show/update Project Graph |
110
- | `ctx doctor` | Validate skill dependencies, check for conflicts |
111
- | `ctx explain` | Explain why specific context was loaded |
103
+ | `contextos init` | Initialize `.agents/` folder and bootstrap profiles |
104
+ | `contextos export <agent>` | Compile skills for target agent (`gemini`, `claude`, `cursor`, `copilot`, `aider`, `zed`, `all`) |
105
+ | `contextos resolve "<task>"` | Dynamically resolve relevant skills, rules, and risk level for task |
106
+ | `contextos validate` | Validate skill schemas, dependencies, and detect configuration drift |
107
+ | `contextos doctor` | Pre-flight diagnostics for skills, profiles, and compiler synchronization |
108
+ | `contextos watch` | Background file watcher for continuous auto-compilation |
112
109
 
113
110
  ## Project Initialization Flow
114
111
 
@@ -126,7 +123,7 @@ When user says something like "Сделай CRM для стоматологии"
126
123
  3. **Select profile** (startup/enterprise/mvp/hackathon)
127
124
  4. **Resolve skills** (Stage 2)
128
125
  5. **Generate all documents** using `generators/` skill
129
- 6. **Create Project Graph** — the master map of modules → features → tasks → files → skills
126
+ 6. **Create Project Graph** - the master map of modules -> features -> tasks -> files -> skills
130
127
  7. **Output agent config** using `adapters/` skill
131
128
 
132
129
  ## Skill Discovery
@@ -45,7 +45,7 @@ Inspired by [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills
45
45
 
46
46
  ---
47
47
 
48
- ### Phase 1: DEFINE — /spec
48
+ ### Phase 1: DEFINE - /spec
49
49
 
50
50
  **Auto-activates → `[ROLE: Product Manager]`**
51
51
 
@@ -79,8 +79,8 @@ Before writing the spec, if there is ambiguity, high blast radius, or multiple a
79
79
  ### Technical Approach
80
80
  [Read the relevant code. Understand what changes where.]
81
81
  Files affected:
82
- - `src/X.js` — [what changes]
83
- - `src/Y.js` — [what changes]
82
+ - `src/X.js` - [what changes]
83
+ - `src/Y.js` - [what changes]
84
84
 
85
85
  ### Acceptance Criteria
86
86
  - [ ] Given [context], when [action], then [result]
@@ -93,7 +93,7 @@ Files affected:
93
93
 
94
94
  ---
95
95
 
96
- ### Phase 2: PLAN — /plan
96
+ ### Phase 2: PLAN - /plan
97
97
 
98
98
  **Auto-activates → `[ROLE: Architect]`**
99
99
 
@@ -111,7 +111,7 @@ Organize tasks as **Thin Vertical Slices** rather than horizontal layers:
111
111
  - Each task must be **completable in < 2 hours** of focused work.
112
112
  - Each task must be **independently testable**.
113
113
  - Tasks must be **ordered by dependency** (blocking tasks first).
114
- - Each task gets a **test requirement** — no task without a test.
114
+ - Each task gets a **test requirement** - no task without a test.
115
115
 
116
116
  #### Plan Template
117
117
 
@@ -136,13 +136,13 @@ Organize tasks as **Thin Vertical Slices** rather than horizontal layers:
136
136
  - [Risk 1]: [Mitigation]
137
137
  - [Risk 2]: [Mitigation]
138
138
 
139
- ### STOP — Awaiting Approval
139
+ ### STOP - Awaiting Approval
140
140
  Do not proceed to BUILD until this plan is approved.
141
141
  ```
142
142
 
143
143
  ---
144
144
 
145
- ### Phase 3: BUILD — /build
145
+ ### Phase 3: BUILD - /build
146
146
 
147
147
  **Auto-activates → `[ROLE: Senior Developer]`**
148
148
 
@@ -150,12 +150,12 @@ Implement one task at a time. Commit after each task.
150
150
 
151
151
  #### Build Rules
152
152
 
153
- 1. **One task per commit** — atomic, descriptive commit messages.
154
- 2. **Write the test FIRST** (TDD — red-green-refactor).
155
- 3. **No dead code** — if it's not tested, it's not shipped.
156
- 4. **No TODOs in committed code** — resolve or create a tracked issue.
157
- 5. **Read before writing** — understand the surrounding code before changing it.
158
- 6. **Limit the blast radius** — modify ONLY the files explicitly listed in the current task's plan. Do NOT rewrite adjacent components, hooks, or utilities unless strictly required AND approved.
153
+ 1. **One task per commit** - atomic, descriptive commit messages.
154
+ 2. **Write the test FIRST** (TDD - red-green-refactor).
155
+ 3. **No dead code** - if it's not tested, it's not shipped.
156
+ 4. **No TODOs in committed code** - resolve or create a tracked issue.
157
+ 5. **Read before writing** - understand the surrounding code before changing it.
158
+ 6. **Limit the blast radius** - modify ONLY the files explicitly listed in the current task's plan. Do NOT rewrite adjacent components, hooks, or utilities unless strictly required AND approved.
159
159
 
160
160
  #### Commit Message Format
161
161
 
@@ -172,7 +172,7 @@ Types: `feat`, `fix`, `refactor`, `test`, `docs`, `chore`
172
172
 
173
173
  ---
174
174
 
175
- ### Phase 4: VERIFY — /test
175
+ ### Phase 4: VERIFY - /test
176
176
 
177
177
  **Auto-activates → `[ROLE: QA Lead]`**
178
178
 
@@ -193,7 +193,7 @@ Tests are proof, not an afterthought.
193
193
 
194
194
  For complex React components, prioritize testing _user behavior_ over internal state:
195
195
 
196
- - Use **React Testing Library** (`userEvent`, `screen.getByRole`) — test what the user sees.
196
+ - Use **React Testing Library** (`userEvent`, `screen.getByRole`) - test what the user sees.
197
197
  - Use **Playwright** for critical user flows (login, checkout, form submit).
198
198
  - Do NOT test implementation details (internal state, private methods, component structure).
199
199
  - Focus on: "When user clicks X, does Y appear?" not "Does `useState` hold the right value?"
@@ -220,7 +220,7 @@ Before moving to Review, verify:
220
220
 
221
221
  ---
222
222
 
223
- ### Phase 5: REVIEW — /review
223
+ ### Phase 5: REVIEW - /review
224
224
 
225
225
  **Auto-activates → `[ROLE: Staff Engineer]` + `[ROLE: Senior Designer]` for UI tasks**
226
226
 
@@ -240,7 +240,7 @@ Inspired by [obra/superpowers](https://github.com/obra/superpowers):
240
240
 
241
241
  ---
242
242
 
243
- ### Phase 5.5: SIMPLIFY — /simplify
243
+ ### Phase 5.5: SIMPLIFY - /simplify
244
244
 
245
245
  **Auto-activates → `[ROLE: Staff Engineer]` (Ponytail Mindset)**
246
246
 
@@ -253,7 +253,7 @@ Before merging, ruthlessly simplify:
253
253
 
254
254
  ---
255
255
 
256
- ### Phase 6: SHIP — /ship
256
+ ### Phase 6: SHIP - /ship
257
257
 
258
258
  **Auto-activates → `[ROLE: Release Engineer]`**
259
259
 
@@ -267,8 +267,7 @@ Only ship when all gates are green.
267
267
  - [ ] Docs updated (README, API docs, changelogs)
268
268
  - [ ] Breaking changes documented
269
269
  - [ ] Rollback plan exists
270
- - [ ] Vercel Preview Deployment is successful and manually verified
271
- - [ ] Core Web Vitals pass in preview (LCP < 2.5s, CLS < 0.1, INP < 200ms)
270
+ - [ ] Preview / staging deployment verified (if applicable, e.g. Vercel Preview and Core Web Vitals for frontend deployments)
272
271
 
273
272
  #### Operational Self-Improvement
274
273
 
@@ -311,6 +310,7 @@ export async function POST(req) {
311
310
  - [ ] Implementation plan broken down into vertical tasks < 2 hours each.
312
311
  - [ ] Tests written before implementation (TDD/BDD).
313
312
  - [ ] Code reviewed against correctness, security, performance, and design gates.
313
+ - [ ] Staged security and quality check passes (`contextos scan --staged --enforce`).
314
314
  - [ ] Simplification ladder executed before shipping.
315
315
 
316
316
  ---
@@ -337,7 +337,7 @@ export async function POST(req) {
337
337
 
338
338
  When completing a task or workflow, you must explicitly report your final status as the last part of your output:
339
339
 
340
- - **DONE** — completed with evidence.
341
- - **DONE_WITH_CONCERNS** — completed, but list concerns.
342
- - **BLOCKED** — cannot proceed; state blocker and what was tried.
343
- - **NEEDS_CONTEXT** — missing info; state exactly what is needed.
340
+ - **DONE** - completed with evidence.
341
+ - **DONE_WITH_CONCERNS** - completed, but list concerns.
342
+ - **BLOCKED** - cannot proceed; state blocker and what was tried.
343
+ - **NEEDS_CONTEXT** - missing info; state exactly what is needed.
@@ -0,0 +1,72 @@
1
+ # gemini-precision Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Read-Before-Write Invariant (Zero Assumptions)
4
+
5
+ ### Anti-pattern: Hallucinated Import and Signature
6
+
7
+ ```typescript
8
+ // BAD: Assuming the module exists and export is a default function
9
+ import hashPassword from 'src/utils/crypto';
10
+ const hash = hashPassword(password);
11
+ ```
12
+
13
+ ### Best practice: ContextOS Standard (Inspected Active Codebase First)
14
+
15
+ ```typescript
16
+ // GOOD: Inspected src/lib/auth.ts via view_file before writing code
17
+ import { hashSecret, ARGON2_CONFIG } from '../lib/auth.js';
18
+ const hash = await hashSecret(password, ARGON2_CONFIG);
19
+ ```
20
+
21
+ ---
22
+
23
+ ## Example 2: Zero-Placeholder Invariant (Complete Code Only)
24
+
25
+ ### Anti-pattern: Lazy Stubs and Ellipsis Comments
26
+
27
+ ```typescript
28
+ // BAD: Emitting incomplete code with TODOs and ellipsis
29
+ export function processTransaction(tx: Transaction) {
30
+ // TODO: validate transaction balance
31
+ // ... rest of implementation stays here ...
32
+ return { status: 'ok' };
33
+ }
34
+ ```
35
+
36
+ ### Best practice: ContextOS Standard (100% Drop-in Compilable)
37
+
38
+ ```typescript
39
+ // GOOD: Fully implemented logic with complete error handling
40
+ export function processTransaction(tx: Transaction): TransactionResult {
41
+ if (!tx.amount || tx.amount <= 0) {
42
+ throw new ValidationError('Transaction amount must be positive');
43
+ }
44
+ if (tx.senderBalance < tx.amount) {
45
+ throw new InsufficientFundsError(tx.senderId, tx.amount);
46
+ }
47
+ return {
48
+ status: 'ok',
49
+ transactionId: tx.id,
50
+ newBalance: tx.senderBalance - tx.amount,
51
+ };
52
+ }
53
+ ```
54
+
55
+ ---
56
+
57
+ ## Example 3: Mandatory Proof-of-Work Invariant
58
+
59
+ ### Anti-pattern: Claiming Task Complete Without Evidence
60
+
61
+ ```text
62
+ BAD: "I have updated the authentication handler. The code looks correct and is ready to merge."
63
+ ```
64
+
65
+ ### Best practice: ContextOS Standard (Verified with Automated Gates)
66
+
67
+ ```bash
68
+ # GOOD: Run test suite, staged scanner, and consistency checks
69
+ npm test
70
+ contextos scan --staged --enforce
71
+ node .agents/ctx.js validate
72
+ ```
@@ -51,6 +51,7 @@ Activate whenever:
51
51
  1. Run the project validator or compiler (`node .agents/ctx.js validate`, `tsc --noEmit`, etc.).
52
52
  2. Run unit and integration tests (`npm test`, `pytest`, etc.).
53
53
  3. Run linter and formatting checks (`npm run lint:md`, `eslint`, etc.).
54
+ 4. Run staged security and quality scanner (`contextos scan --staged --enforce`).
54
55
  - If a test or validation fails, do not guess: read the exact error trace, fix the root cause, and re-run until green.
55
56
 
56
57
  ### 4. Surgical Blast Radius Containment
@@ -86,7 +87,7 @@ Activate whenever:
86
87
  **Eliminate the "black box" by narrating technical decisions.**
87
88
 
88
89
  - Avoid executing long, silent chains of tool calls without user visibility.
89
- - Provide a concise 1–2 sentence transparent status update before key operations:
90
+ - Provide a concise 1-2 sentence transparent status update before key operations:
90
91
  - State what was inspected or verified from the code.
91
92
  - State the architectural decision made and the immediate next action.
92
93
  - Keep narration crisp and actionable without excessive verbosity.
@@ -0,0 +1,25 @@
1
+ # gemini-precision Troubleshooting & Common Failure Modes
2
+
3
+ ## 1. Test Failure Investigation (No Guesswork)
4
+
5
+ - **Symptom**: Test fails during `npm test` after code modifications.
6
+ - **Root Cause**: Trying to patch the code without reading the exact assertion diff.
7
+ - **Fix**: Never guess the fix. View the test file line where assertion failed, inspect expected vs actual output, and resolve the root discrepancy.
8
+
9
+ ## 2. Accidental Staged Secrets or Placeholders
10
+
11
+ - **Symptom**: `contextos scan --staged --enforce` fails with exit code 1.
12
+ - **Root Cause**: Committed temporary `.env` file or left an unfinished `// TODO: implement later` stub in added lines.
13
+ - **Fix**: Remove or redact the secret before committing. Fully implement the logic or replace the placeholder with an explicit tracked issue rather than committed code stubs.
14
+
15
+ ## 3. Scope Creep and Excessive Blast Radius
16
+
17
+ - **Symptom**: Unrelated files reformatted or imports reordered across the repository.
18
+ - **Root Cause**: Full-file rewrite instead of targeted surgical replacement.
19
+ - **Fix**: Use targeted chunks that touch only the lines specified in the task plan. Avoid modifying unrelated styling or formatting.
20
+
21
+ ## 4. Forbidden Long Dashes
22
+
23
+ - **Symptom**: Linter or compliance check flags unicode dashes in text.
24
+ - **Root Cause**: Using typography dashes (`\u2014` or `\u2013`) instead of standard ASCII hyphens.
25
+ - **Fix**: Replace all em-dashes and en-dashes with standard ASCII hyphens (` - `) or appropriate punctuation (parentheses, commas, colons).
@@ -4,5 +4,7 @@ type: instruction-only
4
4
  description: High-precision engineering and execution guardrails optimized for Google Gemini models. Enforces zero-assumption file inspection, complete non-lazy implementations, surgical blast-radius containment, and mandatory proof-of-work execution.
5
5
  version: 1.0.0
6
6
  resources:
7
+ - EXAMPLES.md
7
8
  - SKILL.md
9
+ - TROUBLESHOOTING.md
8
10
  - VALIDATION.json
@@ -17,7 +17,7 @@ Activate on every task to declare explicit specialist role and mindset before be
17
17
 
18
18
  ## Rules & Patterns
19
19
 
20
- Inspired by [Garry Tan's gstack](https://github.com/garrytan/gstack) — shipping 810× more logical code than a solo dev in 2013.
20
+ Inspired by [Garry Tan's gstack](https://github.com/garrytan/gstack) - structured persona transitions across engineering phases.
21
21
 
22
22
  ## Core Principle
23
23
 
@@ -25,13 +25,14 @@ Inspired by [Garry Tan's gstack](https://github.com/garrytan/gstack) — shippin
25
25
 
26
26
  ## Role Identification Protocol
27
27
 
28
- At the start of each task or major phase switch, declare your role:
28
+ At the start of each task or major phase switch, declare your role using the ContextOS standard format:
29
29
 
30
- ```
31
- [ROLE: <Role Name>] — <One-line description of your mandate for this task>
30
+ ```text
31
+ [DOMAIN: <Domain>] [PHASE: <Phase>] [ROLE: <Role Name>]
32
+ Skills loaded: <skill-1>, <skill-2>
32
33
  ```
33
34
 
34
- > **Anti-Spam Invariant**: Declare this role **strictly once per phase**. Never prefix intermediate tool calls, file operations, or step updates with role tags.
35
+ > **Anti-Spam Invariant**: Declare this role header **strictly once per phase**. Never prefix intermediate tool calls, file operations, or step updates with role tags.
35
36
 
36
37
  Then execute ONLY within the constraints of that role.
37
38
 
@@ -110,7 +111,7 @@ THINK PLAN BUILD REVIEW TEST SHIP
110
111
  2. **One role at a time.** Don't mix QA and implementation in the same response.
111
112
  3. **Declare before acting.** Always state `[ROLE: X]` before switching modes.
112
113
  4. **Escalate correctly.** If a QA finds an architectural problem → escalate to Architect role.
113
- 5. **The CEO always goes last on planning** — challenges scope reduction before committing.
114
+ 5. **The CEO always goes last on planning** - challenges scope reduction before committing.
114
115
 
115
116
  ## Example Usage
116
117