deepspider 0.2.11 → 0.3.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.
- package/README.md +71 -24
- package/bin/cli.js +45 -0
- package/package.json +10 -4
- package/src/agent/core/PanelBridge.js +133 -0
- package/src/agent/core/RetryManager.js +51 -0
- package/src/agent/core/StreamHandler.js +263 -0
- package/src/agent/core/index.js +7 -0
- package/src/agent/errors/ErrorClassifier.js +43 -0
- package/src/agent/errors/SpiderError.js +68 -0
- package/src/agent/errors/index.js +19 -0
- package/src/agent/run.js +67 -460
- package/src/agent/setup.js +14 -14
- package/src/agent/subagents/factory.js +60 -0
- package/src/agent/subagents/index.js +3 -0
- package/src/agent/tools/report.js +36 -4
- package/src/browser/client.js +47 -10
- package/src/cli/commands/config.js +94 -0
- package/src/cli/commands/help.js +34 -0
- package/src/cli/commands/update.js +78 -0
- package/src/cli/commands/version.js +9 -0
- package/src/cli/config.js +15 -0
- package/src/config/settings.js +102 -0
- package/.claude/agents/check.md +0 -122
- package/.claude/agents/debug.md +0 -106
- package/.claude/agents/dispatch.md +0 -214
- package/.claude/agents/implement.md +0 -96
- package/.claude/agents/plan.md +0 -396
- package/.claude/agents/research.md +0 -120
- package/.claude/commands/evolve/merge.md +0 -80
- package/.claude/commands/trellis/before-backend-dev.md +0 -13
- package/.claude/commands/trellis/before-frontend-dev.md +0 -13
- package/.claude/commands/trellis/break-loop.md +0 -107
- package/.claude/commands/trellis/check-backend.md +0 -13
- package/.claude/commands/trellis/check-cross-layer.md +0 -153
- package/.claude/commands/trellis/check-frontend.md +0 -13
- package/.claude/commands/trellis/create-command.md +0 -154
- package/.claude/commands/trellis/finish-work.md +0 -129
- package/.claude/commands/trellis/integrate-skill.md +0 -219
- package/.claude/commands/trellis/onboard.md +0 -358
- package/.claude/commands/trellis/parallel.md +0 -193
- package/.claude/commands/trellis/record-session.md +0 -62
- package/.claude/commands/trellis/start.md +0 -280
- package/.claude/commands/trellis/update-spec.md +0 -213
- package/.claude/hooks/inject-subagent-context.py +0 -758
- package/.claude/hooks/ralph-loop.py +0 -374
- package/.claude/hooks/session-start.py +0 -126
- package/.claude/settings.json +0 -41
- package/.claude/skills/deepagents-guide/SKILL.md +0 -428
- package/.cursor/commands/trellis-before-backend-dev.md +0 -13
- package/.cursor/commands/trellis-before-frontend-dev.md +0 -13
- package/.cursor/commands/trellis-break-loop.md +0 -107
- package/.cursor/commands/trellis-check-backend.md +0 -13
- package/.cursor/commands/trellis-check-cross-layer.md +0 -153
- package/.cursor/commands/trellis-check-frontend.md +0 -13
- package/.cursor/commands/trellis-create-command.md +0 -154
- package/.cursor/commands/trellis-finish-work.md +0 -129
- package/.cursor/commands/trellis-integrate-skill.md +0 -219
- package/.cursor/commands/trellis-onboard.md +0 -358
- package/.cursor/commands/trellis-record-session.md +0 -62
- package/.cursor/commands/trellis-start.md +0 -156
- package/.cursor/commands/trellis-update-spec.md +0 -213
- package/.github/workflows/publish.yml +0 -63
- package/.husky/pre-commit +0 -1
- package/.mcp.json +0 -8
- package/.trellis/.template-hashes.json +0 -65
- package/.trellis/.version +0 -1
- package/.trellis/scripts/add-session.sh +0 -384
- package/.trellis/scripts/common/developer.sh +0 -129
- package/.trellis/scripts/common/git-context.sh +0 -263
- package/.trellis/scripts/common/paths.sh +0 -208
- package/.trellis/scripts/common/phase.sh +0 -150
- package/.trellis/scripts/common/registry.sh +0 -247
- package/.trellis/scripts/common/task-queue.sh +0 -142
- package/.trellis/scripts/common/task-utils.sh +0 -151
- package/.trellis/scripts/common/worktree.sh +0 -128
- package/.trellis/scripts/create-bootstrap.sh +0 -299
- package/.trellis/scripts/get-context.sh +0 -7
- package/.trellis/scripts/get-developer.sh +0 -15
- package/.trellis/scripts/init-developer.sh +0 -34
- package/.trellis/scripts/multi-agent/cleanup.sh +0 -396
- package/.trellis/scripts/multi-agent/create-pr.sh +0 -241
- package/.trellis/scripts/multi-agent/plan.sh +0 -207
- package/.trellis/scripts/multi-agent/start.sh +0 -310
- package/.trellis/scripts/multi-agent/status.sh +0 -828
- package/.trellis/scripts/task.sh +0 -1118
- package/.trellis/spec/backend/ci-cd-guidelines.md +0 -73
- package/.trellis/spec/backend/deepagents-guide.md +0 -380
- package/.trellis/spec/backend/directory-structure.md +0 -126
- package/.trellis/spec/backend/examples/skills/deepagents-guide/README.md +0 -11
- package/.trellis/spec/backend/examples/skills/deepagents-guide/agent.js.template +0 -20
- package/.trellis/spec/backend/examples/skills/deepagents-guide/skills-config.js.template +0 -13
- package/.trellis/spec/backend/examples/skills/deepagents-guide/subagent.js.template +0 -19
- package/.trellis/spec/backend/hook-guidelines.md +0 -218
- package/.trellis/spec/backend/index.md +0 -37
- package/.trellis/spec/backend/quality-guidelines.md +0 -302
- package/.trellis/spec/backend/state-management.md +0 -76
- package/.trellis/spec/backend/tool-guidelines.md +0 -144
- package/.trellis/spec/backend/type-safety.md +0 -71
- package/.trellis/spec/guides/code-reuse-thinking-guide.md +0 -92
- package/.trellis/spec/guides/cross-layer-thinking-guide.md +0 -94
- package/.trellis/spec/guides/index.md +0 -79
- package/.trellis/tasks/archive/02-02-evolving-skills/prd.md +0 -61
- package/.trellis/tasks/archive/02-02-evolving-skills/task.json +0 -29
- package/.trellis/tasks/archive/2026-02/00-bootstrap-guidelines/prd.md +0 -86
- package/.trellis/tasks/archive/2026-02/00-bootstrap-guidelines/task.json +0 -27
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/check.jsonl +0 -3
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/debug.jsonl +0 -2
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/implement.jsonl +0 -5
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/prd.md +0 -33
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/task.json +0 -41
- package/.trellis/workflow.md +0 -407
- package/.trellis/workspace/index.md +0 -123
- package/.trellis/workspace/pony/index.md +0 -42
- package/.trellis/workspace/pony/journal-1.md +0 -125
- package/.trellis/worktree.yaml +0 -47
- package/AGENTS.md +0 -18
- package/CLAUDE.md +0 -315
- package/agents/deepspider.md +0 -142
- package/docs/DEBUG.md +0 -42
- package/docs/GUIDE.md +0 -334
- package/docs/PROMPT.md +0 -60
- package/docs/USAGE.md +0 -226
- package/eslint.config.js +0 -51
- package/test/analyze.test.js +0 -90
- package/test/envdump.test.js +0 -74
- package/test/flow.test.js +0 -90
- package/test/hooks.test.js +0 -138
- package/test/plugin.test.js +0 -35
- package/test/refactor-full.test.js +0 -30
- package/test/refactor.test.js +0 -21
- package/test/samples/obfuscated.js +0 -61
- package/test/samples/original.js +0 -66
- package/test/samples/v10_eval_chain.js +0 -52
- package/test/samples/v11_bytecode_vm.js +0 -81
- package/test/samples/v12_polymorphic.js +0 -69
- package/test/samples/v1_ob_basic.js +0 -98
- package/test/samples/v2_ob_advanced.js +0 -99
- package/test/samples/v3_jjencode.js +0 -77
- package/test/samples/v4_aaencode.js +0 -73
- package/test/samples/v5_control_flow.js +0 -86
- package/test/samples/v6_string_encryption.js +0 -71
- package/test/samples/v7_jsvmp.js +0 -83
- package/test/samples/v8_anti_debug.js +0 -79
- package/test/samples/v9_proxy_trap.js +0 -49
- package/test/samples.test.js +0 -96
- package/test/webcrack.test.js +0 -55
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# Implement Skills System with Progressive Disclosure
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
|
|
5
|
-
实现 Skills 系统,支持主 agent 和子 agent 按需加载工具,实现渐进式披露。
|
|
6
|
-
|
|
7
|
-
## Requirements
|
|
8
|
-
|
|
9
|
-
### 1. Skills 定义
|
|
10
|
-
- 每个 skill 包含:name, description, tools, systemPrompt (可选)
|
|
11
|
-
- Skills 按功能分组(静态分析、动态分析、沙箱执行等)
|
|
12
|
-
|
|
13
|
-
### 2. 渐进式披露
|
|
14
|
-
- 主 agent 默认只加载核心工具
|
|
15
|
-
- 提供 `use_skill` 工具激活特定 skill
|
|
16
|
-
- 激活后,skill 的工具可用于当前会话
|
|
17
|
-
|
|
18
|
-
### 3. 使用 deepagents middleware
|
|
19
|
-
- 通过 middleware 实现 skill 管理
|
|
20
|
-
- 子 agent 可以预绑定特定 skills
|
|
21
|
-
|
|
22
|
-
## Acceptance Criteria
|
|
23
|
-
|
|
24
|
-
- [ ] Skills 目录结构创建
|
|
25
|
-
- [ ] SkillsMiddleware 实现
|
|
26
|
-
- [ ] 主 agent 集成 skills middleware
|
|
27
|
-
- [ ] 子 agent 支持预绑定 skills
|
|
28
|
-
- [ ] use_skill 工具可正常激活 skill
|
|
29
|
-
|
|
30
|
-
## Technical Notes
|
|
31
|
-
|
|
32
|
-
- 使用 deepagents 的 AgentMiddleware 接口
|
|
33
|
-
- 参考现有 middleware 实现模式
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"id": "skills-system",
|
|
3
|
-
"name": "skills-system",
|
|
4
|
-
"title": "Implement Skills System with Progressive Disclosure",
|
|
5
|
-
"description": "",
|
|
6
|
-
"status": "completed",
|
|
7
|
-
"dev_type": null,
|
|
8
|
-
"scope": null,
|
|
9
|
-
"priority": "P2",
|
|
10
|
-
"creator": "pony",
|
|
11
|
-
"assignee": "pony",
|
|
12
|
-
"createdAt": "2026-02-02",
|
|
13
|
-
"completedAt": "2026-02-02",
|
|
14
|
-
"branch": null,
|
|
15
|
-
"base_branch": null,
|
|
16
|
-
"worktree_path": null,
|
|
17
|
-
"current_phase": 0,
|
|
18
|
-
"next_action": [
|
|
19
|
-
{
|
|
20
|
-
"phase": 1,
|
|
21
|
-
"action": "implement"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
"phase": 2,
|
|
25
|
-
"action": "check"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"phase": 3,
|
|
29
|
-
"action": "finish"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
"phase": 4,
|
|
33
|
-
"action": "create-pr"
|
|
34
|
-
}
|
|
35
|
-
],
|
|
36
|
-
"commit": null,
|
|
37
|
-
"pr_url": null,
|
|
38
|
-
"subtasks": [],
|
|
39
|
-
"relatedFiles": [],
|
|
40
|
-
"notes": ""
|
|
41
|
-
}
|
package/.trellis/workflow.md
DELETED
|
@@ -1,407 +0,0 @@
|
|
|
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
|
|
@@ -1,123 +0,0 @@
|
|
|
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**.
|
|
@@ -1,42 +0,0 @@
|
|
|
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**: 2
|
|
12
|
-
- **Last Active**: 2026-02-03
|
|
13
|
-
<!-- @@@/auto:current-status -->
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Active Documents
|
|
18
|
-
|
|
19
|
-
<!-- @@@auto:active-documents -->
|
|
20
|
-
| File | Lines | Status |
|
|
21
|
-
|------|-------|--------|
|
|
22
|
-
| `journal-1.md` | ~125 | Active |
|
|
23
|
-
<!-- @@@/auto:active-documents -->
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Session History
|
|
28
|
-
|
|
29
|
-
<!-- @@@auto:session-history -->
|
|
30
|
-
| # | Date | Title | Commits |
|
|
31
|
-
|---|------|-------|---------|
|
|
32
|
-
| 2 | 2026-02-03 | GitHub Actions 自动发布 npm | `4ff9a25`, `debdc4e`, `ab56fe2`, `67f9c55`, `b13b03d`, `63a6304`, `327ca39`, `78de837`, `46ce73e` |
|
|
33
|
-
| 1 | 2026-02-03 | 环境变量重命名与配置检测 | `4aa6cad` |
|
|
34
|
-
<!-- @@@/auto:session-history -->
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Notes
|
|
39
|
-
|
|
40
|
-
- Sessions are appended to journal files
|
|
41
|
-
- New journal file created when current exceeds 2000 lines
|
|
42
|
-
- Use `add-session.sh` to record sessions
|