dino-spec 0.11.0 → 5.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 (322) hide show
  1. package/README.md +209 -227
  2. package/dist/agents/index.d.ts +52 -0
  3. package/dist/agents/index.d.ts.map +1 -0
  4. package/dist/agents/index.js +337 -0
  5. package/dist/agents/index.js.map +1 -0
  6. package/dist/cli/index.d.ts +15 -0
  7. package/dist/cli/index.d.ts.map +1 -1
  8. package/dist/cli/index.js +83 -271
  9. package/dist/cli/index.js.map +1 -1
  10. package/dist/commands/hooks/index.d.ts +51 -0
  11. package/dist/commands/hooks/index.d.ts.map +1 -0
  12. package/dist/commands/hooks/index.js +456 -0
  13. package/dist/commands/hooks/index.js.map +1 -0
  14. package/dist/commands/hooks/registry.d.ts +25 -0
  15. package/dist/commands/hooks/registry.d.ts.map +1 -0
  16. package/dist/commands/hooks/registry.js +148 -0
  17. package/dist/commands/hooks/registry.js.map +1 -0
  18. package/dist/commands/hooks/types.d.ts +93 -0
  19. package/dist/commands/hooks/types.d.ts.map +1 -0
  20. package/dist/commands/hooks/types.js +5 -0
  21. package/dist/commands/hooks/types.js.map +1 -0
  22. package/dist/commands/hooks/utils.d.ts +86 -0
  23. package/dist/commands/hooks/utils.d.ts.map +1 -0
  24. package/dist/commands/hooks/utils.js +154 -0
  25. package/dist/commands/hooks/utils.js.map +1 -0
  26. package/dist/commands/init.d.ts +44 -1
  27. package/dist/commands/init.d.ts.map +1 -1
  28. package/dist/commands/init.js +266 -305
  29. package/dist/commands/init.js.map +1 -1
  30. package/dist/commands/refresh.d.ts +17 -0
  31. package/dist/commands/refresh.d.ts.map +1 -0
  32. package/dist/commands/refresh.js +173 -0
  33. package/dist/commands/refresh.js.map +1 -0
  34. package/dist/commands/session.d.ts +38 -0
  35. package/dist/commands/session.d.ts.map +1 -0
  36. package/dist/commands/session.js +179 -0
  37. package/dist/commands/session.js.map +1 -0
  38. package/dist/commands/status.d.ts +7 -2
  39. package/dist/commands/status.d.ts.map +1 -1
  40. package/dist/commands/status.js +94 -57
  41. package/dist/commands/status.js.map +1 -1
  42. package/dist/core/analyzer/command-extractor.d.ts +15 -0
  43. package/dist/core/analyzer/command-extractor.d.ts.map +1 -0
  44. package/dist/core/analyzer/command-extractor.js +183 -0
  45. package/dist/core/analyzer/command-extractor.js.map +1 -0
  46. package/dist/core/analyzer/index.d.ts +18 -0
  47. package/dist/core/analyzer/index.d.ts.map +1 -0
  48. package/dist/core/analyzer/index.js +36 -0
  49. package/dist/core/analyzer/index.js.map +1 -0
  50. package/dist/core/analyzer/pattern-detector.d.ts +15 -0
  51. package/dist/core/analyzer/pattern-detector.d.ts.map +1 -0
  52. package/dist/core/analyzer/pattern-detector.js +156 -0
  53. package/dist/core/analyzer/pattern-detector.js.map +1 -0
  54. package/dist/core/analyzer/project-detector.d.ts +11 -0
  55. package/dist/core/analyzer/project-detector.d.ts.map +1 -0
  56. package/dist/core/analyzer/project-detector.js +164 -0
  57. package/dist/core/analyzer/project-detector.js.map +1 -0
  58. package/dist/core/analyzer/structure-mapper.d.ts +15 -0
  59. package/dist/core/analyzer/structure-mapper.d.ts.map +1 -0
  60. package/dist/core/analyzer/structure-mapper.js +266 -0
  61. package/dist/core/analyzer/structure-mapper.js.map +1 -0
  62. package/dist/core/analyzer/types.d.ts +69 -0
  63. package/dist/core/analyzer/types.d.ts.map +1 -0
  64. package/dist/core/analyzer/types.js +5 -0
  65. package/dist/core/analyzer/types.js.map +1 -0
  66. package/dist/core/checkpoints/checkpoint.d.ts +75 -0
  67. package/dist/core/checkpoints/checkpoint.d.ts.map +1 -0
  68. package/dist/core/checkpoints/checkpoint.js +254 -0
  69. package/dist/core/checkpoints/checkpoint.js.map +1 -0
  70. package/dist/core/checkpoints/handoff.d.ts +58 -0
  71. package/dist/core/checkpoints/handoff.d.ts.map +1 -0
  72. package/dist/core/checkpoints/handoff.js +234 -0
  73. package/dist/core/checkpoints/handoff.js.map +1 -0
  74. package/dist/core/checkpoints/index.d.ts +8 -0
  75. package/dist/core/checkpoints/index.d.ts.map +1 -0
  76. package/dist/core/checkpoints/index.js +8 -0
  77. package/dist/core/checkpoints/index.js.map +1 -0
  78. package/dist/core/config/constants.d.ts +26 -0
  79. package/dist/core/config/constants.d.ts.map +1 -0
  80. package/dist/core/config/constants.js +29 -0
  81. package/dist/core/config/constants.js.map +1 -0
  82. package/dist/core/config/generated-files.d.ts +30 -0
  83. package/dist/core/config/generated-files.d.ts.map +1 -0
  84. package/dist/core/config/generated-files.js +41 -0
  85. package/dist/core/config/generated-files.js.map +1 -0
  86. package/dist/core/config/index.d.ts +14 -0
  87. package/dist/core/config/index.d.ts.map +1 -0
  88. package/dist/core/config/index.js +14 -0
  89. package/dist/core/config/index.js.map +1 -0
  90. package/dist/core/config/markers.d.ts +20 -0
  91. package/dist/core/config/markers.d.ts.map +1 -0
  92. package/dist/core/config/markers.js +20 -0
  93. package/dist/core/config/markers.js.map +1 -0
  94. package/dist/core/config/paths.d.ts +17 -0
  95. package/dist/core/config/paths.d.ts.map +1 -0
  96. package/dist/core/config/paths.js +16 -0
  97. package/dist/core/config/paths.js.map +1 -0
  98. package/dist/core/config.d.ts +11 -85
  99. package/dist/core/config.d.ts.map +1 -1
  100. package/dist/core/config.js +10 -290
  101. package/dist/core/config.js.map +1 -1
  102. package/dist/core/errors/index.d.ts +183 -0
  103. package/dist/core/errors/index.d.ts.map +1 -0
  104. package/dist/core/errors/index.js +348 -0
  105. package/dist/core/errors/index.js.map +1 -0
  106. package/dist/core/generator/claude-md.d.ts +48 -0
  107. package/dist/core/generator/claude-md.d.ts.map +1 -0
  108. package/dist/core/generator/claude-md.js +275 -0
  109. package/dist/core/generator/claude-md.js.map +1 -0
  110. package/dist/core/generator/index.d.ts +6 -0
  111. package/dist/core/generator/index.d.ts.map +1 -0
  112. package/dist/core/generator/index.js +6 -0
  113. package/dist/core/generator/index.js.map +1 -0
  114. package/dist/core/generator/session-md.d.ts +137 -0
  115. package/dist/core/generator/session-md.d.ts.map +1 -0
  116. package/dist/core/generator/session-md.js +737 -0
  117. package/dist/core/generator/session-md.js.map +1 -0
  118. package/dist/core/intelligence/focus-detector.d.ts +22 -0
  119. package/dist/core/intelligence/focus-detector.d.ts.map +1 -0
  120. package/dist/core/intelligence/focus-detector.js +241 -0
  121. package/dist/core/intelligence/focus-detector.js.map +1 -0
  122. package/dist/core/intelligence/index.d.ts +8 -0
  123. package/dist/core/intelligence/index.d.ts.map +1 -0
  124. package/dist/core/intelligence/index.js +8 -0
  125. package/dist/core/intelligence/index.js.map +1 -0
  126. package/dist/core/intelligence/progress-tracker.d.ts +55 -0
  127. package/dist/core/intelligence/progress-tracker.d.ts.map +1 -0
  128. package/dist/core/intelligence/progress-tracker.js +154 -0
  129. package/dist/core/intelligence/progress-tracker.js.map +1 -0
  130. package/dist/core/tasks/index.d.ts +8 -0
  131. package/dist/core/tasks/index.d.ts.map +1 -0
  132. package/dist/core/tasks/index.js +8 -0
  133. package/dist/core/tasks/index.js.map +1 -0
  134. package/dist/core/tasks/registry.d.ts +89 -0
  135. package/dist/core/tasks/registry.d.ts.map +1 -0
  136. package/dist/core/tasks/registry.js +341 -0
  137. package/dist/core/tasks/registry.js.map +1 -0
  138. package/dist/core/tasks/types.d.ts +166 -0
  139. package/dist/core/tasks/types.d.ts.map +1 -0
  140. package/dist/core/tasks/types.js +8 -0
  141. package/dist/core/tasks/types.js.map +1 -0
  142. package/dist/core/templates/index.d.ts +6 -9
  143. package/dist/core/templates/index.d.ts.map +1 -1
  144. package/dist/core/templates/index.js +7 -8
  145. package/dist/core/templates/index.js.map +1 -1
  146. package/dist/hooks/index.d.ts +10 -0
  147. package/dist/hooks/index.d.ts.map +1 -0
  148. package/dist/hooks/index.js +10 -0
  149. package/dist/hooks/index.js.map +1 -0
  150. package/dist/hooks/post-build.d.ts +12 -0
  151. package/dist/hooks/post-build.d.ts.map +1 -0
  152. package/dist/hooks/post-build.js +501 -0
  153. package/dist/hooks/post-build.js.map +1 -0
  154. package/dist/hooks/post-edit.d.ts +14 -0
  155. package/dist/hooks/post-edit.d.ts.map +1 -0
  156. package/dist/hooks/post-edit.js +451 -0
  157. package/dist/hooks/post-edit.js.map +1 -0
  158. package/dist/hooks/post-lint.d.ts +12 -0
  159. package/dist/hooks/post-lint.d.ts.map +1 -0
  160. package/dist/hooks/post-lint.js +552 -0
  161. package/dist/hooks/post-lint.js.map +1 -0
  162. package/dist/hooks/post-test.d.ts +13 -0
  163. package/dist/hooks/post-test.d.ts.map +1 -0
  164. package/dist/hooks/post-test.js +522 -0
  165. package/dist/hooks/post-test.js.map +1 -0
  166. package/dist/hooks/pre-compact.d.ts +17 -0
  167. package/dist/hooks/pre-compact.d.ts.map +1 -0
  168. package/dist/hooks/pre-compact.js +277 -0
  169. package/dist/hooks/pre-compact.js.map +1 -0
  170. package/dist/hooks/session-end.d.ts +14 -0
  171. package/dist/hooks/session-end.d.ts.map +1 -0
  172. package/dist/hooks/session-end.js +116 -0
  173. package/dist/hooks/session-end.js.map +1 -0
  174. package/dist/hooks/session-start.d.ts +18 -0
  175. package/dist/hooks/session-start.d.ts.map +1 -0
  176. package/dist/hooks/session-start.js +160 -0
  177. package/dist/hooks/session-start.js.map +1 -0
  178. package/dist/hooks/subagent-start.d.ts +15 -0
  179. package/dist/hooks/subagent-start.d.ts.map +1 -0
  180. package/dist/hooks/subagent-start.js +238 -0
  181. package/dist/hooks/subagent-start.js.map +1 -0
  182. package/dist/hooks/subagent-stop.d.ts +15 -0
  183. package/dist/hooks/subagent-stop.d.ts.map +1 -0
  184. package/dist/hooks/subagent-stop.js +256 -0
  185. package/dist/hooks/subagent-stop.js.map +1 -0
  186. package/dist/hooks/types.d.ts +145 -0
  187. package/dist/hooks/types.d.ts.map +1 -0
  188. package/dist/hooks/types.js +211 -0
  189. package/dist/hooks/types.js.map +1 -0
  190. package/dist/hooks/user-prompt-submit.d.ts +15 -0
  191. package/dist/hooks/user-prompt-submit.d.ts.map +1 -0
  192. package/dist/hooks/user-prompt-submit.js +328 -0
  193. package/dist/hooks/user-prompt-submit.js.map +1 -0
  194. package/dist/interactive/index.d.ts +86 -0
  195. package/dist/interactive/index.d.ts.map +1 -0
  196. package/dist/interactive/index.js +284 -0
  197. package/dist/interactive/index.js.map +1 -0
  198. package/dist/mcp/index.d.ts +5 -0
  199. package/dist/mcp/index.d.ts.map +1 -0
  200. package/dist/mcp/index.js +5 -0
  201. package/dist/mcp/index.js.map +1 -0
  202. package/dist/mcp/server.d.ts +77 -0
  203. package/dist/mcp/server.d.ts.map +1 -0
  204. package/dist/mcp/server.js +1068 -0
  205. package/dist/mcp/server.js.map +1 -0
  206. package/dist/plugin/index.d.ts +87 -0
  207. package/dist/plugin/index.d.ts.map +1 -0
  208. package/dist/plugin/index.js +235 -0
  209. package/dist/plugin/index.js.map +1 -0
  210. package/dist/rules/index.d.ts +40 -0
  211. package/dist/rules/index.d.ts.map +1 -0
  212. package/dist/rules/index.js +281 -0
  213. package/dist/rules/index.js.map +1 -0
  214. package/dist/skills/index.d.ts +61 -0
  215. package/dist/skills/index.d.ts.map +1 -0
  216. package/dist/skills/index.js +616 -0
  217. package/dist/skills/index.js.map +1 -0
  218. package/dist/statusline/index.d.ts +48 -0
  219. package/dist/statusline/index.d.ts.map +1 -0
  220. package/dist/statusline/index.js +192 -0
  221. package/dist/statusline/index.js.map +1 -0
  222. package/dist/utils/ascii-art.d.ts +0 -15
  223. package/dist/utils/ascii-art.d.ts.map +1 -1
  224. package/dist/utils/ascii-art.js +0 -15
  225. package/dist/utils/ascii-art.js.map +1 -1
  226. package/package.json +2 -2
  227. package/dist/cli/handler.d.ts +0 -5
  228. package/dist/cli/handler.d.ts.map +0 -1
  229. package/dist/cli/handler.js +0 -38
  230. package/dist/cli/handler.js.map +0 -1
  231. package/dist/commands/active.d.ts +0 -5
  232. package/dist/commands/active.d.ts.map +0 -1
  233. package/dist/commands/active.js +0 -85
  234. package/dist/commands/active.js.map +0 -1
  235. package/dist/commands/archive.d.ts +0 -9
  236. package/dist/commands/archive.d.ts.map +0 -1
  237. package/dist/commands/archive.js +0 -77
  238. package/dist/commands/archive.js.map +0 -1
  239. package/dist/commands/focus.d.ts +0 -90
  240. package/dist/commands/focus.d.ts.map +0 -1
  241. package/dist/commands/focus.js +0 -1965
  242. package/dist/commands/focus.js.map +0 -1
  243. package/dist/commands/hooks.d.ts +0 -19
  244. package/dist/commands/hooks.d.ts.map +0 -1
  245. package/dist/commands/hooks.js +0 -336
  246. package/dist/commands/hooks.js.map +0 -1
  247. package/dist/commands/list.d.ts +0 -12
  248. package/dist/commands/list.d.ts.map +0 -1
  249. package/dist/commands/list.js +0 -156
  250. package/dist/commands/list.js.map +0 -1
  251. package/dist/commands/museum.d.ts +0 -9
  252. package/dist/commands/museum.d.ts.map +0 -1
  253. package/dist/commands/museum.js +0 -252
  254. package/dist/commands/museum.js.map +0 -1
  255. package/dist/commands/provider.d.ts +0 -60
  256. package/dist/commands/provider.d.ts.map +0 -1
  257. package/dist/commands/provider.js +0 -388
  258. package/dist/commands/provider.js.map +0 -1
  259. package/dist/commands/skill.d.ts +0 -17
  260. package/dist/commands/skill.d.ts.map +0 -1
  261. package/dist/commands/skill.js +0 -143
  262. package/dist/commands/skill.js.map +0 -1
  263. package/dist/commands/update.d.ts +0 -10
  264. package/dist/commands/update.d.ts.map +0 -1
  265. package/dist/commands/update.js +0 -247
  266. package/dist/commands/update.js.map +0 -1
  267. package/dist/commands/view.d.ts +0 -5
  268. package/dist/commands/view.d.ts.map +0 -1
  269. package/dist/commands/view.js +0 -164
  270. package/dist/commands/view.js.map +0 -1
  271. package/dist/core/skills/index.d.ts +0 -7
  272. package/dist/core/skills/index.d.ts.map +0 -1
  273. package/dist/core/skills/index.js +0 -6
  274. package/dist/core/skills/index.js.map +0 -1
  275. package/dist/core/skills/loader.d.ts +0 -38
  276. package/dist/core/skills/loader.d.ts.map +0 -1
  277. package/dist/core/skills/loader.js +0 -144
  278. package/dist/core/skills/loader.js.map +0 -1
  279. package/dist/core/skills/registry.d.ts +0 -31
  280. package/dist/core/skills/registry.d.ts.map +0 -1
  281. package/dist/core/skills/registry.js +0 -150
  282. package/dist/core/skills/registry.js.map +0 -1
  283. package/dist/core/skills/types.d.ts +0 -92
  284. package/dist/core/skills/types.d.ts.map +0 -1
  285. package/dist/core/skills/types.js +0 -5
  286. package/dist/core/skills/types.js.map +0 -1
  287. package/dist/core/templates/agent-templates.d.ts +0 -14
  288. package/dist/core/templates/agent-templates.d.ts.map +0 -1
  289. package/dist/core/templates/agent-templates.js +0 -586
  290. package/dist/core/templates/agent-templates.js.map +0 -1
  291. package/dist/core/templates/dna-skills.d.ts +0 -27
  292. package/dist/core/templates/dna-skills.d.ts.map +0 -1
  293. package/dist/core/templates/dna-skills.js +0 -276
  294. package/dist/core/templates/dna-skills.js.map +0 -1
  295. package/dist/core/templates/dna-template.d.ts +0 -8
  296. package/dist/core/templates/dna-template.d.ts.map +0 -1
  297. package/dist/core/templates/dna-template.js +0 -101
  298. package/dist/core/templates/dna-template.js.map +0 -1
  299. package/dist/core/templates/reference-docs.d.ts +0 -9
  300. package/dist/core/templates/reference-docs.d.ts.map +0 -1
  301. package/dist/core/templates/reference-docs.js +0 -1042
  302. package/dist/core/templates/reference-docs.js.map +0 -1
  303. package/dist/core/templates/rules-template.d.ts +0 -5
  304. package/dist/core/templates/rules-template.d.ts.map +0 -1
  305. package/dist/core/templates/rules-template.js +0 -137
  306. package/dist/core/templates/rules-template.js.map +0 -1
  307. package/dist/core/templates/skill-template.d.ts +0 -5
  308. package/dist/core/templates/skill-template.d.ts.map +0 -1
  309. package/dist/core/templates/skill-template.js +0 -264
  310. package/dist/core/templates/skill-template.js.map +0 -1
  311. package/dist/core/templates/slash-commands.d.ts +0 -11
  312. package/dist/core/templates/slash-commands.d.ts.map +0 -1
  313. package/dist/core/templates/slash-commands.js +0 -883
  314. package/dist/core/templates/slash-commands.js.map +0 -1
  315. package/dist/utils/errors.d.ts +0 -34
  316. package/dist/utils/errors.d.ts.map +0 -1
  317. package/dist/utils/errors.js +0 -53
  318. package/dist/utils/errors.js.map +0 -1
  319. package/dist/utils/validation.d.ts +0 -145
  320. package/dist/utils/validation.d.ts.map +0 -1
  321. package/dist/utils/validation.js +0 -103
  322. package/dist/utils/validation.js.map +0 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # dino-spec
2
2
 
3
- > Spec-driven development workflow for Claude Code with dinosaur-themed phases
3
+ > Automatic context engineering for Claude Code
4
4
 
5
5
  ```
6
6
  __
@@ -10,30 +10,101 @@
10
10
  <__|-|__|
11
11
  ```
12
12
 
13
- **dino-spec** is a CLI tool that brings structured, specification-driven development to [Claude Code](https://claude.ai/code). It guides you through a dinosaur-themed workflow: from discovering requirements to hunting down implementation tasks.
13
+ **dino-spec** is a CLI tool that brings structured, context-aware development to [Claude Code](https://claude.ai/code). It automatically maintains session state through hooks, ensuring Claude always has the context it needs.
14
14
 
15
15
  ## Why dino-spec?
16
16
 
17
17
  When working with AI coding assistants, projects often suffer from:
18
18
 
19
19
  - **Context loss** - AI forgets what you're building mid-conversation
20
- - **Scope creep** - Features expand without clear boundaries
20
+ - **State blindness** - No awareness of test/build/lint status
21
21
  - **Unstructured iteration** - No clear progression from idea to implementation
22
- - **Lost specifications** - Requirements scattered across conversations
23
22
 
24
- **dino-spec** solves these problems by:
23
+ **dino-spec v5.0.0** solves these with:
25
24
 
26
- - Persisting specifications in `.dino/` files that survive context resets
27
- - Enforcing a structured workflow with clear phase transitions
28
- - Breaking work into small, trackable tasks (max 8-10 per phase)
29
- - Integrating directly with Claude Code via slash commands
25
+ - **Progressive task delegation** - Automatic delegation to specialized agents with context handoffs
26
+ - **Progressive context loading** - Minimal initial tokens, load context on-demand via MCP resources
27
+ - **Automatic context** via Claude Code hooks that maintain session state
28
+ - **Skill-based workflow** with phases from discovery to completion
29
+ - **Session intelligence** that tracks focus, blockers, and progress
30
30
 
31
- ## Who is this for?
31
+ ## What's New in v5.0.0
32
32
 
33
- - **Developers using Claude Code** who want structured AI-assisted development
34
- - **Teams** who need reproducible specification workflows
35
- - **Solo developers** building complex features incrementally
36
- - **Anyone** tired of re-explaining context to AI assistants
33
+ ### Progressive Task Delegation
34
+
35
+ Automatically delegate complex tasks to specialized agents while preserving context:
36
+
37
+ ```
38
+ User: "Implement caching for the API"
39
+
40
+ ┌────────────────────────────────────────────────┐
41
+ │ @dino-analyst → @dino-architect → @dino-implementer │
42
+ │ (explore) (design) (implement) │
43
+ └────────────────────────────────────────────────┘
44
+ ```
45
+
46
+ Each agent creates **checkpoints** with their discoveries, which get passed to the next agent via **handoffs**. No re-reading the entire codebase!
47
+
48
+ #### MCP Tools for Task Management
49
+
50
+ | Tool | Purpose |
51
+ |------|---------|
52
+ | `dino_task_create` | Create a task in the registry |
53
+ | `dino_task_breakdown` | Split task into subtasks with roles |
54
+ | `dino_checkpoint_create` | Save findings for handoff |
55
+ | `dino_task_delegate` | Delegate to specialized agent |
56
+ | `dino_task_status` | View task tree and progress |
57
+
58
+ #### New Resources
59
+
60
+ | Resource | Description |
61
+ |----------|-------------|
62
+ | `@dino://tasks` | Current task tree and progress |
63
+ | `@dino://handoff` | Active handoff context |
64
+
65
+ ### Specialized Agents
66
+
67
+ | Agent | Role | Purpose |
68
+ |-------|------|---------|
69
+ | `@dino-analyst` | Explorer | Read-only codebase research |
70
+ | `@dino-architect` | Planner | Design and planning (Opus) |
71
+ | `@dino-implementer` | Implementer | Full implementation |
72
+ | `@dino-tester` | Tester | Test writing and execution |
73
+ | `@dino-reviewer` | Reviewer | Code review and QA |
74
+
75
+ ### Auto-Delegation Detection
76
+
77
+ The `user-prompt-submit` hook detects complex prompts and suggests delegation:
78
+
79
+ ```
80
+ [dino] Multi-step task detected. Suggested delegation: explorer -> planner -> implementer
81
+ ```
82
+
83
+ ## Previous: v4.0.0 Features
84
+
85
+ ### Progressive Context Loading
86
+
87
+ Reduce initial context by ~59% with the new `--minimal` mode:
88
+
89
+ ```bash
90
+ dino init --minimal
91
+ ```
92
+
93
+ Instead of loading everything upfront, context is loaded on-demand:
94
+
95
+ | Resource | Description | Access |
96
+ |----------|-------------|--------|
97
+ | `@dino://session` | Current session state | On-demand |
98
+ | `@dino://structure` | Project architecture | On-demand |
99
+ | `@dino://patterns` | Coding conventions | On-demand |
100
+ | `@dino://commands` | Build/test/lint commands | On-demand |
101
+ | `@dino://skills` | Available workflow skills | On-demand |
102
+
103
+ ### Smart Hooks
104
+
105
+ - **Context Router**: Session-start only outputs critical alerts (failing tests, blockers)
106
+ - **Intent Detection**: User prompts trigger relevant resource suggestions
107
+ - **Session Compaction**: Automatically archives old session data
37
108
 
38
109
  ## Installation
39
110
 
@@ -56,63 +127,65 @@ npm link
56
127
  ## Quick Start
57
128
 
58
129
  ```bash
59
- # Initialize in your project
130
+ # Initialize in your project (standard mode)
60
131
  cd your-project
61
132
  dino init
62
133
 
63
- # Open Claude Code and run:
64
- # /dino.discover add user authentication
134
+ # Or use minimal mode for progressive context loading
135
+ dino init --minimal
136
+
137
+ # Check current session state
138
+ dino status
139
+
140
+ # Open Claude Code and use workflow skills:
141
+ # /dino.discover, /dino.scout, /dino.hunt, etc.
65
142
  ```
66
143
 
67
- ## The Dinosaur Workflow
144
+ ## The Workflow
68
145
 
69
- Each phase builds on the previous, ensuring nothing is lost:
146
+ Each phase builds on the previous, with automatic session tracking:
70
147
 
71
148
  ```
72
- discover → scout → sniff → nest → hatch → hunt → aging → fossil → [extinct]
149
+ discover → scout → sniff → nest → hatch → hunt → aging → fossil
73
150
  ```
74
151
 
75
- | Phase | Command | Purpose |
76
- | ------------ | ---------------- | ---------------------------------------------- |
77
- | **Discover** | `/dino.discover` | Capture requirements and create specification |
78
- | **Scout** | `/dino.scout` | Research codebase and technical options |
79
- | **Sniff** | `/dino.sniff` | Sniff out ambiguities with targeted questions | (optional) |
80
- | **Nest** | `/dino.nest` | Create implementation plan (Plan Mode) |
81
- | **Hatch** | `/dino.hatch` | Break plan into tasks with requirement mapping |
82
- | **Hunt** | `/dino.hunt` | Implement tasks with progress tracking |
83
- | **Aging** | `/dino.aging` | Create and run tests to verify business logic | (optional) |
84
- | **Fossil** | `/dino.fossil` | Archive completed specification |
85
- | **Extinct** | `/dino.extinct` | Permanently remove archive, keep museum record | (optional) |
152
+ | Phase | Skill | Purpose |
153
+ | ------------ | ---------------- | -------------------------------------------- |
154
+ | **Discover** | `/dino.discover` | Capture requirements from user prompts |
155
+ | **Scout** | `/dino.scout` | Research codebase and explore options |
156
+ | **Sniff** | `/dino.sniff` | Clarify ambiguities with targeted questions |
157
+ | **Nest** | `/dino.nest` | Plan implementation (uses Plan Mode) |
158
+ | **Hatch** | `/dino.hatch` | Break plan into actionable todos |
159
+ | **Hunt** | `/dino.hunt` | Execute implementation with tracking |
160
+ | **Aging** | `/dino.aging` | Verify with tests |
161
+ | **Fossil** | `/dino.fossil` | Archive and commit completed work |
86
162
 
87
- Optional: `/dino.next` suggests follow-up features based on completed work.
163
+ Utility skills: `/dino.status`, `/dino.focus`, `/dino.next`
88
164
 
89
165
  ## CLI Commands
90
166
 
91
- These commands work **without AI** - saving tokens and providing instant feedback:
92
-
93
167
  ```bash
94
- dino init # Initialize dino-spec in your project
95
- dino status [spec] # Show current spec progress
96
- dino list # List all specifications
97
- dino view # Interactive dashboard
98
- dino active [spec] # Show or set active specification
99
- dino archive <spec> # Archive completed specification
100
- dino museum [spec] # View museum records (extinct specs summary)
101
- dino update # Update configuration files
102
-
103
- # Skill management
104
- dino skill list # List installed skills
105
- dino skill create # Create custom skill
106
- dino skill install # Install from registry
107
- dino skill remove # Remove a skill
108
-
109
- # API Provider management
110
- dino provider list # List configured providers
111
- dino provider add # Add a new provider (Z.AI, etc.)
112
- dino provider remove # Remove a provider
113
- dino provider show # Show provider details
114
- dino provider setup # Install shell functions
115
- dino provider -h # Show provider help
168
+ # Initialize
169
+ dino init # Standard initialization
170
+ dino init --minimal # Minimal mode for progressive loading
171
+ dino init --force # Reinitialize, overwriting existing
172
+
173
+ # Status and refresh
174
+ dino status # Show current session state
175
+ dino refresh # Re-analyze codebase and update context
176
+ dino refresh --minimal # Switch to minimal mode
177
+
178
+ # Session management
179
+ dino session read # Display session state
180
+ dino session update # Update session (blockers, focus, etc.)
181
+
182
+ # Hooks
183
+ dino hooks setup # Install Claude Code hooks
184
+ dino hooks status # Show hook configuration
185
+ dino hooks list # List all available hooks
186
+ dino hooks enable <id> # Enable a specific hook
187
+ dino hooks disable <id> # Disable a specific hook
188
+ dino hooks remove # Remove all hooks
116
189
  ```
117
190
 
118
191
  ## Project Structure
@@ -121,194 +194,111 @@ After `dino init`, your project will have:
121
194
 
122
195
  ```
123
196
  your-project/
197
+ ├── CLAUDE.md # Project context (auto-updated)
124
198
  ├── .claude/
125
- │ ├── commands/ # Slash commands for Claude Code (12 total)
126
- │ │ ├── dino.discover.md
127
- │ │ ├── dino.scout.md
128
- │ │ ├── dino.sniff.md
129
- │ │ ├── dino.nest.md
130
- │ │ ├── dino.hatch.md
131
- │ │ ├── dino.hunt.md
132
- │ │ ├── dino.aging.md
133
- │ │ ├── dino.fossil.md
134
- │ │ ├── dino.extinct.md
135
- │ │ └── ...
136
- ├── skills/dino-workflow/
137
- │ └── SKILL.md # Workflow skill definition
138
- │ └── rules/dino/
139
- │ └── workflow.md # Workflow rules
199
+ │ ├── skills/dino/ # Workflow skills
200
+ │ │ ├── discover.md # Discovery phase
201
+ │ │ ├── scout.md # Research phase
202
+ │ │ ├── sniff.md # Clarification phase
203
+ │ │ ├── nest.md # Planning phase
204
+ │ │ ├── hatch.md # Breakdown phase
205
+ │ │ ├── hunt.md # Implementation phase
206
+ │ │ ├── aging.md # Verification phase
207
+ │ │ ├── fossil.md # Completion phase
208
+ │ │ ├── status.md # Status utility
209
+ │ │ ├── focus.md # Focus utility
210
+ │ └── next.md # Next steps utility
211
+ ├── rules/dino/ # Workflow rules
212
+ │ └── agents/ # Specialized agents
140
213
  └── .dino/
141
- ├── active.json # Current active specification
142
- ├── dna.md # Project conventions
143
- ├── specs/ # Active specifications
144
- ├── archive/ # Completed specifications
145
- └── museum/ # Minimal records of extinct specs
214
+ ├── session.md # Session state (focus, blockers, signals)
215
+ ├── structure.json # Cached codebase analysis
216
+ ├── patterns.json # Coding patterns (@dino://patterns)
217
+ ├── commands.json # Commands (@dino://commands)
218
+ ├── config.json # Configuration
219
+ ├── archive/ # Session history archive
220
+ ├── tasks/ # Task registry (v5.0.0)
221
+ ├── checkpoints/ # Agent checkpoints (v5.0.0)
222
+ └── handoff/ # Agent handoffs (v5.0.0)
146
223
  ```
147
224
 
148
- ## Specification Files
149
-
150
- Each specification contains:
151
-
152
- ```
153
- .dino/specs/{spec-id}/
154
- ├── spec.md # Requirements and success criteria
155
- ├── research.md # Technical research from scout phase
156
- ├── plan.md # Implementation plan from nest phase
157
- ├── tasks.md # Phased task checklist with requirement mapping
158
- └── tests.md # Test cases with business logic verification (aging phase)
159
- ```
160
-
161
- ## Key Features
162
-
163
- ### Context Preservation
164
- All state is stored in files. When context resets, Claude Code reads `.dino/active.json` and resumes from where you left off.
225
+ ## Session State
165
226
 
166
- ### Plan Mode Integration
167
- Complex phases (`/dino.nest`, `/dino.hatch`) automatically trigger Claude Code's Plan Mode for careful deliberation.
168
-
169
- ### Task Tracking
170
- Tasks use a simple checkbox format with requirement mapping and progress bars:
227
+ The `.dino/session.md` file tracks:
171
228
 
172
229
  ```markdown
173
- - [ ] T001 Implement user model | REQ-1
174
- - [ ] T002 [P] Add validation (parallelizable) | REQ-1, REQ-2
175
- - [x] T003 Create database schema (completed) | REQ-3
176
- ```
177
-
178
- The `| REQ-N` suffix maps tasks to requirements, ensuring every requirement is covered.
179
-
180
- ### Skill System
181
- Extend functionality with custom skills:
182
-
183
- ```bash
184
- dino skill create my-linter
185
- # Edit .claude/skills/my-linter/SKILL.md
186
- ```
187
-
188
- ### API Provider Management
189
-
190
- Use alternative API providers (like Z.AI) with Claude Code without affecting your default Anthropic subscription:
230
+ # Session State
191
231
 
192
- ```bash
193
- # Add Z.AI provider (with optional model mapping for GLM models)
194
- dino provider add zai \
195
- --url https://api.z.ai/api/anthropic \
196
- --key YOUR_API_KEY \
197
- --sonnet GLM-4.7 \
198
- --haiku GLM-4.5-Air \
199
- --opus GLM-4.7
200
-
201
- # Install shell functions for quick switching
202
- dino provider setup
203
-
204
- # Reload PowerShell profile
205
- . $PROFILE
206
- ```
207
-
208
- > **Important:** Use `https://api.z.ai/api/anthropic` (Anthropic-compatible endpoint), NOT `https://api.z.ai/api/coding/paas/v4/` (direct GLM endpoint). Claude Code requires the Anthropic-compatible API format.
232
+ ## Focus
233
+ **src/core/** (high confidence, directory-cluster)
209
234
 
210
- After setup, use these commands in any terminal:
235
+ ## Test Status
236
+ **Status:** passing
237
+ **Counts:** 121 passed, 0 failed, 0 skipped
211
238
 
212
- | Command | Description |
213
- |---------|-------------|
214
- | `claude-zai` | Launch Claude Code with Z.AI |
215
- | `claude-anthropic` | Reset to default Anthropic |
239
+ ## Build Status
240
+ **Status:** passing
216
241
 
217
- #### Minimax 2.1 Provider
242
+ ## Blockers
243
+ - Waiting for API response format decision
218
244
 
219
- Minimax 2.1 requires additional environment variables. Use the dedicated options:
220
-
221
- ```bash
222
- # Add Minimax provider (International users)
223
- dino provider add minimax \
224
- --url https://api.minimax.io/anthropic \
225
- --key YOUR_MINIMAX_API_KEY \
226
- --model MiniMax-M2.1 \
227
- --small-fast-model MiniMax-M2.1 \
228
- --sonnet MiniMax-M2.1 \
229
- --haiku MiniMax-M2.1 \
230
- --opus MiniMax-M2.1 \
231
- --disable-nonessential-traffic
232
-
233
- # For China users, use:
234
- # --url https://api.minimaxi.com/anthropic
235
-
236
- # Install shell functions
237
- dino provider setup
238
-
239
- # Reload PowerShell profile
240
- . $PROFILE
245
+ ## Progress
246
+ - 2024-01-15 10:30: tests-fixed - All tests passing
247
+ - 2024-01-15 10:15: build-fixed - Build errors resolved
241
248
  ```
242
249
 
243
- After setup:
244
-
245
- | Command | Description |
246
- |---------|-------------|
247
- | `claude-minimax` | Launch Claude Code with Minimax 2.1 |
248
- | `claude-anthropic` | Reset to default Anthropic |
249
-
250
- > **Note:** Get your Minimax API key from the [Minimax Developer Platform](https://platform.minimax.io/user-center/basic-information/interface-key). See [official documentation](https://platform.minimax.io/docs/coding-plan/claude-code) for details.
251
-
252
- Provider configurations are stored in `~/.dino/providers.json` for cross-computer portability.
253
-
254
- ## Example Workflow
250
+ Hooks automatically update this state based on your actions.
255
251
 
256
- ```bash
257
- # 1. Initialize
258
- dino init
259
-
260
- # 2. In Claude Code, start a specification
261
- /dino.discover add dark mode toggle to settings
262
-
263
- # 3. Claude creates spec.md with requirements
264
-
265
- # 4. Research the codebase
266
- /dino.scout
252
+ ## Hooks System (v4.0.0)
267
253
 
268
- # 5. Sniff out any ambiguities
269
- /dino.sniff
254
+ Dino-spec integrates with Claude Code's hooks:
270
255
 
271
- # 6. Create implementation plan (enters Plan Mode)
272
- /dino.nest
256
+ | Hook | Purpose |
257
+ |------|---------|
258
+ | `SessionStart` | Output critical alerts only (context router) |
259
+ | `SessionEnd` | Clean up on exit |
260
+ | `PostEdit` | Track file changes with classification |
261
+ | `PostTest` | Update test status |
262
+ | `PostBuild` | Update build status |
263
+ | `PostLint` | Update lint status |
264
+ | `PreCompact` | Archive and compact session state |
265
+ | `UserPromptSubmit` | Intent detection with resource suggestions |
266
+ | `SubagentStart/Stop` | Track agent activity |
273
267
 
274
- # 7. Break into tasks with requirement mapping
275
- /dino.hatch
268
+ The v4.0.0 hooks are optimized for minimal output:
269
+ - **Session-start**: Only alerts on failures/blockers (silence when green)
270
+ - **User-prompt-submit**: Suggests relevant `@dino://` resources based on intent
276
271
 
277
- # 8. Implement with progress tracking
278
- /dino.hunt
272
+ ## MCP Resources
279
273
 
280
- # 9. Verify with tests
281
- /dino.aging
274
+ Access context on-demand using @ mentions in Claude Code:
282
275
 
283
- # 10. Archive when complete
284
- /dino.fossil
285
-
286
- # 11. (Optional) Clean up archive, keep museum record
287
- /dino.extinct
288
-
289
- # Check progress anytime
290
- dino status
291
- dino view
292
- dino museum # View extinct specs history
276
+ ```
277
+ @dino://session # Current focus, blockers, test status
278
+ @dino://structure # Project architecture and directories
279
+ @dino://patterns # Coding conventions and patterns
280
+ @dino://commands # Build, test, lint commands
281
+ @dino://skills # Available workflow skills
282
+ @dino://history # Recent file edit history
283
+ @dino://tasks # Task registry and progress (v5.0.0)
284
+ @dino://handoff # Active handoff context (v5.0.0)
293
285
  ```
294
286
 
295
- ## Configuration
296
-
297
- ### Project DNA
298
-
299
- Edit `.dino/dna.md` to define project conventions:
287
+ ## Minimal vs Standard Mode
300
288
 
301
- ```markdown
302
- # Project DNA
289
+ | Aspect | Standard | Minimal |
290
+ |--------|----------|---------|
291
+ | CLAUDE.md size | ~300 tokens | ~100 tokens |
292
+ | Initial context | Full sections | Quick reference |
293
+ | Architecture | Embedded | `@dino://structure` |
294
+ | Patterns | Embedded | `@dino://patterns` |
295
+ | Commands | Embedded | `@dino://commands` |
296
+ | Best for | Quick reference | Large codebases |
303
297
 
304
- ## Tech Stack
305
- - Framework: React
306
- - Language: TypeScript
307
- - Testing: Vitest
308
-
309
- ## Conventions
310
- - Use functional components
311
- - Prefer composition over inheritance
298
+ Switch between modes:
299
+ ```bash
300
+ dino refresh --minimal # Switch to minimal
301
+ dino refresh --full # Switch to standard
312
302
  ```
313
303
 
314
304
  ## Requirements
@@ -316,18 +306,10 @@ Edit `.dino/dna.md` to define project conventions:
316
306
  - Node.js >= 20.0.0
317
307
  - Claude Code CLI
318
308
 
319
- ## Contributing
320
-
321
- Contributions welcome! Please read the contribution guidelines before submitting PRs.
322
-
323
309
  ## License
324
310
 
325
311
  MIT
326
312
 
327
- ## Acknowledgments
328
-
329
- Inspired by [spec-kit](https://github.com/spec-kit/spec-kit) and [OpenSpec](https://github.com/openspec/openspec) - combining structured workflows with token-efficient CLI tools.
330
-
331
313
  ---
332
314
 
333
315
  Built for developers who believe AI coding should be structured, reproducible, and context-aware.
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Custom Agents System - v3.0.0
3
+ *
4
+ * Creates specialized agents in .claude/agents/
5
+ * Each agent has specific capabilities and tool restrictions.
6
+ */
7
+ /**
8
+ * Agent definition
9
+ */
10
+ export interface AgentDefinition {
11
+ name: string;
12
+ filename: string;
13
+ description: string;
14
+ role: string;
15
+ frontmatter: AgentFrontmatter;
16
+ content: string;
17
+ }
18
+ /**
19
+ * Agent frontmatter options
20
+ */
21
+ interface AgentFrontmatter {
22
+ description: string;
23
+ model?: 'sonnet' | 'haiku' | 'opus';
24
+ permissionMode?: 'permissive' | 'default';
25
+ allowedTools?: string[];
26
+ disallowedTools?: string[];
27
+ }
28
+ /**
29
+ * Get all agent definitions
30
+ */
31
+ export declare function getAllAgentDefinitions(): AgentDefinition[];
32
+ /**
33
+ * Result of agents creation
34
+ */
35
+ export interface AgentsCreateResult {
36
+ created: string[];
37
+ updated: string[];
38
+ skipped: string[];
39
+ agentsDir: string;
40
+ }
41
+ /**
42
+ * Create .claude/agents/ with all agent files
43
+ */
44
+ export declare function createAgents(projectDir: string, options?: {
45
+ force?: boolean;
46
+ }): Promise<AgentsCreateResult>;
47
+ /**
48
+ * Get agents directory path
49
+ */
50
+ export declare function getAgentsDir(projectDir: string): string;
51
+ export {};
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,gBAAgB,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,UAAU,gBAAgB;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IACpC,cAAc,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IAC1C,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAmSD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,eAAe,EAAE,CAE1D;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,wBAAsB,YAAY,CAChC,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAChC,OAAO,CAAC,kBAAkB,CAAC,CAqC7B;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAEvD"}