torque-refine
Torque Refine
Single entry-point for all prompt engineering, requirements gathering, and planning workflows. Routes to 6 internal capabilities based on user intent. Supports Jira integration to push task breakdowns as subtasks.
Context
This skill runs in planning-only refine sessions:
- No MR creation — refine sessions never create merge requests or feature branches
- Multi-repo workspace — the workspace may contain multiple cloned repos for codebase analysis
- Jira integration — use
torque-tool jirato create subtasks and update parent issues
Quick Start
- Detect user intent (see routing below)
- Load the matching rule:
torque-tool skill read torque-refinethen read the appropriate reference - Follow that rule exactly
Intent Routing
| User Intent | Mode | Reference |
|---|---|---|
| Vague idea, needs discovery | Start | references/start.md |
| Has a prompt to optimize | Improve | references/improve.md |
| Extract requirements from chat | Summarize | references/summarize.md |
| Needs full requirements doc | PRD | references/prd.md |
| Has PRD, needs task breakdown | Plan | references/plan.md |
| Update existing PRD or prompt | Refine | references/refine.md |
Default: If the user has a prompt/PRD to optimize, use Improve. If they only have a vague idea with no written artifact, use Start to gather requirements first.
Workflow
Vague Idea --> START --> conversation --> SUMMARIZE --> mini-PRD
|
Clear Feature --> PRD ------------------------+-> full PRD --> PLAN --> tasks.md
|
Existing Prompt --> IMPROVE v
Jira subtasks (optional)
Existing PRD/Prompt --> REFINE --> back to any mode
Key Behaviors
- Announce mode before starting (State Assertion)
- Never write implementation code - planning only
- Self-correct mistakes (DETECT/STOP/CORRECT/RESUME)
- Verify file saves - Write then Read to confirm
- One question at a time in Start and PRD modes
- Always present plan before creating Jira issues - never push to Jira without confirmation
- Always score quality - Every mode uses the 6-dimension quality assessment
Universal Quality Assessment
All modes must evaluate outputs using 6 dimensions (0-100%):
| Dimension | What It Measures |
|---|---|
| Clarity | Is the objective clear and unambiguous? |
| Efficiency | Is the content concise without losing critical information? |
| Structure | Is information organized logically? |
| Completeness | Are all necessary details provided? |
| Actionability | Can an AI take immediate action on this? |
| Specificity | How concrete and precise? (versions, paths, identifiers) |
Quality gate: If overall score < 70%, recommend running Improve mode first to optimize before proceeding to the next step.
Jira Integration
After generating tasks.md, offer to push tasks as Jira subtasks:
# Show parent issue details first
torque-tool jira show --key PROJ-456
# Create subtask with priority (always prefix with [repo-name])
torque-tool jira create-subtask --parent PROJ-456 \
--title "[payments-api] Add retry logic" \
--description "Scope: files to change..." \
--assignee me --priority High
# Link dependencies (MRTCH-1 blocks MRTCH-2)
torque-tool jira link --from MRTCH-1 --to MRTCH-2 --type Blocks
# Update parent issue title with repo context
torque-tool jira update --key PROJ-456 \
--title "[payments-api] Updated title" \
--description "Updated requirements..."
Subtask Conventions
- Always prefix with
[repo-name]: Every subtask title starts with the repo name in brackets (e.g.,[payments-api] Add retry logic) - Single-repo tasks: Also update the parent task title with the repo prefix
- Priority: Use
--prioritywith:Highest,High,Medium,Low,Lowest - Dependencies: Use
torque-tool jira link --from X --to Y --type Blocks(X blocks Y) - Assignee: Use
--assignee meto auto-assign subtasks to the current user - Description: Include scope (files to change), context, and enough detail for the next agent to work autonomously
- Granularity: Each subtask should be completable in one coding session
- Fallback: If
torque-tool jirafails (rate limit, auth), save tasks.md and tell the user to create subtasks manually
Transitioning Issues
Workflows differ per project. Always check available transitions before moving:
# Check what transitions are available from current status
torque-tool jira transitions PROJ-456
# Move to a specific status
torque-tool jira transition PROJ-456 --name "Development"
# Close an issue (walks all transitions to Done automatically)
torque-tool jira close PROJ-456
Deleting Subtasks
When the user asks to delete subtasks (e.g., "delete the subtasks", "remove all subtasks", "start fresh"):
# List subtasks first to confirm what will be deleted
torque-tool jira list-subtasks PROJ-456
# Delete individual subtasks
torque-tool jira delete MRTCH-1371
torque-tool jira delete MRTCH-1372
# If delete fails (403), close them instead
torque-tool jira close MRTCH-1371
torque-tool jira close MRTCH-1372
# Or delete a parent and all its subtasks at once
torque-tool jira delete PROJ-456 --delete-subtasks
Always list subtasks before deleting to confirm with the user. Never delete without showing what will be removed.
Output Location
All outputs save to .mula/outputs/:
- PRDs:
.mula/outputs/{project}/ - Prompts:
.mula/outputs/prompts/{id}.md - Tasks:
.mula/outputs/{project}/tasks.md
After Planning
When plan mode generates tasks.md:
- Present the task breakdown to the user
- Ask: "Would you like me to create these as Jira subtasks under the parent issue?"
- If yes, use
torque-tool jira create-subtaskfor each task - If no: "Your task breakdown is ready. Implement using your preferred workflow."
References
| Reference | Purpose |
|---|---|
references/start.md |
Conversational exploration and requirements gathering |
references/improve.md |
6-dimension prompt quality assessment and optimization |
references/summarize.md |
Extract requirements from conversation into mini-PRD |
references/prd.md |
Strategic questioning to create comprehensive PRD |
references/plan.md |
Transform PRD into actionable task breakdown + Jira subtasks |
references/refine.md |
Iterate on existing PRD or saved prompt + Jira updates |
More from carvalab/k-skills
code-review
Use this skill as the FINAL step after writing or modifying code — reviews for logic bugs, architecture violations, security issues, and performance problems. Trigger after completing a feature, fixing a bug, before merging, or when asked to "review this code", "check my changes", or "is this ready to merge". Fixes issues directly and runs quality gates (lint, typecheck, build, tests). Delegates style to automation, focuses on what matters.
38refactor-cleaner
Use this skill to find and remove dead code, unused dependencies, duplicate logic, and unused exports using detection tools (knip, depcheck, ts-prune, deadcode, staticcheck). Trigger on "clean up dead code", "remove unused", "find dead code", "reduce bundle size", "dependency audit", or when the codebase feels bloated. For simplifying living code (readability, naming, complexity reduction) without detection tools, use code-simplifier instead. Use this skill during maintenance windows or before major refactors.
36code-simplifier
Use this skill after writing or modifying code to simplify it — reduces complexity, eliminates redundancy, and improves naming while preserving exact behavior. Trigger after implementing a feature, after a refactor, or when asked to "clean up this code", "simplify this", "make this more readable", or "reduce complexity". Also use when code feels too nested, verbose, or hard to follow. For removing dead code and unused dependencies with detection tools (knip, ts-prune, deadcode), use refactor-cleaner instead.
24backend-development
Use this skill for ANY task in a Node.js/TypeScript or Go backend codebase — adding features, fixing bugs, refactoring, adding flows, modifying handlers, changing business logic, or writing new code. Trigger even when the task is vague like "add the flow to this", "implement this feature", "fix this", or "add X like Y" — if the project has go.mod, nest-cli.json, express routes, or server-side TypeScript, this skill applies. Covers REST APIs, PostgreSQL, Redis, authentication, job queues, events, microservices, Docker, CI/CD, Clean Architecture, SOLID, DRY, and code reuse patterns. When in doubt whether this is backend work, use this skill.
24doc-updater
Use this skill when documentation needs updating — after adding features, changing APIs, modifying architecture, or updating dependencies. Trigger on "update the docs", "generate codemap", "refresh the README", "document this", "update architecture docs", or when code changes make existing documentation stale. Generates codemaps from actual code, updates READMEs, architecture diagrams, and guides.
22frontend-development
Use this skill for ANY task in a Next.js or React frontend codebase — adding pages, building components, fixing UI bugs, styling, handling forms, fetching data, or modifying layouts. Trigger even when the task is vague like "add this feature", "fix the UI", "make this page", or "update the form" — if the project has next.config.*, React components, or client-side TypeScript, this skill applies. Covers App Router, Server Components, Server Actions, MUI styling, Zod validation, caching, and design quality. When in doubt whether this is frontend work, use this skill.
21