4.3 KiB
| name | description | user-invocable | argument-hint |
|---|---|---|---|
| fea | Issue-driven feature planning workflow via Gitea. Reads issue as prompt, discusses requirements via issue comments, publishes implementation plan to wiki. Triggered with /fea owner/repo#number. | true | <owner/repo#issue-number> |
Issue-Driven Feature Planning Skill
You orchestrate a multi-phase feature planning workflow using Gitea issues and wiki. The argument $ARGUMENTS is in the format owner/repo#number (e.g. pushok/mpns#12).
Read .claude/skills/fea/references/gitea-dto.md before every invocation — it defines which fields to extract from Gitea responses and how to classify comments.
Read .claude/skills/fea/references/auth.md for credential setup — agents must authenticate themselves using project-level .claude/.env.
Read .claude/skills/fea/references/tea-cli.md when MCP tools fail — tea CLI is the fallback for all Gitea operations.
Read .claude/skills/fea/references/wiki-git.md for wiki operations — wiki is a git repo cloned into .wiki/ subfolder.
Argument Parsing
Parse $ARGUMENTS into three variables:
owner— everything before/repo— between/and#issue_number— after#(integer)
If parsing fails, tell the user: "Expected format: /fea owner/repo#12"
Authentication
Before any Gitea operation, ensure credentials are available:
- Check for
.claude/.env— if missing, create it with empty values (seereferences/auth.md), add to.gitignore, tell user to fill in credentials, and stop - Load credentials:
set -a; source .claude/.env; set +a— if any value is empty, tell user to fill in.claude/.envand stop - Verify
tealogin exists:tea login list— if not, runtea login addperreferences/auth.md
Context Loading
Every invocation starts by loading context:
- Fetch issue via
mcp__gitea__get_issue_by_indexwithowner,repo,index=issue_number- If MCP fails, fallback:
tea api GET /repos/$owner/$repo/issues/$issue_number
- If MCP fails, fallback:
- Fetch comments via
mcp__gitea__get_issue_comments_by_indexwithowner,repo,index=issue_number- If MCP fails, fallback:
tea api GET /repos/$owner/$repo/issues/$issue_number/comments
- If MCP fails, fallback:
- Extract fields per
references/gitea-dto.md— discard everything else - Classify comments into bot vs user per
references/gitea-dto.mdrules
The issue title + body is the feature prompt (replaces the old prompt.md).
Phase Detection
Detect the current phase from the comment history:
- No bot comments at all → Phase 1: Explore & Ask
- Latest bot comment has
### Questions, no user comment posted after it → Phase 2: Waiting for answers - Latest bot comment has
### Questions, user comment exists after it → Phase 3: Process answers - Latest bot comment has
<!-- status:ready -->, no plan-published marker → Phase 4: Generate plan - Bot comment with
# Implementation Planexists → Done: tell user the plan is already published, show the wiki link
Phase 1: Explore & Ask
Issue understanding phase described at:
references/phases/phase1-understanding.md
Phase 2: Waiting for Answers
The latest bot comment has questions but no user reply after it. Tell the user:
"Waiting for your answers on the issue. Reply to the questions comment and re-run /fea $ARGUMENTS."
Phase 3: Process Answers
Conversation reconstruction analyzing and responce phase described at:
references/phases/phase3-conversation.md
Phase 4: Generate Plan
Feature planning:
references/phases/phase4-planning.md
Important Rules
- ALWAYS read
references/gitea-dto.mdand extract only listed fields — do not pass raw Gitea JSON to agents - Bot comments MUST start with
<!-- mpns-feature-bot -->on the very first line - Session numbering: count existing bot Q&A comments to determine next session number
- Questions should be thoughtful and specific — 3–7 per session
- Use Russian where the issue is written in Russian
- Each session should make meaningful progress toward clarity
- Wiki pages are written as markdown files in
.wiki/and published via git push (seereferences/wiki-git.md) - Never post duplicate bot comments — check existing comments before posting
- When posting markdown in comments, ensure code blocks and formatting render correctly on Gitea