contextos-agents 2.1.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 (191) hide show
  1. package/.agents/adapters/aider/export.js +2 -2
  2. package/.agents/adapters/claude/export.js +53 -2
  3. package/.agents/adapters/drift-detector.js +6 -3
  4. package/.agents/adapters/pure-compiler.js +18 -6
  5. package/.agents/ctx.js +4 -4
  6. package/.agents/plugins.js +100 -4
  7. package/.agents/profiles.js +32 -11
  8. package/README.md +2 -2
  9. package/bin/commands/hook.js +50 -12
  10. package/bin/commands/scan.js +10 -3
  11. package/bin/index.js +8 -2
  12. package/bin/lib/git-snapshot.js +70 -43
  13. package/bin/lib/scan.js +108 -27
  14. package/catalog/skills/adapters/EXAMPLES.md +19 -0
  15. package/catalog/skills/adapters/SKILL.md +101 -0
  16. package/catalog/skills/adapters/TROUBLESHOOTING.md +7 -0
  17. package/catalog/skills/adapters/VALIDATION.json +12 -0
  18. package/catalog/skills/adapters/skill.yaml +13 -0
  19. package/catalog/skills/api-design/EXAMPLES.md +91 -0
  20. package/catalog/skills/api-design/SKILL.md +63 -0
  21. package/catalog/skills/api-design/TROUBLESHOOTING.md +54 -0
  22. package/catalog/skills/api-design/VALIDATION.json +11 -0
  23. package/catalog/skills/api-design/skill.yaml +14 -0
  24. package/catalog/skills/architecture-diagrams/SKILL.md +108 -0
  25. package/catalog/skills/architecture-diagrams/VALIDATION.json +12 -0
  26. package/catalog/skills/architecture-diagrams/skill.yaml +9 -0
  27. package/catalog/skills/brutalist-design/EXAMPLES.md +59 -0
  28. package/catalog/skills/brutalist-design/SKILL.md +150 -0
  29. package/catalog/skills/brutalist-design/VALIDATION.json +12 -0
  30. package/catalog/skills/brutalist-design/skill.yaml +10 -0
  31. package/catalog/skills/ci-cd/EXAMPLES.md +79 -0
  32. package/catalog/skills/ci-cd/SKILL.md +69 -0
  33. package/catalog/skills/ci-cd/TROUBLESHOOTING.md +52 -0
  34. package/catalog/skills/ci-cd/VALIDATION.json +11 -0
  35. package/catalog/skills/ci-cd/skill.yaml +13 -0
  36. package/catalog/skills/database/EXAMPLES.md +74 -0
  37. package/catalog/skills/database/SKILL.md +101 -0
  38. package/catalog/skills/database/TROUBLESHOOTING.md +18 -0
  39. package/catalog/skills/database/VALIDATION.json +11 -0
  40. package/catalog/skills/database/skill.yaml +14 -0
  41. package/catalog/skills/ddd/EXAMPLES.md +42 -0
  42. package/catalog/skills/ddd/SKILL.md +247 -0
  43. package/catalog/skills/ddd/TROUBLESHOOTING.md +19 -0
  44. package/catalog/skills/ddd/VALIDATION.json +12 -0
  45. package/catalog/skills/ddd/skill.yaml +14 -0
  46. package/catalog/skills/decisions/EXAMPLES.md +35 -0
  47. package/catalog/skills/decisions/SKILL.md +90 -0
  48. package/catalog/skills/decisions/TROUBLESHOOTING.md +13 -0
  49. package/catalog/skills/decisions/VALIDATION.json +12 -0
  50. package/catalog/skills/decisions/skill.yaml +13 -0
  51. package/catalog/skills/docker/EXAMPLES.md +56 -0
  52. package/catalog/skills/docker/SKILL.md +169 -0
  53. package/catalog/skills/docker/TROUBLESHOOTING.md +18 -0
  54. package/catalog/skills/docker/VALIDATION.json +11 -0
  55. package/catalog/skills/docker/skill.yaml +13 -0
  56. package/catalog/skills/fastapi/EXAMPLES.md +36 -0
  57. package/catalog/skills/fastapi/SKILL.md +171 -0
  58. package/catalog/skills/fastapi/TROUBLESHOOTING.md +19 -0
  59. package/catalog/skills/fastapi/VALIDATION.json +12 -0
  60. package/catalog/skills/fastapi/skill.yaml +14 -0
  61. package/catalog/skills/generators/EXAMPLES.md +19 -0
  62. package/catalog/skills/generators/SKILL.md +110 -0
  63. package/catalog/skills/generators/TROUBLESHOOTING.md +7 -0
  64. package/catalog/skills/generators/VALIDATION.json +12 -0
  65. package/catalog/skills/generators/skill.yaml +22 -0
  66. package/catalog/skills/generators/templates/API.md +77 -0
  67. package/catalog/skills/generators/templates/ARCHITECTURE.md +70 -0
  68. package/catalog/skills/generators/templates/DATABASE.md +42 -0
  69. package/catalog/skills/generators/templates/DECISION.md +46 -0
  70. package/catalog/skills/generators/templates/PRD.md +67 -0
  71. package/catalog/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  72. package/catalog/skills/generators/templates/ROADMAP.md +51 -0
  73. package/catalog/skills/generators/templates/TASKS.md +43 -0
  74. package/catalog/skills/generators/templates/UI.md +73 -0
  75. package/catalog/skills/graphify/EXAMPLES.md +73 -0
  76. package/catalog/skills/graphify/SKILL.md +130 -0
  77. package/catalog/skills/graphify/VALIDATION.json +12 -0
  78. package/catalog/skills/graphify/skill.yaml +13 -0
  79. package/catalog/skills/impeccable-design/EXAMPLES.md +26 -0
  80. package/catalog/skills/impeccable-design/SKILL.md +201 -0
  81. package/catalog/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  82. package/catalog/skills/impeccable-design/VALIDATION.json +12 -0
  83. package/catalog/skills/impeccable-design/skill.yaml +15 -0
  84. package/catalog/skills/interview-me/SKILL.md +97 -0
  85. package/catalog/skills/interview-me/VALIDATION.json +12 -0
  86. package/catalog/skills/interview-me/skill.yaml +9 -0
  87. package/catalog/skills/microservices/EXAMPLES.md +38 -0
  88. package/catalog/skills/microservices/SKILL.md +164 -0
  89. package/catalog/skills/microservices/TROUBLESHOOTING.md +19 -0
  90. package/catalog/skills/microservices/VALIDATION.json +12 -0
  91. package/catalog/skills/microservices/skill.yaml +14 -0
  92. package/catalog/skills/minimalist-design/EXAMPLES.md +58 -0
  93. package/catalog/skills/minimalist-design/SKILL.md +113 -0
  94. package/catalog/skills/minimalist-design/VALIDATION.json +12 -0
  95. package/catalog/skills/minimalist-design/skill.yaml +10 -0
  96. package/catalog/skills/nestjs/EXAMPLES.md +40 -0
  97. package/catalog/skills/nestjs/SKILL.md +139 -0
  98. package/catalog/skills/nestjs/TROUBLESHOOTING.md +19 -0
  99. package/catalog/skills/nestjs/VALIDATION.json +12 -0
  100. package/catalog/skills/nestjs/skill.yaml +14 -0
  101. package/catalog/skills/nextjs/EXAMPLES.md +40 -0
  102. package/catalog/skills/nextjs/SKILL.md +163 -0
  103. package/catalog/skills/nextjs/TROUBLESHOOTING.md +19 -0
  104. package/catalog/skills/nextjs/VALIDATION.json +12 -0
  105. package/catalog/skills/nextjs/skill.yaml +14 -0
  106. package/catalog/skills/node/EXAMPLES.md +80 -0
  107. package/catalog/skills/node/SKILL.md +128 -0
  108. package/catalog/skills/node/TROUBLESHOOTING.md +19 -0
  109. package/catalog/skills/node/VALIDATION.json +12 -0
  110. package/catalog/skills/node/skill.yaml +14 -0
  111. package/catalog/skills/performance/EXAMPLES.md +30 -0
  112. package/catalog/skills/performance/SKILL.md +75 -0
  113. package/catalog/skills/performance/TROUBLESHOOTING.md +19 -0
  114. package/catalog/skills/performance/VALIDATION.json +12 -0
  115. package/catalog/skills/performance/skill.yaml +14 -0
  116. package/catalog/skills/react/EXAMPLES.md +79 -0
  117. package/catalog/skills/react/SKILL.md +132 -0
  118. package/catalog/skills/react/TROUBLESHOOTING.md +19 -0
  119. package/catalog/skills/react/VALIDATION.json +12 -0
  120. package/catalog/skills/react/skill.yaml +14 -0
  121. package/catalog/skills/react-best-practices/SKILL.md +158 -0
  122. package/catalog/skills/react-best-practices/VALIDATION.json +12 -0
  123. package/catalog/skills/react-best-practices/skill.yaml +13 -0
  124. package/catalog/skills/redesign-audit/SKILL.md +117 -0
  125. package/catalog/skills/redesign-audit/VALIDATION.json +12 -0
  126. package/catalog/skills/redesign-audit/skill.yaml +9 -0
  127. package/catalog/skills/security-audit/EXAMPLES.md +79 -0
  128. package/catalog/skills/security-audit/SKILL.md +91 -0
  129. package/catalog/skills/security-audit/TROUBLESHOOTING.md +46 -0
  130. package/catalog/skills/security-audit/VALIDATION.json +11 -0
  131. package/catalog/skills/security-audit/skill.yaml +14 -0
  132. package/catalog/skills/soft-design/EXAMPLES.md +51 -0
  133. package/catalog/skills/soft-design/SKILL.md +108 -0
  134. package/catalog/skills/soft-design/VALIDATION.json +12 -0
  135. package/catalog/skills/soft-design/skill.yaml +10 -0
  136. package/catalog/skills/state-management/EXAMPLES.md +56 -0
  137. package/catalog/skills/state-management/SKILL.md +168 -0
  138. package/catalog/skills/state-management/TROUBLESHOOTING.md +18 -0
  139. package/catalog/skills/state-management/VALIDATION.json +11 -0
  140. package/catalog/skills/state-management/skill.yaml +14 -0
  141. package/catalog/skills/subagent-orchestrator/SKILL.md +117 -0
  142. package/catalog/skills/subagent-orchestrator/VALIDATION.json +12 -0
  143. package/catalog/skills/subagent-orchestrator/skill.yaml +9 -0
  144. package/catalog/skills/system-design/EXAMPLES.md +75 -0
  145. package/catalog/skills/system-design/SKILL.md +419 -0
  146. package/catalog/skills/system-design/TROUBLESHOOTING.md +19 -0
  147. package/catalog/skills/system-design/VALIDATION.json +12 -0
  148. package/catalog/skills/system-design/skill.yaml +14 -0
  149. package/catalog/skills/terraform/EXAMPLES.md +74 -0
  150. package/catalog/skills/terraform/SKILL.md +55 -0
  151. package/catalog/skills/terraform/TROUBLESHOOTING.md +53 -0
  152. package/catalog/skills/terraform/VALIDATION.json +11 -0
  153. package/catalog/skills/terraform/skill.yaml +14 -0
  154. package/catalog/skills/testing/EXAMPLES.md +122 -0
  155. package/catalog/skills/testing/SKILL.md +70 -0
  156. package/catalog/skills/testing/TROUBLESHOOTING.md +18 -0
  157. package/catalog/skills/testing/VALIDATION.json +11 -0
  158. package/catalog/skills/testing/skill.yaml +14 -0
  159. package/catalog/skills/typescript/EXAMPLES.md +64 -0
  160. package/catalog/skills/typescript/SKILL.md +112 -0
  161. package/catalog/skills/typescript/TROUBLESHOOTING.md +19 -0
  162. package/catalog/skills/typescript/VALIDATION.json +12 -0
  163. package/catalog/skills/typescript/skill.yaml +14 -0
  164. package/catalog/skills/ui-design/EXAMPLES.md +21 -0
  165. package/catalog/skills/ui-design/SKILL.md +124 -0
  166. package/catalog/skills/ui-design/TROUBLESHOOTING.md +19 -0
  167. package/catalog/skills/ui-design/VALIDATION.json +12 -0
  168. package/catalog/skills/ui-design/skill.yaml +16 -0
  169. package/catalog/skills/ui-ux-pro/EXAMPLES.md +62 -0
  170. package/catalog/skills/ui-ux-pro/SKILL.md +418 -0
  171. package/catalog/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  172. package/catalog/skills/ui-ux-pro/VALIDATION.json +12 -0
  173. package/catalog/skills/ui-ux-pro/skill.yaml +14 -0
  174. package/catalog/skills/ux-design/EXAMPLES.md +36 -0
  175. package/catalog/skills/ux-design/SKILL.md +116 -0
  176. package/catalog/skills/ux-design/TROUBLESHOOTING.md +19 -0
  177. package/catalog/skills/ux-design/VALIDATION.json +12 -0
  178. package/catalog/skills/ux-design/skill.yaml +16 -0
  179. package/catalog/skills/vercel-optimize/SKILL.md +83 -0
  180. package/catalog/skills/vercel-optimize/VALIDATION.json +12 -0
  181. package/catalog/skills/vercel-optimize/scripts/collect-signals.mjs +131 -0
  182. package/catalog/skills/vercel-optimize/scripts/gate-investigations.mjs +142 -0
  183. package/catalog/skills/vercel-optimize/scripts/merge-signals.mjs +143 -0
  184. package/catalog/skills/vercel-optimize/scripts/scan-codebase.mjs +174 -0
  185. package/catalog/skills/vercel-optimize/skill.yaml +15 -0
  186. package/catalog/skills/web-accessibility/EXAMPLES.md +39 -0
  187. package/catalog/skills/web-accessibility/SKILL.md +151 -0
  188. package/catalog/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  189. package/catalog/skills/web-accessibility/VALIDATION.json +12 -0
  190. package/catalog/skills/web-accessibility/skill.yaml +14 -0
  191. package/package.json +3 -2
@@ -0,0 +1,73 @@
1
+ # Graphify Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Codebase Exploration & Architecture Mapping
4
+
5
+ ### Anti-pattern: Context Window Flooding (Dumping source directories into prompt)
6
+
7
+ ```bash
8
+ # BAD: Reading 150 TypeScript files into context to understand system architecture.
9
+ # Burns 200k+ tokens, causes model hallucinations, and loses attention span.
10
+ cat src/**/*.ts | llm "explain the architecture and component connections"
11
+ ```
12
+
13
+ ### Best practice: ContextOS Standard (Deterministic Tree-sitter AST Graph)
14
+
15
+ ```bash
16
+ # GOOD: Generate queryable AST knowledge graph and compact architecture summary
17
+ graphify run ./src --output .graphify/
18
+
19
+ # Inspect high-level architecture and god nodes with minimal tokens (<2k tokens)
20
+ cat .graphify/GRAPH_REPORT.md
21
+ ```
22
+
23
+ ---
24
+
25
+ ## Example 2: Refactoring Blast-Radius Analysis
26
+
27
+ ### Anti-pattern: String Grep Guesswork
28
+
29
+ ```bash
30
+ # BAD: Grepping for common symbol names returns hundreds of false positives (comments, logs, unrelated types)
31
+ grep -rn "PaymentService" src/
32
+ ```
33
+
34
+ ### Best practice: ContextOS Standard (Inbound Dependency Traversal via graph.json)
35
+
36
+ ```javascript
37
+ // GOOD: Precise AST-level callers extracted directly from knowledge graph edges
38
+ const fs = require('fs');
39
+ const graph = JSON.parse(fs.readFileSync('.graphify/graph.json', 'utf8'));
40
+
41
+ const targetNode = 'PaymentService';
42
+ const dependents = graph.edges
43
+ .filter(edge => edge.target === targetNode && edge.type === 'imports')
44
+ .map(edge => edge.source);
45
+
46
+ console.log(`Modules directly broken by modifying ${targetNode}:`, dependents);
47
+ ```
48
+
49
+ ---
50
+
51
+ ## Example 3: Keeping Graph Fresh in CI / Pre-commit
52
+
53
+ ### Anti-pattern: Relying on Outdated Graphs
54
+
55
+ ```bash
56
+ # BAD: Developing against a graph generated two months ago.
57
+ # Dependencies drift, leading to false safety assumptions.
58
+ ```
59
+
60
+ ### Best practice: ContextOS Standard (Git Hook & Automated Watch)
61
+
62
+ ```bash
63
+ # Option A: Active development in watch mode
64
+ graphify watch ./src --output .graphify/
65
+
66
+ # Option B: Pre-commit hook to verify fresh GRAPH_REPORT.md
67
+ #!/bin/sh
68
+ # .git/hooks/pre-commit
69
+ if command -v graphify >/dev/null 2>&1; then
70
+ graphify run ./src --report-only
71
+ git add GRAPH_REPORT.md
72
+ fi
73
+ ```
@@ -0,0 +1,130 @@
1
+ ---
2
+ name: graphify
3
+ description: >
4
+ Codebase knowledge graph generator and architecture mapping guide.
5
+ Eliminates context window burn, enables precise dependency mapping, and identifies architectural god nodes.
6
+ ---
7
+
8
+ # graphify
9
+
10
+ ## Overview
11
+
12
+ **Graphify** is an instruction-only codebase mapping and context optimization guide. Instead of feeding raw directory trees or entire source files into an agent's context window, Graphify instructs agents on how to construct a deterministic, queryable knowledge graph (`graph.json`, `GRAPH_REPORT.md`, `graph.html`) using external companion analyzers (such as the TypeScript AST analyzer in `contextos-mcp` or the external `graphifyy` CLI), keeping the core package 100% zero-dependency without bundled native Tree-sitter binaries.
13
+
14
+ This skill instructs agents how to build, query, and maintain codebase graphs to navigate complex architectures with near-zero token overhead.
15
+
16
+ ## When to Use
17
+
18
+ Activate whenever:
19
+
20
+ - Working in large repositories (10k+ LOC) where full-file reads cause context overflow.
21
+ - Performing cross-module refactorings and needing to determine exact dependency **blast radius**.
22
+ - Onboarding onto an unfamiliar codebase or mapping legacy service boundaries.
23
+ - The user asks to "map the codebase", "show dependency graph", "find central components", or "run graphify".
24
+ - Working alongside `context-manager` to supply an automated `PROJECT_GRAPH.md` / `graph.json`.
25
+
26
+ ## Rules & Patterns
27
+
28
+ ### 1. The Graph-First Navigation Protocol
29
+
30
+ Before opening and reading arbitrary source files in a large project:
31
+
32
+ 1. **Check for Existing Artifacts**:
33
+ - Inspect if `graph.json` or `GRAPH_REPORT.md` exists in the project root or `.graphify/`.
34
+ - If present, query `graph.json` or read `GRAPH_REPORT.md` first to locate target modules.
35
+ 2. **Deterministic CLI Execution**:
36
+ - If missing or stale, generate the graph using the Python package (`pip install graphifyy`):
37
+
38
+ ```bash
39
+ graphify run .
40
+ ```
41
+
42
+ - For live development sessions, run in watch mode:
43
+
44
+ ```bash
45
+ graphify watch .
46
+ ```
47
+
48
+ 3. **Inspect God Nodes**:
49
+ - Always check the "God Nodes" section of `GRAPH_REPORT.md`. These represent high-centrality modules (e.g., core configs, base models, central dispatchers). Changes to god nodes have the highest blast radius.
50
+
51
+ ### 2. Context Safety Rules
52
+
53
+ - **Never load `graph.html` into agent context**: `graph.html` is an interactive visualization for humans in the browser; reading it burns tokens needlessly.
54
+ - **Selective JSON Querying**: Do not dump the entire `graph.json` into prompt context if it exceeds 50KB. Use targeted grep/jq queries to extract specific node neighbors.
55
+ - **Git Hygiene**: Add `graph.html` and `.graphify/cache` to `.gitignore`. Keep `GRAPH_REPORT.md` committed only if the team uses it as shared documentation.
56
+
57
+ ### 3. Blast Radius Verification
58
+
59
+ When modifying a function, class, or interface:
60
+
61
+ 1. Locate the symbol's node in `graph.json`.
62
+ 2. Extract all inbound edges (`dependents` / `callers`).
63
+ 3. Formulate the verification plan specifically around those dependent call sites.
64
+
65
+ ---
66
+
67
+ ## Code Examples
68
+
69
+ ### Installing and Running Graphify
70
+
71
+ ```bash
72
+ # Install graphify CLI (package name is graphifyy on PyPI)
73
+ pip install graphifyy
74
+
75
+ # Generate knowledge graph and markdown architectural report
76
+ graphify run ./src --output .graphify/
77
+
78
+ # View interactive visualization locally
79
+ open .graphify/graph.html
80
+ ```
81
+
82
+ ### Querying Node Dependencies via Shell
83
+
84
+ ```bash
85
+ # Find dependents of a critical module in graph.json without loading entire file
86
+ node -e "
87
+ const g = require('./.graphify/graph.json');
88
+ const target = 'UserService';
89
+ const inbound = g.edges.filter(e => e.target === target).map(e => e.source);
90
+ console.log('Modules dependent on ' + target + ':', inbound);
91
+ "
92
+ ```
93
+
94
+ ### Git Pre-Commit Hook Integration
95
+
96
+ ```bash
97
+ #!/bin/sh
98
+ # .git/hooks/pre-commit: ensure GRAPH_REPORT.md remains fresh
99
+ if command -v graphify >/dev/null 2>&1; then
100
+ graphify run . --report-only
101
+ git add GRAPH_REPORT.md
102
+ fi
103
+ ```
104
+
105
+ ---
106
+
107
+ ## Validation Checklist
108
+
109
+ - [ ] `graph.json` and `GRAPH_REPORT.md` are generated without syntax errors.
110
+ - [ ] Central "God Nodes" are identified and accounted for in the implementation plan.
111
+ - [ ] No heavy visualization artifacts (`graph.html`, raw SVG dumps) are ingested into agent prompt context.
112
+ - [ ] Inbound dependencies (callers) are checked before modifying exported signatures.
113
+ - [ ] `.gitignore` properly excludes local graph caches and visualization outputs.
114
+
115
+ ---
116
+
117
+ ## Common Mistakes
118
+
119
+ - **Context Window Flooding**: Ingesting the complete `graph.json` of a 500k LOC repository into agent context instead of slicing target subgraphs.
120
+ - **Stale Graph Fallacy**: Assuming `graph.json` is up to date after heavy code refactorings without re-running `graphify run` or using `--watch`.
121
+ - **Ignoring Semantic Non-Code Files**: Neglecting SQL migrations, OpenAPI specs, and docker configs during graph extraction.
122
+ - **Mistaking Package Name**: Trying to install `pip install graphify` instead of the official PyPI package `graphifyy`.
123
+
124
+ ---
125
+
126
+ ## Integration Notes
127
+
128
+ - **Synergy with `context-manager`**: Graphify serves as the automated backend engine for `context-manager`. Instead of manually maintaining `docs/PROJECT_GRAPH.md`, run Graphify to keep `graph.json` current.
129
+ - **Synergy with `system-design`**: Use `GRAPH_REPORT.md` to ground architectural proposals in actual codebase topology.
130
+ - **Synergy with `architecture-diagrams`**: The nodes and edges extracted in `graph.json` can be directly mapped into animated SVG C4 architecture diagrams.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,13 @@
1
+ schemaVersion: 2
2
+ name: graphify
3
+ category: architecture
4
+ type: instruction-only
5
+ description: Codebase knowledge graph generator and architecture mapping guide. Instructs agents on AST dependency extraction and blast radius analysis.
6
+ version: 1.0.0
7
+ optional:
8
+ - context-manager
9
+ - system-design
10
+ resources:
11
+ - EXAMPLES.md
12
+ - SKILL.md
13
+ - VALIDATION.json
@@ -0,0 +1,26 @@
1
+ # impeccable-design Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Dark Mode Surfaces & Elevation
4
+
5
+ ### Anti-pattern: Pure Black with Flat Cards
6
+
7
+ ```css
8
+ /* BAD: Pure #000000 background with harsh pure white borders and flat cards */
9
+ body { background-color: #000000; color: #ffffff; }
10
+ .card { background-color: #111111; border: 1px solid #ffffff; }
11
+ ```
12
+
13
+ ### Best practice: ContextOS Standard (Atmospheric Depth & Tinted Surfaces)
14
+
15
+ ```css
16
+ /* GOOD: Tinted dark background with layered elevation surfaces and subtle border */
17
+ body {
18
+ background-color: #0B0D13; /* Tinted with subtle deep blue */
19
+ color: #E2E8F0;
20
+ }
21
+ .surface-1 {
22
+ background-color: #111522;
23
+ border: 1px solid rgba(255, 255, 255, 0.08);
24
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
25
+ }
26
+ ```
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: impeccable-design
3
+ description: >
4
+ Visual design quality enforcement. 50 deterministic anti-pattern rules preventing
5
+ AI design slop. Bans generic fonts, pure colors, nested cards, dated animations.
6
+ Adapted for Tailwind CSS v4, shadcn/ui, and Framer Motion stacks.
7
+ ---
8
+
9
+ # impeccable-design
10
+
11
+ ## Overview
12
+
13
+ Hard QA design review checklist consisting of 50 deterministic rules covering typography (T1-T10), color systems (C1-C12), layout constraints (L1-L11), component contracts (K1-K11), and micro-animations (A1-A8).
14
+
15
+ ## When to Use
16
+
17
+ Activate during the REVIEW phase of all frontend tasks as a strict visual and functional QA gate before marking UI work complete.
18
+
19
+ ## Rules & Patterns
20
+
21
+ Based on [pbakaus/impeccable](https://github.com/pbakaus/impeccable) - deterministic detector rules for AI-generated frontend design.
22
+
23
+ ## Core Principle
24
+
25
+ > Every model is trained on the same SaaS templates. Skip this guidance and you get the same handful of tells on every project. Impeccable eliminates them.
26
+
27
+ ## Role in the Pipeline
28
+
29
+ > **This skill acts as a QA-designer at the `/review` phase.** `ui-ux-pro` is the planning guideline; `impeccable-design` is the hard checklist that runs before merge.
30
+
31
+ ---
32
+
33
+ ## Anti-Pattern Rules
34
+
35
+ ### Typography (Rules T1 - T10)
36
+
37
+ | Rule | Anti-Pattern | Correct Approach |
38
+ | ------ | ------------- | ----------------- |
39
+ | T1 | Using Inter for all text | Use Inter for UI body, pair with a distinct display font for headings OR with `JetBrains Mono` for technical/number accents (premium SaaS pattern) |
40
+ | T2 | Using Arial or Helvetica | Use a curated Google Font pairing |
41
+ | T3 | All text same weight | Use weight contrast: 700 headings, 400 body, 500 labels |
42
+ | T4 | Line height = 1 (tight) | Body: 1.6-1.8, Headings: 1.1-1.3 |
43
+ | T5 | No letter-spacing on caps | Uppercase labels: `letter-spacing: 0.08em` (Tailwind: `tracking-widest`) |
44
+ | T6 | Text too wide | Max line length: 60-75 characters - use `max-w-prose` or `max-w-[65ch]` |
45
+ | T7 | Monospace only for code | Use `tabular-nums` Tailwind class for number tables and data grids |
46
+ | T8 | Random font sizing | Use a consistent modular scale (1.25× or 1.333×) - use Tailwind's `text-*` scale |
47
+ | T9 | Body text too small | Minimum `text-sm` (14px) for body, never smaller than 12px |
48
+ | T10 | Bold everywhere | Bold is for emphasis. Diluted if overused. |
49
+
50
+ **Tailwind typography utilities:**
51
+
52
+ - `text-balance` - for headlines (prevents orphan words)
53
+ - `text-pretty` - for body paragraphs (smart line-breaks)
54
+ - `tabular-nums` - for numerical data tables
55
+
56
+ ### Color (Rules C1 - C12)
57
+
58
+ | Rule | Anti-Pattern | Correct Approach |
59
+ | ------ | ------------- | ----------------- |
60
+ | C1 | Pure black `#000` | Tint toward brand: `hsl(240, 10%, 4%)` |
61
+ | C2 | Pure white `#fff` for surfaces | Near-white with warmth: `hsl(40, 30%, 97%)` |
62
+ | C3 | Gray on colored background | Check contrast - likely fails WCAG. Use white/dark |
63
+ | C4 | Purple → Blue gradient | Clichéd AI palette. Use brand-derived gradients |
64
+ | C5 | Neon primary colors | Neon = accent only, never primary surface or text |
65
+ | C6 | Too many colors | 3 colors max: primary, neutral, semantic (success/error) |
66
+ | C7 | All links same blue `#0000EE` | Style links with brand color, preserve underline |
67
+ | C8 | Disabled state = gray only | Disabled: `opacity-40` + `cursor-not-allowed` |
68
+ | C9 | Success always green, Error always red | Check brand conflicts. Use accessible variants |
69
+ | C10 | Dark mode = inverted light mode | Dark mode needs separate palette - use `@layer base { .dark { ... } }` |
70
+ | C11 | No hover state change | Hover: shift lightness 8-12%, add `transition-colors duration-150` |
71
+ | C12 | Brand color on dark surface loses identity | Adjust saturation/lightness for dark bg context |
72
+
73
+ ### Layout & Spacing (Rules L1 - L11)
74
+
75
+ | Rule | Anti-Pattern | Correct Approach |
76
+ | ------ | ------------- | ----------------- |
77
+ | L1 | Cards inside cards | One level of card depth maximum |
78
+ | L2 | Icon tile above every heading | Use icons inline, in context, not decoratively above text |
79
+ | L3 | Centered long paragraphs | `text-center` max 2 lines only. Use `text-pretty` + left-align for body |
80
+ | L4 | Inconsistent spacing | Use Tailwind spacing utilities only. **Never arbitrary values** like `gap-[17px]` |
81
+ | L5 | Zero whitespace between sections | Sections need `py-16` to `py-24` breathing room |
82
+ | L6 | Content touching edges | Always `px-4` minimum on mobile |
83
+ | L7 | Same visual weight everywhere | Use hierarchy: primary > secondary > tertiary zones |
84
+ | L8 | Grid breaks on tablet | Test at 768px. Use 4-col on tablet, 12-col on desktop |
85
+ | L9 | Full-width everything | Max content width: `max-w-7xl` centered |
86
+ | L10 | Missing grid alignment | Use CSS Grid or Tailwind `grid` - not absolute positioning |
87
+ | L11 | Arbitrary high z-indexes | **NEVER** use `z-[999]` or `z-50` manually. Rely on DOM order + Radix/shadcn Portals which already handle modal elevation correctly |
88
+ | L12 | Default Rhythm | Break the 'Hero → 3 Features → CTA' structure. Build structurally diverse pages tailored to the content. |
89
+ | L13 | Symmetric card grids everywhere | Use asymmetric layouts (e.g., bento boxes, masonry, alternating left/right) to reduce the AI-generated feel. |
90
+
91
+ ### Components (Rules K1 - K11)
92
+
93
+ | Rule | Anti-Pattern | Correct Approach |
94
+ | ------ | ------------- | ----------------- |
95
+ | K1 | Two filled buttons side-by-side | `<Button variant="default">` + `<Button variant="outline">` or `variant="ghost"` |
96
+ | K2 | Button without loading state | Always add spinner + `disabled` during async actions |
97
+ | K3 | Modal without backdrop blur | shadcn `<Dialog>` handles this. Don't override with plain divs |
98
+ | K4 | Empty states left blank | **Always** design empty states: illustration + helpful message + primary CTA |
99
+ | K5 | No skeleton screens | Use `<Skeleton>` from shadcn for content areas, not just spinners |
100
+ | K6 | Tooltip on click (not hover) | Tooltips on hover, modals on click - use shadcn `<Tooltip>` + `<Dialog>` |
101
+ | K7 | Dropdown without keyboard nav | Use shadcn `<DropdownMenu>` - keyboard nav is built-in |
102
+ | K8 | Table without row hover | shadcn `<TableRow>` handles hover state automatically. Do **not** override it |
103
+ | K9 | Building complex UI from scratch | **Check shadcn/ui first**. If the component exists, generate the CLI command: `npx shadcn@latest add dialog`. Never manually rewrite what shadcn already provides |
104
+ | K10 | Native `<select>` or `<input type="date">` in premium UI | Native form controls cannot be styled consistently across Chrome/Safari/Firefox. Use `shadcn <Select>` and `shadcn <DatePicker>` for cross-browser consistency |
105
+ | K11 | Form without error state styling | Every input must have error state: red border + error message below |
106
+
107
+ ### Animation (Rules A1 - A8)
108
+
109
+ | Rule | Anti-Pattern | Correct Approach |
110
+ | ------ | ------------- | ----------------- |
111
+ | A1 | CSS bounce/elastic/spring easing | CSS spring animations are forbidden. **Exception**: If using Framer Motion, highly damped springs are encouraged: `{ type: "spring", stiffness: 400, damping: 30 }` for modals and popovers - this creates a premium, physical feel like Vercel/Linear |
112
+ | A2 | Animations that take > 400ms | Micro: 100-150ms, Components: 200-300ms, Pages: 300-400ms |
113
+ | A3 | Animations everywhere | Animate max 2-3 elements simultaneously |
114
+ | A4 | Same animation for enter and exit | Enter: ease-out (decelerate), Exit: ease-in (accelerate) |
115
+ | A5 | Animating expensive properties | Only animate `transform` and `opacity` - never `height`, `width`, `top` |
116
+ | A6 | No animation on mobile | Respect `prefers-reduced-motion: reduce` - wrap in `@media` or use `useReducedMotion()` |
117
+ | A7 | Scroll-triggered animations that block | Don't block content visibility for scroll reveals |
118
+ | A8 | Hover animations on touch devices | Wrap hover effects in `@media (hover: hover)` |
119
+
120
+ ### Images & Icons (Rules I1 - I8)
121
+
122
+ | Rule | Anti-Pattern | Correct Approach |
123
+ | ------ | ------------- | ----------------- |
124
+ | I1 | Decorative icons on every list item | Icons add meaning, not decoration. Use selectively. |
125
+ | I2 | Mix of icon styles | Pick one icon set (e.g., Lucide for shadcn). Stick with it. |
126
+ | I3 | Low-contrast icons | Icons need ≥ 3:1 contrast ratio |
127
+ | I4 | Images without aspect-ratio | Always set `aspect-video` or `aspect-square` to prevent layout shifts |
128
+ | I5 | No image loading state | Use `<Skeleton>` placeholder or blur hash |
129
+ | I6 | SVG icons inline without aria | Add `aria-hidden="true"` or `aria-label` |
130
+ | I7 | Stock photo generic humans | Use illustrations, abstract art, or genuine brand photography |
131
+ | I8 | Unoptimized images | WebP/AVIF, properly sized, `loading="lazy"` below fold |
132
+
133
+ ---
134
+
135
+ ## Design Initialization Checklist
136
+
137
+ Start every new design with:
138
+
139
+ ```markdown
140
+ ## Design Context
141
+
142
+ **Surface type**: [brand/marketing OR product/app]
143
+ **Target audience**: [who are they? what do they value?]
144
+ **Brand tone**: [professional/playful/bold/minimal/technical]
145
+ **Anti-references**: [designs this should NOT look like]
146
+ **Primary font**: [chosen font + why + Framer Motion / shadcn pairing]
147
+ **Color palette**: [3 semantic colors + HSL values for light AND dark]
148
+ **Component library**: [shadcn/ui | radix | custom]
149
+ **Animation library**: [CSS only | Framer Motion | GSAP]
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Design Review Audits
155
+
156
+ ### Quick Audit (before PR)
157
+
158
+ - Typography: Is there clear visual hierarchy? Are fonts intentional? Is Inter paired properly?
159
+ - Color: Any pure black/white? Contrast failures? Too many colors? Dark mode?
160
+ - Spacing: Consistent Tailwind scale? No arbitrary values? Enough whitespace?
161
+ - Animation: Any CSS bounce/elastic? Too slow (>400ms)? Too many simultaneous?
162
+ - Components: Any native `<select>` or `<input type="date">` that should be shadcn?
163
+ - Z-index: Any hardcoded `z-[999]` or `z-50`?
164
+
165
+ ### Full Audit (before release)
166
+
167
+ - Accessibility: Run axe DevTools or Lighthouse - target 90+ score
168
+ - Responsiveness: Test at 375px, 768px, 1280px, 1440px
169
+ - Dark mode: Does the full palette hold up? No inverted-only shortcuts?
170
+ - Empty states: Does every list/table have a designed empty state?
171
+ - Edge cases: Loading states, error states, long text overflow, RTL
172
+
173
+ ---
174
+
175
+ ## Premium Design Markers
176
+
177
+ These details separate premium from mediocre:
178
+
179
+ 1. **Consistent border radius** - pick one and use it everywhere (`rounded-md` = 6px, `rounded-lg` = 8px)
180
+ 2. **Intentional drop shadows** - darker near surface, lighter for floating elements
181
+ 3. **Micro-copy quality** - button labels are verbs: "Save changes" not "Submit"
182
+ 4. **Focus ring styling** - `focus-visible:ring-2 focus-visible:ring-primary` matching brand
183
+ 5. **Smooth color transitions** - `transition-colors duration-150` on all interactive elements
184
+ 6. **Optical alignment** - icon + text optically centered, not mathematically (`items-center gap-1.5`)
185
+
186
+
187
+ ## Code Examples
188
+
189
+ See `EXAMPLES.md` for detailed code examples.
190
+
191
+ ## Validation Checklist
192
+
193
+ What to verify during the review phase before completing the task.
194
+
195
+ ## Common Mistakes
196
+
197
+ Anti-patterns and things to explicitly avoid. See `TROUBLESHOOTING.md`.
198
+
199
+ ## Integration Notes
200
+
201
+ How this skill interacts with other skills.
@@ -0,0 +1,19 @@
1
+ # impeccable-design Troubleshooting & Common Mistakes
2
+
3
+ ## 1. Nested Border Radius Mismatch
4
+
5
+ - **Symptom**: Corners of an inner element poke out or look visually awkward inside a container.
6
+ - **Root Cause**: Using the same border-radius on both outer container and inner child.
7
+ - **Fix**: Inner radius formula: r_inner = max(0, r_outer - padding).
8
+
9
+ ## 2. Animation Performance Stutter
10
+
11
+ - **Symptom**: Janky animations and dropped frames during transitions.
12
+ - **Root Cause**: Animating layout properties (width, height, top, margin).
13
+ - **Fix**: Animate only composited GPU-accelerated properties: transform and opacity.
14
+
15
+ ## 3. Cluttered Visual Density
16
+
17
+ - **Symptom**: Interface feels overwhelming, cramped, and cheap.
18
+ - **Root Cause**: Cramming too many borders, dividers, badges, and icons into one view.
19
+ - **Fix**: Replace borders with generous whitespace; let alignment and typography hierarchy define grouping.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,15 @@
1
+ schemaVersion: 2
2
+ name: impeccable-design
3
+ category: design
4
+ type: instruction-only
5
+ description: >
6
+ Visual design quality skill based on pbakaus/impeccable.
7
+ 46 deterministic anti-pattern rules that prevent AI design slop.
8
+ Bans overused fonts, pure black/gray, nested cards, bounce animations,
9
+ and all generic AI-generated design clichés.
10
+ version: 1.0.0
11
+ resources:
12
+ - EXAMPLES.md
13
+ - SKILL.md
14
+ - TROUBLESHOOTING.md
15
+ - VALIDATION.json
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: interview-me
3
+ description: >
4
+ Interactive requirements elicitation skill. Interrogates ambiguous, complex, or high-blast-radius
5
+ tasks one focused question at a time before any plan or code is written.
6
+ ---
7
+
8
+ # interview-me
9
+
10
+ ## Overview
11
+
12
+ Structured requirements interrogation framework inspired by [addyosmani/agent-skills](https://github.com/addyosmani/agent-skills). Prevents wasted cycles by transforming vague user intents into crisp, unambiguous architectural constraints through single-question progressive interview loops.
13
+
14
+ ## When to Use
15
+
16
+ Activate whenever:
17
+
18
+ - User task has underspecified requirements, open UX decisions, or multiple viable architectural trade-offs.
19
+ - A high-blast-radius change (database migrations, auth refactor, API contract change) is requested.
20
+ - Explicitly triggered via `/spec`, `/interview`, or "ask me questions first".
21
+
22
+ ## Rules & Patterns
23
+
24
+ ### 1. The One-Question-At-A-Time Rule
25
+
26
+ **Never overwhelm the user with a 10-point interrogation form.**
27
+
28
+ - Ask **exactly ONE focused question** per turn (or at most two tightly-coupled binary options).
29
+ - Provide the recommended option first with clear rationale: `"(Recommended) Option A because..."`.
30
+ - Always allow write-in or clarification.
31
+
32
+ ### 2. The 4 Interrogation Dimensions
33
+
34
+ Interrogate in this strict priority order:
35
+
36
+ 1. **Business Outcome & Invariants**:
37
+ - What core problem does this solve?
38
+ - What behavior is strictly forbidden?
39
+ 2. **Scope Boundaries (In vs Out)**:
40
+ - What must be delivered in this atomic slice?
41
+ - What is explicitly deferred to later?
42
+ 3. **Technical Constraints**:
43
+ - Versions, libraries, database engines, backwards compatibility requirements.
44
+ 4. **Edge Cases & Failure Modes**:
45
+ - What happens on network disconnect, empty response, or unauthorized token?
46
+
47
+ ### 3. Progressive Synthesis
48
+
49
+ After each user answer:
50
+
51
+ - Acknowledge the decision and update the mental model.
52
+ - If more critical decisions remain, ask the next question.
53
+ - Once 2-4 key questions are resolved, synthesize the formal Feature Spec and transition to `engineering-workflow` (`[PHASE: Plan]`).
54
+
55
+ ---
56
+
57
+ ## Code Examples
58
+
59
+ ### Interactive Interview Turn Example
60
+
61
+ ```markdown
62
+ **Question 1 of 3 (Authentication Strategy)**
63
+
64
+ Before implementing the API authentication layer, we need to align on session storage:
65
+
66
+ 1. **(Recommended) HTTP-only Secure Cookies with Refresh Tokens**:
67
+ - *Why*: Immune to XSS token theft, standard for web dashboards.
68
+ 2. **Bearer Token in Authorization Header**:
69
+ - *Why*: Ideal if this API will also be consumed by mobile apps or third-party CLI tools.
70
+
71
+ Which model fits your architecture best?
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Validation Checklist
77
+
78
+ - [ ] Question addresses an actual ambiguity (never ask about obvious defaults).
79
+ - [ ] Exactly one question (or two tightly coupled choices) asked.
80
+ - [ ] Recommendation provided with clear engineering justification.
81
+ - [ ] User response incorporated into the final spec before coding.
82
+
83
+ ---
84
+
85
+ ## Common Mistakes
86
+
87
+ - **Asking obvious questions**: Asking "Do you want error handling?" instead of making a sensible senior default.
88
+ - **Interrogation bombardment**: Dumping a list of 8 open-ended questions in a single wall of text.
89
+ - **Ignoring user answers**: Asking a question, receiving an answer, and then implementing something else.
90
+
91
+ ---
92
+
93
+ ## Integration Notes
94
+
95
+ - Runs at the start of `engineering-workflow` Phase 1 (`/spec`).
96
+ - Interacts with `gstack-roles` (`[ROLE: Product Manager]` or `[ROLE: Architect]`).
97
+ - Hands off to `ponytail-mindset` once scope is defined.
@@ -0,0 +1,12 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "type": "object",
4
+ "properties": {
5
+ "rules_followed": {
6
+ "type": "boolean"
7
+ }
8
+ },
9
+ "required": [
10
+ "rules_followed"
11
+ ]
12
+ }
@@ -0,0 +1,9 @@
1
+ schemaVersion: 2
2
+ name: interview-me
3
+ category: engineering
4
+ type: instruction-only
5
+ description: Interactive requirements elicitation skill. Interrogates ambiguous, complex, or high-blast-radius tasks one focused question at a time before any plan or code is written.
6
+ version: 1.0.0
7
+ resources:
8
+ - SKILL.md
9
+ - VALIDATION.json
@@ -0,0 +1,38 @@
1
+ # microservices Examples - Anti-patterns vs ContextOS Standard
2
+
3
+ ## Example 1: Inter-service Communication
4
+
5
+ ### Anti-pattern: Synchronous HTTP Call Chains (The Distributed Monolith)
6
+
7
+ ```text
8
+ User -> OrderService (HTTP) -> InventoryService (HTTP) -> PaymentService (HTTP) -> EmailService (HTTP)
9
+ Problem: High latency, 99.9% availability compounding to 96% overall availability, cascading failure.
10
+ ```
11
+
12
+ ### Best practice: ContextOS Standard (Asynchronous Event Choreography)
13
+
14
+ ```text
15
+ User -> OrderService (creates order with status 'PENDING')
16
+ OrderService publishes 'OrderPlaced' event to Event Broker (Kafka/RabbitMQ)
17
+ ├── InventoryService consumes 'OrderPlaced' -> Reserves stock
18
+ ├── PaymentService consumes 'OrderPlaced' -> Charges customer
19
+ └── NotificationService consumes 'PaymentProcessed' -> Sends confirmation email
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Example 2: Database Architecture
25
+
26
+ ### Anti-pattern: Shared Database Across Multiple Microservices
27
+
28
+ ```text
29
+ BAD: OrderService and UserService both directly read and write to the same 'users' table.
30
+ Schema migrations in UserService immediately break OrderService.
31
+ ```
32
+
33
+ ### Best practice: ContextOS Standard (Database-per-Service)
34
+
35
+ ```text
36
+ GOOD: UserService owns user data. OrderService maintains a local read-model (denormalized user info)
37
+ synchronized via 'UserUpdated' events. Each service can migrate and scale independently.
38
+ ```