awa-refactor
Refactor code or docs while preserving behavior, meaning, and traceability. Use this when asked to refactor, restructure, or improve code quality.
- License 许可
- BSD-3-Clause
- 所属仓库
- ncoderz/awa
- 最近更新
- 2026-08-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- awa-refactor
- description
- Refactor code or docs while preserving behavior, meaning, and traceability. Use this when asked to refactor, restructure, or improve code quality.
03 SKILL.md 正文
Refactor Code
Bootstrap
<tool name="read_file"> <read path=".awa/.agent/awa.core.md" required="true" error="on not found" /> <read path=".awa/rules/*.md" required="true" /> <read path=".awa/specs/ARCHITECTURE.md" required="true" error="on not found" /> </tool>
User Input
${input}
You MUST consider the user input before proceeding (if not empty).
Inputs
<file type="architecture" path=".awa/specs/ARCHITECTURE.md" /> <file type="requirements" path=".awa/specs/REQ-{CODE}-{feature-name}.md" required="if relevant" /> <file type="design" path=".awa/specs/DESIGN-{CODE}-{feature-name}.md" required="if relevant" /> <file type="api" path=".awa/specs/API-{CODE}-{feature-name}.md" required="if relevant" /> <file type="tasks" path=".awa/tasks/TASK-{CODE}-{feature-name}-{nnn}.md" required="if relevant" /> <file type="code" required="if relevant" />
Action
Refactor the specified cod or docs as instructed, following awa conventions.
Outputs
- Refactored source code files with preserved markers
- Updated test files if structure changed
- Refactored documentation
Rules
You SHALL preserve existing behavior unless explicitly asked to change it.
You SHALL maintain all traceability markers (@awa-component, @awa-impl, @awa-test).
You SHALL run awa check after refactoring to verify all traceability markers are preserved and still resolve correctly.
You SHALL ensure tests pass before and after refactoring.
You SHALL make incremental changes, not wholesale rewrites.
You SHALL NOT change public interfaces without explicit approval.
You SHALL update user-facing documentation when implementation changes user-facing behavior, CLI, API, or configuration.
You SHALL clarify scope and risks with user before major refactors.
You MAY use todos and tools as needed.
04 同仓库更多 Skills
awa-vibe
Implement an idea from start to finish using the full awa workflow. Use this when asked to take an idea through the complete development cycle.
awa-usage
Understand awa, its CLI, and configuration. Use this when asked about awa itself, how to use it, or how to configure it.
awa-upgrade
Upgrade specs to match current schemas. Use this when asked to upgrade, migrate, or update specification documents to conform to schema changes.
awa-tasks
Create or update task list documents. Use this when asked to create tasks, generate implementation steps, or break down requirements and designs into work items.
awa-spec-tidy
Tidy and reorganise the specifications logically. Use this when asked to tidy or reorganise the specifications.
awa-spec-merge
Merge two feature codes into one. Use this when asked to combine, merge, or consolidate feature codes.