@devran-ai/kit 4.1.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 (231) hide show
  1. package/.agent/CheatSheet.md +350 -0
  2. package/.agent/README.md +76 -0
  3. package/.agent/agents/README.md +155 -0
  4. package/.agent/agents/architect.md +185 -0
  5. package/.agent/agents/backend-specialist.md +276 -0
  6. package/.agent/agents/build-error-resolver.md +207 -0
  7. package/.agent/agents/code-reviewer.md +162 -0
  8. package/.agent/agents/database-architect.md +138 -0
  9. package/.agent/agents/devops-engineer.md +144 -0
  10. package/.agent/agents/doc-updater.md +229 -0
  11. package/.agent/agents/e2e-runner.md +145 -0
  12. package/.agent/agents/explorer-agent.md +143 -0
  13. package/.agent/agents/frontend-specialist.md +144 -0
  14. package/.agent/agents/go-reviewer.md +128 -0
  15. package/.agent/agents/knowledge-agent.md +197 -0
  16. package/.agent/agents/mobile-developer.md +150 -0
  17. package/.agent/agents/performance-optimizer.md +175 -0
  18. package/.agent/agents/planner.md +133 -0
  19. package/.agent/agents/pr-reviewer.md +148 -0
  20. package/.agent/agents/python-reviewer.md +123 -0
  21. package/.agent/agents/refactor-cleaner.md +201 -0
  22. package/.agent/agents/reliability-engineer.md +156 -0
  23. package/.agent/agents/security-reviewer.md +141 -0
  24. package/.agent/agents/sprint-orchestrator.md +124 -0
  25. package/.agent/agents/tdd-guide.md +179 -0
  26. package/.agent/agents/typescript-reviewer.md +110 -0
  27. package/.agent/checklists/README.md +102 -0
  28. package/.agent/checklists/pre-commit.md +93 -0
  29. package/.agent/checklists/session-end.md +99 -0
  30. package/.agent/checklists/session-start.md +102 -0
  31. package/.agent/checklists/task-complete.md +81 -0
  32. package/.agent/commands/README.md +130 -0
  33. package/.agent/commands/adr.md +29 -0
  34. package/.agent/commands/ask.md +28 -0
  35. package/.agent/commands/build.md +30 -0
  36. package/.agent/commands/changelog.md +40 -0
  37. package/.agent/commands/checkpoint.md +28 -0
  38. package/.agent/commands/code-review.md +65 -0
  39. package/.agent/commands/compact.md +28 -0
  40. package/.agent/commands/cook.md +30 -0
  41. package/.agent/commands/db.md +30 -0
  42. package/.agent/commands/debug.md +31 -0
  43. package/.agent/commands/deploy.md +37 -0
  44. package/.agent/commands/design.md +29 -0
  45. package/.agent/commands/doc.md +30 -0
  46. package/.agent/commands/eval.md +30 -0
  47. package/.agent/commands/fix.md +32 -0
  48. package/.agent/commands/git.md +32 -0
  49. package/.agent/commands/help.md +273 -0
  50. package/.agent/commands/implement.md +30 -0
  51. package/.agent/commands/integrate.md +32 -0
  52. package/.agent/commands/learn.md +29 -0
  53. package/.agent/commands/perf.md +31 -0
  54. package/.agent/commands/plan.md +56 -0
  55. package/.agent/commands/pr-describe.md +65 -0
  56. package/.agent/commands/pr-fix.md +45 -0
  57. package/.agent/commands/pr-merge.md +45 -0
  58. package/.agent/commands/pr-review.md +50 -0
  59. package/.agent/commands/pr-split.md +54 -0
  60. package/.agent/commands/pr-status.md +56 -0
  61. package/.agent/commands/pr.md +58 -0
  62. package/.agent/commands/refactor.md +32 -0
  63. package/.agent/commands/research.md +28 -0
  64. package/.agent/commands/scout.md +30 -0
  65. package/.agent/commands/security-scan.md +33 -0
  66. package/.agent/commands/setup.md +31 -0
  67. package/.agent/commands/status.md +59 -0
  68. package/.agent/commands/tdd.md +73 -0
  69. package/.agent/commands/verify.md +58 -0
  70. package/.agent/contexts/brainstorm.md +26 -0
  71. package/.agent/contexts/debug.md +28 -0
  72. package/.agent/contexts/implement.md +29 -0
  73. package/.agent/contexts/plan-quality-log.md +30 -0
  74. package/.agent/contexts/review.md +27 -0
  75. package/.agent/contexts/ship.md +28 -0
  76. package/.agent/decisions/001-trust-grade-governance.md +46 -0
  77. package/.agent/decisions/002-cross-ide-generation.md +15 -0
  78. package/.agent/engine/identity.json +4 -0
  79. package/.agent/engine/loading-rules.json +193 -0
  80. package/.agent/engine/marketplace-index.json +29 -0
  81. package/.agent/engine/mcp-servers/filesystem.json +9 -0
  82. package/.agent/engine/mcp-servers/github.json +11 -0
  83. package/.agent/engine/mcp-servers/postgres.json +11 -0
  84. package/.agent/engine/mcp-servers/supabase.json +11 -0
  85. package/.agent/engine/mcp-servers/vercel.json +11 -0
  86. package/.agent/engine/reliability-config.json +14 -0
  87. package/.agent/engine/sdlc-map.json +50 -0
  88. package/.agent/engine/workflow-state.json +167 -0
  89. package/.agent/hooks/README.md +101 -0
  90. package/.agent/hooks/hooks.json +104 -0
  91. package/.agent/hooks/templates/session-end.md +110 -0
  92. package/.agent/hooks/templates/session-start.md +95 -0
  93. package/.agent/manifest.json +466 -0
  94. package/.agent/rules/agent-upgrade-policy.md +56 -0
  95. package/.agent/rules/architecture.md +111 -0
  96. package/.agent/rules/coding-style.md +75 -0
  97. package/.agent/rules/documentation.md +74 -0
  98. package/.agent/rules/git-workflow.md +140 -0
  99. package/.agent/rules/quality-gate.md +117 -0
  100. package/.agent/rules/security.md +67 -0
  101. package/.agent/rules/sprint-tracking.md +103 -0
  102. package/.agent/rules/testing.md +80 -0
  103. package/.agent/rules/workflow-standards.md +30 -0
  104. package/.agent/rules.md +293 -0
  105. package/.agent/session-context.md +69 -0
  106. package/.agent/session-state.json +27 -0
  107. package/.agent/skills/README.md +135 -0
  108. package/.agent/skills/api-patterns/SKILL.md +117 -0
  109. package/.agent/skills/app-builder/SKILL.md +202 -0
  110. package/.agent/skills/architecture/SKILL.md +101 -0
  111. package/.agent/skills/behavioral-modes/SKILL.md +295 -0
  112. package/.agent/skills/brainstorming/SKILL.md +156 -0
  113. package/.agent/skills/clean-code/SKILL.md +142 -0
  114. package/.agent/skills/context-budget/SKILL.md +78 -0
  115. package/.agent/skills/continuous-learning/SKILL.md +145 -0
  116. package/.agent/skills/database-design/SKILL.md +303 -0
  117. package/.agent/skills/debugging-strategies/SKILL.md +158 -0
  118. package/.agent/skills/deployment-procedures/SKILL.md +191 -0
  119. package/.agent/skills/docker-patterns/SKILL.md +161 -0
  120. package/.agent/skills/eval-harness/SKILL.md +89 -0
  121. package/.agent/skills/frontend-patterns/SKILL.md +141 -0
  122. package/.agent/skills/git-workflow/SKILL.md +159 -0
  123. package/.agent/skills/i18n-localization/SKILL.md +191 -0
  124. package/.agent/skills/intelligent-routing/SKILL.md +180 -0
  125. package/.agent/skills/mcp-integration/SKILL.md +240 -0
  126. package/.agent/skills/mobile-design/SKILL.md +191 -0
  127. package/.agent/skills/nodejs-patterns/SKILL.md +164 -0
  128. package/.agent/skills/parallel-agents/SKILL.md +200 -0
  129. package/.agent/skills/performance-profiling/SKILL.md +134 -0
  130. package/.agent/skills/plan-validation/SKILL.md +192 -0
  131. package/.agent/skills/plan-writing/SKILL.md +183 -0
  132. package/.agent/skills/plan-writing/domain-enhancers.md +184 -0
  133. package/.agent/skills/plan-writing/plan-retrospective.md +116 -0
  134. package/.agent/skills/plan-writing/plan-schema.md +119 -0
  135. package/.agent/skills/pr-toolkit/SKILL.md +174 -0
  136. package/.agent/skills/production-readiness/SKILL.md +126 -0
  137. package/.agent/skills/security-practices/SKILL.md +109 -0
  138. package/.agent/skills/shell-conventions/SKILL.md +92 -0
  139. package/.agent/skills/strategic-compact/SKILL.md +62 -0
  140. package/.agent/skills/testing-patterns/SKILL.md +141 -0
  141. package/.agent/skills/typescript-expert/SKILL.md +160 -0
  142. package/.agent/skills/ui-ux-pro-max/SKILL.md +137 -0
  143. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  144. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  145. package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
  146. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  147. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  148. package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  149. package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  150. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  151. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  152. package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  153. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  154. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  155. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  156. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  157. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  158. package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  159. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  160. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  161. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  162. package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
  163. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  164. package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  165. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  166. package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  167. package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
  168. package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  169. package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
  170. package/.agent/skills/verification-loop/SKILL.md +89 -0
  171. package/.agent/skills/webapp-testing/SKILL.md +175 -0
  172. package/.agent/templates/adr-template.md +32 -0
  173. package/.agent/templates/bug-report.md +37 -0
  174. package/.agent/templates/feature-request.md +32 -0
  175. package/.agent/workflows/README.md +101 -0
  176. package/.agent/workflows/brainstorm.md +86 -0
  177. package/.agent/workflows/create.md +85 -0
  178. package/.agent/workflows/debug.md +83 -0
  179. package/.agent/workflows/deploy.md +114 -0
  180. package/.agent/workflows/enhance.md +85 -0
  181. package/.agent/workflows/orchestrate.md +106 -0
  182. package/.agent/workflows/plan.md +105 -0
  183. package/.agent/workflows/pr-fix.md +163 -0
  184. package/.agent/workflows/pr-merge.md +117 -0
  185. package/.agent/workflows/pr-review.md +178 -0
  186. package/.agent/workflows/pr-split.md +118 -0
  187. package/.agent/workflows/pr.md +184 -0
  188. package/.agent/workflows/preflight.md +107 -0
  189. package/.agent/workflows/preview.md +95 -0
  190. package/.agent/workflows/quality-gate.md +103 -0
  191. package/.agent/workflows/retrospective.md +100 -0
  192. package/.agent/workflows/review.md +104 -0
  193. package/.agent/workflows/status.md +89 -0
  194. package/.agent/workflows/test.md +98 -0
  195. package/.agent/workflows/ui-ux-pro-max.md +93 -0
  196. package/.agent/workflows/upgrade.md +97 -0
  197. package/LICENSE +21 -0
  198. package/README.md +218 -0
  199. package/bin/kit.js +773 -0
  200. package/lib/agent-registry.js +228 -0
  201. package/lib/agent-reputation.js +343 -0
  202. package/lib/circuit-breaker.js +195 -0
  203. package/lib/cli-commands.js +322 -0
  204. package/lib/config-validator.js +274 -0
  205. package/lib/conflict-detector.js +252 -0
  206. package/lib/constants.js +47 -0
  207. package/lib/engineering-manager.js +336 -0
  208. package/lib/error-budget.js +370 -0
  209. package/lib/hook-system.js +256 -0
  210. package/lib/ide-generator.js +434 -0
  211. package/lib/identity.js +240 -0
  212. package/lib/io.js +146 -0
  213. package/lib/learning-engine.js +163 -0
  214. package/lib/loading-engine.js +421 -0
  215. package/lib/logger.js +118 -0
  216. package/lib/marketplace.js +321 -0
  217. package/lib/plugin-system.js +604 -0
  218. package/lib/plugin-verifier.js +197 -0
  219. package/lib/rate-limiter.js +113 -0
  220. package/lib/security-scanner.js +312 -0
  221. package/lib/self-healing.js +468 -0
  222. package/lib/session-manager.js +264 -0
  223. package/lib/skill-sandbox.js +244 -0
  224. package/lib/task-governance.js +522 -0
  225. package/lib/task-model.js +332 -0
  226. package/lib/updater.js +240 -0
  227. package/lib/verify.js +279 -0
  228. package/lib/workflow-engine.js +373 -0
  229. package/lib/workflow-events.js +166 -0
  230. package/lib/workflow-persistence.js +160 -0
  231. package/package.json +57 -0
@@ -0,0 +1,119 @@
1
+ # Plan Quality Schema
2
+
3
+ > Defines the mandatory structure and scoring rubric for implementation plans.
4
+ > Every plan produced by the `/plan` workflow MUST satisfy this schema.
5
+
6
+ ---
7
+
8
+ ## Task Size Classification
9
+
10
+ Before applying the schema, classify the task:
11
+
12
+ | Size | Criteria | Required Tiers |
13
+ |------|----------|----------------|
14
+ | **Trivial** | 1-2 files, <30 minutes estimated effort | Tier 1 only |
15
+ | **Medium** | 3-10 files, 1-4 hours estimated effort | Tier 1 + Tier 2 |
16
+ | **Large** | 10+ files, multi-day effort | Tier 1 + Tier 2 + architect consultation |
17
+
18
+ ---
19
+
20
+ ## Tier 1 — Always Required
21
+
22
+ Every plan, regardless of task size, MUST include these sections:
23
+
24
+ | # | Section | Description | Points |
25
+ |---|---------|-------------|--------|
26
+ | 1 | **Context & Problem Statement** | Why this change is needed. 2-3 sentences covering the problem, impact, and motivation. | 10 |
27
+ | 2 | **Goals & Non-Goals** | What the plan achieves (goals) and what is explicitly out of scope (non-goals). Prevents scope creep. | 10 |
28
+ | 3 | **Implementation Steps** | Ordered tasks with exact file paths, specific actions, and verification criteria per step. | 10 |
29
+ | 4 | **Testing Strategy** | Test types required (unit, integration, e2e), coverage targets, key test cases. Reference `.agent/rules/testing.md`. | 10 |
30
+ | 5 | **Security Considerations** | Applicable security requirements from `.agent/rules/security.md`. If genuinely not applicable, state `N/A — [one-line justification]`. | 10 |
31
+ | 6 | **Risks & Mitigations** | At least 1 risk with severity (Low/Medium/High) and concrete mitigation strategy. | 5 |
32
+ | 7 | **Success Criteria** | Measurable definition of done. Checkboxes with specific, verifiable outcomes. | 5 |
33
+
34
+ **Tier 1 Maximum: 60 points**
35
+
36
+ ---
37
+
38
+ ## Tier 2 — Required for Medium & Large Tasks
39
+
40
+ Plans for tasks affecting 3+ files or requiring 1+ hours MUST also include:
41
+
42
+ | # | Section | Description | Points |
43
+ |---|---------|-------------|--------|
44
+ | 8 | **Architecture Impact** | Affected components/modules, integration points, dependency changes. Include component diagram for Large tasks. | 4 |
45
+ | 9 | **API / Data Model Changes** | New or modified endpoints, request/response schemas, database schema changes. | 3 |
46
+ | 10 | **Rollback Strategy** | How to undo the change if deployment fails or defects are discovered post-release. | 3 |
47
+ | 11 | **Observability** | Logging additions, metrics to track, alerting changes, monitoring dashboards affected. | 2 |
48
+ | 12 | **Performance Impact** | Bundle size changes, query performance, latency estimates, memory usage. | 2 |
49
+ | 13 | **Documentation Updates** | Which docs need changing (ROADMAP, CHANGELOG, README, API docs, ADRs). Reference `.agent/rules/documentation.md`. | 2 |
50
+ | 14 | **Dependencies** | What blocks this work (prerequisites). What depends on this work (downstream impact). | 2 |
51
+ | 15 | **Alternatives Considered** | At least 1 rejected approach with reasoning for why the chosen approach is superior. | 2 |
52
+
53
+ **Tier 2 Maximum: 20 points (added to Tier 1)**
54
+
55
+ ---
56
+
57
+ ## Domain Enhancement Scoring
58
+
59
+ When the loading engine matches specific domains (e.g., frontend, backend, security), the corresponding domain enhancer sections from `domain-enhancers.md` MUST be included. Domain sections are scored as **bonus points** on top of the tier maximum:
60
+
61
+ | Condition | Scoring Impact |
62
+ |-----------|---------------|
63
+ | Domain matched and enhancer section present + substantive | +2 bonus points per domain |
64
+ | Domain matched but enhancer section missing | -2 penalty per missing domain (deducted from tier score) |
65
+ | Domain matched with "N/A — [valid reason]" | No bonus, no penalty |
66
+ | No domains matched | No impact |
67
+
68
+ **Maximum domain bonus**: +6 points (3 domains × 2 points each).
69
+
70
+ Domain scoring does NOT change the pass threshold — it provides additional quality signal. A plan can PASS without domain bonuses but will be penalized if matched domains are ignored.
71
+
72
+ ---
73
+
74
+ ## Scoring
75
+
76
+ | Task Size | Max Score | Pass Threshold (70%) |
77
+ |-----------|-----------|---------------------|
78
+ | Trivial | 60 | 42 |
79
+ | Medium | 80 | 56 |
80
+ | Large | 100 | 70 |
81
+
82
+ **Score Calculation**:
83
+ - A section earns full points when present and substantively populated
84
+ - A section earns zero points when missing or contains only placeholder text
85
+ - "N/A" with a valid justification counts as populated (earns full points)
86
+
87
+ **Verdict**:
88
+ - **PASS**: Score >= 70% of tier maximum
89
+ - **REVISE**: Score < 70% — identify missing sections and revise (max 2 revision cycles)
90
+
91
+ ---
92
+
93
+ ## Cross-Cutting Mandate
94
+
95
+ Regardless of task domain, these sections MUST be substantively addressed in every plan:
96
+
97
+ 1. **Security Considerations** (Tier 1, #5) — Reference `.agent/rules/security.md`
98
+ 2. **Testing Strategy** (Tier 1, #4) — Reference `.agent/rules/testing.md`
99
+ 3. **Documentation Updates** (Tier 2, #13) — Reference `.agent/rules/documentation.md`
100
+
101
+ If a cross-cutting section is genuinely not applicable, the plan MUST state:
102
+ ```
103
+ N/A — [specific reason this concern does not apply to this task]
104
+ ```
105
+
106
+ **NEVER silently omit a cross-cutting section.** Silent omission is a plan defect.
107
+
108
+ ---
109
+
110
+ ## Alignment Verification
111
+
112
+ Every plan MUST include an alignment check against operating constraints:
113
+
114
+ | Check | Question |
115
+ |-------|----------|
116
+ | Operating Constraints | Does this respect Trust > Optimization? |
117
+ | Existing Patterns | Does this follow project conventions? |
118
+ | Rules Consulted | Which rule files were reviewed? |
119
+ | Coding Style | Does this comply with `.agent/rules/coding-style.md`? |
@@ -0,0 +1,174 @@
1
+ ---
2
+ name: pr-toolkit
3
+ description: Pull request lifecycle domain knowledge — branch strategy detection, PR size classification, confidence-scored review, git-aware context, PR analytics, dependency management, and split/merge/describe operations.
4
+ version: 2.0.0
5
+ triggers: [pr, pull-request, review, merge, branch, code-review]
6
+ allowed-tools: Read, Grep, Bash
7
+ ---
8
+
9
+ # PR Toolkit Skill
10
+
11
+ > **Purpose**: Domain knowledge for complete PR lifecycle — creation, review, remediation, merge, split, describe, analytics, and dependency management.
12
+
13
+ ---
14
+
15
+ ## 1. Branch Strategy Detection
16
+
17
+ Detect branching model before any PR operation.
18
+
19
+ ```bash
20
+ git branch -r | grep -E 'origin/(dev|develop)$'
21
+ git branch -r | grep -E 'origin/release/'
22
+ ```
23
+
24
+ | Indicator | Strategy |
25
+ |:---|:---|
26
+ | `dev`/`develop` exists | GitFlow — features merge to dev, dev merges to main at release |
27
+ | Only `main`/`master` | Trunk-Based — short-lived branches merge to main |
28
+ | `release/*` branches | GitFlow (full) with release branch phase |
29
+
30
+ ### GitFlow Target Validation
31
+
32
+ | Source | Valid Target | Invalid → Action |
33
+ |:---|:---|:---|
34
+ | `feature/*`, `bugfix/*`, `chore/*`, `docs/*` | `dev`/`develop` | `main` → **BLOCK**, redirect to dev |
35
+ | `hotfix/*` | `main`/`master` | Proceed (emergency) |
36
+ | `release/*`, `dev` | `main`/`master` | Proceed |
37
+
38
+ Trunk-based: any short-lived branch → `main`/`master`.
39
+
40
+ ---
41
+
42
+ ## 2. PR Size Classification
43
+
44
+ | Label | Files | Lines | Review Time | Action |
45
+ |:---|:---|:---|:---|:---|
46
+ | **XS** | 1-5 | <100 | <15 min | Fast-track |
47
+ | **S** | 6-15 | 100-300 | 15-30 min | Standard |
48
+ | **M** | 16-30 | 300-700 | 30-60 min | Thorough |
49
+ | **L** | 31-50 | 700-1500 | 1-2 hrs | Consider splitting |
50
+ | **XL** | 50+ | 1500+ | 2+ hrs | **MUST split** — block |
51
+
52
+ ### Scope Coherence
53
+
54
+ A PR must relate to ONE logical change. Violations (mixed feature+tooling, mixed feature+deps, multiple unrelated features) → split into focused PRs by type (`feat:`, `chore:`, `chore(deps):`, `docs:`).
55
+
56
+ ---
57
+
58
+ ## 3. Title Format
59
+
60
+ Format: `type(scope): description` — conventional commits, lowercase, imperative mood, no period, <72 chars.
61
+
62
+ **Branch parsing**: `feature/ABC-123-add-user-auth` → strip type prefix (`feature/`→`feat`) → strip ticket (`ABC-123-`) → first segment as scope → remaining as description → `feat(user): add user auth`. Fallback: first commit subject.
63
+
64
+ ---
65
+
66
+ ## 4. Review Framework
67
+
68
+ ### 6 Perspectives (sequential)
69
+
70
+ 1. **PR Hygiene**: title, body, size, scope coherence
71
+ 2. **Branch Strategy**: correct target, naming convention
72
+ 3. **Code Quality**: functions <50 lines, files <800, no deep nesting, error handling
73
+ 4. **Security**: secrets, input validation, injection, XSS, auth
74
+ 5. **Testing**: new code has tests, edge cases, coverage maintained
75
+ 6. **Architecture**: follows patterns, SOLID, clean dependencies
76
+
77
+ ### Severity Levels
78
+
79
+ | Severity | Blocks Merge? |
80
+ |:---|:---|
81
+ | **CRITICAL** :red_circle: | Yes — security, data loss, crash |
82
+ | **HIGH** :orange_circle: | Yes if 3+ — broken functionality |
83
+ | **MEDIUM** :yellow_circle: | No — improvement suggestion |
84
+ | **LOW** :blue_circle: | No — optional improvement |
85
+ | **NIT** :white_circle: | No — style preference |
86
+
87
+ **Verdict**: 0 CRITICAL + 0 HIGH → APPROVE | 0 CRITICAL + 1-2 HIGH → COMMENT | Any CRITICAL or 3+ HIGH → REQUEST_CHANGES
88
+
89
+ ---
90
+
91
+ ## 5. Fix Prioritization
92
+
93
+ Priority: CRITICAL → HIGH → MEDIUM → LOW/NIT. Commit convention: `fix(review): address <finding>` or squash to `fix(review): address PR #N review findings`.
94
+
95
+ After each fix: run affected tests, verify concern addressed. After all fixes: run full review pipeline, push, re-request review, summarize changes on PR.
96
+
97
+ ---
98
+
99
+ ## 6. PR Body Checklist
100
+
101
+ Required: Summary (1-3 sentences), Changes (categorized list), Test Plan, Checklist. When applicable: Breaking Changes, Related Issues (`Closes #N`), Screenshots (UI changes).
102
+
103
+ ---
104
+
105
+ ## 7. Repository Health Signals
106
+
107
+ Check: branch protection rules, PR template (`.github/pull_request_template.md`), CODEOWNERS, CI pipeline, auto-delete branches, default branch alignment.
108
+
109
+ ---
110
+
111
+ ## 8. Confidence Scoring
112
+
113
+ Every finding gets confidence 0-100. Default threshold: 70 (High+Certain). `--strict`: 50. `--relaxed`: 90.
114
+
115
+ | Score | Label | Action |
116
+ |:---|:---|:---|
117
+ | 90-100 | Certain | Always report |
118
+ | 70-89 | High | Report (default threshold) |
119
+ | 50-69 | Moderate | Suppress by default |
120
+ | 0-49 | Low/Noise | Suppress |
121
+
122
+ **Adjustments**: +30 OWASP match, +20 PR-introduced code, +15 file:line evidence, -15 existing codebase pattern, -20 style-only, -25 test/generated code.
123
+
124
+ ---
125
+
126
+ ## 9. PR Analytics
127
+
128
+ Core metrics: Coding Time (<2d), Pickup Time (<4h), Review Time (<24h), Cycle Time (<3d), Merge Frequency (3-5/dev/week), Review Rounds (<2), PR Size median (100-300 LOC).
129
+
130
+ DORA alignment: Deployment Frequency ↔ merge frequency, Lead Time ↔ cycle time, Change Failure Rate ↔ revert rate, MTTR ↔ hotfix cycle time.
131
+
132
+ Staleness: <3d fresh, 3-7d aging (nudge), 7-14d stale (escalate), 14d+ abandoned (consider close).
133
+
134
+ ---
135
+
136
+ ## 10. Dependency Management
137
+
138
+ `Depends-On: #42` in PR body. Rules: block merge on unmerged deps, cross-repo support, cycle detection (block both), transitive deps.
139
+
140
+ ---
141
+
142
+ ## 11. Split Strategy
143
+
144
+ | Category | Detection | Sub-PR Type |
145
+ |:---|:---|:---|
146
+ | Feature code | `src/`, `lib/`, `app/` | `feat:` |
147
+ | Tests | `tests/`, `*.test.*` | `test:` |
148
+ | Config | `.agent/`, `.github/`, config | `chore:` |
149
+ | Dependencies | `package.json`, lockfiles | `chore(deps):` |
150
+ | Docs | `*.md`, `docs/` | `docs:` |
151
+ | Styling | CSS/SCSS, themes | `style:` |
152
+ | Infrastructure | Dockerfile, CI, terraform | `ci:`/`chore:` |
153
+
154
+ Merge order: deps → config → feature → tests → docs.
155
+
156
+ ---
157
+
158
+ ## 12. Auto-Description
159
+
160
+ Algorithm: title from branch (section 3) or commits → summary from commit aggregation → changes grouped by type → labels from file patterns → related issues from commit messages.
161
+
162
+ Label mapping: `src/`→feature/bugfix, `tests/`→testing, `docs/`→documentation, CSS→styling, `.github/`→infrastructure, `package.json`→dependencies. Size labels: XS/S/M/L/XL per section 2.
163
+
164
+ ---
165
+
166
+ ## 13. Reviewer Comment Engagement
167
+
168
+ Fetch from all 3 GitHub endpoints: `/pulls/{n}/reviews`, `/pulls/{n}/comments`, `/issues/{n}/comments`.
169
+
170
+ Bots: `gemini-code-assist` (priority labels + suggested changes), `coderabbitai` (severity badges), `github-actions[bot]` (CI results), `sonarcloud[bot]` (quality gates), `dependabot[bot]` (CVEs).
171
+
172
+ **Rules**: Valid+open → agree with attribution. Valid+fixed → acknowledge with SHA. Invalid → challenge with evidence. Duplicate → reference theirs. Missed → amplify.
173
+
174
+ **Cross-file checks**: count headings vs items, category consistency, version strings, feature counts vs filesystem.
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: production-readiness
3
+ description: Production readiness audit domains, weighted scoring criteria, and check specifications for the /preflight workflow.
4
+ version: 1.0.0
5
+ triggers: [pre-deploy, pre-launch, milestone, production-readiness]
6
+ allowed-tools: Read, Grep, Bash
7
+ ---
8
+
9
+ # Production Readiness
10
+
11
+ > **Purpose**: Assess project readiness for production across 10 audit domains
12
+ > **Invoked by**: `/preflight` | **Reusable by**: `/retrospective`, `/deploy`
13
+
14
+ ---
15
+
16
+ ## Principles
17
+
18
+ 1. **Evidence over assertion** — every score backed by observable proof
19
+ 2. **Non-destructive** — checks don't modify source; verification commands may run
20
+ 3. **Fail-safe defaults** — unverifiable checks score 0
21
+ 4. **Domain independence** — each domain scored independently
22
+ 5. **Blocker precedence** — blocker rules override total score
23
+
24
+ ---
25
+
26
+ ## Domain Definitions
27
+
28
+ ### D1: Task Completeness (8 pts) — Skill: `plan-writing`
29
+
30
+ ROADMAP/task tracker exists and current (2) | All milestone tasks complete (3) | No undocumented features (2) | No scope drift (1)
31
+
32
+ ### D2: User Journey Validation (10 pts) — Skills: `webapp-testing`, `testing-patterns`
33
+
34
+ Critical flows identified, >=3 (2) | Happy path verified (3) | Error/edge handling (3) | Accessibility baseline (2)
35
+
36
+ ### D3: Implementation Correctness (10 pts) — Skills: `verification-loop`, `testing-patterns`
37
+
38
+ Test suite passes (4) | Coverage >= target or 60% (2) | No dead code (2) | Features match specs (2)
39
+
40
+ ### D4: Code Quality (15 pts) — Skills: `verification-loop`, `clean-code` — Delegates to `/review`
41
+
42
+ Lint passes (3) | Type check strict (3) | Build succeeds (3) | Style compliance (3) | Dependency health (3)
43
+
44
+ ### D5: Security & Privacy (18 pts) — Skill: `security-practices` — **Highest weight**
45
+
46
+ No hardcoded secrets (4) | Dependency vuln scan (3) | Auth/authz audit (3) | Input validation all endpoints (3) | HTTPS + security headers (3) | Privacy/PII compliance (2)
47
+
48
+ ### D6: Configuration Readiness (8 pts) — Skills: `deployment-procedures`, `shell-conventions`
49
+
50
+ Env vars documented (2) | No dev values in prod (2) | Secrets management defined (2) | Env-specific configs separated (2)
51
+
52
+ ### D7: Performance Baseline (8 pts) — Skill: `performance-profiling`
53
+
54
+ Bundle size within budget (2) | No perf anti-patterns (2) | Core Web Vitals baseline (2) | API p95 <500ms (2)
55
+
56
+ ### D8: Documentation (5 pts) — Skill: `plan-writing`
57
+
58
+ README with setup (2) | API docs (1) | Runbook (1) | CHANGELOG current (1)
59
+
60
+ ### D9: Infrastructure & CI/CD (10 pts) — Skills: `deployment-procedures`, `docker-patterns`
61
+
62
+ CI passes (3) | Deploy strategy defined (2) | Rollback capability (3) | Health check endpoint (2)
63
+
64
+ ### D10: Observability & Monitoring (8 pts) — Skill: `deployment-procedures`
65
+
66
+ Error tracking configured (3) | Structured logging (2) | Alerting for critical paths (2) | No PII in logs (1)
67
+
68
+ ---
69
+
70
+ ## Scoring Model
71
+
72
+ | Domain | Weight | Max |
73
+ |:---|:---|:---|
74
+ | D1: Task Completeness | 8% | 8 |
75
+ | D2: User Journey | 10% | 10 |
76
+ | D3: Implementation | 10% | 10 |
77
+ | D4: Code Quality | 15% | 15 |
78
+ | D5: Security & Privacy | 18% | 18 |
79
+ | D6: Configuration | 8% | 8 |
80
+ | D7: Performance | 8% | 8 |
81
+ | D8: Documentation | 5% | 5 |
82
+ | D9: Infrastructure | 10% | 10 |
83
+ | D10: Observability | 8% | 8 |
84
+ | **Total** | **100%** | **100** |
85
+
86
+ ---
87
+
88
+ ## Go/No-Go Thresholds
89
+
90
+ | Score | Status | Action |
91
+ |:---|:---|:---|
92
+ | >= 85 | Production Ready | Proceed to `/pr` -> `/deploy` |
93
+ | 70-84 | Conditionally Ready | Fix medium issues, `--rescan` |
94
+ | < 70 | Not Ready | Fix critical/high, `--rescan` |
95
+
96
+ ---
97
+
98
+ ## Blocker Rules (override total score)
99
+
100
+ Evaluated BEFORE total score. Precedence: Zero Domain > Security Floor > Quality Floor > Total Score.
101
+
102
+ | Rule | Condition | Override |
103
+ |:---|:---|:---|
104
+ | Zero Domain | Any domain scores 0 | Not Ready |
105
+ | Security Floor | D5 < 50% (<9/18) | Not Ready |
106
+ | Quality Floor | D4 < 50% (<=7/15) | Caps at Conditionally Ready |
107
+
108
+ ---
109
+
110
+ ## Evidence Requirements
111
+
112
+ Every sub-check score must have: **file evidence** (path), **command output**, **observation** (specific detail), or **N/A justification**. Unsupported scores default to 0.
113
+
114
+ ---
115
+
116
+ ## Delta Comparison (`--rescan`)
117
+
118
+ Load previous scorecard -> run full D1-D10 -> generate delta table (domain, previous, current, delta) -> highlight regressions with WARNING -> summary with updated verdict.
119
+
120
+ ---
121
+
122
+ ## Integration
123
+
124
+ - **Primary**: `/preflight` workflow (Verify phase)
125
+ - **Reusable**: `/retrospective` (sprint audit), `/deploy` (can reference D5, D6, D9)
126
+ - **References**: 8 existing skills via delegation map
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: security-practices
3
+ description: Application security best practices including Zero Trust principles, OAuth 2.0 / OpenID Connect flows, API security, supply chain security, and vulnerability prevention
4
+ triggers: [context, security, auth, vulnerability]
5
+ ---
6
+
7
+ # Security Practices Skill
8
+
9
+ > **Purpose**: Apply security best practices to protect applications
10
+
11
+ ---
12
+
13
+ ## Core Security Checklist
14
+
15
+ Apply OWASP Top 10 mitigations on every project: parameterized queries (injection), strong auth + MFA + rate limiting (broken auth), encryption at rest/transit (sensitive data), disable XML external entities (XXE), verify permissions every request (broken access), security headers + remove defaults (misconfig), sanitize output + CSP (XSS), validate input types (insecure deserialization), keep deps updated (components), log security events (logging).
16
+
17
+ ---
18
+
19
+ ## Authentication
20
+
21
+ - **Passwords**: bcrypt (cost factor 12) or Argon2. Never store plaintext.
22
+ - **JWT**: Short-lived access tokens (15min), longer refresh tokens (7d) stored in httpOnly/Secure/SameSite cookies. Access tokens in memory only.
23
+ - **MFA**: Require for admin and sensitive operations.
24
+
25
+ ---
26
+
27
+ ## Input Validation & Output Sanitization
28
+
29
+ - Never trust user input. Use parameterized queries (ORMs, prepared statements).
30
+ - Sanitize output with DOMPurify or equivalent. Never `innerHTML = userInput`.
31
+ - Validate with schema libraries (Zod, Joi) at API boundaries.
32
+
33
+ ---
34
+
35
+ ## Security Headers
36
+
37
+ Use `helmet()` middleware or set manually: `X-Content-Type-Options: nosniff`, `X-Frame-Options: DENY`, `Strict-Transport-Security` (includeSubDomains), `Content-Security-Policy: default-src 'self'`.
38
+
39
+ ---
40
+
41
+ ## Secrets Management
42
+
43
+ - Never commit secrets. Use environment variables or secret managers (AWS Secrets Manager, HashiCorp Vault).
44
+ - `.env.example` with placeholder keys, `.env` in `.gitignore`.
45
+ - Rotate secrets on schedule (90d max) and immediately on compromise.
46
+
47
+ ---
48
+
49
+ ## Zero Trust Principles
50
+
51
+ Apply: never trust/always verify, least privilege (RBAC/ABAC), assume breach (encrypt + segment), micro-segmentation (mTLS between services), continuous validation (short TTL sessions, step-up auth), device trust (compliance checks).
52
+
53
+ ---
54
+
55
+ ## OAuth 2.0 / OpenID Connect — Flow Selection
56
+
57
+ | Client Type | Flow |
58
+ |:---|:---|
59
+ | SPA | Authorization Code + PKCE |
60
+ | Server web app | Authorization Code |
61
+ | Mobile / Desktop | Authorization Code + PKCE |
62
+ | Machine-to-Machine | Client Credentials |
63
+ | Legacy (avoid) | Implicit (deprecated) |
64
+
65
+ **Token storage**: Never localStorage (XSS). Refresh tokens in httpOnly/Secure/SameSite cookies. Access tokens in memory. All public clients MUST use PKCE (RFC 7636).
66
+
67
+ ---
68
+
69
+ ## API Security
70
+
71
+ **Rate limiting**: Per-endpoint (expensive ops), per-user (fair usage), sliding window, token bucket, IP-based (unauthenticated). Use `express-rate-limit` or equivalent.
72
+
73
+ **API keys**: Rotate 90d max, scope to endpoints/methods/IPs, never in client code, separate per environment, log usage.
74
+
75
+ **Request signing**: HMAC-SHA256 with timestamp to prevent tampering and replay.
76
+
77
+ **Versioning**: Deprecate old versions lacking security controls. Same auth on all versions.
78
+
79
+ ---
80
+
81
+ ## Supply Chain Security
82
+
83
+ - `npm audit --audit-level=high` on every CI build
84
+ - Always commit lockfiles; use `npm ci` in CI
85
+ - Review lockfile diffs in PRs
86
+ - Pin exact versions in production (no `^` or `~`)
87
+ - Use Dependabot/Renovate for controlled updates
88
+ - Verify package publisher/download counts before installing
89
+ - Guard against typosquatting (character swaps, hyphen confusion, scope squatting)
90
+ - Consider Socket.dev or Snyk for malicious package detection
91
+
92
+ ---
93
+
94
+ ## Quick Reference
95
+
96
+ | Practice | Implementation |
97
+ |:---------|:-------------|
98
+ | Passwords | bcrypt/Argon2 |
99
+ | Tokens | Short-lived JWT + refresh |
100
+ | SQL | Parameterized queries |
101
+ | XSS | Sanitize + CSP |
102
+ | HTTPS | TLS 1.3, HSTS |
103
+ | Secrets | Env vars, vaults |
104
+ | Dependencies | npm audit, pin, Snyk |
105
+ | Logging | Audit trail, no PII |
106
+ | Zero Trust | Verify every request |
107
+ | OAuth 2.0 | Auth Code + PKCE |
108
+ | API Keys | Scoped, rotated, logged |
109
+ | Supply Chain | Lockfile, pin, audit |
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: shell-conventions
3
+ description: PowerShell shell conventions for Windows. Avoid bash-isms. Reference before running terminal commands.
4
+ triggers: [powershell, terminal, shell, command, run, windows, cli]
5
+ ---
6
+
7
+ # Shell Conventions — Windows PowerShell 5.x
8
+
9
+ > **Environment**: Windows PowerShell 5.x (NOT PowerShell 7/Core)
10
+ > **Scope**: All `run_command` tool calls across all workspaces
11
+
12
+ ---
13
+
14
+ ## 🔴 CRITICAL RULES
15
+
16
+ 1. **NEVER use `&&`** — It is NOT a valid operator in PowerShell 5.x
17
+ 2. **NEVER use `cd dir && command`** — Use the `Cwd` parameter on `run_command` instead
18
+ 3. **NEVER use `||`** as bash-style OR — Use `if (-not $?) { ... }` instead
19
+
20
+ ---
21
+
22
+ ## Operator Reference
23
+
24
+ | Operator | Bash | PowerShell 5.x | Notes |
25
+ | -------- | -------------------------- | ----------------------- | --------------------------------- |
26
+ | `&&` | Sequential (conditional) | ❌ **NOT SUPPORTED** | Use `;` or `Cwd` param |
27
+ | `;` | Sequential (unconditional) | ✅ Sequential execution | Runs next regardless of exit code |
28
+ | `\|` | Pipe stdout | ✅ Pipe objects | Different semantics than bash |
29
+ | `\|\|` | OR (run on failure) | ❌ **NOT SUPPORTED** | Use `if (-not $?) { ... }` |
30
+ | `>` | Redirect stdout | ✅ Redirect output | Same behavior |
31
+ | `2>&1` | Redirect stderr to stdout | ✅ Merge streams | Same behavior |
32
+
33
+ ---
34
+
35
+ ## Patterns
36
+
37
+ ### ❌ WRONG: Chaining with &&
38
+
39
+ ```bash
40
+ cd src && npm test && npm run build
41
+ ```
42
+
43
+ ### ✅ RIGHT: Use Cwd parameter
44
+
45
+ ```powershell
46
+ # Set Cwd to "src" on run_command, then just run:
47
+ npm test
48
+ ```
49
+
50
+ ### ✅ RIGHT: Sequential with ;
51
+
52
+ ```powershell
53
+ git status; git log --oneline -5
54
+ ```
55
+
56
+ ### ✅ RIGHT: Call operator for executables with spaces/special chars
57
+
58
+ ```powershell
59
+ & ".venv\Scripts\ruff.exe" check app/
60
+ & ".venv\Scripts\pytest.exe" tests/ -v
61
+ ```
62
+
63
+ ---
64
+
65
+ ## Common Patterns
66
+
67
+ | Task | PowerShell Command |
68
+ | ------------------- | ------------------------------------------- |
69
+ | Run Node.js tests | `npm test` |
70
+ | Run Python tests | `& ".venv\Scripts\pytest.exe" tests/ -q` |
71
+ | Run linter | `npm run lint` |
72
+ | Check git status | `git status` |
73
+ | Build project | `npm run build` |
74
+ | Install deps | `npm install` |
75
+ | List files | `Get-ChildItem -Recurse` |
76
+ | Find in files | `Select-String -Pattern "text" -Path "*.md"`|
77
+
78
+ ---
79
+
80
+ ## Virtual Environment (Python)
81
+
82
+ ```powershell
83
+ # Activate (PowerShell)
84
+ & ".venv\Scripts\Activate.ps1"
85
+
86
+ # Run without activation (preferred for tool calls)
87
+ & ".venv\Scripts\python.exe" -m pytest tests/ -q
88
+ & ".venv\Scripts\python.exe" -m ruff check app/
89
+ ```
90
+
91
+ > [!TIP]
92
+ > For `run_command` tool calls, prefer calling the executable directly with `&` rather than activating the virtual environment.
@@ -0,0 +1,62 @@
1
+ ---
2
+ name: strategic-compact
3
+ description: Context window management with strategic compaction
4
+ triggers: [context-warning, manual]
5
+ ---
6
+
7
+ # Strategic Compact Skill
8
+
9
+ > **Purpose**: Manage context window efficiently while preserving important information
10
+
11
+ ---
12
+
13
+ ## Overview
14
+
15
+ As conversations grow, context window limits require strategic compaction. This skill ensures important context is preserved while freeing space for new work.
16
+
17
+ ---
18
+
19
+ ## Workflow
20
+
21
+ ### 1. Assess Context
22
+
23
+ Evaluate current context usage:
24
+
25
+ - How much context is used?
26
+ - What is the oldest content?
27
+ - What is most important?
28
+
29
+ ### 2. Prioritize
30
+
31
+ Rank content by importance:
32
+
33
+ | Priority | Content Type |
34
+ | :------- | :------------------------- |
35
+ | CRITICAL | Active code being modified |
36
+ | HIGH | Current task context |
37
+ | MEDIUM | Related code for reference |
38
+ | LOW | Completed discussions |
39
+
40
+ ### 3. Compact
41
+
42
+ Summarize or remove low-priority content:
43
+
44
+ - Summarize completed tasks
45
+ - Remove verbose output
46
+ - Keep code snippets, remove explanations
47
+
48
+ ### 4. Persist
49
+
50
+ Save important context externally:
51
+
52
+ - Update `session-state.json`
53
+ - Document decisions in `decisions/`
54
+ - Create checkpoints
55
+
56
+ ---
57
+
58
+ ## Integration
59
+
60
+ - Triggered at context warning threshold
61
+ - Can be invoked with `/compact`
62
+ - Preserves session continuity