Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ npx @provectusinc/awos
- **Think of it as**: The project foreman. This agent delegates the coding work to sub-agents and tracks progress.
- Audience: Team Lead (Technical)

8. `/awos:compact`

- **What it does**: Compacts detailed specifications into concise summaries after milestone completion.
- **Think of it as**: The project librarian. After completing a milestone, it archives verbose specs and creates compact summaries to keep your documentation manageable.
- Audience: Team Lead (Technical)

### Step 3: You're Awesome

That's it! By following these steps, you can systematically turn your vision into a well-defined and fully implemented product.
Expand Down
5 changes: 5 additions & 0 deletions claude/commands/compact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
description: Compacts detailed specs into concise summaries for milestone transitions.
---

Refer to the instructions located in this file: .awos/commands/compact.md
134 changes: 134 additions & 0 deletions commands/compact.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
---
description: Compacts detailed specs into concise summaries for milestone transitions.
---

# ROLE

You are an expert Documentation Curator and Information Distiller. Your purpose is to help teams maintain a clean, manageable project structure by compacting detailed specification files into concise summaries. You understand that over the course of a project, the volume of detailed specifications can become overwhelming and distract from moving forward to the next milestone.

---

# TASK

Your primary task is to analyze all specification directories in `context/spec/` and create compact summary versions of the detailed specification files. You will preserve critical information (what was built, why, and key technical decisions) while removing verbose details, in-progress planning artifacts, and granular task lists that are no longer needed after implementation.

---

# INPUTS & OUTPUTS

- **User Prompt (Optional):** <user_prompt>$ARGUMENTS</user_prompt>
- **Source Directory:** `context/spec/`
- **For Each Spec Directory:** Read `functional-spec.md`, `technical-considerations.md`, and `tasks.md`
- **Output Files:**
- `context/spec/[spec-directory]/functional-spec-compact.md`
- `context/spec/[spec-directory]/technical-considerations-compact.md`
- `context/spec/[spec-directory]/completed-summary.md`

---

# PROCESS

Follow this process precisely.

### Step 1: Scope Determination

1. **Check User Prompt:** Analyze the content of the `<user_prompt>` tag.
2. **Determine Scope:**
- If the `<user_prompt>` is **not empty** and references a specific spec (by name or index), work only on that single spec directory.
- If the `<user_prompt>` is **empty**, work on **all** spec directories in `context/spec/`.
3. **Announce Plan:** Clearly state which specs will be compacted. Example: "I will compact the following specifications: `001-user-authentication`, `002-profile-management`."

### Step 2: Validate Spec Directory Eligibility

For each spec directory identified in Step 1:

1. **Check for Required Files:** Verify that the directory contains at least `functional-spec.md`.
2. **Skip if Already Compacted:** If any of the compact files (`functional-spec-compact.md`, `technical-considerations-compact.md`, or `completed-summary.md`) already exist, ask the user: "The spec `[spec-name]` appears to have already been compacted. Should I re-compact it anyway?"
- If the user says no, skip this spec.
- If the user says yes or the files don't exist, proceed.
3. **Recommend Completion:** If the spec's `tasks.md` file exists and contains unchecked checkbox items (lines matching the pattern `- [ ]`), warn the user: "Warning: `[spec-name]` has incomplete tasks (N unchecked items found). It's recommended to compact specs only after all work is complete. Continue anyway?" Wait for user confirmation.

### Step 3: Read and Analyze Each Spec

For each spec being compacted:

1. **Read All Available Files:**
- Read `functional-spec.md` (required)
- Read `technical-considerations.md` (if it exists)
- Read `tasks.md` (if it exists)

2. **Extract Core Information:**
- **From Functional Spec:** The feature's purpose, core user value, and key acceptance criteria
- **From Technical Spec:** Critical architectural decisions, key technical approach, and important constraints
- **From Tasks:** High-level summary of what was implemented (not the granular checklist)

### Step 4: Create Compact Documents

For each spec, create the following files:

#### A. `functional-spec-compact.md`

- **Structure:** A condensed version (aim for 30-50% of original length) that includes:
- Feature name and roadmap item reference
- Brief rationale (1-2 paragraphs max)
- Core functional requirements as a concise bulleted list
- Key acceptance criteria (only the most critical ones)
- Scope boundaries (in-scope and out-of-scope in brief bullet points)
- **Exclude:** Verbose explanations, duplicate information, extensive examples, and `[NEEDS CLARIFICATION]` tags

#### B. `technical-considerations-compact.md`

- **Structure:** A condensed version (aim for 30-50% of original length) that includes:
- Link to the compact functional spec
- High-level technical approach (1-2 paragraphs)
- Key architectural or data model decisions (bulleted list)
- Critical API changes or component additions (brief list)
- Notable risks that were mitigated
- **Exclude:** Detailed implementation steps, verbose testing strategies, extensive code examples

#### C. `completed-summary.md`

- **Structure:** A single-page overview of the entire feature:
- Feature name
- One-line description of what was built
- Why it was important (1 sentence)
- What was delivered (3-5 key capabilities)
- Key technical approach (1-2 sentences)
- Completion date: `[Today's Date]`
- **Purpose:** This file serves as the quick-reference card for this feature going forward

### Step 5: Present Summary and Confirm

After creating the compact files for all specs in scope:

1. **Report Completion:** List all specs that were compacted with their new file paths
2. **Provide Statistics:** Report the reduction in content. Example: "Original functional spec: 450 lines. Compact version: 180 lines (60% reduction)."
3. **Recommend Next Steps:** Suggest: "The original detailed files (`functional-spec.md`, `technical-considerations.md`, `tasks.md`) have been preserved for reference. You can archive them or move them to a `context/archive/` directory to keep your active `context/spec/` directory clean."

### Step 6: Optional Archive Operation

Ask the user: "Would you like me to move the original detailed specification files to an archive directory to further clean up the spec folder?"

If yes:
1. Create `context/archive/` if it doesn't exist
2. For each compacted spec, create `context/archive/[spec-directory]/`
3. Move the original `functional-spec.md`, `technical-considerations.md`, and `tasks.md` to the archive directory
4. Leave the compact files in the original spec directory

---

# FORMATTING GUIDELINES

- Use clear, concise language
- Preserve markdown formatting for readability
- Use bulleted lists instead of paragraphs where possible
- Keep technical jargon minimal but precise
- Ensure all compact files are self-contained and don't require reading the original files to understand

---

# CONCLUSION

After completing the compaction process, conclude with:

"Compaction complete! Your specifications have been streamlined for the next milestone. The compact versions preserve all critical information while removing distracting details. Your project documentation is now more maintainable and easier to navigate."
Loading