@pennixrv/trellis 0.7.0-beta.5 → 0.7.0-beta.50
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/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +47 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/commands/backup.d.ts +25 -0
- package/dist/commands/backup.d.ts.map +1 -0
- package/dist/commands/backup.js +152 -0
- package/dist/commands/backup.js.map +1 -0
- package/dist/commands/channel/adapters/claude.d.ts.map +1 -1
- package/dist/commands/channel/adapters/claude.js +2 -0
- package/dist/commands/channel/adapters/claude.js.map +1 -1
- package/dist/commands/channel/adapters/codex.d.ts +5 -1
- package/dist/commands/channel/adapters/codex.d.ts.map +1 -1
- package/dist/commands/channel/adapters/codex.js +19 -9
- package/dist/commands/channel/adapters/codex.js.map +1 -1
- package/dist/commands/channel/adapters/index.d.ts +3 -0
- package/dist/commands/channel/adapters/index.d.ts.map +1 -1
- package/dist/commands/channel/adapters/index.js +3 -3
- package/dist/commands/channel/adapters/index.js.map +1 -1
- package/dist/commands/channel/adapters/types.d.ts +2 -0
- package/dist/commands/channel/adapters/types.d.ts.map +1 -1
- package/dist/commands/channel/guard.d.ts.map +1 -1
- package/dist/commands/channel/guard.js +38 -29
- package/dist/commands/channel/guard.js.map +1 -1
- package/dist/commands/channel/index.d.ts.map +1 -1
- package/dist/commands/channel/index.js +52 -16
- package/dist/commands/channel/index.js.map +1 -1
- package/dist/commands/channel/kill.d.ts.map +1 -1
- package/dist/commands/channel/kill.js +37 -15
- package/dist/commands/channel/kill.js.map +1 -1
- package/dist/commands/channel/messages.d.ts.map +1 -1
- package/dist/commands/channel/messages.js +3 -2
- package/dist/commands/channel/messages.js.map +1 -1
- package/dist/commands/channel/process-identity.d.ts +3 -0
- package/dist/commands/channel/process-identity.d.ts.map +1 -0
- package/dist/commands/channel/process-identity.js +24 -0
- package/dist/commands/channel/process-identity.js.map +1 -0
- package/dist/commands/channel/profiles.d.ts +26 -0
- package/dist/commands/channel/profiles.d.ts.map +1 -0
- package/dist/commands/channel/profiles.js +186 -0
- package/dist/commands/channel/profiles.js.map +1 -0
- package/dist/commands/channel/rm.d.ts +0 -1
- package/dist/commands/channel/rm.d.ts.map +1 -1
- package/dist/commands/channel/rm.js +203 -96
- package/dist/commands/channel/rm.js.map +1 -1
- package/dist/commands/channel/spawn.d.ts +3 -0
- package/dist/commands/channel/spawn.d.ts.map +1 -1
- package/dist/commands/channel/spawn.js +43 -15
- package/dist/commands/channel/spawn.js.map +1 -1
- package/dist/commands/channel/supervisor/idle.d.ts +2 -0
- package/dist/commands/channel/supervisor/idle.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/idle.js +15 -7
- package/dist/commands/channel/supervisor/idle.js.map +1 -1
- package/dist/commands/channel/supervisor/inbox.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/inbox.js +48 -33
- package/dist/commands/channel/supervisor/inbox.js.map +1 -1
- package/dist/commands/channel/supervisor/stdout.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/stdout.js +6 -3
- package/dist/commands/channel/supervisor/stdout.js.map +1 -1
- package/dist/commands/channel/supervisor/warning.d.ts.map +1 -1
- package/dist/commands/channel/supervisor/warning.js +2 -3
- package/dist/commands/channel/supervisor/warning.js.map +1 -1
- package/dist/commands/channel/supervisor.d.ts +12 -0
- package/dist/commands/channel/supervisor.d.ts.map +1 -1
- package/dist/commands/channel/supervisor.js +88 -16
- package/dist/commands/channel/supervisor.js.map +1 -1
- package/dist/commands/channel/wait.d.ts +3 -1
- package/dist/commands/channel/wait.d.ts.map +1 -1
- package/dist/commands/channel/wait.js +59 -14
- package/dist/commands/channel/wait.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +23 -10
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +446 -333
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/workflow.d.ts +1 -0
- package/dist/commands/workflow.d.ts.map +1 -1
- package/dist/commands/workflow.js +56 -1
- package/dist/commands/workflow.js.map +1 -1
- package/dist/configurators/codex.d.ts +6 -0
- package/dist/configurators/codex.d.ts.map +1 -1
- package/dist/configurators/codex.js +93 -0
- package/dist/configurators/codex.js.map +1 -1
- package/dist/configurators/shared.js +2 -2
- package/dist/configurators/shared.js.map +1 -1
- package/dist/constants/paths.d.ts +2 -0
- package/dist/constants/paths.d.ts.map +1 -1
- package/dist/constants/paths.js +2 -0
- package/dist/constants/paths.js.map +1 -1
- package/dist/migrations/manifests/0.7.0-beta.10.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.11.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.12.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.13.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.14.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.15.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.16.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.17.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.18.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.19.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.20.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.21.json +17 -0
- package/dist/migrations/manifests/0.7.0-beta.22.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.23.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.24.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.25.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.26.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.27.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.28.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.29.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.30.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.31.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.32.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.33.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.34.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.35.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.36.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.37.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.38.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.39.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.40.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.41.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.42.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.43.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.44.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.45.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.46.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.47.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.48.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.49.json +13 -0
- package/dist/migrations/manifests/0.7.0-beta.50.json +12 -0
- package/dist/migrations/manifests/0.7.0-beta.6.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.7.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.8.json +9 -0
- package/dist/migrations/manifests/0.7.0-beta.9.json +9 -0
- package/dist/templates/codex/hooks/session-start.py +21 -17
- package/dist/templates/common/bundled-skills/trellis-channel/SKILL.md +3 -1
- package/dist/templates/common/bundled-skills/trellis-channel/references/command-reference.md +24 -16
- package/dist/templates/common/bundled-skills/trellis-channel/references/forum.md +4 -12
- package/dist/templates/common/bundled-skills/trellis-channel/references/multi-target-dispatch.md +139 -0
- package/dist/templates/common/bundled-skills/trellis-channel/references/progress-debugging.md +9 -5
- package/dist/templates/common/bundled-skills/trellis-channel/references/subnode-work.md +84 -14
- package/dist/templates/common/bundled-skills/trellis-channel/references/workers.md +9 -11
- package/dist/templates/common/bundled-skills/trellis-channel/references/workflows.md +25 -14
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-skills-or-commands.md +13 -11
- package/dist/templates/common/bundled-skills/trellis-meta/references/customize-local/change-task-lifecycle.md +7 -2
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/task-system.md +6 -1
- package/dist/templates/common/bundled-skills/trellis-meta/references/local-architecture/workflow.md +6 -4
- package/dist/templates/common/bundled-skills/trellis-session-insight/SKILL.md +42 -3
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/cli-quick-reference.md +1 -1
- package/dist/templates/common/bundled-skills/trellis-session-insight/references/triggering-patterns.md +10 -2
- package/dist/templates/common/commands/continue.md +36 -8
- package/dist/templates/common/commands/finish-work.md +17 -2
- package/dist/templates/common/commands/start.md +8 -1
- package/dist/templates/common/skills/brainstorm.md +49 -22
- package/dist/templates/common/skills/break-loop.md +6 -10
- package/dist/templates/common/skills/check.md +34 -5
- package/dist/templates/copilot/hooks/session-start.py +19 -15
- package/dist/templates/copilot/prompts/brainstorm.prompt.md +27 -21
- package/dist/templates/markdown/spec/backend/database-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/backend/directory-structure.md.txt +20 -20
- package/dist/templates/markdown/spec/backend/error-handling.md.txt +22 -22
- package/dist/templates/markdown/spec/backend/index.md.txt +19 -19
- package/dist/templates/markdown/spec/backend/logging-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/backend/quality-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/component-guidelines.md.txt +25 -25
- package/dist/templates/markdown/spec/frontend/directory-structure.md.txt +20 -20
- package/dist/templates/markdown/spec/frontend/hook-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/index.md.txt +20 -20
- package/dist/templates/markdown/spec/frontend/quality-guidelines.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/state-management.md.txt +22 -22
- package/dist/templates/markdown/spec/frontend/type-safety.md.txt +22 -22
- package/dist/templates/markdown/spec/guides/code-reuse-thinking-guide.md.txt +80 -85
- package/dist/templates/markdown/spec/guides/cross-layer-thinking-guide.md.txt +164 -209
- package/dist/templates/markdown/spec/guides/cross-platform-thinking-guide.md.txt +161 -185
- package/dist/templates/markdown/spec/guides/index.md.txt +51 -51
- package/dist/templates/markdown/workspace-index.md +44 -44
- package/dist/templates/opencode/lib/session-utils.js +2 -2
- package/dist/templates/shared-hooks/inject-shell-session-context.py +3 -6
- package/dist/templates/shared-hooks/inject-workflow-state.py +3 -2
- package/dist/templates/shared-hooks/session-start.py +23 -18
- package/dist/templates/trellis/agents/subnode-profiles.json +13 -0
- package/dist/templates/trellis/agents/subnode.md +11 -5
- package/dist/templates/trellis/config.yaml +2 -0
- package/dist/templates/trellis/index.d.ts +2 -1
- package/dist/templates/trellis/index.d.ts.map +1 -1
- package/dist/templates/trellis/index.js +4 -2
- package/dist/templates/trellis/index.js.map +1 -1
- package/dist/templates/trellis/scripts/add_session.py +35 -32
- package/dist/templates/trellis/scripts/common/active_task.py +8 -8
- package/dist/templates/trellis/scripts/common/developer.py +18 -18
- package/dist/templates/trellis/scripts/common/ownership_record.py +13 -8
- package/dist/templates/trellis/scripts/common/safe_commit.py +38 -9
- package/dist/templates/trellis/scripts/common/task_planning.py +137 -0
- package/dist/templates/trellis/scripts/common/task_store.py +46 -14
- package/dist/templates/trellis/scripts/common/workflow_phase.py +4 -3
- package/dist/templates/trellis/scripts/subnode_artifact.py +470 -21
- package/dist/templates/trellis/scripts/task.py +175 -2
- package/dist/templates/trellis/workflow.md +407 -388
- package/dist/utils/managed-paths.d.ts +2 -0
- package/dist/utils/managed-paths.d.ts.map +1 -1
- package/dist/utils/managed-paths.js +24 -2
- package/dist/utils/managed-paths.js.map +1 -1
- package/dist/utils/template-fetcher.d.ts +1 -0
- package/dist/utils/template-fetcher.d.ts.map +1 -1
- package/dist/utils/template-fetcher.js +2 -1
- package/dist/utils/template-fetcher.js.map +1 -1
- package/dist/utils/uninstall-scrubbers.d.ts.map +1 -1
- package/dist/utils/uninstall-scrubbers.js +5 -0
- package/dist/utils/uninstall-scrubbers.js.map +1 -1
- package/dist/utils/workflow-provenance.d.ts +24 -0
- package/dist/utils/workflow-provenance.d.ts.map +1 -0
- package/dist/utils/workflow-provenance.js +71 -0
- package/dist/utils/workflow-provenance.js.map +1 -0
- package/dist/utils/workflow-resolver.d.ts +9 -2
- package/dist/utils/workflow-resolver.d.ts.map +1 -1
- package/dist/utils/workflow-resolver.js +33 -7
- package/dist/utils/workflow-resolver.js.map +1 -1
- package/package.json +2 -2
- package/dist/templates/trellis/agents/subnode.env +0 -4
|
@@ -10,7 +10,11 @@ A request to build, implement, fix, refactor, or "go ahead" is not approval to l
|
|
|
10
10
|
|
|
11
11
|
For every non-trivial task, the user must respond at least once after the initial request before implementation begins. If no clarification is needed, that response must approve the final planning summary described below.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Keep the task in planning while a user-owned choice needed to define the requested work remains unresolved. For `analysis_only`, findings, recommendations, and open product options do not block evidence work or require a sealed decision chain. For change-bearing work, inventory evidence and decision dependencies; batch independent material questions with `pennix-decision-grill` when useful, and do not implement or run `task.py start` until change decisions are sealed and approved.
|
|
14
|
+
|
|
15
|
+
## Analysis-Only Exception
|
|
16
|
+
|
|
17
|
+
When `task.json.meta.delivery_mode = "analysis_only"` exactly and the PRD names a bounded evidence deliverable plus a no-change boundary for product source, runtime configuration, deployment, credentials, and external systems, task-creation consent authorizes that evidence work. Keep status `planning`, record and verify the evidence, commit task artifacts, and archive directly; do not run `task.py start` or wait for a second implementation approval. This route remains eligible regardless of complexity, cross-owner scope, multiple evidence units, or whether findings include recommendations or unresolved product choices. Record these in task artifacts without changing protected targets, deploying, releasing, altering credentials, or mutating external systems. The initial request authorizes the requested main-session research; do not require a second implementation approval, Planning Seal, or `task.py start`. If independent subnode evidence is requested, freeze its dispatch plan in the task and obtain explicit approval before any spawn/send; that approval authorizes only the listed evidence dispatch. A later implementation request needs a change-bearing task and its normal Planning Seal and implementation approval gates.
|
|
14
18
|
|
|
15
19
|
## Non-Negotiable Evidence Rule
|
|
16
20
|
|
|
@@ -22,6 +26,10 @@ Do not ask the user to confirm facts that the repository can answer. Ask only fo
|
|
|
22
26
|
|
|
23
27
|
Repository evidence establishes current behavior and technical constraints. The user's intended behavior, feature scope boundaries, and UX preferences are never answerable by repository evidence alone, even when an existing pattern exists; existing patterns are options and recommendation evidence, not decisions.
|
|
24
28
|
|
|
29
|
+
## Evidence Units For Read-Heavy Work
|
|
30
|
+
|
|
31
|
+
When research, audit, review, or investigation is too large for one independently useful conclusion in the current session, split it into evidence units. Each unit has one question or scope, a minimal evidence range, a destination artifact, and a stop condition; persist facts, conclusion or blocker, unknowns, and a recovery point before starting another unit. Size each unit for one normal context window without promising an exact token or time limit.
|
|
32
|
+
|
|
25
33
|
---
|
|
26
34
|
|
|
27
35
|
Use this skill during Phase 1 planning to turn the user's request into clear requirements and planning artifacts.
|
|
@@ -52,18 +60,17 @@ Use a concise title from the user's request. Both the title and `--description`
|
|
|
52
60
|
- product intent still needed from the user
|
|
53
61
|
- scope or risk decisions still needed from the user
|
|
54
62
|
- likely out-of-scope items
|
|
55
|
-
4. If
|
|
56
|
-
5.
|
|
57
|
-
6. When
|
|
58
|
-
7.
|
|
59
|
-
8.
|
|
60
|
-
9. Only a subsequent user message that explicitly approves the latest planning summary authorizes `task.py start` and implementation. If the artifacts change materially after approval, repeat the final review.
|
|
63
|
+
4. If the requested research scope or method depends on an unresolved user-owned choice, ask only that material question; otherwise proceed with the evidence work already requested. Use `pennix-decision-grill` to batch independent choices only when needed to define the requested work. A research recommendation or open product choice can be reported as a finding without being decided or sealed for implementation.
|
|
64
|
+
5. If the user requests independent subnode evidence, first freeze the dispatch plan in the task: question, evidence-unit mapping and grouping rationale, brief scope/stop conditions/destinations, concurrency and FIFO refill/acceptance method. Obtain the user's explicit approval of that frozen plan before any spawn/send. This approval covers only the listed evidence dispatch; material changes to units, scope, method, owner, risk, or acceptance require reapproval. Main-session evidence work may continue while dispatch approval is pending.
|
|
65
|
+
6. When a needed answer returns, persist it, recheck evidence, and continue the same task.
|
|
66
|
+
7. For `analysis_only`, record and verify the declared evidence and no-change boundary in planning; do not require a Planning Seal, implementation approval, or `task.py start` merely because the research is complex.
|
|
67
|
+
8. For change-bearing work, resolve material decisions, create/update complex-task artifacts, run the requirement convergence and PRD passes, then close and present the Planning Seal. Stop before implementation. Only later explicit approval of this task's current sealed revision authorizes native plan approval and `task.py start`; material changes require `task.py replan` and approval of its newly sealed revision.
|
|
61
68
|
|
|
62
69
|
Do not invent a project-specific product/spec hierarchy. If the repository already has product, domain, or spec docs, use them. If it does not, proceed with the evidence that exists.
|
|
63
70
|
|
|
64
71
|
## Question Rules
|
|
65
72
|
|
|
66
|
-
Ask
|
|
73
|
+
Ask one bounded batch per message: include up to three independent material frontier questions. Ask exactly one question only when it is the sole remaining material decision or later decisions depend on its answer.
|
|
67
74
|
|
|
68
75
|
Each question must include:
|
|
69
76
|
|
|
@@ -76,9 +83,7 @@ Do not ask process questions such as whether to search, inspect files, or contin
|
|
|
76
83
|
|
|
77
84
|
Recommendations are not default selections. Never choose a recommended product decision on the user's behalf merely because the user asked for implementation.
|
|
78
85
|
|
|
79
|
-
Do not manufacture clarification questions when the request and repository evidence already resolve
|
|
80
|
-
|
|
81
|
-
The final review is a required phase-transition gate, not a prohibited process question. Task-creation consent, the initial implementation request, and approval given before the latest final summary do not satisfy this gate.
|
|
86
|
+
Do not manufacture clarification questions when the request and repository evidence already resolve the scope and method. For `analysis_only`, proceed with the requested evidence work; no final implementation review or approval is required. The final review and subsequent approval are phase-transition gates for change-bearing implementation only.
|
|
82
87
|
|
|
83
88
|
## Requirement Convergence Gate
|
|
84
89
|
|
|
@@ -91,10 +96,12 @@ Before final review, verify all of the following:
|
|
|
91
96
|
- blocking open questions are empty
|
|
92
97
|
- technical unknowns are researched or explicitly deferred without changing MVP behavior
|
|
93
98
|
|
|
94
|
-
|
|
99
|
+
For `analysis_only`, the task PRD may stay bounded to evidence and the protected-target no-change boundary; no implementation review or approval is required. Change-bearing tasks retain their applicable evidence, convergence, final review, and fresh implementation approval gates.
|
|
95
100
|
|
|
96
101
|
The final planning summary must show Goal, In Scope, Out of Scope, Acceptance Criteria, Key Decisions, relevant Risks or Deferred Items, and artifact status.
|
|
97
102
|
|
|
103
|
+
For change-bearing work, the Planning Seal reconciles task artifacts, targets, branches, dependencies, release, validation, rollback, dynamic facts, and material decisions before implementation. It is not an eligibility or completion gate for `analysis_only` evidence work.
|
|
104
|
+
|
|
98
105
|
## Artifact Rules
|
|
99
106
|
|
|
100
107
|
`prd.md` records requirements and acceptance:
|
|
@@ -142,15 +149,14 @@ After the pass, read `prd.md` top to bottom and verify that no fact is repeated
|
|
|
142
149
|
|
|
143
150
|
## Quality Bar
|
|
144
151
|
|
|
145
|
-
Before declaring planning ready:
|
|
152
|
+
Before declaring change-bearing planning ready:
|
|
153
|
+
|
|
154
|
+
- `prd.md` contains testable acceptance criteria and has passed the PRD convergence pass.
|
|
155
|
+
- Repository-answerable questions have been answered; blocking implementation questions are resolved.
|
|
156
|
+
- Complex change-bearing tasks have `design.md` and `implement.md`; sub-agent-dispatch implementation tasks have curated manifests.
|
|
157
|
+
- The Planning Seal and final summary cover the implementation target, validation, and rollback.
|
|
158
|
+
- The user subsequently approved this task's current sealed plan.
|
|
146
159
|
|
|
147
|
-
|
|
148
|
-
- `prd.md` has passed the PRD convergence pass: no unresolved temporary brainstorm sections, no duplicate facts across sections, and no lost anchors, decisions, or acceptance mappings.
|
|
149
|
-
- Repository-answerable questions have already been answered through inspection.
|
|
150
|
-
- Blocking open questions are empty.
|
|
151
|
-
- Complex tasks have `design.md` and `implement.md`.
|
|
152
|
-
- Sub-agent-dispatch tasks have real curated entries in both `implement.jsonl` and `check.jsonl`; seed-only manifests are not ready.
|
|
153
|
-
- The latest final planning summary has been presented to the user.
|
|
154
|
-
- In a subsequent message, the user explicitly approved that summary for implementation.
|
|
160
|
+
For `analysis_only`, verify the declared evidence deliverable and protected-target no-change boundary, then proceed to complete the research in planning without an implementation summary approval.
|
|
155
161
|
|
|
156
162
|
Do not start implementation merely because the user originally asked for implementation.
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Database Guidelines
|
|
1
|
+
# 数据库指南(Database Guidelines)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 本项目的数据库模式与约定。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
-
|
|
10
|
+
在此记录项目的数据库约定。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
需要回答的问题:
|
|
13
|
+
- 使用什么 ORM/查询库?
|
|
14
|
+
- 如何管理迁移?
|
|
15
|
+
- 表名和列名遵循什么命名约定?
|
|
16
|
+
- 如何处理事务?
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
(待团队填写)
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Query Patterns
|
|
23
|
+
## 查询模式(Query Patterns)
|
|
24
24
|
|
|
25
|
-
<!--
|
|
25
|
+
<!-- 查询应如何编写?如何执行批量操作? -->
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
(待团队填写)
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
## Migrations
|
|
31
|
+
## 迁移(Migrations)
|
|
32
32
|
|
|
33
|
-
<!--
|
|
33
|
+
<!-- 如何创建和运行迁移 -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
(待团队填写)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## Naming Conventions
|
|
39
|
+
## 命名约定(Naming Conventions)
|
|
40
40
|
|
|
41
|
-
<!--
|
|
41
|
+
<!-- 表名、列名和索引名 -->
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
(待团队填写)
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## Common Mistakes
|
|
47
|
+
## 常见错误(Common Mistakes)
|
|
48
48
|
|
|
49
|
-
<!--
|
|
49
|
+
<!-- 团队曾经出现过的数据库相关错误 -->
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
(待团队填写)
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# Directory Structure
|
|
1
|
+
# 目录结构(Directory Structure)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 本项目如何组织后端代码。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
-
|
|
10
|
+
在此记录项目的后端目录结构。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
需要回答的问题:
|
|
13
|
+
- 模块/包如何组织?
|
|
14
|
+
- 业务逻辑位于何处?
|
|
15
|
+
- API 端点在哪里定义?
|
|
16
|
+
- 工具和辅助函数如何组织?
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
(待团队填写)
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Directory Layout
|
|
23
|
+
## 目录布局(Directory Layout)
|
|
24
24
|
|
|
25
25
|
```
|
|
26
26
|
<!-- Replace with your actual structure -->
|
|
@@ -31,24 +31,24 @@ src/
|
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
## Module Organization
|
|
34
|
+
## 模块组织(Module Organization)
|
|
35
35
|
|
|
36
|
-
<!--
|
|
36
|
+
<!-- 新功能/模块应如何组织? -->
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
(待团队填写)
|
|
39
39
|
|
|
40
40
|
---
|
|
41
41
|
|
|
42
|
-
## Naming Conventions
|
|
42
|
+
## 命名约定(Naming Conventions)
|
|
43
43
|
|
|
44
|
-
<!--
|
|
44
|
+
<!-- 文件和目录的命名规则 -->
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
(待团队填写)
|
|
47
47
|
|
|
48
48
|
---
|
|
49
49
|
|
|
50
|
-
## Examples
|
|
50
|
+
## 示例(Examples)
|
|
51
51
|
|
|
52
|
-
<!--
|
|
52
|
+
<!-- 链接到组织良好的模块作为示例 -->
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
(待团队填写)
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Error Handling
|
|
1
|
+
# 错误处理(Error Handling)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 本项目如何处理错误。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
-
|
|
10
|
+
在此记录项目的错误处理约定。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
需要回答的问题:
|
|
13
|
+
- 定义了哪些错误类型?
|
|
14
|
+
- 错误如何传播?
|
|
15
|
+
- 错误如何记录日志?
|
|
16
|
+
- 如何向客户端返回错误?
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
(待团队填写)
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Error Types
|
|
23
|
+
## 错误类型(Error Types)
|
|
24
24
|
|
|
25
|
-
<!--
|
|
25
|
+
<!-- 自定义错误类/类型 -->
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
(待团队填写)
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
## Error Handling Patterns
|
|
31
|
+
## 错误处理模式(Error Handling Patterns)
|
|
32
32
|
|
|
33
|
-
<!--
|
|
33
|
+
<!-- try-catch 模式、错误传播方式 -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
(待团队填写)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## API Error Responses
|
|
39
|
+
## API 错误响应(API Error Responses)
|
|
40
40
|
|
|
41
|
-
<!--
|
|
41
|
+
<!-- 标准错误响应格式 -->
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
(待团队填写)
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## Common Mistakes
|
|
47
|
+
## 常见错误(Common Mistakes)
|
|
48
48
|
|
|
49
|
-
<!--
|
|
49
|
+
<!-- 团队曾经出现过的错误处理问题 -->
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
(待团队填写)
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
# Backend Development Guidelines
|
|
1
|
+
# 后端开发指南(Backend Development Guidelines)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 本项目的后端开发最佳实践。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
本目录包含后端开发指南。请在各文件中填写项目的具体约定。
|
|
10
10
|
|
|
11
11
|
---
|
|
12
12
|
|
|
13
|
-
## Guidelines Index
|
|
13
|
+
## 指南索引(Guidelines Index)
|
|
14
14
|
|
|
15
|
-
| Guide | Description | Status |
|
|
15
|
+
| 指南(Guide) | 说明(Description) | 状态(Status) |
|
|
16
16
|
|-------|-------------|--------|
|
|
17
|
-
| [Directory Structure](./directory-structure.md) |
|
|
18
|
-
| [Database Guidelines](./database-guidelines.md) | ORM
|
|
19
|
-
| [Error Handling](./error-handling.md) |
|
|
20
|
-
| [Quality Guidelines](./quality-guidelines.md) |
|
|
21
|
-
| [Logging Guidelines](./logging-guidelines.md) |
|
|
17
|
+
| [目录结构(Directory Structure)](./directory-structure.md) | 模块组织和文件布局 | 待填写 |
|
|
18
|
+
| [数据库指南(Database Guidelines)](./database-guidelines.md) | ORM 模式、查询和迁移 | 待填写 |
|
|
19
|
+
| [错误处理(Error Handling)](./error-handling.md) | 错误类型和处理策略 | 待填写 |
|
|
20
|
+
| [质量指南(Quality Guidelines)](./quality-guidelines.md) | 代码标准和禁止模式 | 待填写 |
|
|
21
|
+
| [日志指南(Logging Guidelines)](./logging-guidelines.md) | 结构化日志和日志级别 | 待填写 |
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
## How to Fill These Guidelines
|
|
25
|
+
## 如何填写这些指南(How to Fill These Guidelines)
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
对于每个指南文件:
|
|
28
28
|
|
|
29
|
-
1.
|
|
30
|
-
2.
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
29
|
+
1. 记录项目的**实际约定**,而不是理想状态
|
|
30
|
+
2. 包含代码库中的**代码示例**
|
|
31
|
+
3. 列出**禁止模式**及其原因
|
|
32
|
+
4. 补充团队曾经出现过的**常见错误**
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
目标是帮助 AI 助手和新团队成员理解项目的实际工作方式。
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
**语言(Language)**:所有文档默认使用**简体中文**。
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Logging Guidelines
|
|
1
|
+
# 日志指南(Logging Guidelines)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 本项目如何记录日志。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
-
|
|
10
|
+
在此记录项目的日志约定。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
需要回答的问题:
|
|
13
|
+
- 使用什么日志库?
|
|
14
|
+
- 有哪些日志级别,分别何时使用?
|
|
15
|
+
- 应记录哪些内容?
|
|
16
|
+
- 哪些内容不应记录(个人身份信息、密钥)?
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
(待团队填写)
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Log Levels
|
|
23
|
+
## 日志级别(Log Levels)
|
|
24
24
|
|
|
25
|
-
<!--
|
|
25
|
+
<!-- 各级别的使用场景:debug、info、warn、error -->
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
(待团队填写)
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
## Structured Logging
|
|
31
|
+
## 结构化日志(Structured Logging)
|
|
32
32
|
|
|
33
|
-
<!--
|
|
33
|
+
<!-- 日志格式和必填字段 -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
(待团队填写)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## What to Log
|
|
39
|
+
## 应记录的内容(What to Log)
|
|
40
40
|
|
|
41
|
-
<!--
|
|
41
|
+
<!-- 应记录的重要事件 -->
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
(待团队填写)
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## What NOT to Log
|
|
47
|
+
## 不应记录的内容(What NOT to Log)
|
|
48
48
|
|
|
49
|
-
<!--
|
|
49
|
+
<!-- 敏感数据、个人身份信息和密钥 -->
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
(待团队填写)
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
# Quality Guidelines
|
|
1
|
+
# 质量指南(Quality Guidelines)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 后端开发的代码质量标准。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
-
|
|
10
|
+
在此记录项目的质量标准。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
需要回答的问题:
|
|
13
|
+
- 禁止哪些模式?
|
|
14
|
+
- 执行哪些 lint 规则?
|
|
15
|
+
- 有哪些测试要求?
|
|
16
|
+
- 适用哪些代码审查标准?
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
(待团队填写)
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Forbidden Patterns
|
|
23
|
+
## 禁止模式(Forbidden Patterns)
|
|
24
24
|
|
|
25
|
-
<!--
|
|
25
|
+
<!-- 永远不应使用的模式及其原因 -->
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
(待团队填写)
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
## Required Patterns
|
|
31
|
+
## 必须遵守的模式(Required Patterns)
|
|
32
32
|
|
|
33
|
-
<!--
|
|
33
|
+
<!-- 必须始终使用的模式 -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
(待团队填写)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## Testing Requirements
|
|
39
|
+
## 测试要求(Testing Requirements)
|
|
40
40
|
|
|
41
|
-
<!--
|
|
41
|
+
<!-- 期望达到的测试层级 -->
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
(待团队填写)
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## Code Review Checklist
|
|
47
|
+
## 代码审查清单(Code Review Checklist)
|
|
48
48
|
|
|
49
|
-
<!--
|
|
49
|
+
<!-- 审查者应检查的内容 -->
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
(待团队填写)
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
# Component Guidelines
|
|
1
|
+
# 组件指南(Component Guidelines)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 本项目如何构建组件。
|
|
4
4
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
## Overview
|
|
7
|
+
## 概览(Overview)
|
|
8
8
|
|
|
9
9
|
<!--
|
|
10
|
-
|
|
10
|
+
在此记录项目的组件约定。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
12
|
+
需要回答的问题:
|
|
13
|
+
- 使用哪些组件模式?
|
|
14
|
+
- 如何定义 props?
|
|
15
|
+
- 如何处理组合?
|
|
16
|
+
- 适用哪些无障碍标准?
|
|
17
17
|
-->
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
(待团队填写)
|
|
20
20
|
|
|
21
21
|
---
|
|
22
22
|
|
|
23
|
-
## Component Structure
|
|
23
|
+
## 组件结构(Component Structure)
|
|
24
24
|
|
|
25
|
-
<!--
|
|
25
|
+
<!-- 组件文件的标准结构 -->
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
(待团队填写)
|
|
28
28
|
|
|
29
29
|
---
|
|
30
30
|
|
|
31
|
-
## Props Conventions
|
|
31
|
+
## Props 约定(Props Conventions)
|
|
32
32
|
|
|
33
|
-
<!--
|
|
33
|
+
<!-- props 应如何定义和声明类型 -->
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
(待团队填写)
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
## Styling Patterns
|
|
39
|
+
## 样式模式(Styling Patterns)
|
|
40
40
|
|
|
41
|
-
<!--
|
|
41
|
+
<!-- 如何应用样式(CSS modules、styled-components、Tailwind 等) -->
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
(待团队填写)
|
|
44
44
|
|
|
45
45
|
---
|
|
46
46
|
|
|
47
|
-
## Accessibility
|
|
47
|
+
## 无障碍(Accessibility)
|
|
48
48
|
|
|
49
|
-
<!-- A11y
|
|
49
|
+
<!-- A11y 要求和模式 -->
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
(待团队填写)
|
|
52
52
|
|
|
53
53
|
---
|
|
54
54
|
|
|
55
|
-
## Common Mistakes
|
|
55
|
+
## 常见错误(Common Mistakes)
|
|
56
56
|
|
|
57
|
-
<!--
|
|
57
|
+
<!-- 团队曾经出现过的组件相关错误 -->
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
(待团队填写)
|