trellis-governance-closeout 收口旧任务并统一 Trellis-only 治理
这个提交包含在:
@@ -0,0 +1,2 @@
|
||||
{"file":".trellis/spec/hyb-oa/index.md","reason":"Verify project-specific specs are discoverable."}
|
||||
{"file":".trellis/spec/hyb-oa/project-governance.md","reason":"Verify bootstrap remains compatible with current governance."}
|
||||
@@ -0,0 +1,5 @@
|
||||
# Bootstrap Design
|
||||
|
||||
This is the generated Trellis bootstrap task. hyb-oa keeps it as historical
|
||||
setup evidence, while project-specific rules live in `.trellis/spec/hyb-oa/`.
|
||||
TRELLIS2 supersedes the old Issue CSV binding requirement for new tasks.
|
||||
@@ -0,0 +1,2 @@
|
||||
{"file":".trellis/spec/hyb-oa/index.md","reason":"Project-specific hyb-oa spec entry after bootstrap."}
|
||||
{"file":".trellis/spec/hyb-oa/project-governance.md","reason":"Project governance supersedes generated bootstrap placeholders."}
|
||||
@@ -0,0 +1,180 @@
|
||||
# Bootstrap Task: Fill Project Development Guidelines
|
||||
|
||||
**hyb-oa binding**: this generated bootstrap task is governed by
|
||||
`issues/2026-05-26_09-02-34-trellis-primary-development-workflow-v1.csv`
|
||||
(`TRELLIS1-3`, `TRELLIS1-4`). The project-specific rules are maintained under
|
||||
`.trellis/spec/hyb-oa/`; the generated backend/frontend scaffolds remain
|
||||
secondary.
|
||||
|
||||
## Goal
|
||||
|
||||
Capture project-specific Trellis specs so future agents follow hyb-oa
|
||||
conventions instead of generic generated placeholders.
|
||||
|
||||
## Scope
|
||||
|
||||
- Bootstrap project-specific Trellis specs and confirm hyb-oa conventions.
|
||||
- Treat this task as historical setup evidence after TRELLIS2.
|
||||
|
||||
## Out Of Scope
|
||||
|
||||
- No OA business-code changes.
|
||||
- No deployment, database write, Enterprise WeChat write or public data write.
|
||||
|
||||
## Acceptance
|
||||
|
||||
- hyb-oa project specs exist under `.trellis/spec/hyb-oa/`.
|
||||
- Future work can use task PRDs and JSONL spec context instead of generic
|
||||
agent memory.
|
||||
|
||||
## Test Plan
|
||||
|
||||
- `python3 ./.trellis/scripts/task.py validate 00-bootstrap-guidelines`
|
||||
- `node scripts/qa/check-trellis-governance.mjs`
|
||||
|
||||
**You (the AI) are running this task. The developer does not read this file.**
|
||||
|
||||
The developer just ran `trellis init` on this project for the first time.
|
||||
`.trellis/` now exists with empty spec scaffolding, and this bootstrap task
|
||||
exists under `.trellis/tasks/`. When they want to work on it, they should start
|
||||
this task from a session that provides Trellis session identity.
|
||||
|
||||
**Your job**: help them populate `.trellis/spec/` with the team's real
|
||||
coding conventions. Every future AI session — this project's
|
||||
`trellis-implement` and `trellis-check` sub-agents — auto-loads spec files
|
||||
listed in per-task jsonl manifests. Empty spec = sub-agents write generic
|
||||
code. Real spec = sub-agents match the team's actual patterns.
|
||||
|
||||
Don't dump instructions. Open with a short greeting, figure out if the repo
|
||||
has any existing convention docs (CLAUDE.md, .cursorrules, etc.), and drive
|
||||
the rest conversationally.
|
||||
|
||||
---
|
||||
|
||||
## Status (update the checkboxes as you complete each item)
|
||||
|
||||
- [x] Superseded by `.trellis/spec/hyb-oa/` project-specific specs.
|
||||
- [x] Bootstrap task retained only as historical setup evidence.
|
||||
|
||||
The generated backend/frontend placeholder checklist below is no longer the
|
||||
active project guideline contract. hyb-oa uses `.trellis/spec/hyb-oa/` plus
|
||||
domain docs as the current spec entry point.
|
||||
|
||||
### Historical generated checklist
|
||||
|
||||
- [ ] Fill backend guidelines
|
||||
- [ ] Fill frontend guidelines
|
||||
- [ ] Add code examples
|
||||
|
||||
---
|
||||
|
||||
## Spec files to populate
|
||||
|
||||
|
||||
### Backend guidelines
|
||||
|
||||
| File | What to document |
|
||||
|------|------------------|
|
||||
| `.trellis/spec/backend/directory-structure.md` | Where different file types go (routes, services, utils) |
|
||||
| `.trellis/spec/backend/database-guidelines.md` | ORM, migrations, query patterns, naming conventions |
|
||||
| `.trellis/spec/backend/error-handling.md` | How errors are caught, logged, and returned |
|
||||
| `.trellis/spec/backend/logging-guidelines.md` | Log levels, format, what to log |
|
||||
| `.trellis/spec/backend/quality-guidelines.md` | Code review standards, testing requirements |
|
||||
|
||||
|
||||
### Frontend guidelines
|
||||
|
||||
| File | What to document |
|
||||
|------|------------------|
|
||||
| `.trellis/spec/frontend/directory-structure.md` | Component/page/hook organization |
|
||||
| `.trellis/spec/frontend/component-guidelines.md` | Component patterns, props conventions |
|
||||
| `.trellis/spec/frontend/hook-guidelines.md` | Custom hook naming, patterns |
|
||||
| `.trellis/spec/frontend/state-management.md` | State library, patterns, what goes where |
|
||||
| `.trellis/spec/frontend/type-safety.md` | TypeScript conventions, type organization |
|
||||
| `.trellis/spec/frontend/quality-guidelines.md` | Linting, testing, accessibility |
|
||||
|
||||
|
||||
### Thinking guides (already populated)
|
||||
|
||||
`.trellis/spec/guides/` contains general thinking guides pre-filled with
|
||||
best practices. Customize only if something clearly doesn't fit this project.
|
||||
|
||||
---
|
||||
|
||||
## How to fill the spec
|
||||
|
||||
### Step 1: Import from existing convention files first (preferred)
|
||||
|
||||
Search the repo for existing convention docs. If any exist, read them and
|
||||
extract the relevant rules into the matching `.trellis/spec/` files —
|
||||
usually much faster than documenting from scratch.
|
||||
|
||||
| File / Directory | Tool |
|
||||
|------|------|
|
||||
| `CLAUDE.md` / `CLAUDE.local.md` | Claude Code |
|
||||
| `AGENTS.md` | Codex / Claude Code / agent-compatible tools |
|
||||
| `.cursorrules` | Cursor |
|
||||
| `.cursor/rules/*.mdc` | Cursor (rules directory) |
|
||||
| `.windsurfrules` | Windsurf |
|
||||
| `.clinerules` | Cline |
|
||||
| `.roomodes` | Roo Code |
|
||||
| `.github/copilot-instructions.md` | GitHub Copilot |
|
||||
| `.vscode/settings.json` → `github.copilot.chat.codeGeneration.instructions` | VS Code Copilot |
|
||||
| `CONVENTIONS.md` / `.aider.conf.yml` | aider |
|
||||
| `CONTRIBUTING.md` | General project conventions |
|
||||
| `.editorconfig` | Editor formatting rules |
|
||||
|
||||
### Step 2: Analyze the codebase for anything not covered by existing docs
|
||||
|
||||
Scan real code to discover patterns. Before writing each spec file:
|
||||
- Find 2-3 real examples of each pattern in the codebase.
|
||||
- Reference real file paths (not hypothetical ones).
|
||||
- Document anti-patterns the team clearly avoids.
|
||||
|
||||
### Step 3: Document reality, not ideals
|
||||
|
||||
**Critical**: write what the code *actually does*, not what it should do.
|
||||
Sub-agents match the spec, so aspirational patterns that don't exist in the
|
||||
codebase will cause sub-agents to write code that looks out of place.
|
||||
|
||||
If the team has known tech debt, document the current state — improvement
|
||||
is a separate conversation, not a bootstrap concern.
|
||||
|
||||
---
|
||||
|
||||
## Quick explainer of the runtime (share when they ask "why do we need spec at all")
|
||||
|
||||
- Every AI coding task spawns two sub-agents: `trellis-implement` (writes
|
||||
code) and `trellis-check` (verifies quality).
|
||||
- Each task has `implement.jsonl` / `check.jsonl` manifests listing which
|
||||
spec files to load.
|
||||
- The platform hook auto-injects those spec files + the task's `prd.md`
|
||||
into every sub-agent prompt, so the sub-agent codes/reviews per team
|
||||
conventions without anyone pasting them manually.
|
||||
- Source of truth: `.trellis/spec/`. That's why filling it well now pays
|
||||
off forever.
|
||||
|
||||
---
|
||||
|
||||
## Completion
|
||||
|
||||
When the developer confirms the checklist items above are done with real
|
||||
examples (not placeholders), guide them to run:
|
||||
|
||||
```bash
|
||||
python3 ./.trellis/scripts/task.py finish
|
||||
python3 ./.trellis/scripts/task.py archive 00-bootstrap-guidelines
|
||||
```
|
||||
|
||||
After archive, every new developer who joins this project will get a
|
||||
`00-join-<slug>` onboarding task instead of this bootstrap task.
|
||||
|
||||
---
|
||||
|
||||
## Suggested opening line
|
||||
|
||||
"Welcome to Trellis! Your init just set me up to help you fill the project
|
||||
spec — a one-time setup so every future AI session follows the team's
|
||||
conventions instead of writing generic code. Before we start, do you have
|
||||
any existing convention docs (CLAUDE.md, .cursorrules, CONTRIBUTING.md,
|
||||
etc.) I can pull from, or should I scan the codebase from scratch?"
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"id": "00-bootstrap-guidelines",
|
||||
"name": "00-bootstrap-guidelines",
|
||||
"title": "Bootstrap Guidelines",
|
||||
"description": "Fill in project development guidelines for AI agents",
|
||||
"status": "completed",
|
||||
"dev_type": "docs",
|
||||
"scope": null,
|
||||
"package": null,
|
||||
"priority": "P1",
|
||||
"creator": "shunli",
|
||||
"assignee": "shunli",
|
||||
"createdAt": "2026-05-26",
|
||||
"completedAt": "2026-05-26",
|
||||
"branch": null,
|
||||
"base_branch": null,
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [
|
||||
".trellis/spec/backend/",
|
||||
".trellis/spec/frontend/"
|
||||
],
|
||||
"notes": "First-time setup task created by trellis init; governed by TRELLIS1 and superseded by hyb-oa specs.",
|
||||
"meta": {
|
||||
"issueCsv": "issues/2026-05-26_09-02-34-trellis-primary-development-workflow-v1.csv",
|
||||
"issueIds": [
|
||||
"TRELLIS1-3",
|
||||
"TRELLIS1-4"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
{"file":".trellis/spec/hyb-oa/project-governance.md","reason":"Check task-to-Issue governance and completion rules."}
|
||||
{"file":".trellis/spec/hyb-oa/security-privacy.md","reason":"Check Trellis task files for sensitive-data violations."}
|
||||
@@ -0,0 +1,6 @@
|
||||
# TRELLIS1 Pilot Design
|
||||
|
||||
TRELLIS1 proved Trellis could be introduced without changing OA business code.
|
||||
Its original design intentionally bound a Trellis task to Issue CSV evidence.
|
||||
TRELLIS2 supersedes that dual-track rule and keeps this task as historical
|
||||
migration evidence.
|
||||
@@ -0,0 +1,3 @@
|
||||
{"file":".trellis/spec/hyb-oa/project-governance.md","reason":"Defines Trellis-first flow and legacy Issue CSV boundaries."}
|
||||
{"file":".trellis/spec/hyb-oa/docs-and-evidence.md","reason":"Defines docs/evidence reuse and registration requirements."}
|
||||
{"file":".trellis/spec/hyb-oa/security-privacy.md","reason":"Defines redaction and sensitive-data exclusions for Trellis task files."}
|
||||
@@ -0,0 +1,40 @@
|
||||
# TRELLIS1 Low-risk Pilot
|
||||
|
||||
## Goal
|
||||
|
||||
Prove that future hyb-oa development can start from a Trellis task while still
|
||||
binding to Issue CSV and project documentation.
|
||||
|
||||
## Issue Binding
|
||||
|
||||
- Issue CSV: `issues/2026-05-26_09-02-34-trellis-primary-development-workflow-v1.csv`
|
||||
- Issue ID: `TRELLIS1-7`
|
||||
|
||||
## Scope
|
||||
|
||||
- Create Trellis task metadata, PRD and context manifests.
|
||||
- Reference project governance specs.
|
||||
- Run `scripts/qa/check-trellis-governance.mjs`.
|
||||
|
||||
## Out Of Scope
|
||||
|
||||
- No backend or frontend business-code changes.
|
||||
- No deployment.
|
||||
- No public OA data writes.
|
||||
|
||||
## Acceptance
|
||||
|
||||
- The task contains issue binding and redacted scope.
|
||||
- `implement.jsonl` and `check.jsonl` include real spec context entries.
|
||||
- Trellis governance check passes.
|
||||
|
||||
## Test Plan
|
||||
|
||||
- `python3 ./.trellis/scripts/task.py validate 05-26-trellis1-pilot`
|
||||
- `node scripts/qa/check-trellis-governance.mjs`
|
||||
|
||||
## Closeout
|
||||
|
||||
TRELLIS1 is complete as historical migration evidence. TRELLIS2 replaced the
|
||||
dual Trellis task plus Issue CSV binding with official Trellis task-first
|
||||
governance for new work.
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"id": "trellis1-pilot",
|
||||
"name": "trellis1-pilot",
|
||||
"title": "TRELLIS1 low-risk pilot",
|
||||
"description": "Low-risk task used to prove the Trellis task -> Issue CSV -> governance check path without changing business code.",
|
||||
"status": "completed",
|
||||
"dev_type": "docs",
|
||||
"scope": "trellis-governance",
|
||||
"package": "docs",
|
||||
"priority": "P2",
|
||||
"creator": "shunli",
|
||||
"assignee": "shunli",
|
||||
"createdAt": "2026-05-26",
|
||||
"completedAt": "2026-05-26",
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [
|
||||
".trellis/workflow.md",
|
||||
".trellis/spec/hyb-oa/",
|
||||
"issues/2026-05-26_09-02-34-trellis-primary-development-workflow-v1.csv"
|
||||
],
|
||||
"notes": "No business code, no deployment, no public OA writes.",
|
||||
"meta": {
|
||||
"issueCsv": "issues/2026-05-26_09-02-34-trellis-primary-development-workflow-v1.csv",
|
||||
"issueIds": [
|
||||
"TRELLIS1-7"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{"file":".trellis/spec/hyb-oa/project-governance.md","reason":"Check that task-first governance supersedes mandatory Issue CSV binding."}
|
||||
{"file":".trellis/spec/hyb-oa/docs-and-evidence.md","reason":"Check documentation registration and evidence boundaries."}
|
||||
{"file":".trellis/spec/hyb-oa/security-privacy.md","reason":"Check sensitive-data exclusions in Trellis governance files."}
|
||||
@@ -0,0 +1,21 @@
|
||||
# TRELLIS2 Design
|
||||
|
||||
## Decision
|
||||
|
||||
Use the official Trellis task directory as the single execution contract for
|
||||
new work. Issue CSV remains available as historical evidence or an optional
|
||||
export format when a tabular external audit packet is needed.
|
||||
|
||||
## Contract Shape
|
||||
|
||||
- `task.json`: metadata, status, scope, related files and optional commit/PR.
|
||||
- `prd.md`: goal, scope, out-of-scope, acceptance and test plan.
|
||||
- `design.md` or `implement.md`: required for complex process, API, migration,
|
||||
permission, deployment or workflow-governance changes.
|
||||
- `implement.jsonl` / `check.jsonl`: stable spec or research context only.
|
||||
|
||||
## Compatibility
|
||||
|
||||
Existing Issue CSV files stay in place. Existing Trellis tasks can mention
|
||||
their old Issue CSV bindings as historical metadata, but new task validation
|
||||
must not require those bindings.
|
||||
@@ -0,0 +1,3 @@
|
||||
{"file":".trellis/spec/hyb-oa/project-governance.md","reason":"Defines the hyb-oa development governance contract to update."}
|
||||
{"file":".trellis/spec/hyb-oa/docs-and-evidence.md","reason":"Defines docs fact-source and evidence registration rules."}
|
||||
{"file":".trellis/spec/hyb-oa/security-privacy.md","reason":"Defines redaction boundaries for Trellis tasks, docs and reports."}
|
||||
@@ -0,0 +1,53 @@
|
||||
# TRELLIS2 Official Task Contract
|
||||
|
||||
## Goal
|
||||
|
||||
Adopt official Trellis task-first usage for hyb-oa development governance.
|
||||
Future non-trivial work starts from `.trellis/tasks/*`; the task directory
|
||||
holds the PRD, implementation context, verification context and finish record.
|
||||
|
||||
## Scope
|
||||
|
||||
- Make Trellis task the execution contract for new work.
|
||||
- Keep `docs/` as the business fact source.
|
||||
- Keep historical `issues/*.csv` files for audit and legacy lookup only.
|
||||
- Update AGENTS, Trellis workflow, project governance spec, governance check
|
||||
and project documentation.
|
||||
|
||||
## Out Of Scope
|
||||
|
||||
- No backend or frontend business-code changes.
|
||||
- No deployment or public OA verification.
|
||||
- No database, Enterprise WeChat, payment, production config or real-data write.
|
||||
- No deletion, migration or bulk rewrite of historical `issues/*.csv` files.
|
||||
|
||||
## Acceptance
|
||||
|
||||
- New governance text says non-trivial work requires a Trellis task, not an
|
||||
Issue CSV.
|
||||
- `scripts/qa/check-trellis-governance.mjs` validates task contract quality
|
||||
without requiring Issue CSV bindings.
|
||||
- Current active Trellis tasks have PRD/test/scope information sufficient for
|
||||
the new check.
|
||||
- Documentation, AGENTS and Trellis specs agree on Trellis task-first operation.
|
||||
|
||||
## Test Plan
|
||||
|
||||
- `python3 ./.trellis/scripts/task.py validate 05-26-trellis2-official-task-contract`
|
||||
- `python3 ./.trellis/scripts/task.py list`
|
||||
- `node --check scripts/qa/check-trellis-governance.mjs`
|
||||
- `node scripts/qa/check-trellis-governance.mjs`
|
||||
- `node scripts/qa/audit-docs.mjs --check-registry`
|
||||
- `git diff --check`
|
||||
- `bash scripts/check-minimal.sh`
|
||||
|
||||
## Privacy
|
||||
|
||||
Do not store passwords, token, Secret, real invoice originals, contract bodies,
|
||||
bank materials, full accounts, complete local paths or raw payloads in Trellis
|
||||
tasks, docs, reports or chat.
|
||||
|
||||
## Closeout
|
||||
|
||||
TRELLIS2 is complete as the official task-first governance contract. Subsequent
|
||||
cleanup and stale-task archival is handled by `trellis-governance-closeout`.
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"id": "trellis2-official-task-contract",
|
||||
"name": "trellis2-official-task-contract",
|
||||
"title": "TRELLIS2 official task contract",
|
||||
"description": "Migrate hyb-oa development governance from Issue CSV binding to official Trellis task contracts.",
|
||||
"status": "completed",
|
||||
"dev_type": "docs",
|
||||
"scope": "trellis-governance",
|
||||
"package": "docs",
|
||||
"priority": "P2",
|
||||
"creator": "shunli",
|
||||
"assignee": "shunli",
|
||||
"createdAt": "2026-05-26",
|
||||
"completedAt": "2026-05-26",
|
||||
"branch": null,
|
||||
"base_branch": "main",
|
||||
"worktree_path": null,
|
||||
"commit": null,
|
||||
"pr_url": null,
|
||||
"subtasks": [],
|
||||
"children": [],
|
||||
"parent": null,
|
||||
"relatedFiles": [
|
||||
"AGENTS.md",
|
||||
".trellis/workflow.md",
|
||||
".trellis/spec/hyb-oa/project-governance.md",
|
||||
".trellis/spec/hyb-oa/index.md",
|
||||
"scripts/qa/check-trellis-governance.mjs",
|
||||
"docs/Agent开发交付实践.md",
|
||||
"docs/文档索引.md",
|
||||
"docs/文档事实源状态矩阵.md"
|
||||
],
|
||||
"notes": "No business code, no deployment, no public OA data writes. TRELLIS2 intentionally creates no Issue CSV.",
|
||||
"meta": {
|
||||
"contractMode": "trellis_task",
|
||||
"supersedesPolicy": "TRELLIS1 dual-track Issue CSV binding"
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户