skillstore-cli 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 (231) hide show
  1. package/README.md +95 -0
  2. package/data/bundles/devflow-complete.json +19 -0
  3. package/data/free-skills/devflow-agile/manifest.json +19 -0
  4. package/data/free-skills/devflow-agile/plugin/commands/agile/retro.md +23 -0
  5. package/data/free-skills/devflow-agile/plugin/commands/agile/review.md +21 -0
  6. package/data/free-skills/devflow-agile/plugin/commands/agile/sprint.md +30 -0
  7. package/data/free-skills/devflow-agile/plugin/commands/agile/standup.md +20 -0
  8. package/data/free-skills/devflow-agile/plugin/commands/agile.md +35 -0
  9. package/data/free-skills/devflow-agile/plugin/commands/devflow.md +42 -0
  10. package/data/free-skills/devflow-agile/plugin/skills/developer/SKILL.md +93 -0
  11. package/data/free-skills/devflow-agile/plugin/skills/developer/assets/sample-output.md +182 -0
  12. package/data/free-skills/devflow-agile/plugin/skills/developer/references/clean-architecture.md +361 -0
  13. package/data/free-skills/devflow-agile/plugin/skills/developer/references/clean-code-guide.md +207 -0
  14. package/data/free-skills/devflow-agile/plugin/skills/developer/references/debugging-methodology.md +191 -0
  15. package/data/free-skills/devflow-agile/template/agents/agile-coach.md +76 -0
  16. package/data/free-skills/devflow-agile/template/workflows/agile-sprint-workflow.md +81 -0
  17. package/data/free-skills/devflow-bootstrap/manifest.json +8 -0
  18. package/data/free-skills/devflow-bootstrap/plugin/commands/bootstrap/auto.md +31 -0
  19. package/data/free-skills/devflow-bootstrap/plugin/commands/bootstrap.md +38 -0
  20. package/data/free-skills/devflow-bootstrap/plugin/commands/devflow.md +20 -0
  21. package/data/free-skills/devflow-bootstrap/plugin/skills/project-scaffold/SKILL.md +56 -0
  22. package/data/free-skills/devflow-bootstrap/plugin/skills/project-scaffold/assets/sample-output.md +216 -0
  23. package/data/free-skills/devflow-bootstrap/plugin/skills/project-scaffold/references/architecture-decisions.md +254 -0
  24. package/data/free-skills/devflow-bootstrap/plugin/skills/project-scaffold/references/stack-templates.md +400 -0
  25. package/data/free-skills/devflow-bootstrap/template/agents/bootstrap-specialist.md +56 -0
  26. package/data/free-skills/devflow-bootstrap/template/workflows/bootstrap-workflow.md +70 -0
  27. package/data/free-skills/devflow-docs/manifest.json +8 -0
  28. package/data/free-skills/devflow-docs/plugin/commands/devflow.md +20 -0
  29. package/data/free-skills/devflow-docs/plugin/commands/docs/generate.md +17 -0
  30. package/data/free-skills/devflow-docs/plugin/commands/docs/parse.md +19 -0
  31. package/data/free-skills/devflow-docs/plugin/commands/docs.md +26 -0
  32. package/data/free-skills/devflow-docs/plugin/skills/pdf-processor/SKILL.md +59 -0
  33. package/data/free-skills/devflow-docs/plugin/skills/pdf-processor/assets/sample-output.md +114 -0
  34. package/data/free-skills/devflow-docs/plugin/skills/pdf-processor/references/extraction-techniques.md +115 -0
  35. package/data/free-skills/devflow-docs/plugin/skills/pdf-processor/references/ocr-strategies.md +167 -0
  36. package/data/free-skills/devflow-docs/template/agents/docs-specialist.md +35 -0
  37. package/data/free-skills/devflow-docs/template/workflows/docs-workflow.md +70 -0
  38. package/data/free-skills/devflow-postproject/manifest.json +13 -0
  39. package/data/free-skills/devflow-postproject/plugin/commands/devflow.md +34 -0
  40. package/data/free-skills/devflow-postproject/plugin/commands/postproject/handover.md +21 -0
  41. package/data/free-skills/devflow-postproject/plugin/commands/postproject/retro.md +21 -0
  42. package/data/free-skills/devflow-postproject/plugin/commands/postproject/support.md +21 -0
  43. package/data/free-skills/devflow-postproject/plugin/commands/postproject.md +32 -0
  44. package/data/free-skills/devflow-postproject/plugin/skills/retrospective/SKILL.md +70 -0
  45. package/data/free-skills/devflow-postproject/plugin/skills/retrospective/assets/sample-output.md +79 -0
  46. package/data/free-skills/devflow-postproject/plugin/skills/retrospective/references/facilitation-techniques.md +178 -0
  47. package/data/free-skills/devflow-postproject/plugin/skills/retrospective/references/lessons-learned-template.md +118 -0
  48. package/data/free-skills/devflow-postproject/plugin/skills/retrospective/references/retro-techniques.md +100 -0
  49. package/data/free-skills/devflow-postproject/template/agents/transition-manager.md +71 -0
  50. package/data/free-skills/devflow-postproject/template/workflows/transition-workflow.md +72 -0
  51. package/data/free-skills/devflow-presale/manifest.json +15 -0
  52. package/data/free-skills/devflow-presale/plugin/commands/devflow.md +47 -0
  53. package/data/free-skills/devflow-presale/plugin/commands/presale/analyze.md +30 -0
  54. package/data/free-skills/devflow-presale/plugin/commands/presale/estimate.md +30 -0
  55. package/data/free-skills/devflow-presale/plugin/commands/presale/price.md +30 -0
  56. package/data/free-skills/devflow-presale/plugin/commands/presale/propose.md +30 -0
  57. package/data/free-skills/devflow-presale/plugin/commands/presale.md +42 -0
  58. package/data/free-skills/devflow-presale/plugin/skills/requirement-analysis/SKILL.md +63 -0
  59. package/data/free-skills/devflow-presale/plugin/skills/requirement-analysis/assets/sample-output.md +129 -0
  60. package/data/free-skills/devflow-presale/plugin/skills/requirement-analysis/references/extraction-framework.md +140 -0
  61. package/data/free-skills/devflow-presale/plugin/skills/requirement-analysis/references/output-template.md +132 -0
  62. package/data/free-skills/devflow-presale/template/agents/presale-lead.md +83 -0
  63. package/data/free-skills/devflow-presale/template/agents/proposal-reviewer.md +63 -0
  64. package/data/free-skills/devflow-presale/template/workflows/presale-workflow.md +70 -0
  65. package/data/registry/categories.json +7 -0
  66. package/data/registry/packages.json +184 -0
  67. package/data/shared/framework/agents/brainstormer.md +74 -0
  68. package/data/shared/framework/agents/code-reviewer.md +87 -0
  69. package/data/shared/framework/agents/debugger.md +84 -0
  70. package/data/shared/framework/agents/docs-manager.md +55 -0
  71. package/data/shared/framework/agents/git-manager.md +59 -0
  72. package/data/shared/framework/agents/planner.md +68 -0
  73. package/data/shared/framework/agents/researcher.md +66 -0
  74. package/data/shared/framework/agents/tester.md +65 -0
  75. package/data/shared/framework/commands/cook/auto.md +27 -0
  76. package/data/shared/framework/commands/cook.md +45 -0
  77. package/data/shared/framework/commands/fix/ci.md +21 -0
  78. package/data/shared/framework/commands/fix/test.md +26 -0
  79. package/data/shared/framework/commands/fix/types.md +29 -0
  80. package/data/shared/framework/commands/fix.md +26 -0
  81. package/data/shared/framework/commands/git/cm.md +37 -0
  82. package/data/shared/framework/commands/git/pr.md +40 -0
  83. package/data/shared/framework/config/CLAUDE.md.template +26 -0
  84. package/data/shared/framework/config/settings.json +41 -0
  85. package/data/shared/framework/config/skillstore.config.json +29 -0
  86. package/data/shared/framework/hooks/discord-notify.sh +85 -0
  87. package/data/shared/framework/hooks/docs-sync.sh +53 -0
  88. package/data/shared/framework/hooks/modularization-hook.js +103 -0
  89. package/data/shared/framework/hooks/notification.js +94 -0
  90. package/data/shared/framework/hooks/quality-gate.js +109 -0
  91. package/data/shared/framework/hooks/scout-block.js +77 -0
  92. package/data/shared/framework/hooks/telegram-notify.sh +77 -0
  93. package/data/shared/framework/protocols/error-recovery.md +80 -0
  94. package/data/shared/framework/protocols/orchestration-protocol.md +112 -0
  95. package/data/shared/framework/quality/review-protocol.md +76 -0
  96. package/data/shared/framework/quality/verification-protocol.md +66 -0
  97. package/data/shared/framework/rules/development-rules.md +75 -0
  98. package/data/shared/framework/skills/backend-development/SKILL.md +77 -0
  99. package/data/shared/framework/skills/backend-development/assets/sample-output.md +175 -0
  100. package/data/shared/framework/skills/backend-development/references/advanced-patterns.md +180 -0
  101. package/data/shared/framework/skills/backend-development/references/api-design-guide.md +160 -0
  102. package/data/shared/framework/skills/backend-development/references/architecture-patterns.md +183 -0
  103. package/data/shared/framework/skills/backend-development/references/observability-resilience.md +155 -0
  104. package/data/shared/framework/skills/backend-development/references/troubleshooting.md +199 -0
  105. package/data/shared/framework/skills/codebase-analysis/SKILL.md +72 -0
  106. package/data/shared/framework/skills/codebase-analysis/assets/sample-output.md +263 -0
  107. package/data/shared/framework/skills/codebase-analysis/references/analysis-techniques.md +241 -0
  108. package/data/shared/framework/skills/codebase-analysis/references/dependency-mapping.md +280 -0
  109. package/data/shared/framework/skills/codebase-analysis/references/tech-debt-assessment.md +208 -0
  110. package/data/shared/framework/skills/databases/SKILL.md +72 -0
  111. package/data/shared/framework/skills/databases/assets/sample-output.md +212 -0
  112. package/data/shared/framework/skills/databases/references/advanced-data-patterns.md +259 -0
  113. package/data/shared/framework/skills/databases/references/query-optimization.md +214 -0
  114. package/data/shared/framework/skills/databases/references/schema-design.md +159 -0
  115. package/data/shared/framework/skills/databases/references/troubleshooting.md +214 -0
  116. package/data/shared/framework/skills/debugging-investigation/SKILL.md +84 -0
  117. package/data/shared/framework/skills/debugging-investigation/assets/sample-output.md +314 -0
  118. package/data/shared/framework/skills/debugging-investigation/references/systematic-debugging.md +197 -0
  119. package/data/shared/framework/skills/debugging-investigation/references/tool-specific-guides.md +202 -0
  120. package/data/shared/framework/skills/debugging-investigation/references/troubleshooting-patterns.md +196 -0
  121. package/data/shared/framework/skills/frontend-development/SKILL.md +67 -0
  122. package/data/shared/framework/skills/frontend-development/assets/sample-output.md +110 -0
  123. package/data/shared/framework/skills/frontend-development/references/component-patterns.md +112 -0
  124. package/data/shared/framework/skills/frontend-development/references/performance-guide.md +169 -0
  125. package/data/shared/framework/skills/frontend-development/references/routing-forms-realtime.md +374 -0
  126. package/data/shared/framework/skills/frontend-development/references/ssr-rsc-patterns.md +284 -0
  127. package/data/shared/framework/skills/frontend-development/references/troubleshooting.md +154 -0
  128. package/data/shared/framework/skills/mobile-development/SKILL.md +67 -0
  129. package/data/shared/framework/skills/mobile-development/assets/sample-output.md +382 -0
  130. package/data/shared/framework/skills/mobile-development/references/mobile-patterns.md +681 -0
  131. package/data/shared/framework/skills/mobile-development/references/mobile-performance.md +524 -0
  132. package/data/shared/framework/skills/mobile-development/references/troubleshooting.md +158 -0
  133. package/data/shared/framework/skills/security-audit/SKILL.md +83 -0
  134. package/data/shared/framework/skills/security-audit/assets/sample-output.md +451 -0
  135. package/data/shared/framework/skills/security-audit/references/owasp-checklist.md +580 -0
  136. package/data/shared/framework/skills/security-audit/references/secure-coding-patterns.md +433 -0
  137. package/data/shared/framework/skills/security-audit/references/vulnerability-remediation.md +331 -0
  138. package/data/shared/framework/skills/ui-generation/SKILL.md +70 -0
  139. package/data/shared/framework/skills/ui-generation/assets/sample-output.md +139 -0
  140. package/data/shared/framework/skills/ui-generation/references/accessibility-responsive.md +127 -0
  141. package/data/shared/framework/skills/ui-generation/references/compound-components.md +252 -0
  142. package/data/shared/framework/skills/ui-generation/references/generation-patterns.md +110 -0
  143. package/data/shared/framework/skills/ui-generation/references/storybook-design-system.md +278 -0
  144. package/data/shared/framework/skills/ui-generation/references/troubleshooting.md +198 -0
  145. package/data/shared/framework/workflows/documentation-management.md +58 -0
  146. package/data/shared/framework/workflows/primary-workflow.md +88 -0
  147. package/dist/commands/activate.d.ts +3 -0
  148. package/dist/commands/activate.d.ts.map +1 -0
  149. package/dist/commands/activate.js +34 -0
  150. package/dist/commands/activate.js.map +1 -0
  151. package/dist/commands/bundle.d.ts +3 -0
  152. package/dist/commands/bundle.d.ts.map +1 -0
  153. package/dist/commands/bundle.js +64 -0
  154. package/dist/commands/bundle.js.map +1 -0
  155. package/dist/commands/install.d.ts +3 -0
  156. package/dist/commands/install.d.ts.map +1 -0
  157. package/dist/commands/install.js +99 -0
  158. package/dist/commands/install.js.map +1 -0
  159. package/dist/commands/list.d.ts +3 -0
  160. package/dist/commands/list.d.ts.map +1 -0
  161. package/dist/commands/list.js +37 -0
  162. package/dist/commands/list.js.map +1 -0
  163. package/dist/commands/search.d.ts +3 -0
  164. package/dist/commands/search.d.ts.map +1 -0
  165. package/dist/commands/search.js +30 -0
  166. package/dist/commands/search.js.map +1 -0
  167. package/dist/commands/status.d.ts +3 -0
  168. package/dist/commands/status.d.ts.map +1 -0
  169. package/dist/commands/status.js +35 -0
  170. package/dist/commands/status.js.map +1 -0
  171. package/dist/commands/update.d.ts +3 -0
  172. package/dist/commands/update.d.ts.map +1 -0
  173. package/dist/commands/update.js +68 -0
  174. package/dist/commands/update.js.map +1 -0
  175. package/dist/download/cache.d.ts +3 -0
  176. package/dist/download/cache.d.ts.map +1 -0
  177. package/dist/download/cache.js +18 -0
  178. package/dist/download/cache.js.map +1 -0
  179. package/dist/download/client.d.ts +2 -0
  180. package/dist/download/client.d.ts.map +1 -0
  181. package/dist/download/client.js +58 -0
  182. package/dist/download/client.js.map +1 -0
  183. package/dist/index.d.ts +3 -0
  184. package/dist/index.d.ts.map +1 -0
  185. package/dist/index.js +23 -0
  186. package/dist/index.js.map +1 -0
  187. package/dist/installer/file-copier.d.ts +6 -0
  188. package/dist/installer/file-copier.d.ts.map +1 -0
  189. package/dist/installer/file-copier.js +32 -0
  190. package/dist/installer/file-copier.js.map +1 -0
  191. package/dist/installer/plugin-installer.d.ts +12 -0
  192. package/dist/installer/plugin-installer.d.ts.map +1 -0
  193. package/dist/installer/plugin-installer.js +33 -0
  194. package/dist/installer/plugin-installer.js.map +1 -0
  195. package/dist/installer/template-installer.d.ts +12 -0
  196. package/dist/installer/template-installer.d.ts.map +1 -0
  197. package/dist/installer/template-installer.js +45 -0
  198. package/dist/installer/template-installer.js.map +1 -0
  199. package/dist/license/crypto.d.ts +16 -0
  200. package/dist/license/crypto.d.ts.map +1 -0
  201. package/dist/license/crypto.js +50 -0
  202. package/dist/license/crypto.js.map +1 -0
  203. package/dist/license/license-store.d.ts +19 -0
  204. package/dist/license/license-store.d.ts.map +1 -0
  205. package/dist/license/license-store.js +99 -0
  206. package/dist/license/license-store.js.map +1 -0
  207. package/dist/license/validator.d.ts +32 -0
  208. package/dist/license/validator.d.ts.map +1 -0
  209. package/dist/license/validator.js +81 -0
  210. package/dist/license/validator.js.map +1 -0
  211. package/dist/registry/loader.d.ts +30 -0
  212. package/dist/registry/loader.d.ts.map +1 -0
  213. package/dist/registry/loader.js +22 -0
  214. package/dist/registry/loader.js.map +1 -0
  215. package/dist/registry/search-engine.d.ts +9 -0
  216. package/dist/registry/search-engine.d.ts.map +1 -0
  217. package/dist/registry/search-engine.js +30 -0
  218. package/dist/registry/search-engine.js.map +1 -0
  219. package/dist/utils/config.d.ts +14 -0
  220. package/dist/utils/config.d.ts.map +1 -0
  221. package/dist/utils/config.js +28 -0
  222. package/dist/utils/config.js.map +1 -0
  223. package/dist/utils/logger.d.ts +9 -0
  224. package/dist/utils/logger.d.ts.map +1 -0
  225. package/dist/utils/logger.js +22 -0
  226. package/dist/utils/logger.js.map +1 -0
  227. package/dist/utils/paths.d.ts +20 -0
  228. package/dist/utils/paths.d.ts.map +1 -0
  229. package/dist/utils/paths.js +79 -0
  230. package/dist/utils/paths.js.map +1 -0
  231. package/package.json +54 -0
@@ -0,0 +1,77 @@
1
+ #!/bin/bash
2
+
3
+ # Telegram Notification Hook (Stop/SubagentStop)
4
+ #
5
+ # Sends Markdown notifications to Telegram when sessions complete.
6
+ # Requires: TELEGRAM_BOT_TOKEN + TELEGRAM_CHAT_ID in environment or .claude/.env
7
+ #
8
+ # Non-blocking: always exits 0.
9
+
10
+ set -e
11
+
12
+ # Load environment
13
+ load_env() {
14
+ local env_files=(
15
+ "$CLAUDE_PROJECT_DIR/.claude/hooks/.env"
16
+ "$CLAUDE_PROJECT_DIR/.claude/.env"
17
+ )
18
+ for f in "${env_files[@]}"; do
19
+ if [ -f "$f" ]; then
20
+ set -a
21
+ source "$f"
22
+ set +a
23
+ fi
24
+ done
25
+ }
26
+
27
+ load_env
28
+
29
+ # Check required vars
30
+ if [ -z "$TELEGRAM_BOT_TOKEN" ] || [ -z "$TELEGRAM_CHAT_ID" ]; then
31
+ exit 0
32
+ fi
33
+
34
+ # Read stdin
35
+ INPUT=$(cat /dev/stdin)
36
+
37
+ # Parse event data
38
+ EVENT_TYPE=$(echo "$INPUT" | node -e "
39
+ const d=JSON.parse(require('fs').readFileSync('/dev/stdin','utf-8'));
40
+ console.log(d.event || 'unknown');
41
+ " 2>/dev/null || echo "unknown")
42
+
43
+ TIMESTAMP=$(TZ='Asia/Ho_Chi_Minh' date '+%Y-%m-%d %H:%M:%S')
44
+
45
+ # Build message
46
+ case "$EVENT_TYPE" in
47
+ "Stop")
48
+ EMOJI="✅"
49
+ TITLE="Session Completed"
50
+ ;;
51
+ "SubagentStop")
52
+ EMOJI="🔵"
53
+ TITLE="Agent Completed"
54
+ ;;
55
+ *)
56
+ EMOJI="📌"
57
+ TITLE="Event: $EVENT_TYPE"
58
+ ;;
59
+ esac
60
+
61
+ MESSAGE="$EMOJI *$TITLE*
62
+
63
+ ⏰ *Time:* $TIMESTAMP
64
+ 📍 *Event:* $EVENT_TYPE
65
+
66
+ _SkillStore DevFlow_"
67
+
68
+ # Send Telegram message
69
+ curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \
70
+ -H "Content-Type: application/json" \
71
+ -d "{
72
+ \"chat_id\": \"${TELEGRAM_CHAT_ID}\",
73
+ \"text\": \"${MESSAGE}\",
74
+ \"parse_mode\": \"Markdown\"
75
+ }" > /dev/null 2>&1 || true
76
+
77
+ exit 0
@@ -0,0 +1,80 @@
1
+ # Error Recovery Protocol
2
+
3
+ All agents and workflows MUST follow this protocol when encountering errors.
4
+
5
+ ---
6
+
7
+ ## Core Principles
8
+
9
+ 1. **No infinite loops** — There must be a clear retry limit
10
+ 2. **Analyze before retrying** — Understand WHY it failed before trying again
11
+ 3. **Escalate when needed** — Know when to stop and ask the user
12
+ 4. **Save progress** — Do not lose work that has already been completed
13
+
14
+ ## Retry Decision Tree
15
+
16
+ ```
17
+ Error occurred
18
+
19
+ ├─ Build error?
20
+ │ → Fix immediately
21
+ │ → Rebuild
22
+ │ → If same error 3 times → escalate to user
23
+
24
+ ├─ Test failure?
25
+ │ ├─ Attempt 1: Fix code based on test output
26
+ │ ├─ Attempt 2: Check if test itself is wrong
27
+ │ ├─ Attempt 3: Check if requirement is unclear
28
+ │ └─ After 3: STOP → report with all 3 analyses
29
+
30
+ ├─ Agent timeout?
31
+ │ → Save partial results
32
+ │ → Report what's done vs. remaining
33
+ │ → User decides next step
34
+
35
+ ├─ External dependency fail?
36
+ │ → Wait 30s, retry once
37
+ │ → If still fails → report, suggest manual
38
+
39
+ └─ Unknown error?
40
+ → Log full error context
41
+ → DO NOT retry blindly
42
+ → Report to user with error details
43
+ ```
44
+
45
+ ## Recovery Report Format
46
+
47
+ When escalating to user, use this format:
48
+
49
+ ```markdown
50
+ ## Error Report
51
+
52
+ **Task**: [what was being done]
53
+ **Error**: [what went wrong]
54
+ **Attempts**: [number of retries]
55
+
56
+ ### Analysis
57
+ - Attempt 1: [approach → result]
58
+ - Attempt 2: [approach → result]
59
+ - Attempt 3: [approach → result]
60
+
61
+ ### Diagnostic
62
+ - [Relevant logs/output]
63
+ - [Root cause hypothesis]
64
+
65
+ ### Recommended Next Steps
66
+ 1. [Specific action user can take]
67
+ 2. [Alternative approach]
68
+ ```
69
+
70
+ ## Red Flags — STOP immediately
71
+
72
+ If you recognize any of the following patterns, STOP and report:
73
+
74
+ | Red Flag | Meaning |
75
+ |----------|---------|
76
+ | "Quick fix for now, investigate later" | Avoiding root cause |
77
+ | "Just try changing X and see" | Guessing instead of analyzing |
78
+ | "Should work now" (not verified) | Assuming instead of proving |
79
+ | "Let me try one more time" (4th+ attempt) | Looping indefinitely |
80
+ | Same error message appears 3+ times | Root cause has not been fixed |
@@ -0,0 +1,112 @@
1
+ # Orchestration Protocol
2
+
3
+ Rules for coordination between agents and workflows. Reference config at `config/skillstore.config.json`.
4
+
5
+ ---
6
+
7
+ ## Sequential Execution
8
+
9
+ Steps with dependencies MUST run sequentially:
10
+
11
+ ```
12
+ Plan → Implement (implement needs plan output)
13
+ Implement → Test (test needs code)
14
+ Test → Review (review needs test results)
15
+ Review → Fix → Test (loop until pass or max retries)
16
+ ```
17
+
18
+ ## Parallel Execution
19
+
20
+ INDEPENDENT steps can run in parallel via `run_in_background`:
21
+
22
+ ```
23
+ Research Agent 1 + Research Agent 2 (different topics)
24
+ Docs update + Notification (no shared state)
25
+ Unit tests + Lint check (independent tools)
26
+ ```
27
+
28
+ **Parallel rules**:
29
+ - Each agent declares files it will modify in the task description
30
+ - If 2 agents modify the same file → run sequentially, NOT in parallel
31
+ - Agents MUST NOT edit files outside their declared scope
32
+
33
+ ## File Conflict Prevention
34
+
35
+ ```
36
+ Agent A: "I will modify src/auth.ts, src/auth.test.ts"
37
+ Agent B: "I will modify src/api.ts, src/api.test.ts"
38
+ → Parallel OK (no overlap)
39
+
40
+ Agent A: "I will modify src/config.ts"
41
+ Agent B: "I will modify src/config.ts"
42
+ → Sequential ONLY (same file)
43
+ ```
44
+
45
+ ## Retry Policy
46
+
47
+ Reference `config.thresholds.maxRetries` (default: 3).
48
+
49
+ ```
50
+ Attempt 1: Execute task normally
51
+ → Fail: Analyze failure, adjust approach
52
+ Attempt 2: Execute with adjusted approach
53
+ → Fail: Check if the problem is in the task itself (wrong test, wrong requirement)
54
+ Attempt 3: Execute with alternative approach
55
+ → Fail: STOP. Report to user with:
56
+ - What was attempted (3 approaches)
57
+ - What failed each time
58
+ - Diagnostic information
59
+ - Suggested manual steps
60
+ ```
61
+
62
+ **Never**: retry a 4th+ time without new input from the user.
63
+
64
+ ## Timeout Handling
65
+
66
+ Reference `config.thresholds.agentTimeoutMs` (default: 180000ms = 3 min).
67
+
68
+ ```
69
+ Agent start → [working...] → timeout reached
70
+ 1. Save partial results to task output
71
+ 2. Report: "Timed out after {N}ms. Partial results: {summary}"
72
+ 3. User decides: retry with more time, skip, or manual intervention
73
+ ```
74
+
75
+ ## Agent Handoff
76
+
77
+ When agent A hands off work to agent B:
78
+
79
+ ```markdown
80
+ ## Handoff: [Agent A] → [Agent B]
81
+
82
+ ### Completed
83
+ - [List of completed items]
84
+
85
+ ### Context
86
+ - [Key decisions made]
87
+ - [Files modified: list]
88
+
89
+ ### Remaining
90
+ - [What B needs to do]
91
+
92
+ ### Blockers (if any)
93
+ - [Issues B should be aware of]
94
+ ```
95
+
96
+ ## Checkpoint Protocol
97
+
98
+ After each major subtask, the agent MUST:
99
+ 1. Update task status (if using TaskCreate/TaskUpdate)
100
+ 2. Write a summary: what was done, what remains
101
+ 3. If interrupted → the next agent reads the checkpoint to resume
102
+
103
+ ## Escalation Matrix
104
+
105
+ | Failure | Retry? | Escalation |
106
+ |---------|--------|------------|
107
+ | Build error | Fix immediately, no retry limit | Report if > 3 attempts |
108
+ | Test failure | Max 3 retries | Report with diagnostic |
109
+ | Agent timeout | 1 retry with 2x timeout | Report partial results |
110
+ | File conflict | No retry | Stop, ask user |
111
+ | Unclear requirement | No retry | Stop, ask user |
112
+ | External service down | 1 retry after 30s | Report, suggest manual |
@@ -0,0 +1,76 @@
1
+ # Review Protocol
2
+
3
+ Code review guide — technical rigor, not performative agreement.
4
+
5
+ ---
6
+
7
+ ## Principles
8
+
9
+ 1. **Technical correctness > social comfort** — If the code is wrong, say so directly
10
+ 2. **Verify before agreeing** — Do not accept without checking
11
+ 3. **Constructive feedback** — Point out the issue AND suggest a fix
12
+ 4. **Scope-aware** — Review according to strictness level, do not over-review
13
+
14
+ ## Review Checklist (by strictness)
15
+
16
+ ### Balanced (default)
17
+
18
+ **Functionality**
19
+ - Is the logic correct according to requirements?
20
+ - Edge cases: null, empty, boundary values handled?
21
+ - Error handling: exceptions caught at the appropriate level?
22
+
23
+ **Readability**
24
+ - Is the code self-explanatory? Is naming clear?
25
+ - Is there complex logic that needs an explanatory comment?
26
+ - Consistent with existing codebase conventions?
27
+
28
+ **Security**
29
+ - No hardcoded secrets/credentials
30
+ - User input validated before processing
31
+ - SQL/command injection prevention (if applicable)
32
+
33
+ ### Strict (in addition to balanced)
34
+
35
+ **Performance**
36
+ - Unnecessary database queries? N+1?
37
+ - Large data processing has pagination/streaming?
38
+ - Caching opportunities?
39
+
40
+ **Type Safety**
41
+ - No `any` types (TypeScript)
42
+ - Proper error types (no generic `Error`)
43
+ - Interface/type definitions complete
44
+
45
+ **Testing**
46
+ - Does new code have corresponding tests?
47
+ - Is test coverage adequate for the new logic?
48
+ - Edge cases tested?
49
+
50
+ ## Review Output Format
51
+
52
+ ```markdown
53
+ ## Code Review
54
+
55
+ ### Critical (MUST fix)
56
+ - [File:line] [Issue description] → [Suggested fix]
57
+
58
+ ### Recommended (SHOULD fix)
59
+ - [File:line] [Issue description] → [Suggested fix]
60
+
61
+ ### Observations (FYI)
62
+ - [Notes, patterns, or minor suggestions]
63
+
64
+ ### Verdict
65
+ - [ ] Approved
66
+ - [ ] Approved with minor changes
67
+ - [ ] Changes requested (fix critical issues)
68
+ ```
69
+
70
+ ## Anti-Patterns — DO NOT do
71
+
72
+ - DO NOT give performative agreement: "Great code!" without actually reviewing
73
+ - DO NOT nitpick formatting when there are logic bugs
74
+ - DO NOT suggest adding features outside the scope
75
+ - DO NOT re-architect code that is working well
76
+ - DO NOT block for style preferences (unless it violates team conventions)
@@ -0,0 +1,66 @@
1
+ # Verification Protocol
2
+
3
+ Completion verification process — DO NOT claim "done" without evidence.
4
+
5
+ ---
6
+
7
+ ## Golden Rule
8
+
9
+ **Evidence before assertions.** Run verification commands, confirm output, THEN claim completion.
10
+
11
+ ## Verification Checklist
12
+
13
+ ### Minimum (all strictness levels)
14
+
15
+ - [ ] Build pass: run build command, verify zero errors
16
+ - [ ] Tests pass: run test command, verify all green
17
+ - [ ] No regression: existing functionality still works
18
+
19
+ ### Balanced (config.strictness = "balanced")
20
+
21
+ All minimum checks, plus:
22
+ - [ ] Code review: check logic, readability, consistency
23
+ - [ ] Security basics: no hardcoded secrets, input validation at boundaries
24
+ - [ ] Requirements coverage: all acceptance criteria have been addressed
25
+
26
+ ### Strict (config.strictness = "strict")
27
+
28
+ All balanced checks, plus:
29
+ - [ ] Performance check: no obvious N+1 queries, unnecessary re-renders, etc.
30
+ - [ ] Type safety: no `any` types, proper error types
31
+ - [ ] Security audit: OWASP top 10 check for new code
32
+ - [ ] Edge cases: boundary values, empty states, error states handled
33
+
34
+ ## Self-Review Process
35
+
36
+ Before claiming done:
37
+
38
+ 1. **Re-read requirements** — Compare output with the original request
39
+ 2. **Run verification commands** — Build, test, lint
40
+ 3. **Check diff** — Review all of your own changes
41
+ 4. **Ask yourself**:
42
+ - "If this were someone else's code, would I approve this PR?"
43
+ - "Are there any edge cases I haven't handled?"
44
+ - "Is there anything hardcoded that should be configurable?"
45
+
46
+ ## Completion Report Format
47
+
48
+ When claiming done, provide:
49
+
50
+ ```markdown
51
+ ## Completion Report
52
+
53
+ ### What was done
54
+ - [Summary of changes]
55
+
56
+ ### Verification Evidence
57
+ - Build: [pass/fail + output snippet]
58
+ - Tests: [pass/fail + count]
59
+ - Other: [relevant checks]
60
+
61
+ ### Files Changed
62
+ - [List of files with brief description]
63
+
64
+ ### Known Limitations
65
+ - [Anything not covered, if applicable]
66
+ ```
@@ -0,0 +1,75 @@
1
+ # Development Rules
2
+
3
+ Single source of truth — all agents and workflows reference this file. DO NOT duplicate rules elsewhere.
4
+
5
+ ---
6
+
7
+ ## Critical Rules (2 rules — no exceptions)
8
+
9
+ 1. **NO completion claims without verification evidence.** Before saying "done", there must be actual output: build pass, test pass, or user confirmation.
10
+
11
+ 2. **NO fixes without root cause investigation.** Before fixing, you must understand WHY the error occurred. "Try replacing X and see" is not acceptable.
12
+
13
+ ---
14
+
15
+ ## Standard Rules (adjustable via config.strictness)
16
+
17
+ ### File Organization
18
+ - File size: reference `config.thresholds.maxFileLines` (default 200 LOC)
19
+ - Naming: kebab-case for files, self-documenting names to help LLM tools (Grep/Glob) find quickly
20
+ - Each file should have single responsibility — if a file has > 5 functions/exports, consider splitting
21
+ - DO NOT create new files when you can edit existing ones (avoid file bloat)
22
+ - Use composition over deep inheritance
23
+
24
+ ### Code Quality
25
+ - No hardcoded secrets, credentials, or API keys in code
26
+ - Input validation at system boundaries (user input, external APIs)
27
+ - Error handling at system boundaries — do not over-handle internal code
28
+ - Clean, readable code — code should be self-explanatory, comments only for complex logic
29
+ - Consistent with existing conventions in the codebase
30
+
31
+ ### Workflow
32
+ - Retry limit: reference `config.thresholds.maxRetries` (default 3)
33
+ - After max retries: STOP, report failure, suggest manual steps
34
+ - Agent timeout: reference `config.thresholds.agentTimeoutMs` (default 3 min)
35
+ - Each agent declares files it will modify — do not edit files outside scope
36
+
37
+ ### Testing
38
+ - Build must pass before claiming done
39
+ - Tests must pass — do not ignore failing tests
40
+ - Do not use fake data, mocks, or tricks just to pass tests
41
+ - Flaky test: investigate root cause, do not retry indefinitely
42
+
43
+ ### Code Review (depends on strictness level)
44
+ - **strict**: Full review + security audit + performance check + type safety
45
+ - **balanced**: Review + security basics + obvious performance issues
46
+ - **relaxed**: Build + test pass, review only when there are red flags
47
+
48
+ ### Git
49
+ - Commit messages: English, describe the change, < config.commitMessageMaxChars chars
50
+ - Run build before committing
51
+ - Run tests before pushing
52
+ - Do not commit files containing secrets (.env, credentials, API keys)
53
+ - Do not commit generated files (dist/, build/, coverage/)
54
+ - Clean, professional commit messages — do not reference AI
55
+
56
+ ### Pre-commit Checklist
57
+ 1. `build` pass — no syntax/type errors
58
+ 2. `test` pass — no failing tests
59
+ 3. `lint` pass — no critical violations (if a linter exists)
60
+ 4. Review diff — only commit changes related to the task
61
+ 5. No secrets — grep for passwords, tokens, keys
62
+
63
+ ---
64
+
65
+ ## Guidelines (suggestions, not enforced)
66
+
67
+ - Prefer composition over inheritance
68
+ - YAGNI — only build what is needed right now
69
+ - KISS — the simplest solution that works
70
+ - DRY — but 3 identical lines are better than 1 premature abstraction
71
+ - Document non-obvious decisions, do not comment obvious code
72
+ - Prefer editing existing files over creating new ones
73
+ - When unsure: research first, plan second, implement last
74
+ - Agents should use `sequential-thinking` for complex analysis
75
+ - When needing latest docs/APIs: research before assuming
@@ -0,0 +1,77 @@
1
+ ---
2
+ name: backend-development
3
+ description: API design, server architecture, authentication, error handling, and backend performance optimization
4
+ ---
5
+
6
+ # Backend Development
7
+
8
+ ## Triggers
9
+
10
+ Activate this skill when:
11
+ - Designing or building REST/GraphQL APIs
12
+ - Planning server architecture or microservice boundaries
13
+ - Implementing authentication and authorization
14
+ - Setting up error handling and validation
15
+ - Optimizing database queries or API response times
16
+ - Adding logging, monitoring, or observability
17
+ - Designing gRPC services or protobuf schemas
18
+ - Implementing webhooks (sending or receiving)
19
+ - Applying event sourcing, CQRS, or saga patterns
20
+ - Setting up distributed tracing or circuit breakers
21
+ - Configuring health checks, alerting, or resilience patterns
22
+ - Working with message queues (RabbitMQ, Kafka)
23
+
24
+ ## Process
25
+
26
+ ### 1. API Design
27
+ - Define resources and their relationships
28
+ - Map operations to HTTP methods and endpoints
29
+ - Design request/response schemas with TypeScript or JSON Schema
30
+ - Plan pagination, filtering, and sorting strategies
31
+ - Document with OpenAPI/Swagger from the start
32
+
33
+ ### 2. Implementation
34
+ - Set up layered architecture (controller → service → repository)
35
+ - Implement input validation at the controller layer
36
+ - Write business logic in the service layer (no HTTP concepts)
37
+ - Use repository pattern for data access abstraction
38
+ - Apply dependency injection for testability
39
+
40
+ ### 3. Error Handling
41
+ - Use consistent error response format (RFC 7807 Problem Details)
42
+ - Categorize errors: client (4xx) vs. server (5xx)
43
+ - Never expose internal details (stack traces, SQL) in production
44
+ - Log errors with correlation IDs for tracing
45
+ - Implement global error handler middleware
46
+
47
+ ### 4. Security
48
+ - Validate and sanitize all inputs (allowlist, not blocklist)
49
+ - Implement authentication (JWT, OAuth2, session) based on requirements
50
+ - Apply authorization at route and resource level
51
+ - Use parameterized queries (never string concatenation for SQL)
52
+ - Set security headers (CORS, CSP, HSTS, X-Frame-Options)
53
+ - Rate limit public endpoints
54
+
55
+ ### 5. Testing
56
+ - Unit test service layer logic with mocked repositories
57
+ - Integration test API endpoints with test database
58
+ - Contract tests for inter-service communication
59
+ - Load test critical endpoints with k6 or Artillery
60
+
61
+ ### 6. Documentation
62
+ - Generate OpenAPI spec from code annotations or schema-first
63
+ - Include request/response examples for every endpoint
64
+ - Document error codes and their meanings
65
+ - Provide authentication setup instructions
66
+
67
+ ## References
68
+
69
+ - [API Design Guide](references/api-design-guide.md) — REST principles, versioning, error formats, auth patterns
70
+ - [Architecture Patterns](references/architecture-patterns.md) — layered architecture, middleware, DI, caching, logging
71
+ - [Advanced Patterns](references/advanced-patterns.md) — gRPC, webhooks, event sourcing, CQRS, sagas, message queues
72
+ - [Observability & Resilience](references/observability-resilience.md) — circuit breakers, tracing, health checks, logging pipelines, alerting
73
+ - [Troubleshooting](references/troubleshooting.md) — connection pool exhaustion, memory leaks, 502/504 tracing, deadlocks, JWT issues, OOM kills
74
+
75
+ ## Assets
76
+
77
+ - [Sample Output](assets/sample-output.md) — example API design for a Task Management service