Add Gitea issue pipelines and prompts using tea CLI
gt-issue-impl, gt-issue-research, gt-issue-rewrite, gt-issue-update pipelines with corresponding prompts. Mirrors the gh-issue-* variants but uses tea CLI with --login librete for Gitea authentication. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
67
.wave/prompts/gitea-issue-impl/create-pr.md
Normal file
67
.wave/prompts/gitea-issue-impl/create-pr.md
Normal file
@@ -0,0 +1,67 @@
|
||||
You are creating a pull request for the implemented Gitea issue.
|
||||
|
||||
Input: {{ input }}
|
||||
|
||||
## Working Directory
|
||||
|
||||
You are running in an **isolated git worktree** shared with previous pipeline steps.
|
||||
Your working directory IS the project root. The feature branch was created by the
|
||||
plan step and is already checked out. All git operations here are isolated from
|
||||
the main working tree.
|
||||
|
||||
Read the issue assessment artifact to find the issue number, repository, branch name, and issue URL.
|
||||
|
||||
## SAFETY: Do NOT Modify the Working Tree
|
||||
|
||||
This step MUST NOT run `git checkout`, `git stash`, or any command that changes
|
||||
the current branch or working tree state. The branch already exists from the
|
||||
implement step — just push it and create the PR.
|
||||
|
||||
## Instructions
|
||||
|
||||
### Step 1: Load Context
|
||||
|
||||
From the issue assessment artifact, extract:
|
||||
- Issue number and title
|
||||
- Repository (`owner/repo`)
|
||||
- Branch name
|
||||
- Issue URL
|
||||
|
||||
### Step 2: Push the Branch
|
||||
|
||||
Push the feature branch without checking it out:
|
||||
|
||||
```bash
|
||||
git push -u origin <BRANCH_NAME>
|
||||
```
|
||||
|
||||
### Step 3: Create Pull Request
|
||||
|
||||
Create the PR using `tea pulls create` with `--head` to target the branch. The PR description MUST include `Closes #<NUMBER>` to auto-close the issue on merge.
|
||||
|
||||
```bash
|
||||
tea pulls create --repo <OWNER/REPO> --login librete --head <BRANCH_NAME> -t "<concise title>" -d "$(cat <<'PRBODY'
|
||||
## Summary
|
||||
<3-5 bullet points describing the changes>
|
||||
|
||||
Closes #<ISSUE_NUMBER>
|
||||
|
||||
## Changes
|
||||
<list of key files changed and why>
|
||||
|
||||
## Test Plan
|
||||
<how the changes were validated>
|
||||
PRBODY
|
||||
)"
|
||||
```
|
||||
|
||||
## CONSTRAINTS
|
||||
|
||||
- Do NOT spawn Task subagents — work directly in the main context
|
||||
- Do NOT run `git checkout`, `git stash`, or any branch-switching commands
|
||||
- The PR description MUST contain `Closes #<NUMBER>` to link to the issue
|
||||
- Do NOT include Co-Authored-By or AI attribution in commits
|
||||
|
||||
## Output
|
||||
|
||||
Produce a JSON status report matching the injected output schema.
|
||||
81
.wave/prompts/gitea-issue-impl/fetch-assess.md
Normal file
81
.wave/prompts/gitea-issue-impl/fetch-assess.md
Normal file
@@ -0,0 +1,81 @@
|
||||
You are fetching a Gitea issue and assessing whether it has enough detail to implement.
|
||||
|
||||
Input: {{ input }}
|
||||
|
||||
The input format is `owner/repo number` (e.g. `public/librenotes 42`).
|
||||
|
||||
## Working Directory
|
||||
|
||||
You are running in an isolated Wave workspace. The `tea` CLI works from any
|
||||
directory when using the `--repo` and `--login` flags, so no directory change is needed.
|
||||
|
||||
## Instructions
|
||||
|
||||
### Step 1: Parse Input
|
||||
|
||||
Extract the repository (`owner/repo`) and issue number from the input string.
|
||||
|
||||
### Step 2: Fetch Issue
|
||||
|
||||
Use the `tea` CLI to fetch issues and filter for the target:
|
||||
|
||||
```bash
|
||||
tea issues list --repo <OWNER/REPO> --login librete -o json -f index,title,body,labels,state,url --limit 50
|
||||
```
|
||||
|
||||
Then filter the JSON output for the issue matching the requested number.
|
||||
|
||||
### Step 3: Assess Implementability
|
||||
|
||||
Evaluate the issue against these criteria:
|
||||
|
||||
1. **Clear description**: Does the issue describe what needs to change? (not just "X is broken")
|
||||
2. **Sufficient context**: Can you identify which code/files are affected?
|
||||
3. **Testable outcome**: Are there acceptance criteria, or can you infer them from the description?
|
||||
|
||||
Score the issue 0-100:
|
||||
- **80-100**: Well-specified, clear requirements, acceptance criteria present
|
||||
- **60-79**: Adequate detail, some inference needed but feasible
|
||||
- **40-59**: Marginal — missing key details but core intent is clear
|
||||
- **0-39**: Too vague to implement — set `implementable` to `false`
|
||||
|
||||
### Step 4: Determine Skip Steps
|
||||
|
||||
Based on the issue quality, decide which speckit steps can be skipped:
|
||||
- Issues with detailed specs can skip `specify`, `clarify`, `checklist`, `analyze`
|
||||
- Issues with moderate detail might skip `specify` and `clarify` only
|
||||
- Vague issues should skip nothing (but those should fail the assessment)
|
||||
|
||||
### Step 5: Generate Branch Name
|
||||
|
||||
Create a branch name using the pattern `<NNN>-<short-name>` where:
|
||||
- `<NNN>` is the issue number zero-padded to 3 digits
|
||||
- `<short-name>` is 2-3 words from the issue title, kebab-case
|
||||
|
||||
### Step 6: Assess Complexity
|
||||
|
||||
Estimate implementation complexity:
|
||||
- **trivial**: Single file change, obvious fix (typo, config tweak)
|
||||
- **simple**: 1-3 files, straightforward logic change
|
||||
- **medium**: 3-10 files, new feature with tests
|
||||
- **complex**: 10+ files, architectural changes, cross-cutting concerns
|
||||
|
||||
## CRITICAL: Implementability Gate
|
||||
|
||||
If the issue does NOT have enough detail to implement:
|
||||
- Set `"implementable": false` in the output
|
||||
- This will cause the contract validation to fail, aborting the pipeline
|
||||
- Include `missing_info` listing what specific information is needed
|
||||
- Include a `summary` explaining why the issue cannot be implemented as-is
|
||||
|
||||
If the issue IS implementable:
|
||||
- Set `"implementable": true`
|
||||
|
||||
## CONSTRAINTS
|
||||
|
||||
- Do NOT spawn Task subagents — work directly in the main context
|
||||
- Do NOT modify the issue — this is read-only assessment
|
||||
|
||||
## Output
|
||||
|
||||
Produce a JSON assessment matching the injected output schema.
|
||||
87
.wave/prompts/gitea-issue-impl/implement.md
Normal file
87
.wave/prompts/gitea-issue-impl/implement.md
Normal file
@@ -0,0 +1,87 @@
|
||||
You are implementing a Gitea issue according to the plan and task breakdown.
|
||||
|
||||
Input: {{ input }}
|
||||
|
||||
## Working Directory
|
||||
|
||||
You are running in an **isolated git worktree** shared with previous pipeline steps.
|
||||
Your working directory IS the project root. The feature branch was created by the
|
||||
plan step and is already checked out. All git operations here are isolated from
|
||||
the main working tree.
|
||||
|
||||
## Instructions
|
||||
|
||||
### Step 1: Load Context
|
||||
|
||||
1. Get the issue details and branch name from the issue assessment artifact
|
||||
2. Get the task breakdown, file changes, and feature directory from the plan artifact
|
||||
|
||||
### Step 2: Read Plan Files
|
||||
|
||||
Navigate to the feature directory and read:
|
||||
- `spec.md` — the full specification
|
||||
- `plan.md` — the implementation plan
|
||||
- `tasks.md` — the phased task breakdown
|
||||
|
||||
### Step 3: Execute Implementation
|
||||
|
||||
Follow the task breakdown phase by phase:
|
||||
|
||||
**Setup first**: Initialize project structure, dependencies, configuration
|
||||
|
||||
**Tests before code (TDD)**:
|
||||
- Write tests that define expected behavior
|
||||
- Run tests to confirm they fail for the right reason
|
||||
- Implement the code to make tests pass
|
||||
|
||||
**Core development**: Implement the changes specified in the plan
|
||||
|
||||
**Integration**: Wire components together, update imports, middleware
|
||||
|
||||
**Polish**: Edge cases, error handling, documentation updates
|
||||
|
||||
### Step 4: Validate Between Phases
|
||||
|
||||
After each phase, run:
|
||||
```bash
|
||||
go test -race ./...
|
||||
```
|
||||
|
||||
If tests fail, fix the issue before proceeding to the next phase.
|
||||
|
||||
### Step 5: Mark Completed Tasks
|
||||
|
||||
As you complete each task, mark it as `[X]` in `tasks.md`.
|
||||
|
||||
### Step 6: Final Validation
|
||||
|
||||
After all tasks are complete:
|
||||
1. Run `go test -race ./...` one final time
|
||||
2. Verify all tasks in `tasks.md` are marked complete
|
||||
3. Stage and commit all changes:
|
||||
```bash
|
||||
git add -A
|
||||
git reset HEAD -- .wave/artifacts .wave/output .claude CLAUDE.md 2>/dev/null || true
|
||||
git commit -m "feat: implement #<ISSUE_NUMBER> — <short description>"
|
||||
```
|
||||
|
||||
Commit changes to the worktree branch.
|
||||
|
||||
## Agent Usage — USE UP TO 6 AGENTS
|
||||
|
||||
Maximize parallelism with up to 6 Task agents for independent work:
|
||||
- Agents 1-2: Setup and foundational tasks (Phase 1-2)
|
||||
- Agents 3-4: Core implementation tasks (parallelizable [P] tasks)
|
||||
- Agent 5: Test writing and validation
|
||||
- Agent 6: Integration and polish tasks
|
||||
|
||||
Coordinate agents to respect task dependencies:
|
||||
- Sequential tasks (no [P] marker) must complete before dependents start
|
||||
- Parallel tasks [P] affecting different files can run simultaneously
|
||||
- Run test validation between phases
|
||||
|
||||
## Error Handling
|
||||
|
||||
- If a task fails, halt dependent tasks but continue independent ones
|
||||
- Provide clear error context for debugging
|
||||
- If tests fail, fix the issue before proceeding to the next phase
|
||||
90
.wave/prompts/gitea-issue-impl/plan.md
Normal file
90
.wave/prompts/gitea-issue-impl/plan.md
Normal file
@@ -0,0 +1,90 @@
|
||||
You are creating an implementation plan for a Gitea issue.
|
||||
|
||||
Input: {{ input }}
|
||||
|
||||
## Working Directory
|
||||
|
||||
You are running in an **isolated git worktree** checked out at `main` (detached HEAD).
|
||||
Your working directory IS the project root. All git operations here are isolated
|
||||
from the main working tree and will not affect it.
|
||||
|
||||
Use `create-new-feature.sh` to create the feature branch from this clean starting point.
|
||||
|
||||
## Instructions
|
||||
|
||||
### Step 1: Read Assessment
|
||||
|
||||
From the issue assessment artifact, extract:
|
||||
- Issue number, title, body, and repository
|
||||
- Branch name from the assessment
|
||||
- Complexity estimate
|
||||
- Which speckit steps were skipped
|
||||
|
||||
### Step 2: Create Feature Branch
|
||||
|
||||
Use the `create-new-feature.sh` script to create a properly numbered branch:
|
||||
|
||||
```bash
|
||||
.specify/scripts/bash/create-new-feature.sh --json --number <ISSUE_NUMBER> --short-name "<SHORT_NAME>" "<ISSUE_TITLE>"
|
||||
```
|
||||
|
||||
If the branch already exists (e.g. from a resume), check it out instead:
|
||||
```bash
|
||||
git checkout <BRANCH_NAME>
|
||||
```
|
||||
|
||||
### Step 3: Write Spec from Issue
|
||||
|
||||
In the feature directory (e.g. `specs/<BRANCH_NAME>/`), create `spec.md` with:
|
||||
- Issue title as heading
|
||||
- Full issue body
|
||||
- Labels and metadata
|
||||
- Any acceptance criteria extracted from the issue
|
||||
- Link back to the original issue URL
|
||||
|
||||
### Step 4: Create Implementation Plan
|
||||
|
||||
Write `plan.md` in the feature directory with:
|
||||
|
||||
1. **Objective**: What the issue asks for (1-2 sentences)
|
||||
2. **Approach**: High-level strategy
|
||||
3. **File Mapping**: Which files need to be created/modified/deleted
|
||||
4. **Architecture Decisions**: Any design choices made
|
||||
5. **Risks**: Potential issues and mitigations
|
||||
6. **Testing Strategy**: What tests are needed
|
||||
|
||||
### Step 5: Create Task Breakdown
|
||||
|
||||
Write `tasks.md` in the feature directory with a phased breakdown:
|
||||
|
||||
```markdown
|
||||
# Tasks
|
||||
|
||||
## Phase 1: Setup
|
||||
- [ ] Task 1.1: Description
|
||||
- [ ] Task 1.2: Description
|
||||
|
||||
## Phase 2: Core Implementation
|
||||
- [ ] Task 2.1: Description [P] (parallelizable)
|
||||
- [ ] Task 2.2: Description [P]
|
||||
|
||||
## Phase 3: Testing
|
||||
- [ ] Task 3.1: Write unit tests
|
||||
- [ ] Task 3.2: Write integration tests
|
||||
|
||||
## Phase 4: Polish
|
||||
- [ ] Task 4.1: Documentation updates
|
||||
- [ ] Task 4.2: Final validation
|
||||
```
|
||||
|
||||
Mark parallelizable tasks with `[P]`.
|
||||
|
||||
## CONSTRAINTS
|
||||
|
||||
- Do NOT spawn Task subagents — work directly in the main context
|
||||
- Do NOT start implementation — only planning in this step
|
||||
- Do NOT use WebSearch — all information is in the issue and codebase
|
||||
|
||||
## Output
|
||||
|
||||
Produce a JSON status report matching the injected output schema.
|
||||
Reference in New Issue
Block a user