awa-spec-merge
Merge two feature codes into one. Use this when asked to combine, merge, or consolidate feature codes.
- License 许可
- BSD-3-Clause
- 所属仓库
- ncoderz/awa
- 最近更新
- 2026-08-13
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- awa-spec-merge
- description
- Merge two feature codes into one. Use this when asked to combine, merge, or consolidate feature codes.
03 SKILL.md 正文
Merge Two Feature Codes
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="feat" path=".awa/specs/FEAT-{SOURCE_CODE}-.md" required="true" /> <file type="feat" path=".awa/specs/FEAT-{TARGET_CODE}-.md" required="if exists" /> <file type="requirements" path=".awa/specs/REQ-{SOURCE_CODE}-.md" required="if exists" /> <file type="requirements" path=".awa/specs/REQ-{TARGET_CODE}-.md" required="if exists" /> <file type="design" path=".awa/specs/DESIGN-{SOURCE_CODE}-.md" required="if exists" /> <file type="design" path=".awa/specs/DESIGN-{TARGET_CODE}-.md" required="if exists" /> <file type="api" path=".awa/specs/API-{SOURCE_CODE}-.tsp" required="if exists" /> <file type="api" path=".awa/specs/API-{TARGET_CODE}-.tsp" required="if exists" /> <file type="examples" path=".awa/specs/EXAMPLE-{SOURCE_CODE}-.md" required="if exists" /> <file type="examples" path=".awa/specs/EXAMPLE-{TARGET_CODE}-.md" required="if exists" /> <file type="tasks" path=".awa/tasks/TASK-{SOURCE_CODE}-.md" required="if exists" /> <file type="tasks" path=".awa/tasks/TASK-{TARGET_CODE}-.md" required="if exists" />
Action
Merge the source feature code into the target feature code using awa spec merge, following awa conventions.
This combines all spec files, traceability IDs, code markers, and tests from the source code into the target code's namespace, then removes the source.
Merge Process
-
PRE-VALIDATE
- Run
awa checkto record existing errors before proceeding
- Run
-
IDENTIFY CODES
- Determine the source code (to be absorbed) and target code (to receive content)
- Verify both codes exist by checking for spec files:
awa spec codes - Confirm the merge direction with the user if ambiguous
-
PREVIEW CHANGES
- Run
awa spec merge <source> <target> --dry-runto see planned operations - Review the output: ID remap table, file moves, renames
- If output looks wrong, abort and investigate
- Run
-
EXECUTE MERGE
- Run
awa spec merge <source> <target>to apply the merge
- Run
-
CONSOLIDATE TARGET FILES
- List all spec files now under the target code namespace
- For each file type (FEAT, REQ, DESIGN, API, EXAMPLE), check if multiple files exist that should be combined
- Where two files of the same type cover closely related or overlapping content, merge them into one:
- Append the smaller file's content to the larger one
- Remove duplicate sections, but do not alter the wording of requirements or design components
- Ensure the merged file stays within schema line limits; split if needed
- Files that cover distinct topics should remain separate
-
FIX MERGED FILES
- Open every merged spec file and verify content coherence
- Reorder content into logical order
- Check that REQ files have consistent requirement structure
- Check that DESIGN files have non-overlapping component names
- Ensure all files respect schema line limits; split if needed
-
VALIDATE
- Run
awa checkto verify new status - Fix any newly reported errors
- If no errors reported, process is complete
- Run
Outputs
- Renamed spec files under the target code namespace, with recoded traceability markers
- Optionally consolidated target files where content overlaps
Rules
You SHALL always preview with --dry-run before executing a merge.
You SHALL confirm the merge direction (source → target) with the user.
You SHALL run awa check --spec-only after merge to verify structural integrity.
You SHALL run awa check after merge if code markers were rewritten.
You SHALL review merged file content for coherence and size limits.
You SHALL use --renumber when clean sequential IDs are requested.
You SHALL NOT merge a code into itself.
You SHALL NOT proceed if --dry-run reveals unexpected stale references.
You SHALL update user-facing documentation when the merge changes public features, CLI, or configuration.
You SHALL clarify open points with user.
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.