trellis2-official-task-contract 采用官方 Trellis 执行合同
这个提交包含在:
@@ -2,14 +2,14 @@
|
||||
|
||||
## Source Docs
|
||||
|
||||
Read `docs/需求-统一审批中心规约.md` and the latest workflow-related Issue CSV
|
||||
before modifying approval behavior.
|
||||
Read `docs/需求-统一审批中心规约.md` and the current workflow-related Trellis
|
||||
task before modifying approval behavior.
|
||||
|
||||
## Rules
|
||||
|
||||
- No self-approval.
|
||||
- Do not use `admin` as a business approver unless the Issue explicitly defines
|
||||
an administrative fallback.
|
||||
- Do not use `admin` as a business approver unless the current Trellis task
|
||||
explicitly defines an administrative fallback.
|
||||
- Approval precheck, submission, workflow snapshot and task advancement must use
|
||||
consistent rule semantics.
|
||||
- Existing workflow snapshots are historical facts; approval advancement should
|
||||
|
||||
@@ -9,8 +9,8 @@ QA script patterns over new abstractions.
|
||||
|
||||
- Validate Prisma changes with `cd server && npm run prisma:validate`.
|
||||
- For route/service edits, run `node --check` on the touched files and the
|
||||
focused regression listed in the Issue CSV.
|
||||
- Prisma migrations require rollback notes in Issue `Notes`.
|
||||
focused regression listed in the current Trellis task.
|
||||
- Prisma migrations require rollback notes in the Trellis task design or PRD.
|
||||
- Do not resolve migration drift, reset databases, or rewrite migration history
|
||||
without explicit approval.
|
||||
- Workflow, approval and permission behavior must be verified at process level,
|
||||
|
||||
@@ -7,11 +7,11 @@ Start from `docs/文档索引.md` and `docs/文档事实源状态矩阵.md`.
|
||||
## Rules
|
||||
|
||||
- Prefer updating existing fact sources, module specs, manuals, evidence docs
|
||||
or continuous Issue CSVs.
|
||||
or the current Trellis task.
|
||||
- New documents need a reason and must be registered in both the index and
|
||||
status matrix.
|
||||
- Old Issue CSV files are historical audit evidence and should not be rewritten
|
||||
unless the current Issue explicitly says so.
|
||||
unless the current Trellis task explicitly calls for a legacy/export update.
|
||||
- For generated evidence, store report paths and conclusions, not raw secrets,
|
||||
raw payloads, full account identifiers, invoice originals or confidential
|
||||
business content.
|
||||
|
||||
@@ -1,25 +1,25 @@
|
||||
# hyb-oa Project Specs
|
||||
|
||||
These specs are the Trellis entry point for hyb-oa. They summarize stable
|
||||
development rules and point back to the authoritative Issue CSV and `docs/`
|
||||
development rules and point back to the current Trellis task and `docs/`
|
||||
fact sources.
|
||||
|
||||
## Read Order
|
||||
|
||||
1. `project-governance.md`
|
||||
2. The domain file matching the task.
|
||||
3. `docs/文档索引.md` and the latest relevant Issue CSV.
|
||||
3. The current `.trellis/tasks/<task>/prd.md` and `docs/文档索引.md`.
|
||||
|
||||
## Domain Specs
|
||||
|
||||
| Spec | Purpose |
|
||||
| --- | --- |
|
||||
| `project-governance.md` | Trellis-first flow, Issue CSV contract, approvals, commit rules |
|
||||
| `project-governance.md` | Official Trellis task contract, approvals, commit rules |
|
||||
| `backend-fastify-prisma.md` | Server implementation and migration boundaries |
|
||||
| `frontend-react-vite-design.md` | React/Vite UI and design-source rules |
|
||||
| `approval-workflow.md` | OA approval/workflow/self-approval boundaries |
|
||||
| `reimbursement-invoice-ocr.md` | Reimbursement, invoice, OCR and attachment rules |
|
||||
| `wecom-boundary.md` | Enterprise WeChat ownership and API/write gates |
|
||||
| `deployment-trialrun.md` | Public deployment, smoke, live-readiness and rollback gates |
|
||||
| `docs-and-evidence.md` | Documentation reuse, evidence, Issue CSV and status matrix |
|
||||
| `docs-and-evidence.md` | Documentation reuse, evidence, Trellis task and status matrix |
|
||||
| `security-privacy.md` | Privacy, secret handling and sensitive-data exclusions |
|
||||
|
||||
@@ -2,17 +2,22 @@
|
||||
|
||||
## Main Rule
|
||||
|
||||
Trellis is the development workflow coordinator. Issue CSV remains the execution
|
||||
contract and `docs/` remains the business fact source.
|
||||
Trellis task directories are the execution contract for new hyb-oa work.
|
||||
`docs/` remains the business fact source. Historical `issues/*.csv` files remain
|
||||
audit evidence and optional export material, but they are not mandatory for new
|
||||
tasks after TRELLIS2.
|
||||
|
||||
## Required Flow
|
||||
|
||||
- Start non-trivial work from a Trellis task with a PRD.
|
||||
- Bind the task to an Issue CSV path and Issue ID before implementation.
|
||||
- Put goal, scope, out-of-scope, acceptance and test plan in `prd.md`.
|
||||
- Add `design.md` or `implement.md` for complex process, API, migration,
|
||||
permission, deployment or workflow-governance changes.
|
||||
- Curate `implement.jsonl` and `check.jsonl` with stable spec or research
|
||||
context only.
|
||||
- Give a concrete implementation plan before coding and wait for approval.
|
||||
- Keep edits scoped to the current Issue.
|
||||
- Update Issue statuses only after the stated Test_Method passes.
|
||||
- Commit in Chinese and include the Issue ID.
|
||||
- Keep edits scoped to the current Trellis task.
|
||||
- Commit in Chinese and include the Trellis task name or task ID.
|
||||
|
||||
## Stop Conditions
|
||||
|
||||
@@ -24,8 +29,13 @@ contract and `docs/` remains the business fact source.
|
||||
|
||||
## Current Local Commands
|
||||
|
||||
- `python3 <plan-skill>/scripts/validate_issues_csv.py <csv>`
|
||||
- `node scripts/qa/check-process-contract.mjs --baseline --json`
|
||||
- `python3 ./.trellis/scripts/task.py validate <task>`
|
||||
- `node scripts/qa/check-trellis-governance.mjs`
|
||||
- `git diff --check`
|
||||
- `bash scripts/check-minimal.sh`
|
||||
|
||||
## Legacy Issue CSV
|
||||
|
||||
- Do not delete, bulk rewrite or move historical `issues/*.csv` files.
|
||||
- New work may mention an old Issue CSV for traceability, but must not require
|
||||
a new CSV unless the user explicitly requests legacy/export evidence.
|
||||
|
||||
@@ -12,7 +12,7 @@ operating audit.
|
||||
- Enterprise WeChat API checks that need trusted IP must run from the deployment
|
||||
server, not local.
|
||||
- Do not write Enterprise WeChat, create templates, create approvals, expand
|
||||
real users, or enable live trials without explicit approval and an Issue CSV.
|
||||
real users, or enable live trials without explicit approval and a Trellis task.
|
||||
- Approval-rule configuration cannot be fully read through official APIs; keep
|
||||
manual backend/real-device gates where specified.
|
||||
- Messages to Enterprise WeChat must be dehydrated and link back to OA; do not
|
||||
|
||||
在新工单中引用
屏蔽一个用户