refactor(gitea-plan): enforce bidirectional artifact consistency, project boards, and independent reproducibility audit
- add bidirectional artifact reconciliation detecting semantic conflicts - integrate project board policy with deterministic header - implement independent zero-context reproducibility audit protocol - modernize milestone and entity creation using gt CLI - deprecate tea-cli.md in favor of gt-usage Closes #10
This commit is contained in:
1 parent
3f5484e8b1
commit
7077c752a1
3 files changed
+96
-134
No files matched your search
+27
-27
@@ -2,7 +2,7 @@
|
|||||||
name: gitea-plan
|
name: gitea-plan
|
||||||
description: >-
|
description: >-
|
||||||
Translate technical goals, user requests, and architecture plans into Gitea planning
|
Translate technical goals, user requests, and architecture plans into Gitea planning
|
||||||
primitives (issues, milestones, labels, dependencies) with tiered complexity scaling.
|
primitives (issues, milestones, project boards) with tiered complexity scaling.
|
||||||
Use when decomposing work, creating or updating Gitea issues, or establishing planning
|
Use when decomposing work, creating or updating Gitea issues, or establishing planning
|
||||||
milestones. Not for managing pull requests: use gitea-pr.
|
milestones. Not for managing pull requests: use gitea-pr.
|
||||||
---
|
---
|
||||||
@@ -11,44 +11,44 @@ description: >-
|
|||||||
|
|
||||||
## Use when
|
## Use when
|
||||||
- Decomposing a project, feature request, or technical plan into trackable Gitea units.
|
- Decomposing a project, feature request, or technical plan into trackable Gitea units.
|
||||||
- Creating or editing milestones and issues with falsifiable acceptance criteria.
|
- Creating or editing milestones, project boards, and issues with falsifiable criteria.
|
||||||
- Setting rolling planning horizons for multi-phase epics.
|
- Setting rolling planning horizons for multi-phase epics.
|
||||||
- Not for orchestrating slice implementation across subagents: use `implement-slice`.
|
- Not for orchestrating slice implementation across subagents: use `implement-slice`.
|
||||||
- Not for branch or worktree management: use `git-manager`.
|
- Not for branch or worktree management: use `git-manager`.
|
||||||
- Not for pull request lifecycle or review tracking: use `gitea-pr`.
|
- Not for pull request lifecycle or review tracking: use `gitea-pr`.
|
||||||
|
|
||||||
## Steps
|
## Steps
|
||||||
1. **Assess scope and select tier.** Inspect repository context, documentation plans, or user
|
1. **Reconcile artifacts bidirectionally.** Check specs, roadmaps, assets, and Gitea
|
||||||
request to assign a planning tier (`Small`, `Medium`, or `Large`) per
|
state for contradictions. Flag zombie in-progress, premature done, or horizon
|
||||||
[references/decomposition-tiers.md](references/decomposition-tiers.md). Enforce minimum
|
divergence conflicts before planning new work. See
|
||||||
ceremony: small tasks never get milestones or board overhead.
|
[references/decomposition-tiers.md](references/decomposition-tiers.md).
|
||||||
2. **Decompose into deliverable outcome slices.** Map work items into verifiable issues.
|
2. **Assess scope and select tier.** Assign `Small`, `Medium`, or `Large`.
|
||||||
Ensure each issue represents an independently deliverable outcome with a defined testing
|
Emit explicit `### Project Board Policy: <Omitted|Recommended|Required> (Rationale)`.
|
||||||
seam, rather than a micro-commit. For large projects, decompose only the active milestone
|
3. **Decompose into deliverable outcome slices.** Map work into verifiable issues
|
||||||
and leave future horizons coarse.
|
with test seams and falsifiable acceptance criteria (Context, Solution, Criteria).
|
||||||
3. **Draft falsifiable acceptance criteria.** For each planned issue, formulate:
|
4. **Run independent reproducibility audit.** Spawn clean-room subagent with raw
|
||||||
- Context and problem: what motivates the change.
|
input manifest (commit SHA, specs, proposed issue markdown). Review 5-section
|
||||||
- Proposed solution and scope: boundary of what is in and out of scope.
|
evaluation to resolve material ambiguities before human gate.
|
||||||
- Acceptance criteria: numbered, observable pass/fail conditions.
|
5. **Present decomposition for approval.** Present proposed milestone, board, and
|
||||||
4. **Present decomposition for approval.** Present the proposed milestone and issues for human
|
issues with audit disposition. Stop for approval before creating Gitea entities.
|
||||||
review following the operational checkpoint rules in `profile/AGENTS.md`. Stop for approval
|
6. **Execute Gitea operations via `gt` CLI.** Use verified commands from `gt-usage`:
|
||||||
before creating any Gitea entities.
|
- Milestones: `gt milestone create "<title>" -d "<desc>" --json id,url`.
|
||||||
5. **Execute Gitea operations via `tea` CLI.** Use verified commands from
|
- Projects: `gt project create "<title>" --template basic_kanban --json id,url`.
|
||||||
[references/tea-cli.md](references/tea-cli.md) (`tea milestones create`, `tea issues create`).
|
- Issues: `gt issue create -t "<title>" -F <file> -m <id> -p <id> --json number,url`.
|
||||||
Pass multi-line descriptions via `--description-file -` to preserve formatting.
|
Extract server IDs directly; never guess sequence numbers or construct `/milestone/1`.
|
||||||
6. **Verify created state.** Inspect `tea issues list` or `tea milestones list` to confirm index
|
7. **Verify created state.** Inspect `gt issue list` and `gt milestone list` to
|
||||||
numbers and report the created entities to the user.
|
confirm server IDs, board cards, and non-hallucinated canonical URLs.
|
||||||
|
|
||||||
## Your call
|
## Your call
|
||||||
- **Planning tier selection**: confirm Small vs. Medium vs. Large ceremony level.
|
- **Planning tier selection**: confirm Small vs. Medium vs. Large ceremony level.
|
||||||
- **Issue decomposition boundaries**: approve or revise the proposed issue slices.
|
- **Issue decomposition boundaries**: approve or revise proposed issue slices.
|
||||||
- **Batch issue creation**: approve structured batch issue creation per `profile/AGENTS.md`.
|
- **Batch entity creation**: approve structured batch creation per `profile/AGENTS.md`.
|
||||||
|
|
||||||
## Done when
|
## Done when
|
||||||
- Target milestone and issues are created in Gitea with verifiable index numbers and falsifiable
|
- Target milestone, board, and issues exist on Gitea with verified server IDs,
|
||||||
acceptance criteria.
|
canonical URLs, and falsifiable acceptance criteria.
|
||||||
|
|
||||||
## Hands off to
|
## Hands off to
|
||||||
- `implement-slice`: to orchestrate end-to-end delivery of an approved issue or slice.
|
- `implement-slice`: to orchestrate end-to-end delivery of an approved issue or slice.
|
||||||
- `git-manager`: to create dedicated branches or worktrees for the decomposed issues.
|
- `git-manager`: to create dedicated branches or worktrees for decomposed issues.
|
||||||
- `gitea-pr`: to link, review, and close issues via pull requests.
|
- `gitea-pr`: to link, review, and close issues via pull requests.
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
# Project Sizing and Task Decomposition Tiers
|
# Project Sizing, Ceremony Tiers, and Artifact Contracts
|
||||||
|
|
||||||
Reference for `gitea-plan`. Guidelines for scaling planning ceremony to risk and scope, preserving momentum while keeping architecture traceable.
|
Reference for `gitea-plan`. Guidelines for scaling planning ceremony to risk and scope, preserving momentum while keeping architecture traceable and reproducible.
|
||||||
|
|
||||||
## Core Axiom: Issues vs. Commits
|
## 1. Core Axiom: Issues vs. Commits
|
||||||
|
|
||||||
- An **Issue** represents an **independently deliverable outcome** (what is built, verified, and closed by a pull request). It defines falsifiable acceptance criteria and expected behavior.
|
- An **Issue** represents an **independently deliverable outcome** (what is built, verified, and closed by a pull request). It defines falsifiable acceptance criteria and expected behavior.
|
||||||
- A **Commit** represents an **atomic, reversible implementation checkpoint** (a step within that issue's branch). Commits must compile and pass tests, but do not need to represent an entire closed issue on their own.
|
- A **Commit** represents an **atomic, reversible implementation checkpoint** (a step within that issue's branch). Commits must compile and pass tests, but do not need to represent an entire closed issue on their own.
|
||||||
@@ -10,25 +10,64 @@ Reference for `gitea-plan`. Guidelines for scaling planning ceremony to risk and
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Planning Ceremony Tiers
|
## 2. Entity Semantics: Issues, Boards, and Milestones
|
||||||
|
|
||||||
| Tier | Typical Work | Planning Primitives Used | Decomposition Rule |
|
Each Gitea planning primitive tracks a distinct dimension of engineering reality:
|
||||||
| :--- | :--- | :--- | :--- |
|
- **Issue State (`Open` vs. `Closed`)**: Deliverable completion on `main`.
|
||||||
| **Small** | Single-step bugfix, documentation tweak, dependency bump, routine chore | 1 Gitea Issue directly linked to 1 PR | Zero milestones. Zero project boards. Keep issue description concise (Context, Solution, Acceptance Criteria). |
|
- **Board State (Columns: *Backlog*, *Ready*, *In Progress*, *Review*, *Done*)**: Spatial workflow stage in the active pipeline.
|
||||||
| **Medium** | New user-facing feature, vertical slice, multi-step refactor, performance spike | 1 Milestone + 2 to 5 Deliverable Issues | Each issue has its own branch and PR. Every issue includes explicit numbered acceptance criteria and verification notes. |
|
- **Milestone**: Strategic delivery horizon (capacity-driven or time-bounded release boundary).
|
||||||
| **Large** | Architectural redesign, multi-service cutover, major platform evolution | Repository Plan Document + Rolling Gitea Milestones | Technical source of truth remains in repository documentation (`ARCHITECTURE.md`, `docs/plans/`, or ADRs). Gitea coordinates rolling execution horizons. |
|
|
||||||
|
### Meaningful Conflict Reconciliation
|
||||||
|
Never mechanically mirror or silently mutate state. Instead, detect and report semantic conflicts:
|
||||||
|
- **Zombie In-Progress**: Issue is closed on Gitea, but its card still sits in *Backlog*, *Ready*, or *In Progress* on the board.
|
||||||
|
- **Premature Done**: Card is moved to *Done*, but the issue remains open or lacks a merged PR / commit on `main`.
|
||||||
|
- **Review Orphan**: Card sits in *Review*, but no active PR or static review packet exists.
|
||||||
|
- **Horizon Divergence**: Open issue is assigned to a milestone that is closed or diverges from the active milestone in `ROADMAP.md`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Rolling Horizons for Large Projects
|
## 3. Planning Ceremony Tiers & Project Board Policy
|
||||||
|
|
||||||
|
| Tier | Typical Work | Gitea Primitives | Project Board Policy | Decomposition Rule |
|
||||||
|
| :--- | :--- | :--- | :--- | :--- |
|
||||||
|
| **Small** | Single-step bugfix, documentation tweak, dependency bump, routine chore | 1 Issue linked directly to 1 PR / Commit | **Omitted by Policy** (issue tracker suffices) | Zero milestones. Zero project boards. Keep description concise (Context, Solution, Acceptance Criteria). |
|
||||||
|
| **Medium** | Vertical feature slice, multi-step refactor, performance spike (2 to 5 issues) | 1 Milestone + 2 to 5 Issues | **Recommended** (Basic Kanban: *Backlog*, *Ready*, *In Progress*, *Review*, *Done*) | Each issue has its own branch and PR. All issues include explicit numbered acceptance criteria and test seams. |
|
||||||
|
| **Large** | Architectural epic, platform cutover, multi-service evolution | Roadmap Doc + Rolling Milestones + Deliverable Issues | **Required** (Board coordinates rolling horizons) | Source of truth remains in repo docs (`ARCHITECTURE.md`, `ROADMAP.md`, ADRs). Gitea coordinates rolling execution. |
|
||||||
|
|
||||||
|
**Deterministic Output Header**: Every planning proposal must explicitly state:
|
||||||
|
```markdown
|
||||||
|
### Project Board Policy: <Omitted|Recommended|Required> (Rationale)
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 4. Independent Zero-Context Reproducibility Audit
|
||||||
|
|
||||||
|
Before finalizing decomposition for approval, run a clean-room audit subagent to verify plan reproducibility without conversational context:
|
||||||
|
|
||||||
|
### Input Manifest (Strict Clean-Room)
|
||||||
|
The auditor receives strictly raw artifacts and pinned repository state:
|
||||||
|
1. Pinned repository root and commit SHA.
|
||||||
|
2. Canonical specifications (`docs/specs/*.md`) and `ROADMAP.md`.
|
||||||
|
3. Proposed raw issue titles, descriptions, and acceptance criteria markdown.
|
||||||
|
4. Proposed milestone and board specifications.
|
||||||
|
5. Declared asset paths and prerequisite environment variables.
|
||||||
|
|
||||||
|
### Auditor Report Schema
|
||||||
|
The auditor reports across five explicit sections:
|
||||||
|
1. **Reconstructed from Source Artifacts**: Scope and sequence directly supported by source text.
|
||||||
|
2. **Inferred Requirements**: Deductions made from titles or conventions lacking explicit spec text.
|
||||||
|
3. **Undetermined Seams**: Gaps or ambiguities that could not be resolved without guessing.
|
||||||
|
4. **Materiality Classification**:
|
||||||
|
- *Material*: Forces an implementer to guess about scope, behavior, acceptance, or prerequisites.
|
||||||
|
- *Non-Material*: Cosmetic or self-evident convention.
|
||||||
|
5. **Concrete Remediation Plan**: Specific edits to specs, assets, or criteria to resolve material ambiguities.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 5. Rolling Horizons for Large Projects
|
||||||
|
|
||||||
When planning large epics, avoid waterfall decomposition where every future task is pre-created as an issue weeks before implementation:
|
When planning large epics, avoid waterfall decomposition where every future task is pre-created as an issue weeks before implementation:
|
||||||
|
1. **Active Milestone (Immediate Horizon)**: Decomposed into 2 to 5 concrete deliverable issues with falsifiable acceptance criteria.
|
||||||
1. **Active Milestone (Immediate Horizon)**:
|
2. **Future Milestones (Deferred Horizons)**: Represented as high-level milestones or single coarse placeholder issues in Gitea.
|
||||||
- Decomposed into 2 to 5 concrete deliverable issues with falsifiable acceptance criteria.
|
3. **Architecture Synchronization**: Update repository docs (`reconcile-docs`) before decomposing the next rolling milestone.
|
||||||
- Actively assigned, scheduled, and implemented via dedicated branches.
|
|
||||||
2. **Future Milestones (Deferred Horizons)**:
|
|
||||||
- Represented as high-level milestones or single coarse placeholder issues in Gitea.
|
|
||||||
- Decomposed into concrete issues only when the active milestone is completed and its lessons are verified.
|
|
||||||
3. **Architecture Synchronization**:
|
|
||||||
- As decisions are made during active implementation, update repository docs (`reconcile-docs`) before decomposing the next rolling milestone.
|
|
||||||
@@ -1,103 +1,26 @@
|
|||||||
# Verified Tea CLI Subroutines
|
# [DEPRECATED] Tea CLI Subroutines
|
||||||
|
|
||||||
Reference for `gitea-plan` and `gitea-pr`. Canonical, verified syntax for coordinating Gitea operations via the `tea` CLI.
|
> **Notice**: Upstream `tea` CLI is archived and officially deprecated in favor of `gt` (`gitea/cli`).
|
||||||
|
> For verified command patterns, JSON extraction discipline, and sovereign instance conventions, use the official skill:
|
||||||
|
> **`skills/gt-usage/`** and its reference manual **`skills/gt-usage/references/commands.md`**.
|
||||||
|
|
||||||
## Repository Context
|
This document is preserved for historical reference and legacy instance migrations only.
|
||||||
|
|
||||||
`tea` automatically discovers the target repository and authenticated login from the active Git remote (`origin`). To verify or override:
|
|
||||||
- Check current login: `tea logins list`
|
|
||||||
- Override target repo explicitly if running outside the repository root: `-r <owner>/<repo>`
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 1. Issue Management
|
## Legacy Commands Reference (Archived)
|
||||||
|
|
||||||
### Create an Issue
|
### 1. Issue Management (Legacy)
|
||||||
- Simple description:
|
|
||||||
```sh
|
|
||||||
tea issues create --title "<title>" --description "<description>" [--milestone "<milestone>"] [--labels "<label1,label2>"]
|
|
||||||
```
|
|
||||||
- Multi-line description via heredoc (preferred for structured acceptance criteria):
|
|
||||||
```sh
|
|
||||||
tea issues create --title "<title>" --milestone "<milestone>" --description-file - <<'EOF'
|
|
||||||
## Context & Problem
|
|
||||||
...
|
|
||||||
|
|
||||||
## Proposed Solution
|
|
||||||
...
|
|
||||||
|
|
||||||
## Acceptance Criteria
|
|
||||||
1. ...
|
|
||||||
2. ...
|
|
||||||
EOF
|
|
||||||
```
|
|
||||||
|
|
||||||
### List and Inspect Issues
|
|
||||||
- List open issues:
|
|
||||||
```sh
|
```sh
|
||||||
|
tea issues create --title "<title>" --description "<description>"
|
||||||
tea issues list
|
tea issues list
|
||||||
```
|
tea issues edit <index> --title "<new-title>"
|
||||||
- Filter by milestone:
|
|
||||||
```sh
|
|
||||||
tea issues list --milestone "<milestone-title>"
|
|
||||||
```
|
|
||||||
- View specific issue details:
|
|
||||||
```sh
|
|
||||||
tea issues <index>
|
|
||||||
```
|
|
||||||
|
|
||||||
### Edit and Close Issues
|
|
||||||
- Update title, description, or milestone:
|
|
||||||
```sh
|
|
||||||
tea issues edit <index> --title "<new-title>" --milestone "<new-milestone>"
|
|
||||||
```
|
|
||||||
- Close issue:
|
|
||||||
```sh
|
|
||||||
tea issues close <index>
|
tea issues close <index>
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
### 2. Milestone Management (Legacy)
|
||||||
|
|
||||||
## 2. Milestone Management
|
|
||||||
|
|
||||||
### Create a Milestone
|
|
||||||
```sh
|
|
||||||
tea milestones create --title "<milestone-title>" --description "<overview-of-goals>"
|
|
||||||
```
|
|
||||||
|
|
||||||
### List and Inspect Milestones
|
|
||||||
```sh
|
```sh
|
||||||
|
tea milestones create --title "<milestone-title>" --description "<overview>"
|
||||||
tea milestones list
|
tea milestones list
|
||||||
```
|
|
||||||
|
|
||||||
### Close a Milestone
|
|
||||||
```sh
|
|
||||||
tea milestones close "<milestone-title>"
|
tea milestones close "<milestone-title>"
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. Comments and Discussion
|
|
||||||
|
|
||||||
### Add a Comment
|
|
||||||
- Use canonical positional syntax:
|
|
||||||
```sh
|
|
||||||
tea comment <index> "<comment-body>"
|
|
||||||
```
|
|
||||||
- Or explicit command syntax:
|
|
||||||
```sh
|
|
||||||
tea comments add <index> "<comment-body>"
|
|
||||||
```
|
|
||||||
- **Syntax Trap**: Never use `tea comment create`. It fails with `strconv.ParseInt: parsing "create": invalid syntax`.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 4. Labels
|
|
||||||
- List available labels:
|
|
||||||
```sh
|
|
||||||
tea labels list
|
|
||||||
```
|
|
||||||
- Create repository label if missing:
|
|
||||||
```sh
|
|
||||||
tea labels create --name "<name>" --color "<hex-color>" --description "<description>"
|
|
||||||
```
|
|
||||||
Reference in new issue
Block a user