deepspider 0.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 (261) hide show
  1. package/.claude/agents/check.md +122 -0
  2. package/.claude/agents/debug.md +106 -0
  3. package/.claude/agents/dispatch.md +214 -0
  4. package/.claude/agents/implement.md +96 -0
  5. package/.claude/agents/plan.md +396 -0
  6. package/.claude/agents/research.md +120 -0
  7. package/.claude/commands/evolve/merge.md +80 -0
  8. package/.claude/commands/trellis/before-backend-dev.md +13 -0
  9. package/.claude/commands/trellis/before-frontend-dev.md +13 -0
  10. package/.claude/commands/trellis/break-loop.md +107 -0
  11. package/.claude/commands/trellis/check-backend.md +13 -0
  12. package/.claude/commands/trellis/check-cross-layer.md +153 -0
  13. package/.claude/commands/trellis/check-frontend.md +13 -0
  14. package/.claude/commands/trellis/create-command.md +154 -0
  15. package/.claude/commands/trellis/finish-work.md +129 -0
  16. package/.claude/commands/trellis/integrate-skill.md +219 -0
  17. package/.claude/commands/trellis/onboard.md +358 -0
  18. package/.claude/commands/trellis/parallel.md +193 -0
  19. package/.claude/commands/trellis/record-session.md +62 -0
  20. package/.claude/commands/trellis/start.md +280 -0
  21. package/.claude/commands/trellis/update-spec.md +213 -0
  22. package/.claude/hooks/inject-subagent-context.py +758 -0
  23. package/.claude/hooks/ralph-loop.py +374 -0
  24. package/.claude/hooks/session-start.py +126 -0
  25. package/.claude/settings.json +41 -0
  26. package/.claude/skills/deepagents-guide/SKILL.md +428 -0
  27. package/.cursor/commands/trellis-before-backend-dev.md +13 -0
  28. package/.cursor/commands/trellis-before-frontend-dev.md +13 -0
  29. package/.cursor/commands/trellis-break-loop.md +107 -0
  30. package/.cursor/commands/trellis-check-backend.md +13 -0
  31. package/.cursor/commands/trellis-check-cross-layer.md +153 -0
  32. package/.cursor/commands/trellis-check-frontend.md +13 -0
  33. package/.cursor/commands/trellis-create-command.md +154 -0
  34. package/.cursor/commands/trellis-finish-work.md +129 -0
  35. package/.cursor/commands/trellis-integrate-skill.md +219 -0
  36. package/.cursor/commands/trellis-onboard.md +358 -0
  37. package/.cursor/commands/trellis-record-session.md +62 -0
  38. package/.cursor/commands/trellis-start.md +156 -0
  39. package/.cursor/commands/trellis-update-spec.md +213 -0
  40. package/.env.example +11 -0
  41. package/.husky/pre-commit +1 -0
  42. package/.mcp.json +8 -0
  43. package/.trellis/.template-hashes.json +65 -0
  44. package/.trellis/.version +1 -0
  45. package/.trellis/scripts/add-session.sh +384 -0
  46. package/.trellis/scripts/common/developer.sh +129 -0
  47. package/.trellis/scripts/common/git-context.sh +263 -0
  48. package/.trellis/scripts/common/paths.sh +208 -0
  49. package/.trellis/scripts/common/phase.sh +150 -0
  50. package/.trellis/scripts/common/registry.sh +247 -0
  51. package/.trellis/scripts/common/task-queue.sh +142 -0
  52. package/.trellis/scripts/common/task-utils.sh +151 -0
  53. package/.trellis/scripts/common/worktree.sh +128 -0
  54. package/.trellis/scripts/create-bootstrap.sh +299 -0
  55. package/.trellis/scripts/get-context.sh +7 -0
  56. package/.trellis/scripts/get-developer.sh +15 -0
  57. package/.trellis/scripts/init-developer.sh +34 -0
  58. package/.trellis/scripts/multi-agent/cleanup.sh +396 -0
  59. package/.trellis/scripts/multi-agent/create-pr.sh +241 -0
  60. package/.trellis/scripts/multi-agent/plan.sh +207 -0
  61. package/.trellis/scripts/multi-agent/start.sh +310 -0
  62. package/.trellis/scripts/multi-agent/status.sh +828 -0
  63. package/.trellis/scripts/task.sh +1118 -0
  64. package/.trellis/spec/backend/deepagents-guide.md +337 -0
  65. package/.trellis/spec/backend/directory-structure.md +126 -0
  66. package/.trellis/spec/backend/examples/skills/deepagents-guide/README.md +11 -0
  67. package/.trellis/spec/backend/examples/skills/deepagents-guide/agent.js.template +20 -0
  68. package/.trellis/spec/backend/examples/skills/deepagents-guide/skills-config.js.template +13 -0
  69. package/.trellis/spec/backend/examples/skills/deepagents-guide/subagent.js.template +19 -0
  70. package/.trellis/spec/backend/hook-guidelines.md +178 -0
  71. package/.trellis/spec/backend/index.md +36 -0
  72. package/.trellis/spec/backend/quality-guidelines.md +201 -0
  73. package/.trellis/spec/backend/state-management.md +76 -0
  74. package/.trellis/spec/backend/tool-guidelines.md +144 -0
  75. package/.trellis/spec/backend/type-safety.md +71 -0
  76. package/.trellis/spec/guides/code-reuse-thinking-guide.md +92 -0
  77. package/.trellis/spec/guides/cross-layer-thinking-guide.md +94 -0
  78. package/.trellis/spec/guides/index.md +79 -0
  79. package/.trellis/tasks/archive/02-02-evolving-skills/prd.md +61 -0
  80. package/.trellis/tasks/archive/02-02-evolving-skills/task.json +29 -0
  81. package/.trellis/tasks/archive/2026-02/00-bootstrap-guidelines/prd.md +86 -0
  82. package/.trellis/tasks/archive/2026-02/00-bootstrap-guidelines/task.json +27 -0
  83. package/.trellis/tasks/archive/2026-02/02-02-skills-system/check.jsonl +3 -0
  84. package/.trellis/tasks/archive/2026-02/02-02-skills-system/debug.jsonl +2 -0
  85. package/.trellis/tasks/archive/2026-02/02-02-skills-system/implement.jsonl +5 -0
  86. package/.trellis/tasks/archive/2026-02/02-02-skills-system/prd.md +33 -0
  87. package/.trellis/tasks/archive/2026-02/02-02-skills-system/task.json +41 -0
  88. package/.trellis/workflow.md +407 -0
  89. package/.trellis/workspace/index.md +123 -0
  90. package/.trellis/workspace/pony/index.md +40 -0
  91. package/.trellis/workspace/pony/journal-1.md +7 -0
  92. package/.trellis/worktree.yaml +47 -0
  93. package/AGENTS.md +18 -0
  94. package/CLAUDE.md +292 -0
  95. package/README.md +134 -0
  96. package/agents/deepspider.md +142 -0
  97. package/docs/DEBUG.md +42 -0
  98. package/docs/GUIDE.md +334 -0
  99. package/docs/PROMPT.md +60 -0
  100. package/docs/USAGE.md +226 -0
  101. package/eslint.config.js +51 -0
  102. package/package.json +78 -0
  103. package/requirements-crypto.txt +14 -0
  104. package/src/agent/index.js +97 -0
  105. package/src/agent/logger.js +164 -0
  106. package/src/agent/middleware/filterTools.js +64 -0
  107. package/src/agent/middleware/report.js +79 -0
  108. package/src/agent/prompts/system.js +315 -0
  109. package/src/agent/run.js +575 -0
  110. package/src/agent/skills/anti-detect/SKILL.md +28 -0
  111. package/src/agent/skills/anti-detect/evolved.md +12 -0
  112. package/src/agent/skills/captcha/SKILL.md +37 -0
  113. package/src/agent/skills/captcha/evolved.md +12 -0
  114. package/src/agent/skills/config.js +30 -0
  115. package/src/agent/skills/crawler/SKILL.md +9 -0
  116. package/src/agent/skills/crawler/evolved.md +16 -0
  117. package/src/agent/skills/dynamic-analysis/SKILL.md +91 -0
  118. package/src/agent/skills/dynamic-analysis/evolved.md +12 -0
  119. package/src/agent/skills/env/SKILL.md +72 -0
  120. package/src/agent/skills/env/evolved.md +12 -0
  121. package/src/agent/skills/evolve.js +79 -0
  122. package/src/agent/skills/general/SKILL.md +12 -0
  123. package/src/agent/skills/general/evolved.md +12 -0
  124. package/src/agent/skills/js2python/SKILL.md +30 -0
  125. package/src/agent/skills/js2python/evolved.md +13 -0
  126. package/src/agent/skills/report/SKILL.md +21 -0
  127. package/src/agent/skills/report/evolved.md +12 -0
  128. package/src/agent/skills/sandbox/SKILL.md +22 -0
  129. package/src/agent/skills/sandbox/evolved.md +16 -0
  130. package/src/agent/skills/static-analysis/SKILL.md +93 -0
  131. package/src/agent/skills/static-analysis/evolved.md +12 -0
  132. package/src/agent/skills/xpath/SKILL.md +119 -0
  133. package/src/agent/subagents/anti-detect.js +45 -0
  134. package/src/agent/subagents/captcha.js +51 -0
  135. package/src/agent/subagents/crawler.js +138 -0
  136. package/src/agent/subagents/dynamic.js +64 -0
  137. package/src/agent/subagents/env-agent.js +82 -0
  138. package/src/agent/subagents/index.js +37 -0
  139. package/src/agent/subagents/js2python.js +72 -0
  140. package/src/agent/subagents/sandbox.js +55 -0
  141. package/src/agent/subagents/static.js +66 -0
  142. package/src/agent/tools/analysis.js +135 -0
  143. package/src/agent/tools/analyzer.js +85 -0
  144. package/src/agent/tools/anti-detect.js +89 -0
  145. package/src/agent/tools/antidebug.js +64 -0
  146. package/src/agent/tools/async.js +43 -0
  147. package/src/agent/tools/browser.js +324 -0
  148. package/src/agent/tools/captcha.js +223 -0
  149. package/src/agent/tools/capture.js +179 -0
  150. package/src/agent/tools/correlate.js +303 -0
  151. package/src/agent/tools/crawler.js +116 -0
  152. package/src/agent/tools/cryptohook.js +80 -0
  153. package/src/agent/tools/debug.js +246 -0
  154. package/src/agent/tools/deobfuscator.js +90 -0
  155. package/src/agent/tools/env.js +83 -0
  156. package/src/agent/tools/envdump.js +92 -0
  157. package/src/agent/tools/evolve.js +164 -0
  158. package/src/agent/tools/extract.js +114 -0
  159. package/src/agent/tools/extractor.js +54 -0
  160. package/src/agent/tools/file.js +224 -0
  161. package/src/agent/tools/hook.js +84 -0
  162. package/src/agent/tools/hookManager.js +178 -0
  163. package/src/agent/tools/index.js +137 -0
  164. package/src/agent/tools/nodejs.js +101 -0
  165. package/src/agent/tools/patch.js +46 -0
  166. package/src/agent/tools/preprocess.js +71 -0
  167. package/src/agent/tools/profile.js +122 -0
  168. package/src/agent/tools/python.js +627 -0
  169. package/src/agent/tools/report.js +124 -0
  170. package/src/agent/tools/runtime.js +132 -0
  171. package/src/agent/tools/sandbox.js +79 -0
  172. package/src/agent/tools/store.js +73 -0
  173. package/src/agent/tools/trace.js +74 -0
  174. package/src/agent/tools/tracing.js +201 -0
  175. package/src/agent/tools/utils.js +51 -0
  176. package/src/agent/tools/verify.js +184 -0
  177. package/src/agent/tools/webcrack.js +109 -0
  178. package/src/analyzer/ASTAnalyzer.js +387 -0
  179. package/src/analyzer/CallStackAnalyzer.js +379 -0
  180. package/src/analyzer/Deobfuscator.js +289 -0
  181. package/src/analyzer/EncryptionAnalyzer.js +99 -0
  182. package/src/analyzer/index.js +22 -0
  183. package/src/browser/EnvBridge.js +186 -0
  184. package/src/browser/cdp.js +168 -0
  185. package/src/browser/client.js +197 -0
  186. package/src/browser/collector.js +444 -0
  187. package/src/browser/collectors/RequestCryptoLinker.js +109 -0
  188. package/src/browser/collectors/ResponseSearcher.js +107 -0
  189. package/src/browser/collectors/ScriptCollector.js +158 -0
  190. package/src/browser/collectors/index.js +26 -0
  191. package/src/browser/defaultHooks.js +932 -0
  192. package/src/browser/hooks/crypto.js +55 -0
  193. package/src/browser/hooks/index.js +64 -0
  194. package/src/browser/hooks/native.js +9 -0
  195. package/src/browser/hooks/network.js +33 -0
  196. package/src/browser/index.js +42 -0
  197. package/src/browser/interceptors/NetworkInterceptor.js +116 -0
  198. package/src/browser/interceptors/ScriptInterceptor.js +76 -0
  199. package/src/browser/interceptors/index.js +6 -0
  200. package/src/browser/ui/analysisPanel.js +1782 -0
  201. package/src/browser/ui/confirmDialog.js +158 -0
  202. package/src/browser/ui/panel.html +152 -0
  203. package/src/browser/ui/selector.js +170 -0
  204. package/src/config/index.js +5 -0
  205. package/src/config/paths.js +71 -0
  206. package/src/config/patterns/crypto.js +36 -0
  207. package/src/config/profiles/chrome.json +71 -0
  208. package/src/config/profiles/firefox.json +44 -0
  209. package/src/config/profiles/safari.json +38 -0
  210. package/src/core/EnvMonitor.js +200 -0
  211. package/src/core/PatchGenerator.js +278 -0
  212. package/src/core/Sandbox.js +181 -0
  213. package/src/env/AntiAntiDebug.js +111 -0
  214. package/src/env/AsyncHook.js +68 -0
  215. package/src/env/BrowserAPIList.js +265 -0
  216. package/src/env/CookieHook.js +48 -0
  217. package/src/env/CryptoHook.js +205 -0
  218. package/src/env/EnvCodeGenerator.js +157 -0
  219. package/src/env/EnvDumper.js +356 -0
  220. package/src/env/EnvExtractor.js +220 -0
  221. package/src/env/HookBase.js +618 -0
  222. package/src/env/NetworkHook.js +159 -0
  223. package/src/env/modules/bom/history.js +29 -0
  224. package/src/env/modules/bom/location.js +26 -0
  225. package/src/env/modules/bom/navigator.js +70 -0
  226. package/src/env/modules/bom/screen.js +26 -0
  227. package/src/env/modules/bom/storage.js +23 -0
  228. package/src/env/modules/dom/document.js +110 -0
  229. package/src/env/modules/dom/event.js +51 -0
  230. package/src/env/modules/index.js +34 -0
  231. package/src/env/modules/webapi/fetch.js +46 -0
  232. package/src/env/modules/webapi/url.js +47 -0
  233. package/src/env/modules/webapi/xhr.js +48 -0
  234. package/src/index.js +27 -0
  235. package/src/mcp/server.js +89 -0
  236. package/src/store/DataStore.js +708 -0
  237. package/src/store/Store.js +158 -0
  238. package/src/store/Validator.js +24 -0
  239. package/test/analyze.test.js +90 -0
  240. package/test/envdump.test.js +74 -0
  241. package/test/flow.test.js +90 -0
  242. package/test/hooks.test.js +138 -0
  243. package/test/plugin.test.js +35 -0
  244. package/test/refactor-full.test.js +30 -0
  245. package/test/refactor.test.js +21 -0
  246. package/test/samples/obfuscated.js +61 -0
  247. package/test/samples/original.js +66 -0
  248. package/test/samples/v10_eval_chain.js +52 -0
  249. package/test/samples/v11_bytecode_vm.js +81 -0
  250. package/test/samples/v12_polymorphic.js +69 -0
  251. package/test/samples/v1_ob_basic.js +98 -0
  252. package/test/samples/v2_ob_advanced.js +99 -0
  253. package/test/samples/v3_jjencode.js +77 -0
  254. package/test/samples/v4_aaencode.js +73 -0
  255. package/test/samples/v5_control_flow.js +86 -0
  256. package/test/samples/v6_string_encryption.js +71 -0
  257. package/test/samples/v7_jsvmp.js +83 -0
  258. package/test/samples/v8_anti_debug.js +79 -0
  259. package/test/samples/v9_proxy_trap.js +49 -0
  260. package/test/samples.test.js +96 -0
  261. package/test/webcrack.test.js +55 -0
@@ -0,0 +1,407 @@
1
+ # Development Workflow
2
+
3
+ > Based on [Effective Harnesses for Long-Running Agents](https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents)
4
+
5
+ ---
6
+
7
+ ## Table of Contents
8
+
9
+ 1. [Quick Start (Do This First)](#quick-start-do-this-first)
10
+ 2. [Workflow Overview](#workflow-overview)
11
+ 3. [Session Start Process](#session-start-process)
12
+ 4. [Development Process](#development-process)
13
+ 5. [Session End](#session-end)
14
+ 6. [File Descriptions](#file-descriptions)
15
+ 7. [Best Practices](#best-practices)
16
+
17
+ ---
18
+
19
+ ## Quick Start (Do This First)
20
+
21
+ ### Step 0: Initialize Developer Identity (First Time Only)
22
+
23
+ > **Multi-developer support**: Each developer/Agent needs to initialize their identity first
24
+
25
+ ```bash
26
+ # Check if already initialized
27
+ ./.trellis/scripts/get-developer.sh
28
+
29
+ # If not initialized, run:
30
+ ./.trellis/scripts/init-developer.sh <your-name>
31
+ # Example: ./.trellis/scripts/init-developer.sh cursor-agent
32
+ ```
33
+
34
+ This creates:
35
+ - `.trellis/.developer` - Your identity file (gitignored, not committed)
36
+ - `.trellis/workspace/<your-name>/` - Your personal workspace directory
37
+
38
+ **Naming suggestions**:
39
+ - Human developers: Use your name, e.g., `john-doe`
40
+ - Cursor AI: `cursor-agent` or `cursor-<task>`
41
+ - Claude Code: `claude-agent` or `claude-<task>`
42
+
43
+ ### Step 1: Understand Current Context
44
+
45
+ ```bash
46
+ # Get full context in one command
47
+ ./.trellis/scripts/get-context.sh
48
+
49
+ # Or check manually:
50
+ ./.trellis/scripts/get-developer.sh # Your identity
51
+ ./.trellis/scripts/task.sh list # Active tasks
52
+ git status && git log --oneline -10 # Git state
53
+ ```
54
+
55
+ ### Step 2: Read Project Guidelines [MANDATORY]
56
+
57
+ **CRITICAL**: Read guidelines before writing any code:
58
+
59
+ ```bash
60
+ # Read frontend guidelines index (if applicable)
61
+ cat .trellis/spec/frontend/index.md
62
+
63
+ # Read backend guidelines index (if applicable)
64
+ cat .trellis/spec/backend/index.md
65
+ ```
66
+
67
+ **Why read both?**
68
+ - Understand the full project architecture
69
+ - Know coding standards for the entire codebase
70
+ - See how frontend and backend interact
71
+ - Learn the overall code quality requirements
72
+
73
+ ### Step 3: Before Coding - Read Specific Guidelines (Required)
74
+
75
+ Based on your task, read the **detailed** guidelines:
76
+
77
+ **Frontend Task**:
78
+ ```bash
79
+ cat .trellis/spec/frontend/hook-guidelines.md # For hooks
80
+ cat .trellis/spec/frontend/component-guidelines.md # For components
81
+ cat .trellis/spec/frontend/type-safety.md # For types
82
+ ```
83
+
84
+ **Backend Task**:
85
+ ```bash
86
+ cat .trellis/spec/backend/database-guidelines.md # For DB operations
87
+ cat .trellis/spec/backend/type-safety.md # For types
88
+ cat .trellis/spec/backend/logging-guidelines.md # For logging
89
+ ```
90
+
91
+ ---
92
+
93
+ ## Workflow Overview
94
+
95
+ ### Core Principles
96
+
97
+ 1. **Read Before Write** - Understand context before starting
98
+ 2. **Follow Standards** - [!] **MUST read `.trellis/spec/` guidelines before coding**
99
+ 3. **Incremental Development** - Complete one task at a time
100
+ 4. **Record Promptly** - Update tracking files immediately after completion
101
+ 5. **Document Limits** - [!] **Max 2000 lines per journal document**
102
+
103
+ ### File System
104
+
105
+ ```
106
+ .trellis/
107
+ |-- .developer # Developer identity (gitignored)
108
+ |-- scripts/
109
+ | |-- common/ # Shared utilities
110
+ | | |-- paths.sh # Path utilities
111
+ | | |-- developer.sh # Developer management
112
+ | | \-- git-context.sh # Git context implementation
113
+ | |-- init-developer.sh # Initialize developer identity
114
+ | |-- get-developer.sh # Get current developer name
115
+ | |-- task.sh # Manage tasks
116
+ | |-- get-context.sh # Get session context
117
+ | \-- add-session.sh # One-click session recording
118
+ |-- workspace/ # Developer workspaces
119
+ | |-- index.md # Workspace index + Session template
120
+ | \-- {developer}/ # Per-developer directories
121
+ | |-- index.md # Personal index (with @@@auto markers)
122
+ | \-- journal-N.md # Journal files (sequential numbering)
123
+ |-- tasks/ # Task tracking
124
+ | \-- {MM}-{DD}-{name}/
125
+ | \-- task.json
126
+ |-- spec/ # [!] MUST READ before coding
127
+ | |-- frontend/ # Frontend guidelines (if applicable)
128
+ | | |-- index.md # Start here - guidelines index
129
+ | | \-- *.md # Topic-specific docs
130
+ | |-- backend/ # Backend guidelines (if applicable)
131
+ | | |-- index.md # Start here - guidelines index
132
+ | | \-- *.md # Topic-specific docs
133
+ | \-- guides/ # Thinking guides
134
+ | |-- index.md # Guides index
135
+ | |-- cross-layer-thinking-guide.md # Pre-implementation checklist
136
+ | \-- *.md # Other guides
137
+ \-- workflow.md # This document
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Session Start Process
143
+
144
+ ### Step 1: Get Session Context
145
+
146
+ Use the unified context script:
147
+
148
+ ```bash
149
+ # Get all context in one command
150
+ ./.trellis/scripts/get-context.sh
151
+
152
+ # Or get JSON format
153
+ ./.trellis/scripts/get-context.sh --json
154
+ ```
155
+
156
+ ### Step 2: Read Development Guidelines [!] REQUIRED
157
+
158
+ **[!] CRITICAL: MUST read guidelines before writing any code**
159
+
160
+ Based on what you'll develop, read the corresponding guidelines:
161
+
162
+ **Frontend Development** (if applicable):
163
+ ```bash
164
+ # Read index first, then specific docs based on task
165
+ cat .trellis/spec/frontend/index.md
166
+ ```
167
+
168
+ **Backend Development** (if applicable):
169
+ ```bash
170
+ # Read index first, then specific docs based on task
171
+ cat .trellis/spec/backend/index.md
172
+ ```
173
+
174
+ **Cross-Layer Features**:
175
+ ```bash
176
+ # For features spanning multiple layers
177
+ cat .trellis/spec/guides/cross-layer-thinking-guide.md
178
+ ```
179
+
180
+ ### Step 3: Select Task to Develop
181
+
182
+ Use the task management script:
183
+
184
+ ```bash
185
+ # List active tasks
186
+ ./.trellis/scripts/task.sh list
187
+
188
+ # Create new task (creates directory with task.json)
189
+ ./.trellis/scripts/task.sh create "<title>" --slug <task-name>
190
+ ```
191
+
192
+ ---
193
+
194
+ ## Development Process
195
+
196
+ ### Task Development Flow
197
+
198
+ ```
199
+ 1. Create or select task
200
+ \-> ./.trellis/scripts/task.sh create "<title>" --slug <name> or list
201
+
202
+ 2. Write code according to guidelines
203
+ \-> Read .trellis/spec/ docs relevant to your task
204
+ \-> For cross-layer: read .trellis/spec/guides/
205
+
206
+ 3. Self-test
207
+ \-> Run project's lint/test commands (see spec docs)
208
+ \-> Manual feature testing
209
+
210
+ 4. Commit code
211
+ \-> git add <files>
212
+ \-> git commit -m "type(scope): description"
213
+ Format: feat/fix/docs/refactor/test/chore
214
+
215
+ 5. Record session (one command)
216
+ \-> ./.trellis/scripts/add-session.sh --title "Title" --commit "hash"
217
+ ```
218
+
219
+ ### Code Quality Checklist
220
+
221
+ **Must pass before commit**:
222
+ - [OK] Lint checks pass (project-specific command)
223
+ - [OK] Type checks pass (if applicable)
224
+ - [OK] Manual feature testing passes
225
+
226
+ **Project-specific checks**:
227
+ - See `.trellis/spec/frontend/quality-guidelines.md` for frontend
228
+ - See `.trellis/spec/backend/quality-guidelines.md` for backend
229
+
230
+ ---
231
+
232
+ ## Session End
233
+
234
+ ### One-Click Session Recording
235
+
236
+ After code is committed, use:
237
+
238
+ ```bash
239
+ ./.trellis/scripts/add-session.sh \
240
+ --title "Session Title" \
241
+ --commit "abc1234" \
242
+ --summary "Brief summary"
243
+ ```
244
+
245
+ This automatically:
246
+ 1. Detects current journal file
247
+ 2. Creates new file if 2000-line limit exceeded
248
+ 3. Appends session content
249
+ 4. Updates index.md (sessions count, history table)
250
+
251
+ ### Pre-end Checklist
252
+
253
+ Use `/trellis:finish-work` command to run through:
254
+ 1. [OK] All code committed, commit message follows convention
255
+ 2. [OK] Session recorded via `add-session.sh`
256
+ 3. [OK] No lint/test errors
257
+ 4. [OK] Working directory clean (or WIP noted)
258
+ 5. [OK] Spec docs updated if needed
259
+
260
+ ---
261
+
262
+ ## File Descriptions
263
+
264
+ ### 1. workspace/ - Developer Workspaces
265
+
266
+ **Purpose**: Record each AI Agent session's work content
267
+
268
+ **Structure** (Multi-developer support):
269
+ ```
270
+ workspace/
271
+ |-- index.md # Main index (Active Developers table)
272
+ \-- {developer}/ # Per-developer directory
273
+ |-- index.md # Personal index (with @@@auto markers)
274
+ \-- journal-N.md # Journal files (sequential: 1, 2, 3...)
275
+ ```
276
+
277
+ **When to update**:
278
+ - [OK] End of each session
279
+ - [OK] Complete important task
280
+ - [OK] Fix important bug
281
+
282
+ ### 2. spec/ - Development Guidelines
283
+
284
+ **Purpose**: Documented standards for consistent development
285
+
286
+ **Structure** (Multi-doc format):
287
+ ```
288
+ spec/
289
+ |-- frontend/ # Frontend docs (if applicable)
290
+ | |-- index.md # Start here
291
+ | \-- *.md # Topic-specific docs
292
+ |-- backend/ # Backend docs (if applicable)
293
+ | |-- index.md # Start here
294
+ | \-- *.md # Topic-specific docs
295
+ \-- guides/ # Thinking guides
296
+ |-- index.md # Start here
297
+ \-- *.md # Guide-specific docs
298
+ ```
299
+
300
+ **When to update**:
301
+ - [OK] New pattern discovered
302
+ - [OK] Bug fixed that reveals missing guidance
303
+ - [OK] New convention established
304
+
305
+ ### 3. Tasks - Task Tracking
306
+
307
+ Each task is a directory containing `task.json`:
308
+
309
+ ```
310
+ tasks/
311
+ |-- 01-21-my-task/
312
+ | \-- task.json
313
+ \-- archive/
314
+ \-- 2026-01/
315
+ \-- 01-15-old-task/
316
+ \-- task.json
317
+ ```
318
+
319
+ **Commands**:
320
+ ```bash
321
+ ./.trellis/scripts/task.sh create "<title>" [--slug <name>] # Create task directory
322
+ ./.trellis/scripts/task.sh archive <name> # Archive to archive/{year-month}/
323
+ ./.trellis/scripts/task.sh list # List active tasks
324
+ ./.trellis/scripts/task.sh list-archive # List archived tasks
325
+ ```
326
+
327
+ ---
328
+
329
+ ## Best Practices
330
+
331
+ ### [OK] DO - Should Do
332
+
333
+ 1. **Before session start**:
334
+ - Run `./.trellis/scripts/get-context.sh` for full context
335
+ - [!] **MUST read** relevant `.trellis/spec/` docs
336
+
337
+ 2. **During development**:
338
+ - [!] **Follow** `.trellis/spec/` guidelines
339
+ - For cross-layer features, use `/trellis:check-cross-layer`
340
+ - Develop only one task at a time
341
+ - Run lint and tests frequently
342
+
343
+ 3. **After development complete**:
344
+ - Use `/trellis:finish-work` for completion checklist
345
+ - After fix bug, use `/trellis:break-loop` for deep analysis
346
+ - Human commits after testing passes
347
+ - Use `add-session.sh` to record progress
348
+
349
+ ### [X] DON'T - Should Not Do
350
+
351
+ 1. [!] **Don't** skip reading `.trellis/spec/` guidelines
352
+ 2. [!] **Don't** let journal single file exceed 2000 lines
353
+ 3. **Don't** develop multiple unrelated tasks simultaneously
354
+ 4. **Don't** commit code with lint/test errors
355
+ 5. **Don't** forget to update spec docs after learning something
356
+ 6. [!] **Don't** execute `git commit` - AI should not commit code
357
+
358
+ ---
359
+
360
+ ## Quick Reference
361
+
362
+ ### Must-read Before Development
363
+
364
+ | Task Type | Must-read Document |
365
+ |-----------|-------------------|
366
+ | Frontend work | `frontend/index.md` → relevant docs |
367
+ | Backend work | `backend/index.md` → relevant docs |
368
+ | Cross-Layer Feature | `guides/cross-layer-thinking-guide.md` |
369
+
370
+ ### Commit Convention
371
+
372
+ ```bash
373
+ git commit -m "type(scope): description"
374
+ ```
375
+
376
+ **Type**: feat, fix, docs, refactor, test, chore
377
+ **Scope**: Module name (e.g., auth, api, ui)
378
+
379
+ ### Common Commands
380
+
381
+ ```bash
382
+ # Session management
383
+ ./.trellis/scripts/get-context.sh # Get full context
384
+ ./.trellis/scripts/add-session.sh # Record session
385
+
386
+ # Task management
387
+ ./.trellis/scripts/task.sh list # List tasks
388
+ ./.trellis/scripts/task.sh create "<title>" # Create task
389
+
390
+ # Slash commands
391
+ /trellis:finish-work # Pre-commit checklist
392
+ /trellis:break-loop # Post-debug analysis
393
+ /trellis:check-cross-layer # Cross-layer verification
394
+ ```
395
+
396
+ ---
397
+
398
+ ## Summary
399
+
400
+ Following this workflow ensures:
401
+ - [OK] Continuity across multiple sessions
402
+ - [OK] Consistent code quality
403
+ - [OK] Trackable progress
404
+ - [OK] Knowledge accumulation in spec docs
405
+ - [OK] Transparent team collaboration
406
+
407
+ **Core Philosophy**: Read before write, follow standards, record promptly, capture learnings
@@ -0,0 +1,123 @@
1
+ # Workspace Index
2
+
3
+ > Records of all AI Agent work records across all developers
4
+
5
+ ---
6
+
7
+ ## Overview
8
+
9
+ This directory tracks records for all developers working with AI Agents on this project.
10
+
11
+ ### File Structure
12
+
13
+ ```
14
+ workspace/
15
+ |-- index.md # This file - main index
16
+ \-- {developer}/ # Per-developer directory
17
+ |-- index.md # Personal index with session history
18
+ |-- tasks/ # Task files
19
+ | |-- *.json # Active tasks
20
+ | \-- archive/ # Archived tasks by month
21
+ \-- journal-N.md # Journal files (sequential: 1, 2, 3...)
22
+ ```
23
+
24
+ ---
25
+
26
+ ## Active Developers
27
+
28
+ | Developer | Last Active | Sessions | Active File |
29
+ |-----------|-------------|----------|-------------|
30
+ | (none yet) | - | - | - |
31
+
32
+ ---
33
+
34
+ ## Getting Started
35
+
36
+ ### For New Developers
37
+
38
+ Run the initialization script:
39
+
40
+ ```bash
41
+ ./.trellis/scripts/init-developer.sh <your-name>
42
+ ```
43
+
44
+ This will:
45
+ 1. Create your identity file (gitignored)
46
+ 2. Create your progress directory
47
+ 3. Create your personal index
48
+ 4. Create initial journal file
49
+
50
+ ### For Returning Developers
51
+
52
+ 1. Get your developer name:
53
+ ```bash
54
+ ./.trellis/scripts/get-developer.sh
55
+ ```
56
+
57
+ 2. Read your personal index:
58
+ ```bash
59
+ cat .trellis/workspace/$(./.trellis/scripts/get-developer.sh)/index.md
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Guidelines
65
+
66
+ ### Journal File Rules
67
+
68
+ - **Max 2000 lines** per journal file
69
+ - When limit is reached, create `journal-{N+1}.md`
70
+ - Update your personal `index.md` when creating new files
71
+
72
+ ### Session Record Format
73
+
74
+ Each session should include:
75
+ - Summary: One-line description
76
+ - Main Changes: What was modified
77
+ - Git Commits: Commit hashes and messages
78
+ - Next Steps: What to do next
79
+
80
+ ---
81
+
82
+ ## Session Template
83
+
84
+ Use this template when recording sessions:
85
+
86
+ ```markdown
87
+ ## Session {N}: {Title}
88
+
89
+ **Date**: YYYY-MM-DD
90
+ **Task**: {task-name}
91
+
92
+ ### Summary
93
+
94
+ {One-line summary}
95
+
96
+ ### Main Changes
97
+
98
+ - {Change 1}
99
+ - {Change 2}
100
+
101
+ ### Git Commits
102
+
103
+ | Hash | Message |
104
+ |------|---------|
105
+ | `abc1234` | {commit message} |
106
+
107
+ ### Testing
108
+
109
+ - [OK] {Test result}
110
+
111
+ ### Status
112
+
113
+ [OK] **Completed** / # **In Progress** / [P] **Blocked**
114
+
115
+ ### Next Steps
116
+
117
+ - {Next step 1}
118
+ - {Next step 2}
119
+ ```
120
+
121
+ ---
122
+
123
+ **Language**: All documentation must be written in **English**.
@@ -0,0 +1,40 @@
1
+ # Workspace Index - pony
2
+
3
+ > Journal tracking for AI development sessions.
4
+
5
+ ---
6
+
7
+ ## Current Status
8
+
9
+ <!-- @@@auto:current-status -->
10
+ - **Active File**: `journal-1.md`
11
+ - **Total Sessions**: 0
12
+ - **Last Active**: -
13
+ <!-- @@@/auto:current-status -->
14
+
15
+ ---
16
+
17
+ ## Active Documents
18
+
19
+ <!-- @@@auto:active-documents -->
20
+ | File | Lines | Status |
21
+ |------|-------|--------|
22
+ | `journal-1.md` | ~0 | Active |
23
+ <!-- @@@/auto:active-documents -->
24
+
25
+ ---
26
+
27
+ ## Session History
28
+
29
+ <!-- @@@auto:session-history -->
30
+ | # | Date | Title | Commits |
31
+ |---|------|-------|---------|
32
+ <!-- @@@/auto:session-history -->
33
+
34
+ ---
35
+
36
+ ## Notes
37
+
38
+ - Sessions are appended to journal files
39
+ - New journal file created when current exceeds 2000 lines
40
+ - Use `add-session.sh` to record sessions
@@ -0,0 +1,7 @@
1
+ # Journal - pony (Part 1)
2
+
3
+ > AI development session journal
4
+ > Started: 2026-01-30
5
+
6
+ ---
7
+
@@ -0,0 +1,47 @@
1
+ # Worktree Configuration for Multi-Agent Pipeline
2
+ # Used for worktree initialization in multi-agent workflows
3
+ #
4
+ # All paths are relative to project root
5
+
6
+ #-------------------------------------------------------------------------------
7
+ # Paths
8
+ #-------------------------------------------------------------------------------
9
+
10
+ # Worktree storage directory (relative to project root)
11
+ worktree_dir: ../trellis-worktrees
12
+
13
+ #-------------------------------------------------------------------------------
14
+ # Files to Copy
15
+ #-------------------------------------------------------------------------------
16
+
17
+ # Files to copy to each worktree (each worktree needs independent copy)
18
+ # These files contain sensitive info or need worktree-independent config
19
+ copy:
20
+ # Environment variables (uncomment and customize as needed)
21
+ # - .env
22
+ # - .env.local
23
+ # Workflow config
24
+ - .trellis/.developer
25
+
26
+ #-------------------------------------------------------------------------------
27
+ # Post-Create Hooks
28
+ #-------------------------------------------------------------------------------
29
+
30
+ # Commands to run after creating worktree
31
+ # Executed in worktree directory, in order, abort on failure
32
+ post_create:
33
+ # Install dependencies (uncomment based on your package manager)
34
+ # - npm install
35
+ # - pnpm install --frozen-lockfile
36
+ # - yarn install --frozen-lockfile
37
+
38
+ #-------------------------------------------------------------------------------
39
+ # Check Agent Verification (Ralph Loop)
40
+ #-------------------------------------------------------------------------------
41
+
42
+ # Commands to verify code quality before allowing check agent to finish
43
+ # If configured, Ralph Loop will run these commands - all must pass to allow completion
44
+ # If not configured or empty, trusts agent's completion markers
45
+ verify:
46
+ # - pnpm lint
47
+ # - pnpm typecheck
package/AGENTS.md ADDED
@@ -0,0 +1,18 @@
1
+ <!-- TRELLIS:START -->
2
+ # Trellis Instructions
3
+
4
+ These instructions are for AI assistants working in this project.
5
+
6
+ Use the `/trellis:start` command when starting a new session to:
7
+ - Initialize your developer identity
8
+ - Understand current project context
9
+ - Read relevant guidelines
10
+
11
+ Use `@/.trellis/` to learn:
12
+ - Development workflow (`workflow.md`)
13
+ - Project structure guidelines (`spec/`)
14
+ - Developer workspace (`workspace/`)
15
+
16
+ Keep this managed block so 'trellis update' can refresh the instructions.
17
+
18
+ <!-- TRELLIS:END -->