cc-codeconductor 0.4.3 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. package/README.md +95 -95
  2. package/dist/cli/errors.d.ts +65 -0
  3. package/dist/core/compilation/compile-checker.d.ts +51 -0
  4. package/dist/core/config/codeconductor-config.d.ts +42 -0
  5. package/dist/core/config/config-loader.d.ts +11 -0
  6. package/dist/core/filesystem/credential-guard.d.ts +18 -0
  7. package/dist/core/goal/goal-planner.d.ts +8 -0
  8. package/dist/core/goal/goal-state.d.ts +15 -0
  9. package/dist/core/loop/git-stats.d.ts +13 -0
  10. package/dist/core/loop/loop-engine.d.ts +79 -0
  11. package/dist/core/memory/episodic-store.d.ts +6 -0
  12. package/dist/core/memory/operational-state.d.ts +6 -0
  13. package/dist/core/orchestrator/runtime-orchestrator.d.ts +25 -0
  14. package/dist/core/planner/product-planner.d.ts +18 -0
  15. package/dist/core/presets/package-paths.d.ts +4 -0
  16. package/dist/core/product-graph/graph-store.d.ts +11 -0
  17. package/dist/core/product-graph/paths.d.ts +18 -0
  18. package/dist/core/verification/verification-runner.d.ts +57 -0
  19. package/dist/domain/loop/loop-state.d.ts +74 -0
  20. package/dist/domain/product/entities.d.ts +11 -0
  21. package/dist/index.d.ts +15 -0
  22. package/dist/index.js +23721 -15064
  23. package/dist/library.js +2595 -0
  24. package/dist/utils/result.d.ts +36 -0
  25. package/dist/validation/schemas.d.ts +3660 -0
  26. package/package.json +15 -2
  27. package/policy.yml +12 -11
  28. package/presets/agy/AGENTS.md +11 -5
  29. package/presets/agy/gates/pre-commit/GATE.md +136 -0
  30. package/presets/agy/skills/cc-fix/SKILL.md +2 -2
  31. package/presets/agy/skills/cc-tdd-cycle/SKILL.md +11 -0
  32. package/presets/agy/skills/evaluation/SKILL.md +6 -0
  33. package/presets/agy/skills/openspec/SKILL.md +32 -0
  34. package/presets/agy/workflows/cc-api-contract.md +12 -0
  35. package/presets/agy/workflows/cc-ask.md +55 -0
  36. package/presets/agy/workflows/cc-clarify.md +33 -0
  37. package/presets/agy/workflows/cc-council.md +31 -7
  38. package/presets/agy/workflows/cc-db-migration.md +22 -9
  39. package/presets/agy/workflows/cc-explore.md +37 -0
  40. package/presets/agy/workflows/cc-feature.md +41 -19
  41. package/presets/agy/workflows/cc-fix.md +50 -23
  42. package/presets/agy/workflows/cc-handoff.md +42 -0
  43. package/presets/agy/workflows/cc-iterative.md +128 -0
  44. package/presets/agy/workflows/cc-openspec.md +75 -0
  45. package/presets/agy/workflows/cc-pagespeed.md +12 -0
  46. package/presets/agy/workflows/cc-prototype.md +39 -0
  47. package/presets/agy/workflows/cc-refactor.md +12 -0
  48. package/presets/agy/workflows/cc-review.md +12 -0
  49. package/presets/agy/workflows/cc-scorecard.md +29 -0
  50. package/presets/agy/workflows/cc-tdd-cycle.md +24 -0
  51. package/presets/agy/workflows/cc-test-plan.md +12 -0
  52. package/presets/agy/workflows/cc-triage.md +35 -0
  53. package/presets/claude/CLAUDE.md +64 -0
  54. package/presets/claude/commands/cc/api-contract.md +12 -0
  55. package/presets/claude/commands/cc/ask.md +55 -0
  56. package/presets/claude/commands/cc/clarify.md +32 -0
  57. package/presets/claude/commands/cc/council.md +87 -0
  58. package/presets/claude/commands/cc/db-migration.md +22 -9
  59. package/presets/claude/commands/cc/explore.md +36 -0
  60. package/presets/claude/commands/cc/feature.md +49 -22
  61. package/presets/claude/commands/cc/fix.md +74 -20
  62. package/presets/claude/commands/cc/handoff.md +44 -0
  63. package/presets/claude/commands/cc/iterative.md +132 -0
  64. package/presets/claude/commands/cc/openspec.md +169 -0
  65. package/presets/claude/commands/cc/pagespeed.md +12 -0
  66. package/presets/claude/commands/cc/prototype.md +38 -0
  67. package/presets/claude/commands/cc/refactor.md +152 -1
  68. package/presets/claude/commands/cc/review.md +90 -17
  69. package/presets/claude/commands/cc/scorecard.md +77 -0
  70. package/presets/claude/commands/cc/tdd-cycle.md +53 -3
  71. package/presets/claude/commands/cc/test-plan.md +12 -0
  72. package/presets/claude/commands/cc/triage.md +34 -0
  73. package/presets/claude/gates/pre-commit/GATE.md +136 -0
  74. package/presets/claude/settings.json +8 -46
  75. package/presets/claude/skills/evaluation/SKILL.md +42 -0
  76. package/presets/claude/skills/openspec/SKILL.md +54 -0
  77. package/presets/codex/AGENTS.md +62 -5
  78. package/presets/codex/commands/cc-ask.md +55 -0
  79. package/presets/codex/gates/pre-commit/GATE.md +136 -0
  80. package/presets/cursor/.cursorignore +15 -0
  81. package/presets/cursor/AGENTS.md +504 -0
  82. package/presets/cursor/agents/architect.md +211 -0
  83. package/presets/cursor/agents/business-agent.md +44 -0
  84. package/presets/cursor/agents/complexity-auditor.md +76 -0
  85. package/presets/cursor/agents/continuous-architect.md +37 -0
  86. package/presets/cursor/agents/contract-builder.md +75 -0
  87. package/presets/cursor/agents/docs.md +181 -0
  88. package/presets/cursor/agents/goal-planner.md +71 -0
  89. package/presets/cursor/agents/impact-analyst.md +43 -0
  90. package/presets/cursor/agents/implementer.md +161 -0
  91. package/presets/cursor/agents/orchestrator.md +377 -0
  92. package/presets/cursor/agents/repo-explorer.md +100 -0
  93. package/presets/cursor/agents/reviewer.md +237 -0
  94. package/presets/cursor/agents/security-reviewer.md +113 -0
  95. package/presets/cursor/agents/task-coach.md +145 -0
  96. package/presets/cursor/agents/tester.md +241 -0
  97. package/presets/cursor/commands/cc/api-contract.md +70 -0
  98. package/presets/cursor/commands/cc/ask.md +55 -0
  99. package/presets/cursor/commands/cc/clarify.md +32 -0
  100. package/presets/cursor/commands/cc/council.md +87 -0
  101. package/presets/cursor/commands/cc/db-migration.md +71 -0
  102. package/presets/cursor/commands/cc/explore.md +36 -0
  103. package/presets/cursor/commands/cc/feature.md +137 -0
  104. package/presets/cursor/commands/cc/fix.md +148 -0
  105. package/presets/cursor/commands/cc/handoff.md +41 -0
  106. package/presets/cursor/commands/cc/iterative.md +133 -0
  107. package/presets/cursor/commands/cc/openspec.md +159 -0
  108. package/presets/cursor/commands/cc/pagespeed.md +115 -0
  109. package/presets/cursor/commands/cc/prototype.md +38 -0
  110. package/presets/cursor/commands/cc/refactor.md +160 -0
  111. package/presets/cursor/commands/cc/review.md +149 -0
  112. package/presets/cursor/commands/cc/scorecard.md +77 -0
  113. package/presets/cursor/commands/cc/tdd-cycle.md +250 -0
  114. package/presets/cursor/commands/cc/test-plan.md +150 -0
  115. package/presets/cursor/commands/cc/triage.md +34 -0
  116. package/presets/cursor/gates/pre-commit/GATE.md +136 -0
  117. package/presets/cursor/rules/behavioral-discipline.mdc +14 -0
  118. package/presets/cursor/rules/context-budget.mdc +12 -0
  119. package/presets/cursor/rules/orchestration.mdc +12 -0
  120. package/presets/cursor/rules/yagni-stdlib.mdc +11 -0
  121. package/presets/cursor/skills/android/SKILL.md +122 -0
  122. package/presets/cursor/skills/api-versioning/SKILL.md +394 -0
  123. package/presets/cursor/skills/astro/SKILL.md +322 -0
  124. package/presets/cursor/skills/auth-token-inspector/SKILL.md +33 -0
  125. package/presets/cursor/skills/code-review/SKILL.md +208 -0
  126. package/presets/cursor/skills/conductor-setup/SKILL.md +127 -0
  127. package/presets/cursor/skills/django-orm/SKILL.md +463 -0
  128. package/presets/cursor/skills/django-testing/SKILL.md +417 -0
  129. package/presets/cursor/skills/django-uv/SKILL.md +409 -0
  130. package/presets/cursor/skills/drizzle-schema-architect/SKILL.md +54 -0
  131. package/presets/cursor/skills/evaluation/SKILL.md +8 -0
  132. package/presets/cursor/skills/fastapi-pydantic-strict/SKILL.md +46 -0
  133. package/presets/cursor/skills/find-skills/SKILL.md +144 -0
  134. package/presets/cursor/skills/jpa-nplusone-detector/SKILL.md +49 -0
  135. package/presets/cursor/skills/jpa-postgres/SKILL.md +626 -0
  136. package/presets/cursor/skills/laravel-specialist/SKILL.md +267 -0
  137. package/presets/cursor/skills/laravel-specialist/references/eloquent.md +351 -0
  138. package/presets/cursor/skills/laravel-specialist/references/livewire.md +512 -0
  139. package/presets/cursor/skills/laravel-specialist/references/queues.md +423 -0
  140. package/presets/cursor/skills/laravel-specialist/references/routing.md +362 -0
  141. package/presets/cursor/skills/laravel-specialist/references/testing.md +522 -0
  142. package/presets/cursor/skills/livewire-alpine-bridge/SKILL.md +39 -0
  143. package/presets/cursor/skills/multi-agent-orchestration/README.md +144 -0
  144. package/presets/cursor/skills/multi-agent-orchestration/SKILL.md +579 -0
  145. package/presets/cursor/skills/multi-agent-orchestration/examples/framework_implementations.py +362 -0
  146. package/presets/cursor/skills/multi-agent-orchestration/examples/orchestration_patterns.py +411 -0
  147. package/presets/cursor/skills/multi-agent-orchestration/scripts/agent_communication.py +334 -0
  148. package/presets/cursor/skills/multi-agent-orchestration/scripts/benchmarking.py +341 -0
  149. package/presets/cursor/skills/multi-agent-orchestration/scripts/workflow_management.py +334 -0
  150. package/presets/cursor/skills/nextjs-typescript/SKILL.md +394 -0
  151. package/presets/cursor/skills/openspec/SKILL.md +52 -0
  152. package/presets/cursor/skills/pagespeed-insights/SKILL.md +445 -0
  153. package/presets/cursor/skills/pagespeed-insights/reference.md +50 -0
  154. package/presets/cursor/skills/pagespeed-perf/SKILL.md +281 -0
  155. package/presets/cursor/skills/php-pro/SKILL.md +210 -0
  156. package/presets/cursor/skills/php-pro/references/async-patterns.md +412 -0
  157. package/presets/cursor/skills/php-pro/references/laravel-patterns.md +377 -0
  158. package/presets/cursor/skills/php-pro/references/modern-php-features.md +323 -0
  159. package/presets/cursor/skills/php-pro/references/symfony-patterns.md +466 -0
  160. package/presets/cursor/skills/php-pro/references/testing-quality.md +466 -0
  161. package/presets/cursor/skills/python/SKILL.md +613 -0
  162. package/presets/cursor/skills/python-django-stack/SKILL.md +500 -0
  163. package/presets/cursor/skills/python-fastapi-stack/SKILL.md +464 -0
  164. package/presets/cursor/skills/security/SKILL.md +384 -0
  165. package/presets/cursor/skills/seo-analytics-injector/SKILL.md +44 -0
  166. package/presets/cursor/skills/spring-auth-auditor/SKILL.md +33 -0
  167. package/presets/cursor/skills/spring-boot-feature/SKILL.md +566 -0
  168. package/presets/cursor/skills/spring-boot-kotlin/SKILL.md +408 -0
  169. package/presets/cursor/skills/spring-boot-testing-strategy/SKILL.md +479 -0
  170. package/presets/cursor/skills/sqlalchemy/SKILL.md +473 -0
  171. package/presets/cursor/skills/tailwind-responsive-auditor/SKILL.md +32 -0
  172. package/presets/cursor/skills/tdd-mutation-tester/SKILL.md +28 -0
  173. package/presets/cursor/skills/testing-tdd/SKILL.md +592 -0
  174. package/presets/cursor/skills/workflow-orchestration-patterns/SKILL.md +98 -0
  175. package/presets/cursor/skills/workflow-orchestration-patterns/references/details.md +223 -0
  176. package/presets/opencode/agents/architect.md +22 -2
  177. package/presets/opencode/agents/complexity-auditor.md +16 -0
  178. package/presets/opencode/agents/contract-builder.md +109 -0
  179. package/presets/opencode/agents/devil.md +158 -0
  180. package/presets/opencode/agents/docs.md +19 -2
  181. package/presets/opencode/agents/goal-planner.md +112 -0
  182. package/presets/opencode/agents/implementer.md +39 -2
  183. package/presets/opencode/agents/orchestrator.md +124 -19
  184. package/presets/opencode/agents/planner.md +61 -0
  185. package/presets/opencode/agents/repo-explorer.md +15 -0
  186. package/presets/opencode/agents/reviewer.md +53 -2
  187. package/presets/opencode/agents/security-reviewer.md +159 -0
  188. package/presets/opencode/agents/task-coach.md +69 -2
  189. package/presets/opencode/agents/tester.md +18 -2
  190. package/presets/opencode/commands/cc-api-contract.md +12 -0
  191. package/presets/opencode/commands/cc-ask.md +55 -0
  192. package/presets/opencode/commands/cc-clarify.md +31 -0
  193. package/presets/opencode/commands/cc-council.md +87 -0
  194. package/presets/opencode/commands/cc-db-migration.md +22 -9
  195. package/presets/opencode/commands/cc-explore.md +35 -0
  196. package/presets/opencode/commands/cc-feature.md +41 -19
  197. package/presets/opencode/commands/cc-fix.md +50 -23
  198. package/presets/opencode/commands/cc-handoff.md +40 -0
  199. package/presets/opencode/commands/cc-iterative.md +127 -0
  200. package/presets/opencode/commands/cc-openspec.md +74 -0
  201. package/presets/opencode/commands/cc-pagespeed.md +12 -0
  202. package/presets/opencode/commands/cc-prototype.md +37 -0
  203. package/presets/opencode/commands/cc-refactor.md +12 -0
  204. package/presets/opencode/commands/cc-review.md +12 -0
  205. package/presets/opencode/commands/cc-scorecard.md +28 -0
  206. package/presets/opencode/commands/cc-tdd-cycle.md +24 -0
  207. package/presets/opencode/commands/cc-test-plan.md +12 -0
  208. package/presets/opencode/commands/cc-triage.md +33 -0
  209. package/presets/opencode/gates/pre-commit/GATE.md +136 -0
  210. package/presets/opencode/prompts/v0.1.0/DEPRECATED.md +11 -0
  211. package/presets/opencode/prompts/v0.2.0/DEPRECATED.md +11 -0
  212. package/presets/opencode/prompts/v0.3.0/DEPRECATED.md +11 -0
  213. package/presets/opencode/prompts/v0.4.0/DEPRECATED.md +11 -0
  214. package/presets/opencode/prompts/v0.5.0/architect.md +222 -0
  215. package/presets/opencode/prompts/v0.5.0/complexity-auditor.md +91 -0
  216. package/presets/opencode/prompts/v0.5.0/contract-builder.md +84 -0
  217. package/presets/opencode/prompts/v0.5.0/docs.md +190 -0
  218. package/presets/opencode/prompts/v0.5.0/goal-planner.md +80 -0
  219. package/presets/opencode/prompts/v0.5.0/implementer.md +171 -0
  220. package/presets/opencode/prompts/v0.5.0/orchestrator.md +388 -0
  221. package/presets/opencode/prompts/v0.5.0/repo-explorer.md +111 -0
  222. package/presets/opencode/prompts/v0.5.0/reviewer.md +248 -0
  223. package/presets/opencode/prompts/v0.5.0/security-reviewer.md +123 -0
  224. package/presets/opencode/prompts/v0.5.0/task-coach.md +156 -0
  225. package/presets/opencode/prompts/v0.5.0/tester.md +252 -0
  226. package/presets/opencode/prompts/v0.6.0/implementer.md +35 -0
  227. package/presets/opencode/prompts/v0.6.0/planner.md +36 -0
  228. package/presets/opencode/prompts/v0.6.0/reviewer.md +40 -0
  229. package/presets/opencode/prompts/v1.0.0/README.md +47 -0
  230. package/presets/opencode/prompts/v1.0.0/architect.md +259 -0
  231. package/presets/opencode/prompts/v1.0.0/complexity-auditor.md +116 -0
  232. package/presets/opencode/prompts/v1.0.0/contract-builder.md +120 -0
  233. package/presets/opencode/prompts/v1.0.0/devil.md +169 -0
  234. package/presets/opencode/prompts/v1.0.0/docs.md +229 -0
  235. package/presets/opencode/prompts/v1.0.0/goal-planner.md +123 -0
  236. package/presets/opencode/prompts/v1.0.0/implementer.md +228 -0
  237. package/presets/opencode/prompts/v1.0.0/orchestrator.md +474 -0
  238. package/presets/opencode/prompts/v1.0.0/planner.md +72 -0
  239. package/presets/opencode/prompts/v1.0.0/repo-explorer.md +147 -0
  240. package/presets/opencode/prompts/v1.0.0/reviewer.md +295 -0
  241. package/presets/opencode/prompts/v1.0.0/security-reviewer.md +170 -0
  242. package/presets/opencode/prompts/v1.0.0/task-coach.md +235 -0
  243. package/presets/opencode/prompts/v1.0.0/tester.md +298 -0
  244. package/presets/opencode/skills/evaluation/SKILL.md +6 -0
  245. package/presets/opencode/skills/openspec/SKILL.md +50 -0
  246. package/presets/seo-hotel/settings.json +0 -17
  247. package/presets/templates/BACKLOG.md +33 -0
  248. package/presets/templates/execution-profile.yml +6 -0
  249. package/presets/templates/model-comparison.md +11 -0
  250. package/presets/templates/regression-checklist.yml +10 -0
  251. package/src/presets/manifests/agy.yml +2 -2
  252. package/src/presets/manifests/claude.yml +2 -2
  253. package/src/presets/manifests/codex.yml +2 -2
  254. package/src/presets/manifests/cursor.yml +19 -3
  255. package/src/presets/manifests/gemini.yml +2 -2
  256. package/src/presets/manifests/opencode.yml +2 -2
  257. package/src/presets/models/agy.yml +97 -49
  258. package/src/presets/models/claude.yml +83 -39
  259. package/src/presets/models/codex.yml +83 -40
  260. package/src/presets/models/cursor.yml +83 -39
  261. package/src/presets/models/gemini.yml +83 -39
  262. package/src/presets/models/opencode.yml +78 -34
@@ -0,0 +1,322 @@
1
+ ---
2
+ id: astro
3
+ version: 1.0.0
4
+ name: Astro
5
+ description: >
6
+ Provides expert knowledge for building Astro 5+ sites with Islands Architecture, Content Collections, TypeScript, and performance-first rendering strategies.
7
+
8
+ user-invokable: true
9
+ license: MIT
10
+ metadata:
11
+ author: lgzarturo
12
+ category: frontend
13
+
14
+ compatibility:
15
+ tools: [claude, codex, gemini, agy, opencode]
16
+ stacks:
17
+ languages: []
18
+ frameworks: []
19
+
20
+ risk:
21
+ level: low
22
+ can_execute_shell: false
23
+ can_modify_files: true
24
+ requires_network: false
25
+
26
+ inputs: []
27
+
28
+ outputs: []
29
+
30
+ quality:
31
+ reviewed_by: codeconductor-core
32
+ version: 0.1.0
33
+ paths:
34
+ - "**/*.astro"
35
+ - "**/astro.config.*"
36
+ ---
37
+
38
+
39
+
40
+ # Astro
41
+
42
+ ## Islands Architecture
43
+
44
+ Astro renders everything to static HTML by default. JavaScript ships only for
45
+ components that explicitly opt in — these are called Islands.
46
+
47
+ ### Hydration Directives
48
+
49
+ | Directive | When JS loads | Use case |
50
+ |-----------|--------------|----------|
51
+ | `client:load` | On page load | Interactive above-the-fold UI |
52
+ | `client:idle` | When browser is idle | Non-critical interactive widgets |
53
+ | `client:visible` | When element enters viewport | Below-the-fold islands |
54
+ | `client:media` | When CSS media query matches | Responsive interactive components |
55
+ | `client:only` | Client-only, no SSR | Components that require the DOM (e.g., charting libs) |
56
+
57
+ ```astro
58
+ ---
59
+ import Counter from '../components/Counter.tsx';
60
+ import HeavyChart from '../components/HeavyChart.tsx';
61
+ import MobileNav from '../components/MobileNav.tsx';
62
+ ---
63
+
64
+ <!-- Hydrates immediately — user interacts right away -->
65
+ <Counter client:load />
66
+
67
+ <!-- Hydrates when scrolled into view — saves initial JS -->
68
+ <HeavyChart client:visible />
69
+
70
+ <!-- Only on mobile, only when query matches -->
71
+ <MobileNav client:media="(max-width: 768px)" />
72
+ ```
73
+
74
+ Rules:
75
+
76
+ - Default to no hydration directive — most UI does not need JavaScript
77
+ - `client:load` is the most expensive directive; use it sparingly
78
+ - `client:only` skips server rendering entirely — the component receives no
79
+ props from the server; pass all data via props or fetch inside the component
80
+ - Do not use `client:load` for components that could use `client:visible`
81
+
82
+ ### Framework Components Inside Astro
83
+
84
+ ```astro
85
+ ---
86
+ import ReactButton from './Button.tsx'; // React island
87
+ import VueWidget from './Widget.vue'; // Vue island
88
+ ---
89
+
90
+ <!-- Both can coexist on the same page -->
91
+ <ReactButton client:idle label="Click me" />
92
+ <VueWidget client:visible />
93
+ ```
94
+
95
+ Each framework ships its own runtime only when at least one island of that
96
+ framework is on the page.
97
+
98
+ ## Content Collections
99
+
100
+ Content Collections provide type-safe access to Markdown, MDX, and data files.
101
+ Define schemas in `src/content/config.ts`.
102
+
103
+ ### Schema Definition
104
+
105
+ ```typescript
106
+ // src/content/config.ts
107
+ import { defineCollection, z } from 'astro:content';
108
+
109
+ const blog = defineCollection({
110
+ type: 'content', // .md or .mdx files
111
+ schema: z.object({
112
+ title: z.string(),
113
+ description: z.string(),
114
+ pubDate: z.coerce.date(),
115
+ updatedDate: z.coerce.date().optional(),
116
+ author: z.string().default('Anonymous'),
117
+ tags: z.array(z.string()).default([]),
118
+ draft: z.boolean().default(false),
119
+ image: z.object({
120
+ src: z.string(),
121
+ alt: z.string(),
122
+ }).optional(),
123
+ }),
124
+ });
125
+
126
+ const docs = defineCollection({
127
+ type: 'content',
128
+ schema: z.object({
129
+ title: z.string(),
130
+ order: z.number(),
131
+ section: z.enum(['guide', 'reference', 'tutorial']),
132
+ }),
133
+ });
134
+
135
+ export const collections = { blog, docs };
136
+ ```
137
+
138
+ ### Querying Collections
139
+
140
+ ```astro
141
+ ---
142
+ import { getCollection, getEntry } from 'astro:content';
143
+
144
+ // All published posts, sorted by date
145
+ const posts = (await getCollection('blog', ({ data }) => !data.draft))
146
+ .sort((a, b) => b.data.pubDate.valueOf() - a.data.pubDate.valueOf());
147
+
148
+ // Single entry by slug
149
+ const post = await getEntry('blog', 'my-first-post');
150
+ const { Content } = await post.render();
151
+ ---
152
+
153
+ {posts.map(post => (
154
+ <article>
155
+ <h2><a href={`/blog/${post.slug}`}>{post.data.title}</a></h2>
156
+ <time>{post.data.pubDate.toLocaleDateString()}</time>
157
+ </article>
158
+ ))}
159
+ ```
160
+
161
+ ### Dynamic Routes from Collections
162
+
163
+ ```astro
164
+ ---
165
+ // src/pages/blog/[slug].astro
166
+ import { getCollection } from 'astro:content';
167
+
168
+ export async function getStaticPaths() {
169
+ const posts = await getCollection('blog');
170
+ return posts.map(post => ({
171
+ params: { slug: post.slug },
172
+ props: { post },
173
+ }));
174
+ }
175
+
176
+ const { post } = Astro.props;
177
+ const { Content, headings } = await post.render();
178
+ ---
179
+
180
+ <article>
181
+ <h1>{post.data.title}</h1>
182
+ <Content />
183
+ </article>
184
+ ```
185
+
186
+ ## Rendering Strategies
187
+
188
+ ### SSG (Static Site Generation) — default
189
+
190
+ Every page is pre-rendered at build time. Best for content that does not change
191
+ per request.
192
+
193
+ ```javascript
194
+ // astro.config.mjs — no output config needed; SSG is the default
195
+ export default defineConfig({
196
+ site: 'https://example.com',
197
+ });
198
+ ```
199
+
200
+ ### SSR (Server-Side Rendering)
201
+
202
+ Renders pages on each request. Required for: authenticated routes, personalized
203
+ content, live data.
204
+
205
+ ```javascript
206
+ // astro.config.mjs
207
+ import node from '@astrojs/node';
208
+
209
+ export default defineConfig({
210
+ output: 'server',
211
+ adapter: node({ mode: 'standalone' }),
212
+ });
213
+ ```
214
+
215
+ ### Hybrid Mode
216
+
217
+ Mix SSG and SSR on a per-page basis. Most pages are static; specific routes opt
218
+ into server rendering.
219
+
220
+ ```javascript
221
+ // astro.config.mjs
222
+ export default defineConfig({
223
+ output: 'hybrid',
224
+ adapter: node({ mode: 'standalone' }),
225
+ });
226
+ ```
227
+
228
+ ```astro
229
+ ---
230
+ // src/pages/dashboard.astro — this page is server-rendered
231
+ export const prerender = false;
232
+
233
+ // src/pages/about.astro — this page is statically generated (hybrid default)
234
+ export const prerender = true;
235
+ ---
236
+ ```
237
+
238
+ Use hybrid mode when: most content is static but a few routes need auth or
239
+ live data. Do not make everything `output: 'server'` — you lose the performance
240
+ benefits of static generation.
241
+
242
+ ## Image Optimization
243
+
244
+ Use the built-in `<Image>` and `<Picture>` components. Never use raw `<img>`
245
+ for local assets — you lose automatic optimization.
246
+
247
+ ```astro
248
+ ---
249
+ import { Image, Picture } from 'astro:assets';
250
+ import heroImage from '../assets/hero.png';
251
+ ---
252
+
253
+ <!-- Optimized single image -->
254
+ <Image
255
+ src={heroImage}
256
+ alt="Hero illustration"
257
+ width={800}
258
+ height={600}
259
+ format="webp"
260
+ quality={80}
261
+ />
262
+
263
+ <!-- Responsive with multiple formats -->
264
+ <Picture
265
+ src={heroImage}
266
+ formats={['avif', 'webp']}
267
+ alt="Hero illustration"
268
+ widths={[400, 800, 1200]}
269
+ sizes="(max-width: 800px) 100vw, 800px"
270
+ />
271
+ ```
272
+
273
+ Rules:
274
+
275
+ - Always provide `alt` — empty string is acceptable only for decorative images
276
+ - Prefer `avif` + `webp` fallback for best compression
277
+ - Use `widths` + `sizes` on above-the-fold images to serve the right size per
278
+ viewport
279
+ - Remote images require explicit `width` and `height` to prevent layout shift
280
+
281
+ ## Project Structure
282
+
283
+ ```text
284
+ src/
285
+ assets/ — images and static assets processed by Astro
286
+ components/ — .astro components (and framework islands)
287
+ content/
288
+ blog/ — .md and .mdx files
289
+ config.ts — collection schemas
290
+ layouts/ — page shell layouts
291
+ pages/ — file-based routing; every file is a route
292
+ styles/ — global CSS
293
+ astro.config.mjs
294
+ tsconfig.json
295
+ ```
296
+
297
+ Colocation rule: put framework island components (`.tsx`, `.vue`) in
298
+ `src/components/`. Do not scatter them in `src/pages/`.
299
+
300
+ ## TypeScript Conventions
301
+
302
+ ```json
303
+ // tsconfig.json — use the strict Astro preset
304
+ {
305
+ "extends": "astro/tsconfigs/strict"
306
+ }
307
+ ```
308
+
309
+ ```astro
310
+ ---
311
+ // Type props explicitly in the frontmatter
312
+ interface Props {
313
+ title: string;
314
+ description?: string;
315
+ tags: string[];
316
+ }
317
+
318
+ const { title, description = '', tags } = Astro.props;
319
+ ---
320
+ ```
321
+
322
+ Astro infers prop types from `interface Props` automatically. Do not use `any`.
@@ -0,0 +1,33 @@
1
+ ---
2
+ id: auth-token-inspector
3
+ version: 1.0.0
4
+ name: Auth Token Inspector
5
+ description: >
6
+ Audits token storage mechanisms to prevent XSS-based JWT theft.
7
+ user-invokable: true
8
+ license: MIT
9
+ metadata:
10
+ author: lgzarturo
11
+ category: security
12
+ compatibility:
13
+ tools: [claude, codex, gemini, agy, opencode]
14
+ stacks:
15
+ languages: [typescript, javascript, python, kotlin, java, php]
16
+ paths:
17
+ - "**/*.{ts,tsx,py,kt,php}"
18
+ ---
19
+ # Auth Token Inspector
20
+
21
+ ## Core Principles
22
+
23
+ 1. **Secure Storage**: JWTs or session tokens must NOT be stored in `localStorage` or `sessionStorage` due to vulnerability to Cross-Site Scripting (XSS).
24
+ 2. **HttpOnly Cookies**: Deliver tokens via `HttpOnly`, `Secure`, and `SameSite=Strict` (or `Lax`) cookies to protect them from client-side JS access.
25
+ 3. **Short Expiration**: Ensure access tokens have short expiration times, and implement secure, rotation-enabled refresh tokens stored in cookies.
26
+
27
+ ## Storage Comparison
28
+
29
+ | Storage Mode | Vulnerable to XSS | Vulnerable to CSRF | Recommended |
30
+ | :--- | :--- | :--- | :--- |
31
+ | **localStorage** | Yes (High Risk) | No | **NO** |
32
+ | **sessionStorage** | Yes (High Risk) | No | **NO** |
33
+ | **HttpOnly Cookie** | No (Secure) | Yes (Mitigated via SameSite/Tokens) | **YES** |
@@ -0,0 +1,208 @@
1
+ ---
2
+ id: code-review
3
+ version: 1.0.0
4
+ name: Code Review
5
+ description: >
6
+ Provides a structured framework for conducting thorough code reviews covering correctness, security, architecture alignment, performance, and technical debt.
7
+
8
+ user-invokable: true
9
+ license: MIT
10
+ metadata:
11
+ author: lgzarturo
12
+ category: review
13
+
14
+ compatibility:
15
+ tools: [claude, codex, gemini, agy, opencode]
16
+ stacks:
17
+ languages: []
18
+ frameworks: []
19
+
20
+ risk:
21
+ level: low
22
+ can_execute_shell: false
23
+ can_modify_files: true
24
+ requires_network: false
25
+
26
+ inputs: []
27
+
28
+ outputs: []
29
+
30
+ quality:
31
+ reviewed_by: codeconductor-core
32
+ version: 0.1.0
33
+ ---
34
+
35
+
36
+
37
+ # Code Review
38
+
39
+ ## Review Axes
40
+
41
+ Every finding must reference exactly one axis. This prevents vague feedback and
42
+ makes it actionable.
43
+
44
+ | Axis | What to check |
45
+ |------|--------------|
46
+ | **Correctness** | Does the logic handle all cases in the acceptance criteria? |
47
+ | **Security** | Injection vectors, secret exposure, auth bypasses, insecure defaults |
48
+ | **Architecture** | Does the code follow existing patterns and module boundaries? |
49
+ | **Performance** | N+1 queries, unnecessary allocations, blocking I/O in hot paths |
50
+ | **Error handling** | Are failure cases handled explicitly and safely? |
51
+ | **Test coverage** | Do tests verify the acceptance criteria, not just happy paths? |
52
+ | **Scope** | Are there changes outside the stated task boundary? |
53
+ | **Technical debt** | Does the implementation introduce debt without acknowledging it? |
54
+
55
+ ## Finding Categories
56
+
57
+ ### CRITICAL — must be resolved before merge
58
+
59
+ - Logic failures that violate acceptance criteria
60
+ - Security vulnerabilities (injection, auth bypass, secret exposure)
61
+ - Data loss or corruption risk
62
+ - Breaking changes to public API or shared contracts
63
+ - Missing error handling that causes silent failures
64
+
65
+ ### WARNING — should be resolved before merge
66
+
67
+ - Missing edge case coverage in tests
68
+ - Scope creep (changes outside the task boundary)
69
+ - Pattern inconsistency that will confuse future maintainers
70
+ - Performance issue that will degrade under load
71
+ - Missing input validation at system boundaries
72
+
73
+ ### SUGGESTION — optional improvement
74
+
75
+ - Naming clarity improvements
76
+ - Extracting a reusable abstraction
77
+ - Test readability
78
+ - Documentation gaps on non-obvious behavior
79
+
80
+ ## Review Report Format
81
+
82
+ ```markdown
83
+ ## Review Report
84
+
85
+ **Task**: [objective from task card]
86
+ **Verdict**: [approved | approved with warnings | blocked]
87
+
88
+ ---
89
+
90
+ ### CRITICAL
91
+
92
+ - [ ] [C1] `path/to/file:line` — [description]
93
+ Axis: [axis] | Evidence: `[quoted code]` | Required action: [what must change]
94
+
95
+ _(none)_ if no critical findings
96
+
97
+ ### WARNING
98
+
99
+ - [ ] [W1] `path/to/file:line` — [description]
100
+ Axis: [axis] | Recommended action: [what should change]
101
+
102
+ _(none)_ if no warning findings
103
+
104
+ ### SUGGESTION
105
+
106
+ - [ ] [S1] — [description] | Rationale: [brief reason]
107
+
108
+ _(none)_ if no suggestions
109
+
110
+ ### Summary
111
+
112
+ - Critical: [count] | Warning: [count] | Suggestion: [count]
113
+ - **Verdict justification**: [one sentence]
114
+ ```
115
+
116
+ **Verdict rules:**
117
+
118
+ - `blocked` — any CRITICAL finding present
119
+ - `approved with warnings` — no CRITICAL, at least one WARNING
120
+ - `approved` — no CRITICAL, no WARNING
121
+
122
+ ## What to Check — by Axis
123
+
124
+ ### Correctness
125
+
126
+ - Does every acceptance criterion have a corresponding code path?
127
+ - Are null/empty/zero values handled explicitly?
128
+ - Are boundary conditions checked (off-by-one, empty collections, max values)?
129
+ - Do conditional branches cover all cases (exhaustive when/switch)?
130
+
131
+ ### Security
132
+
133
+ ```text
134
+ Injection: SQL, command, LDAP, XML — is input sanitized or parameterized?
135
+ Auth: is the endpoint protected? are role checks correct?
136
+ Secrets: no hardcoded credentials, tokens, or keys in source
137
+ Headers: are security headers set (CSP, HSTS, X-Frame-Options)?
138
+ CORS: is the origin whitelist explicit, not wildcard?
139
+ Dependencies: are new dependencies from trusted sources?
140
+ ```
141
+
142
+ ### Performance
143
+
144
+ ```text
145
+ N+1 queries: does a loop call the database per iteration?
146
+ Eager loading: are JOINs or includes used where needed?
147
+ Pagination: are all list endpoints paginated?
148
+ Caching: is expensive computation cached at an appropriate layer?
149
+ Index: do new query filters have corresponding DB indexes?
150
+ ```
151
+
152
+ ### Error Handling
153
+
154
+ ```text
155
+ Are exceptions caught at the right layer (not swallowed silently)?
156
+ Is the error response format consistent with the rest of the API?
157
+ Is the original exception logged before translating to a user-facing error?
158
+ Are transient failures retried with backoff, or propagated immediately?
159
+ ```
160
+
161
+ ## What NOT to Flag
162
+
163
+ **Personal style preferences.** If the code follows the project's established
164
+ conventions, do not flag it because you would have written it differently.
165
+
166
+ **Trivial naming.** Variable names are a SUGGESTION at most, never a WARNING.
167
+ Do not block a PR over naming unless the name is genuinely misleading.
168
+
169
+ **Tests for trivial code.** Do not demand tests for getters, setters, or data
170
+ class construction. Test behavior, not boilerplate.
171
+
172
+ **Refactors not in scope.** If you notice an improvement opportunity outside
173
+ the task boundary, log it as a SUGGESTION. Do not block the PR for work that
174
+ was not requested.
175
+
176
+ **Framework defaults.** Do not second-guess framework conventions (Spring
177
+ dependency injection, Next.js file-based routing). Trust the framework.
178
+
179
+ ## Exact Diff Recommendations
180
+
181
+ When a finding requires a code change, provide the exact replacement:
182
+
183
+ ```text
184
+ # Current code (path/to/file:42)
185
+ val user = userRepository.findById(id)
186
+ return user.name // NPE if not found
187
+
188
+ # Recommended fix
189
+ val user = userRepository.findById(id)
190
+ ?: throw NotFoundException("User $id not found")
191
+ return user.name
192
+ ```
193
+
194
+ Vague instructions ("handle the null case") force the author to guess your
195
+ intent. Exact diffs remove ambiguity and speed up the review cycle.
196
+
197
+ ## Prioritization Order
198
+
199
+ When multiple findings exist, address them in this order:
200
+
201
+ 1. Security — security issues can silently compromise users or data
202
+ 2. Correctness — broken behavior defeats the purpose of the change
203
+ 3. Error handling — silent failures are hard to debug in production
204
+ 4. Test coverage — gaps mean regressions will be invisible
205
+ 5. Performance — degrade gradually; fix before it causes incidents
206
+ 6. Architecture — inconsistency compounds over time
207
+ 7. Technical debt — acknowledge and track; do not always block for it
208
+ 8. Suggestions — apply at author's discretion
@@ -0,0 +1,127 @@
1
+ ---
2
+ name: conductor-setup
3
+ description: Configure a Rails project to work with Conductor (parallel coding agents)
4
+ allowed-tools: Bash(chmod *), Bash(bundle *), Bash(npm *), Bash(script/server)
5
+ context: fork
6
+ risk: unknown
7
+ source: community
8
+ metadata:
9
+ author: Shpigford
10
+ version: "1.0"
11
+
12
+ disable-model-invocation: true
13
+ ---
14
+
15
+ Set up this Rails project for Conductor, the Mac app for parallel coding agents.
16
+
17
+ ## When to Use
18
+ - You need to configure a Rails project so it runs correctly inside Conductor workspaces.
19
+ - The project should support parallel coding agents with isolated ports, Redis settings, and shared secrets.
20
+ - You want the standard `conductor.json`, `bin/conductor-setup`, and `script/server` scaffolding for a Rails repo.
21
+
22
+ # What to Create
23
+
24
+ ## 1. conductor.json (project root)
25
+
26
+ Create `conductor.json` in the project root if it doesn't already exist:
27
+
28
+ ```json
29
+ {
30
+ "scripts": {
31
+ "setup": "bin/conductor-setup",
32
+ "run": "script/server"
33
+ }
34
+ }
35
+ ```
36
+
37
+ ## 2. bin/conductor-setup (executable)
38
+
39
+ Create `bin/conductor-setup` if it doesn't already exist:
40
+
41
+ ```bash
42
+ #!/bin/bash
43
+ set -e
44
+
45
+ # Symlink .env from repo root (where secrets live, outside worktrees)
46
+ [ -f "$CONDUCTOR_ROOT_PATH/.env" ] && ln -sf "$CONDUCTOR_ROOT_PATH/.env" .env
47
+
48
+ # Symlink Rails master key
49
+ [ -f "$CONDUCTOR_ROOT_PATH/config/master.key" ] && ln -sf "$CONDUCTOR_ROOT_PATH/config/master.key" config/master.key
50
+
51
+ # Install dependencies
52
+ bundle install
53
+ npm install
54
+ ```
55
+
56
+ Make it executable with `chmod +x bin/conductor-setup`.
57
+
58
+ ## 3. script/server (executable)
59
+
60
+ Create the `script` directory if needed, then create `script/server` if it doesn't already exist:
61
+
62
+ ```bash
63
+ #!/bin/bash
64
+
65
+ # === Port Configuration ===
66
+ export PORT=${CONDUCTOR_PORT:-3000}
67
+ export VITE_RUBY_PORT=$((PORT + 1000))
68
+
69
+ # === Redis Isolation ===
70
+ if [ -n "$CONDUCTOR_WORKSPACE_NAME" ]; then
71
+ HASH=$(printf '%s' "$CONDUCTOR_WORKSPACE_NAME" | cksum | cut -d' ' -f1)
72
+ REDIS_DB=$((HASH % 16))
73
+ export REDIS_URL="redis://localhost:6379/${REDIS_DB}"
74
+ fi
75
+
76
+ exec bin/dev
77
+ ```
78
+
79
+ Make it executable with `chmod +x script/server`.
80
+
81
+ ## 4. Update Rails Config Files
82
+
83
+ For each of the following files, if they exist and contain Redis configuration, update them to use `ENV.fetch('REDIS_URL', ...)` or `ENV['REDIS_URL']` with a fallback:
84
+
85
+ ### config/initializers/sidekiq.rb
86
+ If this file exists and configures Redis, update it to use:
87
+ ```ruby
88
+ redis_url = ENV.fetch('REDIS_URL', 'redis://localhost:6379/0')
89
+ ```
90
+
91
+ ### config/cable.yml
92
+ If this file exists, update the development adapter to use:
93
+ ```yaml
94
+ development:
95
+ adapter: redis
96
+ url: <%= ENV.fetch('REDIS_URL', 'redis://localhost:6379/1') %>
97
+ ```
98
+
99
+ ### config/environments/development.rb
100
+ If this file configures Redis for caching, update to use:
101
+ ```ruby
102
+ config.cache_store = :redis_cache_store, { url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0') }
103
+ ```
104
+
105
+ ### config/initializers/rack_attack.rb
106
+ If this file exists and configures a Redis cache store, update to use:
107
+ ```ruby
108
+ Rack::Attack.cache.store = ActiveSupport::Cache::RedisCacheStore.new(url: ENV.fetch('REDIS_URL', 'redis://localhost:6379/0'))
109
+ ```
110
+
111
+ # Implementation Notes
112
+
113
+ - **Don't overwrite existing files**: Check if conductor.json, bin/conductor-setup, and script/server exist before creating them. If they exist, skip creation and inform the user.
114
+ - **Rails config updates**: Only modify Redis-related configuration. If a file doesn't exist or doesn't use Redis, skip it gracefully.
115
+ - **Create directories as needed**: Create `script/` directory if it doesn't exist.
116
+
117
+ # Verification
118
+
119
+ After creating the files:
120
+ 1. Confirm all Conductor files exist and scripts are executable
121
+ 2. Run `script/server` to verify it starts without errors
122
+ 3. Check that Rails configs properly reference `ENV['REDIS_URL']` or `ENV.fetch('REDIS_URL', ...)`
123
+
124
+ ## Limitations
125
+ - Use this skill only when the task clearly matches the scope described above.
126
+ - Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
127
+ - Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.