diff --git a/skills/gitea-plan/SKILL.md b/skills/gitea-plan/SKILL.md new file mode 100644 index 0000000..b9662c7 --- /dev/null +++ b/skills/gitea-plan/SKILL.md @@ -0,0 +1,52 @@ +--- +name: gitea-plan +description: >- + Translate technical goals, user requests, and architecture plans into Gitea planning + primitives (issues, milestones, labels, dependencies) with tiered complexity scaling. + Use when decomposing work, creating or updating Gitea issues, or establishing planning + milestones. Not for managing pull requests: use gitea-pr. +--- + +# Gitea Plan + +## Use when +- Decomposing a project, feature request, or technical plan into trackable Gitea units. +- Creating or editing milestones and issues with falsifiable acceptance criteria. +- Setting rolling planning horizons for multi-phase epics. +- Not for branch or worktree management: use `git-workspace`. +- Not for pull request lifecycle or review tracking: use `gitea-pr`. + +## Steps +1. **Assess scope and select tier.** Inspect repository context, documentation plans, or user + request to assign a planning tier (`Small`, `Medium`, or `Large`) per + [references/decomposition-tiers.md](references/decomposition-tiers.md). Enforce minimum + ceremony: small tasks never get milestones or board overhead. +2. **Decompose into deliverable outcome slices.** Map work items into verifiable issues. + Ensure each issue represents an independently deliverable outcome with a defined testing + seam, rather than a micro-commit. For large projects, decompose only the active milestone + and leave future horizons coarse. +3. **Draft falsifiable acceptance criteria.** For each planned issue, formulate: + - Context and problem: what motivates the change. + - Proposed solution and scope: boundary of what is in and out of scope. + - Acceptance criteria: numbered, observable pass/fail conditions. +4. **Present decomposition for approval.** Present the proposed milestone and issues for human + review following the operational checkpoint rules in `profile/AGENTS.md`. Stop for approval + before creating any Gitea entities. +5. **Execute Gitea operations via `tea` CLI.** Use verified commands from + [references/tea-cli.md](references/tea-cli.md) (`tea milestones create`, `tea issues create`). + Pass multi-line descriptions via `--description-file -` to preserve formatting. +6. **Verify created state.** Inspect `tea issues list` or `tea milestones list` to confirm index + numbers and report the created entities to the user. + +## Your call +- **Planning tier selection**: confirm Small vs. Medium vs. Large ceremony level. +- **Issue decomposition boundaries**: approve or revise the proposed issue slices. +- **Batch issue creation**: approve structured batch issue creation per `profile/AGENTS.md`. + +## Done when +- Target milestone and issues are created in Gitea with verifiable index numbers and falsifiable + acceptance criteria. + +## Hands off to +- `git-workspace`: to create dedicated branches or worktrees for the decomposed issues. +- `gitea-pr`: to link, review, and close issues via pull requests. diff --git a/skills/gitea-plan/references/decomposition-tiers.md b/skills/gitea-plan/references/decomposition-tiers.md new file mode 100644 index 0000000..5cca8c1 --- /dev/null +++ b/skills/gitea-plan/references/decomposition-tiers.md @@ -0,0 +1,34 @@ +# Project Sizing and Task Decomposition Tiers + +Reference for `gitea-plan`. Guidelines for scaling planning ceremony to risk and scope, preserving momentum while keeping architecture traceable. + +## 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. +- 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. +- **Anti-pattern**: Never create 1:1 Gitea issues for micro-commits (such as "fix typo", "add helper function", or "clean up lint"). Group cohesive checkpoints under a single deliverable issue. + +--- + +## Planning Ceremony Tiers + +| Tier | Typical Work | Planning Primitives Used | Decomposition Rule | +| :--- | :--- | :--- | :--- | +| **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). | +| **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. | +| **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. | + +--- + +## 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: + +1. **Active Milestone (Immediate Horizon)**: + - Decomposed into 2 to 5 concrete deliverable issues with falsifiable acceptance criteria. + - 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. diff --git a/skills/gitea-plan/references/tea-cli.md b/skills/gitea-plan/references/tea-cli.md new file mode 100644 index 0000000..a6614e4 --- /dev/null +++ b/skills/gitea-plan/references/tea-cli.md @@ -0,0 +1,103 @@ +# Verified Tea CLI Subroutines + +Reference for `gitea-plan` and `gitea-pr`. Canonical, verified syntax for coordinating Gitea operations via the `tea` CLI. + +## Repository Context + +`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 /` + +--- + +## 1. Issue Management + +### Create an Issue +- Simple description: + ```sh + tea issues create --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 + tea issues list + ``` +- 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> + ``` + +--- + +## 2. Milestone Management + +### Create a Milestone +```sh +tea milestones create --title "<milestone-title>" --description "<overview-of-goals>" +``` + +### List and Inspect Milestones +```sh +tea milestones list +``` + +### Close a Milestone +```sh +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>" + ```