contextos-agents 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (192) 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 +13 -8
  6. package/.agents/plugins.js +347 -26
  7. package/.agents/profiles.js +32 -11
  8. package/README.md +38 -3
  9. package/bin/commands/hook.js +50 -12
  10. package/bin/commands/scan.js +10 -3
  11. package/bin/index.js +165 -53
  12. package/bin/lib/git-snapshot.js +70 -43
  13. package/bin/lib/scan.js +108 -27
  14. package/bin/lib/ui.js +140 -0
  15. package/catalog/skills/adapters/EXAMPLES.md +19 -0
  16. package/catalog/skills/adapters/SKILL.md +101 -0
  17. package/catalog/skills/adapters/TROUBLESHOOTING.md +7 -0
  18. package/catalog/skills/adapters/VALIDATION.json +12 -0
  19. package/catalog/skills/adapters/skill.yaml +13 -0
  20. package/catalog/skills/api-design/EXAMPLES.md +91 -0
  21. package/catalog/skills/api-design/SKILL.md +63 -0
  22. package/catalog/skills/api-design/TROUBLESHOOTING.md +54 -0
  23. package/catalog/skills/api-design/VALIDATION.json +11 -0
  24. package/catalog/skills/api-design/skill.yaml +14 -0
  25. package/catalog/skills/architecture-diagrams/SKILL.md +108 -0
  26. package/catalog/skills/architecture-diagrams/VALIDATION.json +12 -0
  27. package/catalog/skills/architecture-diagrams/skill.yaml +9 -0
  28. package/catalog/skills/brutalist-design/EXAMPLES.md +59 -0
  29. package/catalog/skills/brutalist-design/SKILL.md +150 -0
  30. package/catalog/skills/brutalist-design/VALIDATION.json +12 -0
  31. package/catalog/skills/brutalist-design/skill.yaml +10 -0
  32. package/catalog/skills/ci-cd/EXAMPLES.md +79 -0
  33. package/catalog/skills/ci-cd/SKILL.md +69 -0
  34. package/catalog/skills/ci-cd/TROUBLESHOOTING.md +52 -0
  35. package/catalog/skills/ci-cd/VALIDATION.json +11 -0
  36. package/catalog/skills/ci-cd/skill.yaml +13 -0
  37. package/catalog/skills/database/EXAMPLES.md +74 -0
  38. package/catalog/skills/database/SKILL.md +101 -0
  39. package/catalog/skills/database/TROUBLESHOOTING.md +18 -0
  40. package/catalog/skills/database/VALIDATION.json +11 -0
  41. package/catalog/skills/database/skill.yaml +14 -0
  42. package/catalog/skills/ddd/EXAMPLES.md +42 -0
  43. package/catalog/skills/ddd/SKILL.md +247 -0
  44. package/catalog/skills/ddd/TROUBLESHOOTING.md +19 -0
  45. package/catalog/skills/ddd/VALIDATION.json +12 -0
  46. package/catalog/skills/ddd/skill.yaml +14 -0
  47. package/catalog/skills/decisions/EXAMPLES.md +35 -0
  48. package/catalog/skills/decisions/SKILL.md +90 -0
  49. package/catalog/skills/decisions/TROUBLESHOOTING.md +13 -0
  50. package/catalog/skills/decisions/VALIDATION.json +12 -0
  51. package/catalog/skills/decisions/skill.yaml +13 -0
  52. package/catalog/skills/docker/EXAMPLES.md +56 -0
  53. package/catalog/skills/docker/SKILL.md +169 -0
  54. package/catalog/skills/docker/TROUBLESHOOTING.md +18 -0
  55. package/catalog/skills/docker/VALIDATION.json +11 -0
  56. package/catalog/skills/docker/skill.yaml +13 -0
  57. package/catalog/skills/fastapi/EXAMPLES.md +36 -0
  58. package/catalog/skills/fastapi/SKILL.md +171 -0
  59. package/catalog/skills/fastapi/TROUBLESHOOTING.md +19 -0
  60. package/catalog/skills/fastapi/VALIDATION.json +12 -0
  61. package/catalog/skills/fastapi/skill.yaml +14 -0
  62. package/catalog/skills/generators/EXAMPLES.md +19 -0
  63. package/catalog/skills/generators/SKILL.md +110 -0
  64. package/catalog/skills/generators/TROUBLESHOOTING.md +7 -0
  65. package/catalog/skills/generators/VALIDATION.json +12 -0
  66. package/catalog/skills/generators/skill.yaml +22 -0
  67. package/catalog/skills/generators/templates/API.md +77 -0
  68. package/catalog/skills/generators/templates/ARCHITECTURE.md +70 -0
  69. package/catalog/skills/generators/templates/DATABASE.md +42 -0
  70. package/catalog/skills/generators/templates/DECISION.md +46 -0
  71. package/catalog/skills/generators/templates/PRD.md +67 -0
  72. package/catalog/skills/generators/templates/PROJECT_GRAPH.md +56 -0
  73. package/catalog/skills/generators/templates/ROADMAP.md +51 -0
  74. package/catalog/skills/generators/templates/TASKS.md +43 -0
  75. package/catalog/skills/generators/templates/UI.md +73 -0
  76. package/catalog/skills/graphify/EXAMPLES.md +73 -0
  77. package/catalog/skills/graphify/SKILL.md +130 -0
  78. package/catalog/skills/graphify/VALIDATION.json +12 -0
  79. package/catalog/skills/graphify/skill.yaml +13 -0
  80. package/catalog/skills/impeccable-design/EXAMPLES.md +26 -0
  81. package/catalog/skills/impeccable-design/SKILL.md +201 -0
  82. package/catalog/skills/impeccable-design/TROUBLESHOOTING.md +19 -0
  83. package/catalog/skills/impeccable-design/VALIDATION.json +12 -0
  84. package/catalog/skills/impeccable-design/skill.yaml +15 -0
  85. package/catalog/skills/interview-me/SKILL.md +97 -0
  86. package/catalog/skills/interview-me/VALIDATION.json +12 -0
  87. package/catalog/skills/interview-me/skill.yaml +9 -0
  88. package/catalog/skills/microservices/EXAMPLES.md +38 -0
  89. package/catalog/skills/microservices/SKILL.md +164 -0
  90. package/catalog/skills/microservices/TROUBLESHOOTING.md +19 -0
  91. package/catalog/skills/microservices/VALIDATION.json +12 -0
  92. package/catalog/skills/microservices/skill.yaml +14 -0
  93. package/catalog/skills/minimalist-design/EXAMPLES.md +58 -0
  94. package/catalog/skills/minimalist-design/SKILL.md +113 -0
  95. package/catalog/skills/minimalist-design/VALIDATION.json +12 -0
  96. package/catalog/skills/minimalist-design/skill.yaml +10 -0
  97. package/catalog/skills/nestjs/EXAMPLES.md +40 -0
  98. package/catalog/skills/nestjs/SKILL.md +139 -0
  99. package/catalog/skills/nestjs/TROUBLESHOOTING.md +19 -0
  100. package/catalog/skills/nestjs/VALIDATION.json +12 -0
  101. package/catalog/skills/nestjs/skill.yaml +14 -0
  102. package/catalog/skills/nextjs/EXAMPLES.md +40 -0
  103. package/catalog/skills/nextjs/SKILL.md +163 -0
  104. package/catalog/skills/nextjs/TROUBLESHOOTING.md +19 -0
  105. package/catalog/skills/nextjs/VALIDATION.json +12 -0
  106. package/catalog/skills/nextjs/skill.yaml +14 -0
  107. package/catalog/skills/node/EXAMPLES.md +80 -0
  108. package/catalog/skills/node/SKILL.md +128 -0
  109. package/catalog/skills/node/TROUBLESHOOTING.md +19 -0
  110. package/catalog/skills/node/VALIDATION.json +12 -0
  111. package/catalog/skills/node/skill.yaml +14 -0
  112. package/catalog/skills/performance/EXAMPLES.md +30 -0
  113. package/catalog/skills/performance/SKILL.md +75 -0
  114. package/catalog/skills/performance/TROUBLESHOOTING.md +19 -0
  115. package/catalog/skills/performance/VALIDATION.json +12 -0
  116. package/catalog/skills/performance/skill.yaml +14 -0
  117. package/catalog/skills/react/EXAMPLES.md +79 -0
  118. package/catalog/skills/react/SKILL.md +132 -0
  119. package/catalog/skills/react/TROUBLESHOOTING.md +19 -0
  120. package/catalog/skills/react/VALIDATION.json +12 -0
  121. package/catalog/skills/react/skill.yaml +14 -0
  122. package/catalog/skills/react-best-practices/SKILL.md +158 -0
  123. package/catalog/skills/react-best-practices/VALIDATION.json +12 -0
  124. package/catalog/skills/react-best-practices/skill.yaml +13 -0
  125. package/catalog/skills/redesign-audit/SKILL.md +117 -0
  126. package/catalog/skills/redesign-audit/VALIDATION.json +12 -0
  127. package/catalog/skills/redesign-audit/skill.yaml +9 -0
  128. package/catalog/skills/security-audit/EXAMPLES.md +79 -0
  129. package/catalog/skills/security-audit/SKILL.md +91 -0
  130. package/catalog/skills/security-audit/TROUBLESHOOTING.md +46 -0
  131. package/catalog/skills/security-audit/VALIDATION.json +11 -0
  132. package/catalog/skills/security-audit/skill.yaml +14 -0
  133. package/catalog/skills/soft-design/EXAMPLES.md +51 -0
  134. package/catalog/skills/soft-design/SKILL.md +108 -0
  135. package/catalog/skills/soft-design/VALIDATION.json +12 -0
  136. package/catalog/skills/soft-design/skill.yaml +10 -0
  137. package/catalog/skills/state-management/EXAMPLES.md +56 -0
  138. package/catalog/skills/state-management/SKILL.md +168 -0
  139. package/catalog/skills/state-management/TROUBLESHOOTING.md +18 -0
  140. package/catalog/skills/state-management/VALIDATION.json +11 -0
  141. package/catalog/skills/state-management/skill.yaml +14 -0
  142. package/catalog/skills/subagent-orchestrator/SKILL.md +117 -0
  143. package/catalog/skills/subagent-orchestrator/VALIDATION.json +12 -0
  144. package/catalog/skills/subagent-orchestrator/skill.yaml +9 -0
  145. package/catalog/skills/system-design/EXAMPLES.md +75 -0
  146. package/catalog/skills/system-design/SKILL.md +419 -0
  147. package/catalog/skills/system-design/TROUBLESHOOTING.md +19 -0
  148. package/catalog/skills/system-design/VALIDATION.json +12 -0
  149. package/catalog/skills/system-design/skill.yaml +14 -0
  150. package/catalog/skills/terraform/EXAMPLES.md +74 -0
  151. package/catalog/skills/terraform/SKILL.md +55 -0
  152. package/catalog/skills/terraform/TROUBLESHOOTING.md +53 -0
  153. package/catalog/skills/terraform/VALIDATION.json +11 -0
  154. package/catalog/skills/terraform/skill.yaml +14 -0
  155. package/catalog/skills/testing/EXAMPLES.md +122 -0
  156. package/catalog/skills/testing/SKILL.md +70 -0
  157. package/catalog/skills/testing/TROUBLESHOOTING.md +18 -0
  158. package/catalog/skills/testing/VALIDATION.json +11 -0
  159. package/catalog/skills/testing/skill.yaml +14 -0
  160. package/catalog/skills/typescript/EXAMPLES.md +64 -0
  161. package/catalog/skills/typescript/SKILL.md +112 -0
  162. package/catalog/skills/typescript/TROUBLESHOOTING.md +19 -0
  163. package/catalog/skills/typescript/VALIDATION.json +12 -0
  164. package/catalog/skills/typescript/skill.yaml +14 -0
  165. package/catalog/skills/ui-design/EXAMPLES.md +21 -0
  166. package/catalog/skills/ui-design/SKILL.md +124 -0
  167. package/catalog/skills/ui-design/TROUBLESHOOTING.md +19 -0
  168. package/catalog/skills/ui-design/VALIDATION.json +12 -0
  169. package/catalog/skills/ui-design/skill.yaml +16 -0
  170. package/catalog/skills/ui-ux-pro/EXAMPLES.md +62 -0
  171. package/catalog/skills/ui-ux-pro/SKILL.md +418 -0
  172. package/catalog/skills/ui-ux-pro/TROUBLESHOOTING.md +19 -0
  173. package/catalog/skills/ui-ux-pro/VALIDATION.json +12 -0
  174. package/catalog/skills/ui-ux-pro/skill.yaml +14 -0
  175. package/catalog/skills/ux-design/EXAMPLES.md +36 -0
  176. package/catalog/skills/ux-design/SKILL.md +116 -0
  177. package/catalog/skills/ux-design/TROUBLESHOOTING.md +19 -0
  178. package/catalog/skills/ux-design/VALIDATION.json +12 -0
  179. package/catalog/skills/ux-design/skill.yaml +16 -0
  180. package/catalog/skills/vercel-optimize/SKILL.md +83 -0
  181. package/catalog/skills/vercel-optimize/VALIDATION.json +12 -0
  182. package/catalog/skills/vercel-optimize/scripts/collect-signals.mjs +131 -0
  183. package/catalog/skills/vercel-optimize/scripts/gate-investigations.mjs +142 -0
  184. package/catalog/skills/vercel-optimize/scripts/merge-signals.mjs +143 -0
  185. package/catalog/skills/vercel-optimize/scripts/scan-codebase.mjs +174 -0
  186. package/catalog/skills/vercel-optimize/skill.yaml +15 -0
  187. package/catalog/skills/web-accessibility/EXAMPLES.md +39 -0
  188. package/catalog/skills/web-accessibility/SKILL.md +151 -0
  189. package/catalog/skills/web-accessibility/TROUBLESHOOTING.md +19 -0
  190. package/catalog/skills/web-accessibility/VALIDATION.json +12 -0
  191. package/catalog/skills/web-accessibility/skill.yaml +14 -0
  192. package/package.json +3 -2
@@ -0,0 +1,46 @@
1
+ # ADR-{{number}}: {{Decision Title}}
2
+
3
+ **Date:** {{YYYY-MM-DD}}
4
+ **Status:** {{proposed | accepted | deprecated | superseded}}
5
+ **Affected modules:** {{module_1}}, {{module_2}}
6
+
7
+ ## Decision
8
+
9
+ {{What was decided, in one sentence.}}
10
+
11
+ ## Why
12
+
13
+ {{The reasoning behind this decision. What problem does it solve?}}
14
+
15
+ ## Alternatives Considered
16
+
17
+ ### {{Alternative 1}}
18
+
19
+ - **Pros:** {{advantages}}
20
+ - **Cons:** {{disadvantages}}
21
+ - **Why rejected:** {{reason}}
22
+
23
+ ### {{Alternative 2}}
24
+
25
+ - **Pros:** {{advantages}}
26
+ - **Cons:** {{disadvantages}}
27
+ - **Why rejected:** {{reason}}
28
+
29
+ ## Tradeoffs
30
+
31
+ | Aspect | Gain | Cost |
32
+ | --- | --- | --- |
33
+ | {{aspect_1}} | {{what_we_gain}} | {{what_we_lose}} |
34
+ | {{aspect_2}} | {{what_we_gain}} | {{what_we_lose}} |
35
+
36
+ ## Impact
37
+
38
+ - **Code changes:** {{what files/modules are affected}}
39
+ - **Performance:** {{performance impact}}
40
+ - **Team:** {{learning curve, tooling changes}}
41
+ - **Reversibility:** {{easy | moderate | hard | irreversible}}
42
+
43
+ ## References
44
+
45
+ - {{link_1}}
46
+ - {{link_2}}
@@ -0,0 +1,67 @@
1
+ # {{Project Name}} - Product Requirements Document
2
+
3
+ ## Overview
4
+ <!-- One paragraph describing what this product does and who it's for -->
5
+ {{project_description}}
6
+
7
+ ## Problem Statement
8
+ <!-- What problem does this solve? Why does it need to exist? -->
9
+
10
+ ## Target Users
11
+ <!-- Who will use this? Define user personas -->
12
+
13
+ | Persona | Description | Key Needs |
14
+ | --- | --- | --- |
15
+ | {{persona_1}} | {{description}} | {{needs}} |
16
+ | {{persona_2}} | {{description}} | {{needs}} |
17
+
18
+ ## Core Features
19
+
20
+ ### Must Have (P0)
21
+ <!-- Features required for MVP -->
22
+ - [ ] {{feature_1}}
23
+ - [ ] {{feature_2}}
24
+
25
+ ### Should Have (P1)
26
+ <!-- Features for v1.0 -->
27
+ - [ ] {{feature_3}}
28
+ - [ ] {{feature_4}}
29
+
30
+ ### Nice to Have (P2)
31
+ <!-- Future features -->
32
+ - [ ] {{feature_5}}
33
+
34
+ ## User Flows
35
+
36
+ ### {{Primary Flow Name}}
37
+
38
+ ```
39
+ Step 1: {{action}}
40
+ Step 2: {{action}}
41
+ Step 3: {{action}}
42
+ ```
43
+
44
+ ## Non-Functional Requirements
45
+
46
+ | Requirement | Target |
47
+ | --- | --- |
48
+ | Performance | {{e.g., page load < 2s}} |
49
+ | Availability | {{e.g., 99.9%}} |
50
+ | Security | {{e.g., OWASP Top 10 compliance}} |
51
+ | Accessibility | {{e.g., WCAG 2.1 AA}} |
52
+ | Scalability | {{e.g., 10K concurrent users}} |
53
+
54
+ ## Constraints
55
+ <!-- Technical, business, or timeline constraints -->
56
+ - {{constraint_1}}
57
+ - {{constraint_2}}
58
+
59
+ ## Success Metrics
60
+ <!-- How will we measure success? -->
61
+ - {{metric_1}}
62
+ - {{metric_2}}
63
+
64
+ ## Out of Scope
65
+ <!-- What this project explicitly does NOT do -->
66
+ - {{exclusion_1}}
67
+ - {{exclusion_2}}
@@ -0,0 +1,56 @@
1
+ # {{Project Name}} - Project Graph
2
+
3
+ ## Project
4
+
5
+ ```yaml
6
+ name: "{{project_name}}"
7
+ type: {{webapp | api | mobile | cli | saas | crm | ecommerce}}
8
+ profile: {{startup | enterprise | mvp | hackathon}}
9
+ pack: {{skill_pack_name}}
10
+ ```
11
+
12
+ ## Modules
13
+
14
+ ### {{module_name}}
15
+
16
+ ```yaml
17
+ module: {{module_name}}
18
+ description: "{{what this module does}}"
19
+ features:
20
+ - {{feature_1}}
21
+ - {{feature_2}}
22
+ files:
23
+ - src/modules/{{module_name}}/**
24
+ skills: [{{skill_1}}, {{skill_2}}]
25
+ depends_on: [{{other_module}}]
26
+ ```
27
+
28
+ ---
29
+
30
+ <!-- Repeat for each module -->
31
+
32
+ ## Module Dependency Graph
33
+
34
+ ```
35
+ {{module_1}} ──depends──▶ {{module_2}}
36
+ │
37
+ └──depends──▶ {{module_3}}
38
+ ```
39
+
40
+ ## File → Module Mapping
41
+
42
+ | File Pattern | Module | Skills |
43
+ | --- | --- | --- |
44
+ | `src/modules/{{module}}/**` | {{module}} | {{skills}} |
45
+ | `src/shared/**` | shared | {{skills}} |
46
+ | `src/config/**` | config | - |
47
+ | `tests/**` | testing | testing |
48
+ | `docs/**` | docs | - |
49
+
50
+ ## Feature → Task Mapping
51
+
52
+ ### {{Feature Name}} `[{{module}}]`
53
+
54
+ - [ ] {{task_1}} → `{{file_path}}`
55
+ - [ ] {{task_2}} → `{{file_path}}`
56
+ - [ ] {{task_3}} → `{{file_path}}`
@@ -0,0 +1,51 @@
1
+ # {{Project Name}} - Roadmap
2
+
3
+ ## Vision
4
+
5
+ {{one_sentence_vision}}
6
+
7
+ ## Milestones
8
+
9
+ ### v0.1 - MVP ({{target_date}})
10
+
11
+ **Goal:** {{what_mvp_achieves}}
12
+
13
+ - [ ] {{feature_1}}
14
+ - [ ] {{feature_2}}
15
+ - [ ] {{feature_3}}
16
+
17
+ **Success criteria:** {{how_to_know_mvp_is_done}}
18
+
19
+ ---
20
+
21
+ ### v0.2 - {{milestone_name}} ({{target_date}})
22
+
23
+ **Goal:** {{what_this_milestone_achieves}}
24
+
25
+ - [ ] {{feature_4}}
26
+ - [ ] {{feature_5}}
27
+
28
+ ---
29
+
30
+ ### v1.0 - Production ({{target_date}})
31
+
32
+ **Goal:** {{what_production_means}}
33
+
34
+ - [ ] {{feature_6}}
35
+ - [ ] {{feature_7}}
36
+ - [ ] Performance optimization
37
+ - [ ] Security audit
38
+ - [ ] Documentation
39
+
40
+ ---
41
+
42
+ ## Backlog
43
+ <!-- Future ideas not yet scheduled -->
44
+ - {{idea_1}}
45
+ - {{idea_2}}
46
+
47
+ ## Risks
48
+
49
+ | Risk | Impact | Mitigation |
50
+ |---|---|---|
51
+ | {{risk_1}} | {{high/medium/low}} | {{mitigation}} |
@@ -0,0 +1,43 @@
1
+ # {{Project Name}} - Tasks
2
+
3
+ ## Current Sprint: {{sprint_name}}
4
+
5
+ ### In Progress
6
+
7
+ - [ ] {{task}} `[{{module}}]` `[{{size: S/M/L/XL}}]`
8
+
9
+ ### To Do
10
+
11
+ - [ ] {{task}} `[{{module}}]` `[{{size}}]`
12
+ - [ ] {{task}} `[{{module}}]` `[{{size}}]`
13
+
14
+ ### Done
15
+
16
+ - [x] {{completed_task}} `[{{module}}]`
17
+
18
+ ---
19
+
20
+ ## Task Format
21
+
22
+ Each task should include:
23
+
24
+ - **Description**: What needs to be done
25
+ - **Module**: Which Project Graph module this belongs to
26
+ - **Size**: S (< 1hr), M (1-4hr), L (4-8hr), XL (> 8hr)
27
+ - **Dependencies**: What must be done first
28
+ - **Acceptance criteria**: How to know it's done
29
+ - **Skills needed**: Which skills the AI should load
30
+
31
+ ### Example Task
32
+
33
+ ```
34
+ - [ ] Implement appointment calendar API [appointments] [L]
35
+ Dependencies: auth module, database schema
36
+ Acceptance: CRUD endpoints for appointments, tests passing
37
+ Skills: node, typescript, postgres, testing
38
+ ```
39
+
40
+ ## Backlog
41
+ <!-- Tasks not yet assigned to a sprint -->
42
+ - [ ] {{backlog_task_1}}
43
+ - [ ] {{backlog_task_2}}
@@ -0,0 +1,73 @@
1
+ # {{Project Name}} - UI/UX Specification
2
+
3
+ ## Design System
4
+
5
+ ### Colors
6
+
7
+ | Token | Value | Usage |
8
+ | --- | --- | --- |
9
+ | `--color-primary` | {{hex}} | Primary actions, links |
10
+ | `--color-secondary` | {{hex}} | Secondary elements |
11
+ | `--color-background` | {{hex}} | Page background |
12
+ | `--color-surface` | {{hex}} | Card/panel backgrounds |
13
+ | `--color-text` | {{hex}} | Body text |
14
+ | `--color-text-muted` | {{hex}} | Secondary text |
15
+ | `--color-error` | {{hex}} | Error states |
16
+ | `--color-success` | {{hex}} | Success states |
17
+
18
+ ### Typography
19
+
20
+ | Level | Font | Size | Weight | Line Height |
21
+ | --- | --- | --- | --- | --- |
22
+ | H1 | {{font}} | {{size}} | {{weight}} | {{lh}} |
23
+ | H2 | {{font}} | {{size}} | {{weight}} | {{lh}} |
24
+ | Body | {{font}} | {{size}} | {{weight}} | {{lh}} |
25
+ | Caption | {{font}} | {{size}} | {{weight}} | {{lh}} |
26
+
27
+ ### Spacing Scale
28
+
29
+ `4px, 8px, 12px, 16px, 24px, 32px, 48px, 64px`
30
+
31
+ ### Border Radius
32
+
33
+ | Token | Value | Usage |
34
+ | --- | --- | --- |
35
+ | `--radius-sm` | 4px | Inputs, small elements |
36
+ | `--radius-md` | 8px | Cards, panels |
37
+ | `--radius-lg` | 16px | Modals, hero sections |
38
+ | `--radius-full` | 9999px | Pills, avatars |
39
+
40
+ ## Pages
41
+
42
+ ### {{Page Name}}
43
+
44
+ - **Route:** `{{route}}`
45
+ - **Purpose:** {{what this page does}}
46
+ - **Components:** {{list of components}}
47
+ - **States:** default, loading, empty, error
48
+
49
+ ## Component Library
50
+ <!-- List of reusable components -->
51
+
52
+ | Component | Props | Variants |
53
+ | --- | --- | --- |
54
+ | Button | `variant, size, disabled` | primary, secondary, ghost |
55
+ | Input | `type, label, error` | text, email, password |
56
+ | Card | `title, actions` | default, elevated |
57
+
58
+ ## Responsive Breakpoints
59
+
60
+ | Name | Width | Layout |
61
+ | --- | --- | --- |
62
+ | Mobile | < 640px | Single column |
63
+ | Tablet | 640-1024px | Two columns |
64
+ | Desktop | > 1024px | Full layout |
65
+
66
+ ## Anti-Patterns (avoid these)
67
+
68
+ - No gray text on colored backgrounds
69
+ - No pure black - always tint with brand color
70
+ - No bounce/elastic easing - use ease-out
71
+ - No cards nested inside cards
72
+ - No generic color palettes (plain red, blue, green)
73
+ - No default browser fonts - use curated typography
@@ -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
+ ```