@jahanxu/trellis 0.4.1
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/LICENSE +235 -0
- package/README.md +212 -0
- package/bin/trellis.js +3 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +97 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/commands/init.d.ts +21 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +527 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/update.d.ts +27 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +1289 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/configurators/antigravity.d.ts +8 -0
- package/dist/configurators/antigravity.d.ts.map +1 -0
- package/dist/configurators/antigravity.js +18 -0
- package/dist/configurators/antigravity.js.map +1 -0
- package/dist/configurators/claude.d.ts +32 -0
- package/dist/configurators/claude.d.ts.map +1 -0
- package/dist/configurators/claude.js +98 -0
- package/dist/configurators/claude.js.map +1 -0
- package/dist/configurators/codex.d.ts +8 -0
- package/dist/configurators/codex.d.ts.map +1 -0
- package/dist/configurators/codex.js +20 -0
- package/dist/configurators/codex.js.map +1 -0
- package/dist/configurators/cursor.d.ts +5 -0
- package/dist/configurators/cursor.d.ts.map +1 -0
- package/dist/configurators/cursor.js +52 -0
- package/dist/configurators/cursor.js.map +1 -0
- package/dist/configurators/gemini.d.ts +8 -0
- package/dist/configurators/gemini.d.ts.map +1 -0
- package/dist/configurators/gemini.js +52 -0
- package/dist/configurators/gemini.js.map +1 -0
- package/dist/configurators/iflow.d.ts +33 -0
- package/dist/configurators/iflow.d.ts.map +1 -0
- package/dist/configurators/iflow.js +99 -0
- package/dist/configurators/iflow.js.map +1 -0
- package/dist/configurators/index.d.ts +55 -0
- package/dist/configurators/index.d.ts.map +1 -0
- package/dist/configurators/index.js +220 -0
- package/dist/configurators/index.js.map +1 -0
- package/dist/configurators/kilo.d.ts +8 -0
- package/dist/configurators/kilo.d.ts.map +1 -0
- package/dist/configurators/kilo.js +51 -0
- package/dist/configurators/kilo.js.map +1 -0
- package/dist/configurators/kiro.d.ts +8 -0
- package/dist/configurators/kiro.d.ts.map +1 -0
- package/dist/configurators/kiro.js +20 -0
- package/dist/configurators/kiro.js.map +1 -0
- package/dist/configurators/opencode.d.ts +32 -0
- package/dist/configurators/opencode.d.ts.map +1 -0
- package/dist/configurators/opencode.js +92 -0
- package/dist/configurators/opencode.js.map +1 -0
- package/dist/configurators/shared.d.ts +12 -0
- package/dist/configurators/shared.d.ts.map +1 -0
- package/dist/configurators/shared.js +21 -0
- package/dist/configurators/shared.js.map +1 -0
- package/dist/configurators/workflow.d.ts +28 -0
- package/dist/configurators/workflow.d.ts.map +1 -0
- package/dist/configurators/workflow.js +134 -0
- package/dist/configurators/workflow.js.map +1 -0
- package/dist/constants/paths.d.ts +68 -0
- package/dist/constants/paths.d.ts.map +1 -0
- package/dist/constants/paths.js +77 -0
- package/dist/constants/paths.js.map +1 -0
- package/dist/constants/version.d.ts +9 -0
- package/dist/constants/version.d.ts.map +1 -0
- package/dist/constants/version.js +15 -0
- package/dist/constants/version.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/migrations/index.d.ts +54 -0
- package/dist/migrations/index.d.ts.map +1 -0
- package/dist/migrations/index.js +160 -0
- package/dist/migrations/index.js.map +1 -0
- package/dist/migrations/manifests/0.1.9.json +30 -0
- package/dist/migrations/manifests/0.2.0.json +49 -0
- package/dist/migrations/manifests/0.2.12.json +9 -0
- package/dist/migrations/manifests/0.2.13.json +9 -0
- package/dist/migrations/manifests/0.2.14.json +175 -0
- package/dist/migrations/manifests/0.2.15.json +33 -0
- package/dist/migrations/manifests/0.3.0-beta.0.json +278 -0
- package/dist/migrations/manifests/0.3.0-beta.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.7.json +11 -0
- package/dist/migrations/manifests/0.3.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.3.0-beta.9.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.0.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.1.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.2.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.3.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.4.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.5.json +9 -0
- package/dist/migrations/manifests/0.3.0-rc.6.json +9 -0
- package/dist/migrations/manifests/0.3.0.json +11 -0
- package/dist/templates/antigravity/index.d.ts +12 -0
- package/dist/templates/antigravity/index.d.ts.map +1 -0
- package/dist/templates/antigravity/index.js +29 -0
- package/dist/templates/antigravity/index.js.map +1 -0
- package/dist/templates/claude/agents/check.md +122 -0
- package/dist/templates/claude/agents/debug.md +106 -0
- package/dist/templates/claude/agents/dispatch.md +214 -0
- package/dist/templates/claude/agents/implement.md +96 -0
- package/dist/templates/claude/agents/plan.md +396 -0
- package/dist/templates/claude/agents/research.md +120 -0
- package/dist/templates/claude/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/claude/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/claude/commands/trellis/before-role-work.md +364 -0
- package/dist/templates/claude/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/claude/commands/trellis/break-loop.md +125 -0
- package/dist/templates/claude/commands/trellis/check-backend.md +13 -0
- package/dist/templates/claude/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/claude/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/claude/commands/trellis/create-command.md +154 -0
- package/dist/templates/claude/commands/trellis/finish-work.md +153 -0
- package/dist/templates/claude/commands/trellis/handoff.md +445 -0
- package/dist/templates/claude/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/claude/commands/trellis/onboard.md +358 -0
- package/dist/templates/claude/commands/trellis/parallel.md +193 -0
- package/dist/templates/claude/commands/trellis/pick-task.md +515 -0
- package/dist/templates/claude/commands/trellis/record-session.md +62 -0
- package/dist/templates/claude/commands/trellis/start.md +373 -0
- package/dist/templates/claude/commands/trellis/update-spec.md +354 -0
- package/dist/templates/claude/hooks/inject-subagent-context.py +873 -0
- package/dist/templates/claude/hooks/ralph-loop.py +388 -0
- package/dist/templates/claude/hooks/session-start.py +200 -0
- package/dist/templates/claude/index.d.ts +54 -0
- package/dist/templates/claude/index.d.ts.map +1 -0
- package/dist/templates/claude/index.js +85 -0
- package/dist/templates/claude/index.js.map +1 -0
- package/dist/templates/claude/settings.json +41 -0
- package/dist/templates/codex/index.d.ts +18 -0
- package/dist/templates/codex/index.d.ts.map +1 -0
- package/dist/templates/codex/index.js +40 -0
- package/dist/templates/codex/index.js.map +1 -0
- package/dist/templates/codex/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/codex/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/codex/skills/brainstorm/SKILL.md +479 -0
- package/dist/templates/codex/skills/break-loop/SKILL.md +130 -0
- package/dist/templates/codex/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/codex/skills/check-cross-layer/SKILL.md +158 -0
- package/dist/templates/codex/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/codex/skills/create-command/SKILL.md +101 -0
- package/dist/templates/codex/skills/finish-work/SKILL.md +148 -0
- package/dist/templates/codex/skills/integrate-skill/SKILL.md +221 -0
- package/dist/templates/codex/skills/onboard/SKILL.md +363 -0
- package/dist/templates/codex/skills/record-session/SKILL.md +67 -0
- package/dist/templates/codex/skills/start/SKILL.md +330 -0
- package/dist/templates/codex/skills/update-spec/SKILL.md +335 -0
- package/dist/templates/cursor/commands/trellis-before-backend-dev.md +13 -0
- package/dist/templates/cursor/commands/trellis-before-frontend-dev.md +13 -0
- package/dist/templates/cursor/commands/trellis-brainstorm.md +474 -0
- package/dist/templates/cursor/commands/trellis-break-loop.md +107 -0
- package/dist/templates/cursor/commands/trellis-check-backend.md +13 -0
- package/dist/templates/cursor/commands/trellis-check-cross-layer.md +153 -0
- package/dist/templates/cursor/commands/trellis-check-frontend.md +13 -0
- package/dist/templates/cursor/commands/trellis-create-command.md +154 -0
- package/dist/templates/cursor/commands/trellis-finish-work.md +143 -0
- package/dist/templates/cursor/commands/trellis-integrate-skill.md +219 -0
- package/dist/templates/cursor/commands/trellis-onboard.md +358 -0
- package/dist/templates/cursor/commands/trellis-record-session.md +62 -0
- package/dist/templates/cursor/commands/trellis-start.md +366 -0
- package/dist/templates/cursor/commands/trellis-update-spec.md +354 -0
- package/dist/templates/cursor/index.d.ts +24 -0
- package/dist/templates/cursor/index.d.ts.map +1 -0
- package/dist/templates/cursor/index.js +44 -0
- package/dist/templates/cursor/index.js.map +1 -0
- package/dist/templates/extract.d.ts +166 -0
- package/dist/templates/extract.d.ts.map +1 -0
- package/dist/templates/extract.js +296 -0
- package/dist/templates/extract.js.map +1 -0
- package/dist/templates/gemini/commands/trellis/before-backend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/before-frontend-dev.toml +17 -0
- package/dist/templates/gemini/commands/trellis/brainstorm.toml +420 -0
- package/dist/templates/gemini/commands/trellis/break-loop.toml +129 -0
- package/dist/templates/gemini/commands/trellis/check-backend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/check-cross-layer.toml +147 -0
- package/dist/templates/gemini/commands/trellis/check-frontend.toml +17 -0
- package/dist/templates/gemini/commands/trellis/create-command.toml +119 -0
- package/dist/templates/gemini/commands/trellis/finish-work.toml +133 -0
- package/dist/templates/gemini/commands/trellis/integrate-skill.toml +104 -0
- package/dist/templates/gemini/commands/trellis/onboard.toml +111 -0
- package/dist/templates/gemini/commands/trellis/record-session.toml +66 -0
- package/dist/templates/gemini/commands/trellis/start.toml +292 -0
- package/dist/templates/gemini/commands/trellis/update-spec.toml +132 -0
- package/dist/templates/gemini/index.d.ts +21 -0
- package/dist/templates/gemini/index.d.ts.map +1 -0
- package/dist/templates/gemini/index.js +44 -0
- package/dist/templates/gemini/index.js.map +1 -0
- package/dist/templates/iflow/agents/check.md +122 -0
- package/dist/templates/iflow/agents/debug.md +106 -0
- package/dist/templates/iflow/agents/dispatch.md +214 -0
- package/dist/templates/iflow/agents/implement.md +96 -0
- package/dist/templates/iflow/agents/plan.md +396 -0
- package/dist/templates/iflow/agents/research.md +120 -0
- package/dist/templates/iflow/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/iflow/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/iflow/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/iflow/commands/trellis/break-loop.md +125 -0
- package/dist/templates/iflow/commands/trellis/check-backend.md +13 -0
- package/dist/templates/iflow/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/iflow/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/iflow/commands/trellis/create-command.md +152 -0
- package/dist/templates/iflow/commands/trellis/finish-work.md +153 -0
- package/dist/templates/iflow/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/iflow/commands/trellis/onboard.md +358 -0
- package/dist/templates/iflow/commands/trellis/parallel.md +193 -0
- package/dist/templates/iflow/commands/trellis/record-session.md +62 -0
- package/dist/templates/iflow/commands/trellis/start.md +373 -0
- package/dist/templates/iflow/commands/trellis/update-spec.md +354 -0
- package/dist/templates/iflow/hooks/inject-subagent-context.py +788 -0
- package/dist/templates/iflow/hooks/ralph-loop.py +388 -0
- package/dist/templates/iflow/hooks/session-start.py +143 -0
- package/dist/templates/iflow/index.d.ts +54 -0
- package/dist/templates/iflow/index.d.ts.map +1 -0
- package/dist/templates/iflow/index.js +85 -0
- package/dist/templates/iflow/index.js.map +1 -0
- package/dist/templates/iflow/settings.json +40 -0
- package/dist/templates/kilo/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/kilo/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/kilo/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/kilo/commands/trellis/break-loop.md +125 -0
- package/dist/templates/kilo/commands/trellis/check-backend.md +13 -0
- package/dist/templates/kilo/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/kilo/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/kilo/commands/trellis/create-command.md +152 -0
- package/dist/templates/kilo/commands/trellis/finish-work.md +129 -0
- package/dist/templates/kilo/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/kilo/commands/trellis/onboard.md +358 -0
- package/dist/templates/kilo/commands/trellis/parallel.md +194 -0
- package/dist/templates/kilo/commands/trellis/record-session.md +62 -0
- package/dist/templates/kilo/commands/trellis/start.md +321 -0
- package/dist/templates/kilo/commands/trellis/update-spec.md +285 -0
- package/dist/templates/kilo/index.d.ts +16 -0
- package/dist/templates/kilo/index.d.ts.map +1 -0
- package/dist/templates/kilo/index.js +39 -0
- package/dist/templates/kilo/index.js.map +1 -0
- package/dist/templates/kiro/index.d.ts +18 -0
- package/dist/templates/kiro/index.d.ts.map +1 -0
- package/dist/templates/kiro/index.js +40 -0
- package/dist/templates/kiro/index.js.map +1 -0
- package/dist/templates/kiro/skills/before-backend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/before-frontend-dev/SKILL.md +18 -0
- package/dist/templates/kiro/skills/brainstorm/SKILL.md +479 -0
- package/dist/templates/kiro/skills/break-loop/SKILL.md +130 -0
- package/dist/templates/kiro/skills/check-backend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/check-cross-layer/SKILL.md +158 -0
- package/dist/templates/kiro/skills/check-frontend/SKILL.md +18 -0
- package/dist/templates/kiro/skills/create-command/SKILL.md +101 -0
- package/dist/templates/kiro/skills/finish-work/SKILL.md +148 -0
- package/dist/templates/kiro/skills/integrate-skill/SKILL.md +221 -0
- package/dist/templates/kiro/skills/onboard/SKILL.md +363 -0
- package/dist/templates/kiro/skills/record-session/SKILL.md +67 -0
- package/dist/templates/kiro/skills/start/SKILL.md +330 -0
- package/dist/templates/kiro/skills/update-spec/SKILL.md +335 -0
- package/dist/templates/markdown/agents.md +18 -0
- package/dist/templates/markdown/gitignore.txt +12 -0
- package/dist/templates/markdown/index.d.ts +27 -0
- package/dist/templates/markdown/index.d.ts.map +1 -0
- package/dist/templates/markdown/index.js +52 -0
- package/dist/templates/markdown/index.js.map +1 -0
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/index.md +40 -0
- package/dist/templates/markdown/spec/backend/index.md.txt +38 -0
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/backend/script-conventions.md +467 -0
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +59 -0
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +54 -0
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/index.md.txt +39 -0
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +51 -0
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +51 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md +118 -0
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +92 -0
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +94 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md +394 -0
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +319 -0
- package/dist/templates/markdown/spec/guides/index.md.txt +79 -0
- package/dist/templates/markdown/workspace-index.md +123 -0
- package/dist/templates/markdown/worktree.yaml.txt +58 -0
- package/dist/templates/opencode/agents/check.md +146 -0
- package/dist/templates/opencode/agents/debug.md +129 -0
- package/dist/templates/opencode/agents/dispatch.md +223 -0
- package/dist/templates/opencode/agents/implement.md +120 -0
- package/dist/templates/opencode/agents/research.md +147 -0
- package/dist/templates/opencode/agents/trellis-plan.md +427 -0
- package/dist/templates/opencode/commands/trellis/before-backend-dev.md +13 -0
- package/dist/templates/opencode/commands/trellis/before-frontend-dev.md +13 -0
- package/dist/templates/opencode/commands/trellis/brainstorm.md +474 -0
- package/dist/templates/opencode/commands/trellis/break-loop.md +125 -0
- package/dist/templates/opencode/commands/trellis/check-backend.md +13 -0
- package/dist/templates/opencode/commands/trellis/check-cross-layer.md +153 -0
- package/dist/templates/opencode/commands/trellis/check-frontend.md +13 -0
- package/dist/templates/opencode/commands/trellis/create-command.md +154 -0
- package/dist/templates/opencode/commands/trellis/finish-work.md +144 -0
- package/dist/templates/opencode/commands/trellis/integrate-skill.md +219 -0
- package/dist/templates/opencode/commands/trellis/migrate-specs.md +0 -0
- package/dist/templates/opencode/commands/trellis/onboard.md +358 -0
- package/dist/templates/opencode/commands/trellis/parallel.md +194 -0
- package/dist/templates/opencode/commands/trellis/record-session.md +62 -0
- package/dist/templates/opencode/commands/trellis/start.md +338 -0
- package/dist/templates/opencode/commands/trellis/update-spec.md +354 -0
- package/dist/templates/opencode/lib/trellis-context.js +436 -0
- package/dist/templates/opencode/package.json +5 -0
- package/dist/templates/opencode/plugin/inject-subagent-context.js +538 -0
- package/dist/templates/opencode/plugin/session-start.js +192 -0
- package/dist/templates/trellis/VERSION +1 -0
- package/dist/templates/trellis/deliverables/README.md +51 -0
- package/dist/templates/trellis/gitignore.txt +29 -0
- package/dist/templates/trellis/index.d.ts +49 -0
- package/dist/templates/trellis/index.d.ts.map +1 -0
- package/dist/templates/trellis/index.js +92 -0
- package/dist/templates/trellis/index.js.map +1 -0
- package/dist/templates/trellis/paths.README.md +277 -0
- package/dist/templates/trellis/paths.yaml +41 -0
- package/dist/templates/trellis/pool/implementations.json +5 -0
- package/dist/templates/trellis/pool/prototypes.json +5 -0
- package/dist/templates/trellis/pool/requirements.json +5 -0
- package/dist/templates/trellis/scripts/__init__.py +5 -0
- package/dist/templates/trellis/scripts/add_session.py +391 -0
- package/dist/templates/trellis/scripts/common/__init__.py +80 -0
- package/dist/templates/trellis/scripts/common/cli_adapter.py +522 -0
- package/dist/templates/trellis/scripts/common/developer.py +189 -0
- package/dist/templates/trellis/scripts/common/git_context.py +383 -0
- package/dist/templates/trellis/scripts/common/paths.py +346 -0
- package/dist/templates/trellis/scripts/common/phase.py +253 -0
- package/dist/templates/trellis/scripts/common/project_paths.py +189 -0
- package/dist/templates/trellis/scripts/common/registry.py +365 -0
- package/dist/templates/trellis/scripts/common/task_queue.py +255 -0
- package/dist/templates/trellis/scripts/common/task_utils.py +177 -0
- package/dist/templates/trellis/scripts/common/worktree.py +218 -0
- package/dist/templates/trellis/scripts/create_bootstrap.py +290 -0
- package/dist/templates/trellis/scripts/get_context.py +16 -0
- package/dist/templates/trellis/scripts/get_developer.py +26 -0
- package/dist/templates/trellis/scripts/handoff_generator.py +380 -0
- package/dist/templates/trellis/scripts/init_developer.py +51 -0
- package/dist/templates/trellis/scripts/multi_agent/__init__.py +5 -0
- package/dist/templates/trellis/scripts/multi_agent/cleanup.py +403 -0
- package/dist/templates/trellis/scripts/multi_agent/create_pr.py +329 -0
- package/dist/templates/trellis/scripts/multi_agent/plan.py +233 -0
- package/dist/templates/trellis/scripts/multi_agent/start.py +461 -0
- package/dist/templates/trellis/scripts/multi_agent/status.py +817 -0
- package/dist/templates/trellis/scripts/pool.py +373 -0
- package/dist/templates/trellis/scripts/task.py +1162 -0
- package/dist/templates/trellis/scripts-shell-archive/add-session.sh +384 -0
- package/dist/templates/trellis/scripts-shell-archive/common/developer.sh +129 -0
- package/dist/templates/trellis/scripts-shell-archive/common/git-context.sh +263 -0
- package/dist/templates/trellis/scripts-shell-archive/common/paths.sh +208 -0
- package/dist/templates/trellis/scripts-shell-archive/common/phase.sh +150 -0
- package/dist/templates/trellis/scripts-shell-archive/common/registry.sh +247 -0
- package/dist/templates/trellis/scripts-shell-archive/common/task-queue.sh +142 -0
- package/dist/templates/trellis/scripts-shell-archive/common/task-utils.sh +151 -0
- package/dist/templates/trellis/scripts-shell-archive/common/worktree.sh +128 -0
- package/dist/templates/trellis/scripts-shell-archive/create-bootstrap.sh +299 -0
- package/dist/templates/trellis/scripts-shell-archive/get-context.sh +7 -0
- package/dist/templates/trellis/scripts-shell-archive/get-developer.sh +15 -0
- package/dist/templates/trellis/scripts-shell-archive/init-developer.sh +34 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/cleanup.sh +396 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/create-pr.sh +241 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/plan.sh +207 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/start.sh +317 -0
- package/dist/templates/trellis/scripts-shell-archive/multi-agent/status.sh +828 -0
- package/dist/templates/trellis/scripts-shell-archive/task.sh +1204 -0
- package/dist/templates/trellis/spec/roles/designer/index.md +243 -0
- package/dist/templates/trellis/spec/roles/designer/mock-data-standards.md +481 -0
- package/dist/templates/trellis/spec/roles/designer/prototype-guidelines.md +429 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/api-integration.md +565 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/index.md +321 -0
- package/dist/templates/trellis/spec/roles/frontend-impl/state-management.md +599 -0
- package/dist/templates/trellis/spec/roles/pm/index.md +112 -0
- package/dist/templates/trellis/spec/roles/pm/prd-template.md +124 -0
- package/dist/templates/trellis/tasks/.gitkeep +0 -0
- package/dist/templates/trellis/workflow.md +416 -0
- package/dist/templates/trellis/worktree.yaml +47 -0
- package/dist/types/ai-tools.d.ts +56 -0
- package/dist/types/ai-tools.d.ts.map +1 -0
- package/dist/types/ai-tools.js +103 -0
- package/dist/types/ai-tools.js.map +1 -0
- package/dist/types/migration.d.ts +86 -0
- package/dist/types/migration.d.ts.map +1 -0
- package/dist/types/migration.js +8 -0
- package/dist/types/migration.js.map +1 -0
- package/dist/utils/compare-versions.d.ts +12 -0
- package/dist/utils/compare-versions.d.ts.map +1 -0
- package/dist/utils/compare-versions.js +76 -0
- package/dist/utils/compare-versions.js.map +1 -0
- package/dist/utils/file-writer.d.ts +23 -0
- package/dist/utils/file-writer.d.ts.map +1 -0
- package/dist/utils/file-writer.js +140 -0
- package/dist/utils/file-writer.js.map +1 -0
- package/dist/utils/project-detector.d.ts +16 -0
- package/dist/utils/project-detector.d.ts.map +1 -0
- package/dist/utils/project-detector.js +186 -0
- package/dist/utils/project-detector.js.map +1 -0
- package/dist/utils/template-fetcher.d.ts +51 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -0
- package/dist/utils/template-fetcher.js +174 -0
- package/dist/utils/template-fetcher.js.map +1 -0
- package/dist/utils/template-hash.d.ts +78 -0
- package/dist/utils/template-hash.d.ts.map +1 -0
- package/dist/utils/template-hash.js +233 -0
- package/dist/utils/template-hash.js.map +1 -0
- package/package.json +87 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# PRD Template - 产品需求文档模板
|
|
2
|
+
|
|
3
|
+
> 复制此模板到任务目录,填写各章节内容
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# [功能名称] PRD
|
|
8
|
+
|
|
9
|
+
## 1. 功能概述
|
|
10
|
+
|
|
11
|
+
**一句话概述**:[用一句话说明这个功能是什么]
|
|
12
|
+
|
|
13
|
+
**背景**:[为什么要做这个功能,解决什么问题]
|
|
14
|
+
|
|
15
|
+
**目标用户**:[谁会使用这个功能]
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 2. 用户故事
|
|
20
|
+
|
|
21
|
+
### 主要用户故事
|
|
22
|
+
|
|
23
|
+
**US-1**: 作为 [角色],我想要 [功能],以便 [价值/目标]
|
|
24
|
+
|
|
25
|
+
**验收标准**:
|
|
26
|
+
- [ ] [可测试的标准1]
|
|
27
|
+
- [ ] [可测试的标准2]
|
|
28
|
+
|
|
29
|
+
**US-2**: [重复上述格式]
|
|
30
|
+
|
|
31
|
+
### 边缘场景
|
|
32
|
+
|
|
33
|
+
**US-Edge-1**: [边缘场景描述]
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 3. 功能需求
|
|
38
|
+
|
|
39
|
+
### 3.1 核心功能
|
|
40
|
+
|
|
41
|
+
**F1**: [功能点1]
|
|
42
|
+
- 描述:[详细描述]
|
|
43
|
+
- 优先级:P0/P1/P2
|
|
44
|
+
- 交互要点:[关键交互说明]
|
|
45
|
+
|
|
46
|
+
**F2**: [功能点2]
|
|
47
|
+
|
|
48
|
+
### 3.2 辅助功能
|
|
49
|
+
|
|
50
|
+
[次要功能列表]
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## 4. 验收标准
|
|
55
|
+
|
|
56
|
+
### 功能性验收
|
|
57
|
+
|
|
58
|
+
- [ ] [核心功能可用]
|
|
59
|
+
- [ ] [边缘场景正常]
|
|
60
|
+
- [ ] [错误处理完善]
|
|
61
|
+
|
|
62
|
+
### 用户体验验收
|
|
63
|
+
|
|
64
|
+
- [ ] [加载时间 < X秒]
|
|
65
|
+
- [ ] [交互流畅]
|
|
66
|
+
- [ ] [错误提示友好]
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 5. 非功能需求
|
|
71
|
+
|
|
72
|
+
### 性能要求
|
|
73
|
+
- 响应时间:[X秒内]
|
|
74
|
+
- 并发支持:[X用户]
|
|
75
|
+
|
|
76
|
+
### 兼容性要求
|
|
77
|
+
- 浏览器:[Chrome 90+, Safari 14+, ...]
|
|
78
|
+
- 设备:[桌面端, 移动端, ...]
|
|
79
|
+
|
|
80
|
+
### 安全要求
|
|
81
|
+
- [数据加密要求]
|
|
82
|
+
- [权限控制要求]
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## 6. 数据埋点(可选)
|
|
87
|
+
|
|
88
|
+
### 事件埋点
|
|
89
|
+
|
|
90
|
+
| 事件名 | 触发时机 | 参数 |
|
|
91
|
+
|--------|---------|------|
|
|
92
|
+
| [event_name] | [触发条件] | [参数列表] |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 7. 上线计划
|
|
97
|
+
|
|
98
|
+
### 里程碑
|
|
99
|
+
|
|
100
|
+
- [ ] PRD完成 - [日期]
|
|
101
|
+
- [ ] 原型完成 - [日期]
|
|
102
|
+
- [ ] 开发完成 - [日期]
|
|
103
|
+
- [ ] 测试完成 - [日期]
|
|
104
|
+
- [ ] 上线 - [日期]
|
|
105
|
+
|
|
106
|
+
### 回滚计划
|
|
107
|
+
|
|
108
|
+
[如果上线失败,如何回滚]
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 8. 附录
|
|
113
|
+
|
|
114
|
+
### 竞品参考
|
|
115
|
+
- [竞品A]: [链接]
|
|
116
|
+
- [竞品B]: [链接]
|
|
117
|
+
|
|
118
|
+
### 设计资源
|
|
119
|
+
- Figma: [链接]
|
|
120
|
+
- 图片素材: [路径]
|
|
121
|
+
|
|
122
|
+
### 技术资源
|
|
123
|
+
- API文档: [链接]
|
|
124
|
+
- 技术方案: [链接]
|
|
File without changes
|
|
@@ -0,0 +1,416 @@
|
|
|
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
|
+
python3 ./.trellis/scripts/get_developer.py
|
|
28
|
+
|
|
29
|
+
# If not initialized, run:
|
|
30
|
+
python3 ./.trellis/scripts/init_developer.py <your-name>
|
|
31
|
+
# Example: python3 ./.trellis/scripts/init_developer.py 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
|
+
- iFlow cli: `iflow-agent` or `iflow-<task>`
|
|
43
|
+
|
|
44
|
+
### Step 1: Understand Current Context
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Get full context in one command
|
|
48
|
+
python3 ./.trellis/scripts/get_context.py
|
|
49
|
+
|
|
50
|
+
# Or check manually:
|
|
51
|
+
python3 ./.trellis/scripts/get_developer.py # Your identity
|
|
52
|
+
python3 ./.trellis/scripts/task.py list # Active tasks
|
|
53
|
+
git status && git log --oneline -10 # Git state
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Step 2: Read Project Guidelines [MANDATORY]
|
|
57
|
+
|
|
58
|
+
**CRITICAL**: Read guidelines before writing any code:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Read frontend guidelines index (if applicable)
|
|
62
|
+
cat .trellis/spec/frontend/index.md
|
|
63
|
+
|
|
64
|
+
# Read backend guidelines index (if applicable)
|
|
65
|
+
cat .trellis/spec/backend/index.md
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Why read both?**
|
|
69
|
+
- Understand the full project architecture
|
|
70
|
+
- Know coding standards for the entire codebase
|
|
71
|
+
- See how frontend and backend interact
|
|
72
|
+
- Learn the overall code quality requirements
|
|
73
|
+
|
|
74
|
+
### Step 3: Before Coding - Read Specific Guidelines (Required)
|
|
75
|
+
|
|
76
|
+
Based on your task, read the **detailed** guidelines:
|
|
77
|
+
|
|
78
|
+
**Frontend Task**:
|
|
79
|
+
```bash
|
|
80
|
+
cat .trellis/spec/frontend/hook-guidelines.md # For hooks
|
|
81
|
+
cat .trellis/spec/frontend/component-guidelines.md # For components
|
|
82
|
+
cat .trellis/spec/frontend/type-safety.md # For types
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
**Backend Task**:
|
|
86
|
+
```bash
|
|
87
|
+
cat .trellis/spec/backend/database-guidelines.md # For DB operations
|
|
88
|
+
cat .trellis/spec/backend/type-safety.md # For types
|
|
89
|
+
cat .trellis/spec/backend/logging-guidelines.md # For logging
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Workflow Overview
|
|
95
|
+
|
|
96
|
+
### Core Principles
|
|
97
|
+
|
|
98
|
+
1. **Read Before Write** - Understand context before starting
|
|
99
|
+
2. **Follow Standards** - [!] **MUST read `.trellis/spec/` guidelines before coding**
|
|
100
|
+
3. **Incremental Development** - Complete one task at a time
|
|
101
|
+
4. **Record Promptly** - Update tracking files immediately after completion
|
|
102
|
+
5. **Document Limits** - [!] **Max 2000 lines per journal document**
|
|
103
|
+
|
|
104
|
+
### File System
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
.trellis/
|
|
108
|
+
|-- .developer # Developer identity (gitignored)
|
|
109
|
+
|-- scripts/
|
|
110
|
+
| |-- __init__.py # Python package init
|
|
111
|
+
| |-- common/ # Shared utilities (Python)
|
|
112
|
+
| | |-- __init__.py
|
|
113
|
+
| | |-- paths.py # Path utilities
|
|
114
|
+
| | |-- developer.py # Developer management
|
|
115
|
+
| | +-- git_context.py # Git context implementation
|
|
116
|
+
| |-- multi_agent/ # Multi-agent pipeline scripts
|
|
117
|
+
| | |-- __init__.py
|
|
118
|
+
| | |-- start.py # Start worktree agent
|
|
119
|
+
| | |-- status.py # Monitor agent status
|
|
120
|
+
| | |-- create_pr.py # Create PR
|
|
121
|
+
| | +-- cleanup.py # Cleanup worktree
|
|
122
|
+
| |-- init_developer.py # Initialize developer identity
|
|
123
|
+
| |-- get_developer.py # Get current developer name
|
|
124
|
+
| |-- task.py # Manage tasks
|
|
125
|
+
| |-- get_context.py # Get session context
|
|
126
|
+
| +-- add_session.py # One-click session recording
|
|
127
|
+
|-- workspace/ # Developer workspaces
|
|
128
|
+
| |-- index.md # Workspace index + Session template
|
|
129
|
+
| +-- {developer}/ # Per-developer directories
|
|
130
|
+
| |-- index.md # Personal index (with @@@auto markers)
|
|
131
|
+
| +-- journal-N.md # Journal files (sequential numbering)
|
|
132
|
+
|-- tasks/ # Task tracking
|
|
133
|
+
| +-- {MM}-{DD}-{name}/
|
|
134
|
+
| +-- task.json
|
|
135
|
+
|-- spec/ # [!] MUST READ before coding
|
|
136
|
+
| |-- frontend/ # Frontend guidelines (if applicable)
|
|
137
|
+
| | |-- index.md # Start here - guidelines index
|
|
138
|
+
| | +-- *.md # Topic-specific docs
|
|
139
|
+
| |-- backend/ # Backend guidelines (if applicable)
|
|
140
|
+
| | |-- index.md # Start here - guidelines index
|
|
141
|
+
| | +-- *.md # Topic-specific docs
|
|
142
|
+
| +-- guides/ # Thinking guides
|
|
143
|
+
| |-- index.md # Guides index
|
|
144
|
+
| |-- cross-layer-thinking-guide.md # Pre-implementation checklist
|
|
145
|
+
| +-- *.md # Other guides
|
|
146
|
+
+-- workflow.md # This document
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## Session Start Process
|
|
152
|
+
|
|
153
|
+
### Step 1: Get Session Context
|
|
154
|
+
|
|
155
|
+
Use the unified context script:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Get all context in one command
|
|
159
|
+
python3 ./.trellis/scripts/get_context.py
|
|
160
|
+
|
|
161
|
+
# Or get JSON format
|
|
162
|
+
python3 ./.trellis/scripts/get_context.py --json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Step 2: Read Development Guidelines [!] REQUIRED
|
|
166
|
+
|
|
167
|
+
**[!] CRITICAL: MUST read guidelines before writing any code**
|
|
168
|
+
|
|
169
|
+
Based on what you'll develop, read the corresponding guidelines:
|
|
170
|
+
|
|
171
|
+
**Frontend Development** (if applicable):
|
|
172
|
+
```bash
|
|
173
|
+
# Read index first, then specific docs based on task
|
|
174
|
+
cat .trellis/spec/frontend/index.md
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
**Backend Development** (if applicable):
|
|
178
|
+
```bash
|
|
179
|
+
# Read index first, then specific docs based on task
|
|
180
|
+
cat .trellis/spec/backend/index.md
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
**Cross-Layer Features**:
|
|
184
|
+
```bash
|
|
185
|
+
# For features spanning multiple layers
|
|
186
|
+
cat .trellis/spec/guides/cross-layer-thinking-guide.md
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Step 3: Select Task to Develop
|
|
190
|
+
|
|
191
|
+
Use the task management script:
|
|
192
|
+
|
|
193
|
+
```bash
|
|
194
|
+
# List active tasks
|
|
195
|
+
python3 ./.trellis/scripts/task.py list
|
|
196
|
+
|
|
197
|
+
# Create new task (creates directory with task.json)
|
|
198
|
+
python3 ./.trellis/scripts/task.py create "<title>" --slug <task-name>
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Development Process
|
|
204
|
+
|
|
205
|
+
### Task Development Flow
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
1. Create or select task
|
|
209
|
+
--> python3 ./.trellis/scripts/task.py create "<title>" --slug <name> or list
|
|
210
|
+
|
|
211
|
+
2. Write code according to guidelines
|
|
212
|
+
--> Read .trellis/spec/ docs relevant to your task
|
|
213
|
+
--> For cross-layer: read .trellis/spec/guides/
|
|
214
|
+
|
|
215
|
+
3. Self-test
|
|
216
|
+
--> Run project's lint/test commands (see spec docs)
|
|
217
|
+
--> Manual feature testing
|
|
218
|
+
|
|
219
|
+
4. Commit code
|
|
220
|
+
--> git add <files>
|
|
221
|
+
--> git commit -m "type(scope): description"
|
|
222
|
+
Format: feat/fix/docs/refactor/test/chore
|
|
223
|
+
|
|
224
|
+
5. Record session (one command)
|
|
225
|
+
--> python3 ./.trellis/scripts/add_session.py --title "Title" --commit "hash"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Code Quality Checklist
|
|
229
|
+
|
|
230
|
+
**Must pass before commit**:
|
|
231
|
+
- [OK] Lint checks pass (project-specific command)
|
|
232
|
+
- [OK] Type checks pass (if applicable)
|
|
233
|
+
- [OK] Manual feature testing passes
|
|
234
|
+
|
|
235
|
+
**Project-specific checks**:
|
|
236
|
+
- See `.trellis/spec/frontend/quality-guidelines.md` for frontend
|
|
237
|
+
- See `.trellis/spec/backend/quality-guidelines.md` for backend
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Session End
|
|
242
|
+
|
|
243
|
+
### One-Click Session Recording
|
|
244
|
+
|
|
245
|
+
After code is committed, use:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
python3 ./.trellis/scripts/add_session.py \
|
|
249
|
+
--title "Session Title" \
|
|
250
|
+
--commit "abc1234" \
|
|
251
|
+
--summary "Brief summary"
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
This automatically:
|
|
255
|
+
1. Detects current journal file
|
|
256
|
+
2. Creates new file if 2000-line limit exceeded
|
|
257
|
+
3. Appends session content
|
|
258
|
+
4. Updates index.md (sessions count, history table)
|
|
259
|
+
|
|
260
|
+
### Pre-end Checklist
|
|
261
|
+
|
|
262
|
+
Use `/trellis:finish-work` command to run through:
|
|
263
|
+
1. [OK] All code committed, commit message follows convention
|
|
264
|
+
2. [OK] Session recorded via `add_session.py`
|
|
265
|
+
3. [OK] No lint/test errors
|
|
266
|
+
4. [OK] Working directory clean (or WIP noted)
|
|
267
|
+
5. [OK] Spec docs updated if needed
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## File Descriptions
|
|
272
|
+
|
|
273
|
+
### 1. workspace/ - Developer Workspaces
|
|
274
|
+
|
|
275
|
+
**Purpose**: Record each AI Agent session's work content
|
|
276
|
+
|
|
277
|
+
**Structure** (Multi-developer support):
|
|
278
|
+
```
|
|
279
|
+
workspace/
|
|
280
|
+
|-- index.md # Main index (Active Developers table)
|
|
281
|
+
+-- {developer}/ # Per-developer directory
|
|
282
|
+
|-- index.md # Personal index (with @@@auto markers)
|
|
283
|
+
+-- journal-N.md # Journal files (sequential: 1, 2, 3...)
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
**When to update**:
|
|
287
|
+
- [OK] End of each session
|
|
288
|
+
- [OK] Complete important task
|
|
289
|
+
- [OK] Fix important bug
|
|
290
|
+
|
|
291
|
+
### 2. spec/ - Development Guidelines
|
|
292
|
+
|
|
293
|
+
**Purpose**: Documented standards for consistent development
|
|
294
|
+
|
|
295
|
+
**Structure** (Multi-doc format):
|
|
296
|
+
```
|
|
297
|
+
spec/
|
|
298
|
+
|-- frontend/ # Frontend docs (if applicable)
|
|
299
|
+
| |-- index.md # Start here
|
|
300
|
+
| +-- *.md # Topic-specific docs
|
|
301
|
+
|-- backend/ # Backend docs (if applicable)
|
|
302
|
+
| |-- index.md # Start here
|
|
303
|
+
| +-- *.md # Topic-specific docs
|
|
304
|
+
+-- guides/ # Thinking guides
|
|
305
|
+
|-- index.md # Start here
|
|
306
|
+
+-- *.md # Guide-specific docs
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
**When to update**:
|
|
310
|
+
- [OK] New pattern discovered
|
|
311
|
+
- [OK] Bug fixed that reveals missing guidance
|
|
312
|
+
- [OK] New convention established
|
|
313
|
+
|
|
314
|
+
### 3. Tasks - Task Tracking
|
|
315
|
+
|
|
316
|
+
Each task is a directory containing `task.json`:
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
tasks/
|
|
320
|
+
|-- 01-21-my-task/
|
|
321
|
+
| +-- task.json
|
|
322
|
+
+-- archive/
|
|
323
|
+
+-- 2026-01/
|
|
324
|
+
+-- 01-15-old-task/
|
|
325
|
+
+-- task.json
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
**Commands**:
|
|
329
|
+
```bash
|
|
330
|
+
python3 ./.trellis/scripts/task.py create "<title>" [--slug <name>] # Create task directory
|
|
331
|
+
python3 ./.trellis/scripts/task.py archive <name> # Archive to archive/{year-month}/
|
|
332
|
+
python3 ./.trellis/scripts/task.py list # List active tasks
|
|
333
|
+
python3 ./.trellis/scripts/task.py list-archive # List archived tasks
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
---
|
|
337
|
+
|
|
338
|
+
## Best Practices
|
|
339
|
+
|
|
340
|
+
### [OK] DO - Should Do
|
|
341
|
+
|
|
342
|
+
1. **Before session start**:
|
|
343
|
+
- Run `python3 ./.trellis/scripts/get_context.py` for full context
|
|
344
|
+
- [!] **MUST read** relevant `.trellis/spec/` docs
|
|
345
|
+
|
|
346
|
+
2. **During development**:
|
|
347
|
+
- [!] **Follow** `.trellis/spec/` guidelines
|
|
348
|
+
- For cross-layer features, use `/trellis:check-cross-layer`
|
|
349
|
+
- Develop only one task at a time
|
|
350
|
+
- Run lint and tests frequently
|
|
351
|
+
|
|
352
|
+
3. **After development complete**:
|
|
353
|
+
- Use `/trellis:finish-work` for completion checklist
|
|
354
|
+
- After fix bug, use `/trellis:break-loop` for deep analysis
|
|
355
|
+
- Human commits after testing passes
|
|
356
|
+
- Use `add_session.py` to record progress
|
|
357
|
+
|
|
358
|
+
### [X] DON'T - Should Not Do
|
|
359
|
+
|
|
360
|
+
1. [!] **Don't** skip reading `.trellis/spec/` guidelines
|
|
361
|
+
2. [!] **Don't** let journal single file exceed 2000 lines
|
|
362
|
+
3. **Don't** develop multiple unrelated tasks simultaneously
|
|
363
|
+
4. **Don't** commit code with lint/test errors
|
|
364
|
+
5. **Don't** forget to update spec docs after learning something
|
|
365
|
+
6. [!] **Don't** execute `git commit` - AI should not commit code
|
|
366
|
+
|
|
367
|
+
---
|
|
368
|
+
|
|
369
|
+
## Quick Reference
|
|
370
|
+
|
|
371
|
+
### Must-read Before Development
|
|
372
|
+
|
|
373
|
+
| Task Type | Must-read Document |
|
|
374
|
+
|-----------|-------------------|
|
|
375
|
+
| Frontend work | `frontend/index.md` → relevant docs |
|
|
376
|
+
| Backend work | `backend/index.md` → relevant docs |
|
|
377
|
+
| Cross-Layer Feature | `guides/cross-layer-thinking-guide.md` |
|
|
378
|
+
|
|
379
|
+
### Commit Convention
|
|
380
|
+
|
|
381
|
+
```bash
|
|
382
|
+
git commit -m "type(scope): description"
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
**Type**: feat, fix, docs, refactor, test, chore
|
|
386
|
+
**Scope**: Module name (e.g., auth, api, ui)
|
|
387
|
+
|
|
388
|
+
### Common Commands
|
|
389
|
+
|
|
390
|
+
```bash
|
|
391
|
+
# Session management
|
|
392
|
+
python3 ./.trellis/scripts/get_context.py # Get full context
|
|
393
|
+
python3 ./.trellis/scripts/add_session.py # Record session
|
|
394
|
+
|
|
395
|
+
# Task management
|
|
396
|
+
python3 ./.trellis/scripts/task.py list # List tasks
|
|
397
|
+
python3 ./.trellis/scripts/task.py create "<title>" # Create task
|
|
398
|
+
|
|
399
|
+
# Slash commands
|
|
400
|
+
/trellis:finish-work # Pre-commit checklist
|
|
401
|
+
/trellis:break-loop # Post-debug analysis
|
|
402
|
+
/trellis:check-cross-layer # Cross-layer verification
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
---
|
|
406
|
+
|
|
407
|
+
## Summary
|
|
408
|
+
|
|
409
|
+
Following this workflow ensures:
|
|
410
|
+
- [OK] Continuity across multiple sessions
|
|
411
|
+
- [OK] Consistent code quality
|
|
412
|
+
- [OK] Trackable progress
|
|
413
|
+
- [OK] Knowledge accumulation in spec docs
|
|
414
|
+
- [OK] Transparent team collaboration
|
|
415
|
+
|
|
416
|
+
**Core Philosophy**: Read before write, follow standards, record promptly, capture learnings
|
|
@@ -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
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AI Tool Types and Registry
|
|
3
|
+
*
|
|
4
|
+
* Defines supported AI coding tools and which command templates they can use.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Supported AI coding tools
|
|
8
|
+
*/
|
|
9
|
+
export type AITool = "claude-code" | "cursor" | "opencode" | "iflow" | "codex" | "kilo" | "kiro" | "gemini" | "antigravity";
|
|
10
|
+
/**
|
|
11
|
+
* Template directory categories
|
|
12
|
+
*/
|
|
13
|
+
export type TemplateDir = "common" | "claude" | "cursor" | "opencode" | "iflow" | "codex" | "kilo" | "kiro" | "gemini" | "antigravity";
|
|
14
|
+
/**
|
|
15
|
+
* CLI flag names for platform selection (e.g., --claude, --cursor, --kilo, --kiro, --gemini, --antigravity)
|
|
16
|
+
* Must match keys in InitOptions (src/commands/init.ts)
|
|
17
|
+
*/
|
|
18
|
+
export type CliFlag = "claude" | "cursor" | "opencode" | "iflow" | "codex" | "kilo" | "kiro" | "gemini" | "antigravity";
|
|
19
|
+
/**
|
|
20
|
+
* Configuration for an AI tool
|
|
21
|
+
*/
|
|
22
|
+
export interface AIToolConfig {
|
|
23
|
+
/** Display name of the tool */
|
|
24
|
+
name: string;
|
|
25
|
+
/** Command template directory names to include */
|
|
26
|
+
templateDirs: TemplateDir[];
|
|
27
|
+
/** Config directory name in the project root (e.g., ".claude") */
|
|
28
|
+
configDir: string;
|
|
29
|
+
/** CLI flag name for --flag options (e.g., "claude" for --claude) */
|
|
30
|
+
cliFlag: CliFlag;
|
|
31
|
+
/** Whether this tool is checked by default in interactive init prompt */
|
|
32
|
+
defaultChecked: boolean;
|
|
33
|
+
/** Whether this tool uses Python hooks (affects Windows encoding detection) */
|
|
34
|
+
hasPythonHooks: boolean;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Registry of all supported AI tools and their configurations.
|
|
38
|
+
* This is the single source of truth for platform data.
|
|
39
|
+
*
|
|
40
|
+
* When adding a new platform, add an entry here and create:
|
|
41
|
+
* 1. src/configurators/{platform}.ts — configure function
|
|
42
|
+
* 2. src/templates/{platform}/ — template files
|
|
43
|
+
* 3. Register in src/configurators/index.ts — PLATFORM_FUNCTIONS
|
|
44
|
+
* 4. Add CLI flag in src/cli/index.ts
|
|
45
|
+
* 5. Add to InitOptions in src/commands/init.ts
|
|
46
|
+
*/
|
|
47
|
+
export declare const AI_TOOLS: Record<AITool, AIToolConfig>;
|
|
48
|
+
/**
|
|
49
|
+
* Get the configuration for a specific AI tool
|
|
50
|
+
*/
|
|
51
|
+
export declare function getToolConfig(tool: AITool): AIToolConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Get template directories for a specific tool
|
|
54
|
+
*/
|
|
55
|
+
export declare function getTemplateDirs(tool: AITool): TemplateDir[];
|
|
56
|
+
//# sourceMappingURL=ai-tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-tools.d.ts","sourceRoot":"","sources":["../../src/types/ai-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,MAAM,GACd,aAAa,GACb,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB,QAAQ,GACR,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,aAAa,CAAC;AAElB;;;GAGG;AACH,MAAM,MAAM,OAAO,GACf,QAAQ,GACR,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,MAAM,GACN,MAAM,GACN,QAAQ,GACR,aAAa,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,kDAAkD;IAClD,YAAY,EAAE,WAAW,EAAE,CAAC;IAC5B,kEAAkE;IAClE,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,yEAAyE;IACzE,cAAc,EAAE,OAAO,CAAC;IACxB,+EAA+E;IAC/E,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAyEjD,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAExD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAE3D"}
|