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.
- package/.claude/agents/check.md +122 -0
- package/.claude/agents/debug.md +106 -0
- package/.claude/agents/dispatch.md +214 -0
- package/.claude/agents/implement.md +96 -0
- package/.claude/agents/plan.md +396 -0
- package/.claude/agents/research.md +120 -0
- package/.claude/commands/evolve/merge.md +80 -0
- package/.claude/commands/trellis/before-backend-dev.md +13 -0
- package/.claude/commands/trellis/before-frontend-dev.md +13 -0
- package/.claude/commands/trellis/break-loop.md +107 -0
- package/.claude/commands/trellis/check-backend.md +13 -0
- package/.claude/commands/trellis/check-cross-layer.md +153 -0
- package/.claude/commands/trellis/check-frontend.md +13 -0
- package/.claude/commands/trellis/create-command.md +154 -0
- package/.claude/commands/trellis/finish-work.md +129 -0
- package/.claude/commands/trellis/integrate-skill.md +219 -0
- package/.claude/commands/trellis/onboard.md +358 -0
- package/.claude/commands/trellis/parallel.md +193 -0
- package/.claude/commands/trellis/record-session.md +62 -0
- package/.claude/commands/trellis/start.md +280 -0
- package/.claude/commands/trellis/update-spec.md +213 -0
- package/.claude/hooks/inject-subagent-context.py +758 -0
- package/.claude/hooks/ralph-loop.py +374 -0
- package/.claude/hooks/session-start.py +126 -0
- package/.claude/settings.json +41 -0
- package/.claude/skills/deepagents-guide/SKILL.md +428 -0
- package/.cursor/commands/trellis-before-backend-dev.md +13 -0
- package/.cursor/commands/trellis-before-frontend-dev.md +13 -0
- package/.cursor/commands/trellis-break-loop.md +107 -0
- package/.cursor/commands/trellis-check-backend.md +13 -0
- package/.cursor/commands/trellis-check-cross-layer.md +153 -0
- package/.cursor/commands/trellis-check-frontend.md +13 -0
- package/.cursor/commands/trellis-create-command.md +154 -0
- package/.cursor/commands/trellis-finish-work.md +129 -0
- package/.cursor/commands/trellis-integrate-skill.md +219 -0
- package/.cursor/commands/trellis-onboard.md +358 -0
- package/.cursor/commands/trellis-record-session.md +62 -0
- package/.cursor/commands/trellis-start.md +156 -0
- package/.cursor/commands/trellis-update-spec.md +213 -0
- package/.env.example +11 -0
- package/.husky/pre-commit +1 -0
- package/.mcp.json +8 -0
- package/.trellis/.template-hashes.json +65 -0
- package/.trellis/.version +1 -0
- package/.trellis/scripts/add-session.sh +384 -0
- package/.trellis/scripts/common/developer.sh +129 -0
- package/.trellis/scripts/common/git-context.sh +263 -0
- package/.trellis/scripts/common/paths.sh +208 -0
- package/.trellis/scripts/common/phase.sh +150 -0
- package/.trellis/scripts/common/registry.sh +247 -0
- package/.trellis/scripts/common/task-queue.sh +142 -0
- package/.trellis/scripts/common/task-utils.sh +151 -0
- package/.trellis/scripts/common/worktree.sh +128 -0
- package/.trellis/scripts/create-bootstrap.sh +299 -0
- package/.trellis/scripts/get-context.sh +7 -0
- package/.trellis/scripts/get-developer.sh +15 -0
- package/.trellis/scripts/init-developer.sh +34 -0
- package/.trellis/scripts/multi-agent/cleanup.sh +396 -0
- package/.trellis/scripts/multi-agent/create-pr.sh +241 -0
- package/.trellis/scripts/multi-agent/plan.sh +207 -0
- package/.trellis/scripts/multi-agent/start.sh +310 -0
- package/.trellis/scripts/multi-agent/status.sh +828 -0
- package/.trellis/scripts/task.sh +1118 -0
- package/.trellis/spec/backend/deepagents-guide.md +337 -0
- package/.trellis/spec/backend/directory-structure.md +126 -0
- package/.trellis/spec/backend/examples/skills/deepagents-guide/README.md +11 -0
- package/.trellis/spec/backend/examples/skills/deepagents-guide/agent.js.template +20 -0
- package/.trellis/spec/backend/examples/skills/deepagents-guide/skills-config.js.template +13 -0
- package/.trellis/spec/backend/examples/skills/deepagents-guide/subagent.js.template +19 -0
- package/.trellis/spec/backend/hook-guidelines.md +178 -0
- package/.trellis/spec/backend/index.md +36 -0
- package/.trellis/spec/backend/quality-guidelines.md +201 -0
- package/.trellis/spec/backend/state-management.md +76 -0
- package/.trellis/spec/backend/tool-guidelines.md +144 -0
- package/.trellis/spec/backend/type-safety.md +71 -0
- package/.trellis/spec/guides/code-reuse-thinking-guide.md +92 -0
- package/.trellis/spec/guides/cross-layer-thinking-guide.md +94 -0
- package/.trellis/spec/guides/index.md +79 -0
- package/.trellis/tasks/archive/02-02-evolving-skills/prd.md +61 -0
- package/.trellis/tasks/archive/02-02-evolving-skills/task.json +29 -0
- package/.trellis/tasks/archive/2026-02/00-bootstrap-guidelines/prd.md +86 -0
- package/.trellis/tasks/archive/2026-02/00-bootstrap-guidelines/task.json +27 -0
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/check.jsonl +3 -0
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/debug.jsonl +2 -0
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/implement.jsonl +5 -0
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/prd.md +33 -0
- package/.trellis/tasks/archive/2026-02/02-02-skills-system/task.json +41 -0
- package/.trellis/workflow.md +407 -0
- package/.trellis/workspace/index.md +123 -0
- package/.trellis/workspace/pony/index.md +40 -0
- package/.trellis/workspace/pony/journal-1.md +7 -0
- package/.trellis/worktree.yaml +47 -0
- package/AGENTS.md +18 -0
- package/CLAUDE.md +292 -0
- package/README.md +134 -0
- package/agents/deepspider.md +142 -0
- package/docs/DEBUG.md +42 -0
- package/docs/GUIDE.md +334 -0
- package/docs/PROMPT.md +60 -0
- package/docs/USAGE.md +226 -0
- package/eslint.config.js +51 -0
- package/package.json +78 -0
- package/requirements-crypto.txt +14 -0
- package/src/agent/index.js +97 -0
- package/src/agent/logger.js +164 -0
- package/src/agent/middleware/filterTools.js +64 -0
- package/src/agent/middleware/report.js +79 -0
- package/src/agent/prompts/system.js +315 -0
- package/src/agent/run.js +575 -0
- package/src/agent/skills/anti-detect/SKILL.md +28 -0
- package/src/agent/skills/anti-detect/evolved.md +12 -0
- package/src/agent/skills/captcha/SKILL.md +37 -0
- package/src/agent/skills/captcha/evolved.md +12 -0
- package/src/agent/skills/config.js +30 -0
- package/src/agent/skills/crawler/SKILL.md +9 -0
- package/src/agent/skills/crawler/evolved.md +16 -0
- package/src/agent/skills/dynamic-analysis/SKILL.md +91 -0
- package/src/agent/skills/dynamic-analysis/evolved.md +12 -0
- package/src/agent/skills/env/SKILL.md +72 -0
- package/src/agent/skills/env/evolved.md +12 -0
- package/src/agent/skills/evolve.js +79 -0
- package/src/agent/skills/general/SKILL.md +12 -0
- package/src/agent/skills/general/evolved.md +12 -0
- package/src/agent/skills/js2python/SKILL.md +30 -0
- package/src/agent/skills/js2python/evolved.md +13 -0
- package/src/agent/skills/report/SKILL.md +21 -0
- package/src/agent/skills/report/evolved.md +12 -0
- package/src/agent/skills/sandbox/SKILL.md +22 -0
- package/src/agent/skills/sandbox/evolved.md +16 -0
- package/src/agent/skills/static-analysis/SKILL.md +93 -0
- package/src/agent/skills/static-analysis/evolved.md +12 -0
- package/src/agent/skills/xpath/SKILL.md +119 -0
- package/src/agent/subagents/anti-detect.js +45 -0
- package/src/agent/subagents/captcha.js +51 -0
- package/src/agent/subagents/crawler.js +138 -0
- package/src/agent/subagents/dynamic.js +64 -0
- package/src/agent/subagents/env-agent.js +82 -0
- package/src/agent/subagents/index.js +37 -0
- package/src/agent/subagents/js2python.js +72 -0
- package/src/agent/subagents/sandbox.js +55 -0
- package/src/agent/subagents/static.js +66 -0
- package/src/agent/tools/analysis.js +135 -0
- package/src/agent/tools/analyzer.js +85 -0
- package/src/agent/tools/anti-detect.js +89 -0
- package/src/agent/tools/antidebug.js +64 -0
- package/src/agent/tools/async.js +43 -0
- package/src/agent/tools/browser.js +324 -0
- package/src/agent/tools/captcha.js +223 -0
- package/src/agent/tools/capture.js +179 -0
- package/src/agent/tools/correlate.js +303 -0
- package/src/agent/tools/crawler.js +116 -0
- package/src/agent/tools/cryptohook.js +80 -0
- package/src/agent/tools/debug.js +246 -0
- package/src/agent/tools/deobfuscator.js +90 -0
- package/src/agent/tools/env.js +83 -0
- package/src/agent/tools/envdump.js +92 -0
- package/src/agent/tools/evolve.js +164 -0
- package/src/agent/tools/extract.js +114 -0
- package/src/agent/tools/extractor.js +54 -0
- package/src/agent/tools/file.js +224 -0
- package/src/agent/tools/hook.js +84 -0
- package/src/agent/tools/hookManager.js +178 -0
- package/src/agent/tools/index.js +137 -0
- package/src/agent/tools/nodejs.js +101 -0
- package/src/agent/tools/patch.js +46 -0
- package/src/agent/tools/preprocess.js +71 -0
- package/src/agent/tools/profile.js +122 -0
- package/src/agent/tools/python.js +627 -0
- package/src/agent/tools/report.js +124 -0
- package/src/agent/tools/runtime.js +132 -0
- package/src/agent/tools/sandbox.js +79 -0
- package/src/agent/tools/store.js +73 -0
- package/src/agent/tools/trace.js +74 -0
- package/src/agent/tools/tracing.js +201 -0
- package/src/agent/tools/utils.js +51 -0
- package/src/agent/tools/verify.js +184 -0
- package/src/agent/tools/webcrack.js +109 -0
- package/src/analyzer/ASTAnalyzer.js +387 -0
- package/src/analyzer/CallStackAnalyzer.js +379 -0
- package/src/analyzer/Deobfuscator.js +289 -0
- package/src/analyzer/EncryptionAnalyzer.js +99 -0
- package/src/analyzer/index.js +22 -0
- package/src/browser/EnvBridge.js +186 -0
- package/src/browser/cdp.js +168 -0
- package/src/browser/client.js +197 -0
- package/src/browser/collector.js +444 -0
- package/src/browser/collectors/RequestCryptoLinker.js +109 -0
- package/src/browser/collectors/ResponseSearcher.js +107 -0
- package/src/browser/collectors/ScriptCollector.js +158 -0
- package/src/browser/collectors/index.js +26 -0
- package/src/browser/defaultHooks.js +932 -0
- package/src/browser/hooks/crypto.js +55 -0
- package/src/browser/hooks/index.js +64 -0
- package/src/browser/hooks/native.js +9 -0
- package/src/browser/hooks/network.js +33 -0
- package/src/browser/index.js +42 -0
- package/src/browser/interceptors/NetworkInterceptor.js +116 -0
- package/src/browser/interceptors/ScriptInterceptor.js +76 -0
- package/src/browser/interceptors/index.js +6 -0
- package/src/browser/ui/analysisPanel.js +1782 -0
- package/src/browser/ui/confirmDialog.js +158 -0
- package/src/browser/ui/panel.html +152 -0
- package/src/browser/ui/selector.js +170 -0
- package/src/config/index.js +5 -0
- package/src/config/paths.js +71 -0
- package/src/config/patterns/crypto.js +36 -0
- package/src/config/profiles/chrome.json +71 -0
- package/src/config/profiles/firefox.json +44 -0
- package/src/config/profiles/safari.json +38 -0
- package/src/core/EnvMonitor.js +200 -0
- package/src/core/PatchGenerator.js +278 -0
- package/src/core/Sandbox.js +181 -0
- package/src/env/AntiAntiDebug.js +111 -0
- package/src/env/AsyncHook.js +68 -0
- package/src/env/BrowserAPIList.js +265 -0
- package/src/env/CookieHook.js +48 -0
- package/src/env/CryptoHook.js +205 -0
- package/src/env/EnvCodeGenerator.js +157 -0
- package/src/env/EnvDumper.js +356 -0
- package/src/env/EnvExtractor.js +220 -0
- package/src/env/HookBase.js +618 -0
- package/src/env/NetworkHook.js +159 -0
- package/src/env/modules/bom/history.js +29 -0
- package/src/env/modules/bom/location.js +26 -0
- package/src/env/modules/bom/navigator.js +70 -0
- package/src/env/modules/bom/screen.js +26 -0
- package/src/env/modules/bom/storage.js +23 -0
- package/src/env/modules/dom/document.js +110 -0
- package/src/env/modules/dom/event.js +51 -0
- package/src/env/modules/index.js +34 -0
- package/src/env/modules/webapi/fetch.js +46 -0
- package/src/env/modules/webapi/url.js +47 -0
- package/src/env/modules/webapi/xhr.js +48 -0
- package/src/index.js +27 -0
- package/src/mcp/server.js +89 -0
- package/src/store/DataStore.js +708 -0
- package/src/store/Store.js +158 -0
- package/src/store/Validator.js +24 -0
- package/test/analyze.test.js +90 -0
- package/test/envdump.test.js +74 -0
- package/test/flow.test.js +90 -0
- package/test/hooks.test.js +138 -0
- package/test/plugin.test.js +35 -0
- package/test/refactor-full.test.js +30 -0
- package/test/refactor.test.js +21 -0
- package/test/samples/obfuscated.js +61 -0
- package/test/samples/original.js +66 -0
- package/test/samples/v10_eval_chain.js +52 -0
- package/test/samples/v11_bytecode_vm.js +81 -0
- package/test/samples/v12_polymorphic.js +69 -0
- package/test/samples/v1_ob_basic.js +98 -0
- package/test/samples/v2_ob_advanced.js +99 -0
- package/test/samples/v3_jjencode.js +77 -0
- package/test/samples/v4_aaencode.js +73 -0
- package/test/samples/v5_control_flow.js +86 -0
- package/test/samples/v6_string_encryption.js +71 -0
- package/test/samples/v7_jsvmp.js +83 -0
- package/test/samples/v8_anti_debug.js +79 -0
- package/test/samples/v9_proxy_trap.js +49 -0
- package/test/samples.test.js +96 -0
- package/test/webcrack.test.js +55 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Thinking Guides
|
|
2
|
+
|
|
3
|
+
> **Purpose**: Expand your thinking to catch things you might not have considered.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Why Thinking Guides?
|
|
8
|
+
|
|
9
|
+
**Most bugs and tech debt come from "didn't think of that"**, not from lack of skill:
|
|
10
|
+
|
|
11
|
+
- Didn't think about what happens at layer boundaries → cross-layer bugs
|
|
12
|
+
- Didn't think about code patterns repeating → duplicated code everywhere
|
|
13
|
+
- Didn't think about edge cases → runtime errors
|
|
14
|
+
- Didn't think about future maintainers → unreadable code
|
|
15
|
+
|
|
16
|
+
These guides help you **ask the right questions before coding**.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Available Guides
|
|
21
|
+
|
|
22
|
+
| Guide | Purpose | When to Use |
|
|
23
|
+
|-------|---------|-------------|
|
|
24
|
+
| [Code Reuse Thinking Guide](./code-reuse-thinking-guide.md) | Identify patterns and reduce duplication | When you notice repeated patterns |
|
|
25
|
+
| [Cross-Layer Thinking Guide](./cross-layer-thinking-guide.md) | Think through data flow across layers | Features spanning multiple layers |
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Quick Reference: Thinking Triggers
|
|
30
|
+
|
|
31
|
+
### When to Think About Cross-Layer Issues
|
|
32
|
+
|
|
33
|
+
- [ ] Feature touches 3+ layers (API, Service, Component, Database)
|
|
34
|
+
- [ ] Data format changes between layers
|
|
35
|
+
- [ ] Multiple consumers need the same data
|
|
36
|
+
- [ ] You're not sure where to put some logic
|
|
37
|
+
|
|
38
|
+
→ Read [Cross-Layer Thinking Guide](./cross-layer-thinking-guide.md)
|
|
39
|
+
|
|
40
|
+
### When to Think About Code Reuse
|
|
41
|
+
|
|
42
|
+
- [ ] You're writing similar code to something that exists
|
|
43
|
+
- [ ] You see the same pattern repeated 3+ times
|
|
44
|
+
- [ ] You're adding a new field to multiple places
|
|
45
|
+
- [ ] **You're modifying any constant or config**
|
|
46
|
+
- [ ] **You're creating a new utility/helper function** ← Search first!
|
|
47
|
+
|
|
48
|
+
→ Read [Code Reuse Thinking Guide](./code-reuse-thinking-guide.md)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Pre-Modification Rule (CRITICAL)
|
|
53
|
+
|
|
54
|
+
> **Before changing ANY value, ALWAYS search first!**
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
# Search for the value you're about to change
|
|
58
|
+
grep -r "value_to_change" .
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
This single habit prevents most "forgot to update X" bugs.
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## How to Use This Directory
|
|
66
|
+
|
|
67
|
+
1. **Before coding**: Skim the relevant thinking guide
|
|
68
|
+
2. **During coding**: If something feels repetitive or complex, check the guides
|
|
69
|
+
3. **After bugs**: Add new insights to the relevant guide (learn from mistakes)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Contributing
|
|
74
|
+
|
|
75
|
+
Found a new "didn't think of that" moment? Add it to the relevant guide.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
**Core Principle**: 30 minutes of thinking saves 3 hours of debugging.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Self-Evolving Skills System
|
|
2
|
+
|
|
3
|
+
## 目标
|
|
4
|
+
|
|
5
|
+
实现 Skills 自我进化机制,让 Agent 在分析过程中积累的经验能够持久化,系统越用越好用。
|
|
6
|
+
|
|
7
|
+
## 核心设计
|
|
8
|
+
|
|
9
|
+
### 目录结构
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
src/agent/skills/<skill-name>/
|
|
13
|
+
├── SKILL.md # 静态:基础知识(git管理)
|
|
14
|
+
└── evolved.md # 动态:运行时积累
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### evolved.md 格式
|
|
18
|
+
|
|
19
|
+
```markdown
|
|
20
|
+
---
|
|
21
|
+
total: 15
|
|
22
|
+
last_merged: 2026-01-15
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 核心经验
|
|
26
|
+
|
|
27
|
+
### 经验标题
|
|
28
|
+
**场景**: 具体案例
|
|
29
|
+
**经验**: 一句话总结
|
|
30
|
+
|
|
31
|
+
## 近期发现
|
|
32
|
+
|
|
33
|
+
### [2026-02-02] 发现标题
|
|
34
|
+
**场景**: 具体案例
|
|
35
|
+
**经验**: 一句话总结
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### 加载策略
|
|
39
|
+
|
|
40
|
+
- 静态 SKILL.md:全量加载
|
|
41
|
+
- 动态 evolved.md:核心经验 + 最近 10 条
|
|
42
|
+
|
|
43
|
+
### 阈值提示
|
|
44
|
+
|
|
45
|
+
- 动态经验达到 20 条时提示合并
|
|
46
|
+
- 合并通过命令触发:`/evolve:merge <skill-name>`
|
|
47
|
+
|
|
48
|
+
## 实现清单
|
|
49
|
+
|
|
50
|
+
1. [ ] 创建 `evolved.md` 模板文件
|
|
51
|
+
2. [ ] 实现 `createEvolvingSkillsMiddleware` 中间件
|
|
52
|
+
3. [ ] 实现 `evolve_skill` 工具
|
|
53
|
+
4. [ ] 创建 `/evolve:merge` 命令
|
|
54
|
+
5. [ ] 更新各 subagent 使用新中间件
|
|
55
|
+
6. [ ] 更新 systemPrompt 指导 Agent 何时进化
|
|
56
|
+
|
|
57
|
+
## 技术要点
|
|
58
|
+
|
|
59
|
+
- 中间件在 Agent 启动时合并静态+动态
|
|
60
|
+
- evolve_skill 工具追加内容到 evolved.md
|
|
61
|
+
- 合并命令将核心经验迁移到 SKILL.md
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "evolving-skills",
|
|
3
|
+
"name": "evolving-skills",
|
|
4
|
+
"title": "Self-Evolving Skills System",
|
|
5
|
+
"description": "",
|
|
6
|
+
"status": "planning",
|
|
7
|
+
"dev_type": null,
|
|
8
|
+
"scope": null,
|
|
9
|
+
"priority": "P2",
|
|
10
|
+
"creator": "pony",
|
|
11
|
+
"assignee": "pony",
|
|
12
|
+
"createdAt": "2026-02-02",
|
|
13
|
+
"completedAt": null,
|
|
14
|
+
"branch": null,
|
|
15
|
+
"base_branch": null,
|
|
16
|
+
"worktree_path": null,
|
|
17
|
+
"current_phase": 0,
|
|
18
|
+
"next_action": [
|
|
19
|
+
{"phase": 1, "action": "implement"},
|
|
20
|
+
{"phase": 2, "action": "check"},
|
|
21
|
+
{"phase": 3, "action": "finish"},
|
|
22
|
+
{"phase": 4, "action": "create-pr"}
|
|
23
|
+
],
|
|
24
|
+
"commit": null,
|
|
25
|
+
"pr_url": null,
|
|
26
|
+
"subtasks": [],
|
|
27
|
+
"relatedFiles": [],
|
|
28
|
+
"notes": ""
|
|
29
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Bootstrap: Fill Project Development Guidelines
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Welcome to Trellis! This is your first task.
|
|
6
|
+
|
|
7
|
+
AI agents use `.trellis/spec/` to understand YOUR project's coding conventions.
|
|
8
|
+
**Empty templates = AI writes generic code that doesn't match your project style.**
|
|
9
|
+
|
|
10
|
+
Filling these guidelines is a one-time setup that pays off for every future AI session.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Your Task
|
|
15
|
+
|
|
16
|
+
Fill in the guideline files based on your **existing codebase**.
|
|
17
|
+
|
|
18
|
+
### Frontend Guidelines
|
|
19
|
+
|
|
20
|
+
| File | What to Document |
|
|
21
|
+
|------|------------------|
|
|
22
|
+
| `.trellis/spec/frontend/directory-structure.md` | Component/page/hook organization |
|
|
23
|
+
| `.trellis/spec/frontend/component-guidelines.md` | Component patterns, props conventions |
|
|
24
|
+
| `.trellis/spec/frontend/hook-guidelines.md` | Custom hook naming, patterns |
|
|
25
|
+
| `.trellis/spec/frontend/state-management.md` | State library, patterns, what goes where |
|
|
26
|
+
| `.trellis/spec/frontend/type-safety.md` | TypeScript conventions, type organization |
|
|
27
|
+
| `.trellis/spec/frontend/quality-guidelines.md` | Linting, testing, accessibility |
|
|
28
|
+
|
|
29
|
+
### Thinking Guides (Optional)
|
|
30
|
+
|
|
31
|
+
The `.trellis/spec/guides/` directory contains thinking guides that are already
|
|
32
|
+
filled with general best practices. You can customize them for your project if needed.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
## How to Fill Guidelines
|
|
37
|
+
|
|
38
|
+
### Principle: Document Reality, Not Ideals
|
|
39
|
+
|
|
40
|
+
Write what your codebase **actually does**, not what you wish it did.
|
|
41
|
+
AI needs to match existing patterns, not introduce new ones.
|
|
42
|
+
|
|
43
|
+
### Steps
|
|
44
|
+
|
|
45
|
+
1. **Look at existing code** - Find 2-3 examples of each pattern
|
|
46
|
+
2. **Document the pattern** - Describe what you see
|
|
47
|
+
3. **Include file paths** - Reference real files as examples
|
|
48
|
+
4. **List anti-patterns** - What does your team avoid?
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Tips for Using AI
|
|
53
|
+
|
|
54
|
+
Ask AI to help analyze your codebase:
|
|
55
|
+
|
|
56
|
+
- "Look at my codebase and document the patterns you see"
|
|
57
|
+
- "Analyze my code structure and summarize the conventions"
|
|
58
|
+
- "Find error handling patterns and document them"
|
|
59
|
+
|
|
60
|
+
The AI will read your code and help you document it.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Completion Checklist
|
|
65
|
+
|
|
66
|
+
- [ ] Guidelines filled for your project type
|
|
67
|
+
- [ ] At least 2-3 real code examples in each guideline
|
|
68
|
+
- [ ] Anti-patterns documented
|
|
69
|
+
|
|
70
|
+
When done:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
./.trellis/scripts/task.sh finish
|
|
74
|
+
./.trellis/scripts/task.sh archive 00-bootstrap-guidelines
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Why This Matters
|
|
80
|
+
|
|
81
|
+
After completing this task:
|
|
82
|
+
|
|
83
|
+
1. AI will write code that matches your project style
|
|
84
|
+
2. Relevant `/trellis:before-*-dev` commands will inject real context
|
|
85
|
+
3. `/trellis:check-*` commands will validate against your actual standards
|
|
86
|
+
4. Future developers (human or AI) will onboard faster
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "00-bootstrap-guidelines",
|
|
3
|
+
"name": "Bootstrap Guidelines",
|
|
4
|
+
"description": "Fill in project development guidelines for AI agents",
|
|
5
|
+
"status": "completed",
|
|
6
|
+
"dev_type": "docs",
|
|
7
|
+
"priority": "P1",
|
|
8
|
+
"creator": "pony",
|
|
9
|
+
"assignee": "pony",
|
|
10
|
+
"createdAt": "2026-01-30",
|
|
11
|
+
"completedAt": "2026-02-02",
|
|
12
|
+
"commit": null,
|
|
13
|
+
"subtasks": [
|
|
14
|
+
{
|
|
15
|
+
"name": "Fill frontend guidelines",
|
|
16
|
+
"status": "pending"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "Add code examples",
|
|
20
|
+
"status": "pending"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"relatedFiles": [
|
|
24
|
+
".trellis/spec/frontend/"
|
|
25
|
+
],
|
|
26
|
+
"notes": "First-time setup task created by trellis init (frontend project)"
|
|
27
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{"file": ".trellis/workflow.md", "reason": "Project workflow and conventions"}
|
|
2
|
+
{"file": ".trellis/spec/shared/index.md", "reason": "Shared coding standards"}
|
|
3
|
+
{"file": ".trellis/spec/backend/index.md", "reason": "Backend development guide"}
|
|
4
|
+
{"file": ".trellis/spec/backend/api-module.md", "reason": "API module conventions"}
|
|
5
|
+
{"file": ".trellis/spec/backend/quality.md", "reason": "Code quality requirements"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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 实现模式
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
}
|