Archived completed OpenSpec change after successful deployment. The template path fix has been applied to specs and is now in production. Change archived as: 2026-01-12-fix-coverletter-template-path Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
13 KiB
Implementation Tasks: Archive Applications
Overview
This document outlines the ordered list of tasks to implement the application archiving feature. Tasks are designed to deliver user-visible progress incrementally with validation at each step.
Task Sequence
Task 1: Create Archive Application Command File
Description: Create the main command implementation file with complete procedural instructions for Claude Code.
Actions:
- Create file:
src/.claude/commands/archive-application.md - Follow pattern from
write-cover-letter.mdandwrite-application-email.md - Include complete implementation logic in markdown format:
- Command purpose and overview
- Argument parsing (reason, application-name, flags)
- Location detection (auto-detect vs. explicit name)
- Safety checks for generated documents
- Status field update logic
- Directory creation
- File move operation
- Error handling for all scenarios
- Success messaging
Validation:
- File exists and follows command pattern
- All scenarios from proposal are covered
- Error handling is comprehensive
- Help documentation is clear
Deliverable: src/.claude/commands/archive-application.md (~500-700 lines)
Dependencies: None
Task 2: Update Framework Documentation
Description: Update CLAUDE.md to include archiving in the framework workflow.
Actions:
- Add new section "Archiving Applications" after "Application Management" section
- Include:
- When to archive applications
- Command syntax and examples
- Safety check explanation
- Archive folder structure
- Integration with workflow
- Update "Available Commands" list with
/archive-application - Add archiving to workflow examples
Validation:
- New section is clear and comprehensive
- Commands list includes archive command
- Examples are helpful and accurate
- Integration with existing workflow is explained
Deliverable: Updated src/CLAUDE.md (~40 lines added)
Dependencies: Task 1 (understand command functionality)
Task 3: Create Application Archiving Specification
Description: Create formal OpenSpec specification for the archiving feature.
Actions:
- Create directory:
openspec/specs/application-archiving/ - Create file:
openspec/specs/application-archiving/spec.md - Include requirements with scenarios for:
- Application Archiving Command
- Safety Warnings for Generated Documents
- Status and Timestamp Tracking
- Archive Folder Structure
- Follow OpenSpec format:
## Requirements→### Requirement:→#### Scenario:
Validation:
- All proposal behaviors are captured as requirements
- Each requirement has clear scenarios
- Scenarios follow WHEN/THEN/AND format
- Spec validates with
openspec validate archive-applications
Deliverable: openspec/specs/application-archiving/spec.md (~150-200 lines)
Dependencies: Task 1 (understand implementation details)
Task 4: Update Application Management Specification
Description: Update existing spec to document application lifecycle including archival.
Actions:
- Open:
openspec/specs/application-management/spec.md - Add new requirement: "Application Lifecycle Management"
- Include scenarios for:
- Application states (Draft, Rejected, Not Interested)
- Folder organization by state (pending/, rejected/, not-interested/)
- Status field tracking through lifecycle
Validation:
- Lifecycle states are clearly defined
- Folder organization is documented
- Integration with existing requirements is clear
- Spec validates with
openspec validate
Deliverable: Updated openspec/specs/application-management/spec.md (~30 lines added)
Dependencies: Task 3 (understand new archiving spec)
Task 5: Verify Template Status Field
Description: Verify that the application template has the Status field required for archiving.
Actions:
- Open:
src/.claude/templates/application-template.md - Verify line 12 contains:
- **Status**: Draft - Verify Status field is in Metadata section
- Document finding (no changes needed if field exists)
Validation:
- Status field exists at line 12
- Field is in correct format:
- **Status**: Draft - Field is within Metadata section
- No changes needed (field already present)
Deliverable: Verification confirmation (no file changes)
Dependencies: None (verification task)
Task 6: Create Archive Folders (Test Setup)
Description: Create initial archive folder structure for testing purposes.
Actions:
- Create directory:
src/applications/rejected/ - Create directory:
src/applications/not-interested/ - Add
.gitkeepfiles to preserve empty directories in version control
Validation:
src/applications/rejected/existssrc/applications/not-interested/exists- Both directories are tracked in git
- Directories are ready for archiving operations
Deliverable: Archive folder structure
Dependencies: None
Note: These folders will be created on-demand by the command, but creating them upfront ensures they're tracked in version control.
Task 7: Manual Testing - Basic Archiving
Description: Test basic archiving functionality with simple application.
Test Cases:
- Create test application:
/new-application "TestCo - Test Role" - Navigate to application folder
- Run:
/archive-application rejected - Verify:
- Application moved to
applications/rejected/ - Status field updated with timestamp
- All files preserved (application.md, input/, attachments/)
- Application moved to
Validation:
- Application successfully moved
- Status field shows:
Rejected (Archived: [timestamp]) - All folders and files intact
- Success message shows correct details
Deliverable: Test results documentation
Dependencies: Tasks 1-2 (command implementation and docs)
Task 8: Manual Testing - Safety Checks
Description: Test safety warning functionality with generated documents.
Test Cases:
- Create test application with cover letter and email
- Run:
/archive-application rejected(without --force) - Verify warning message appears
- Verify archiving is blocked
- Run:
/archive-application rejected --force - Verify archiving proceeds
Validation:
- Warning appears when documents detected
- Warning lists all generated documents
- Archiving stops without --force
- --force flag bypasses warning
- Documents are preserved in archive
Deliverable: Test results documentation
Dependencies: Task 7 (basic functionality working)
Task 9: Manual Testing - Error Handling
Description: Test error scenarios and messages.
Test Cases:
- Invalid reason:
/archive-application accepted - Application not found:
/archive-application rejected NonExistent - Not in application folder: Run from root without parameter
- Already archived: Try to archive same application twice
Validation:
- Invalid reason shows correct error with valid options
- Not found shows available applications
- Wrong location shows usage guidance
- Already archived shows helpful message
- All error messages are clear and actionable
Deliverable: Test results documentation
Dependencies: Task 7 (basic functionality working)
Task 10: Manual Testing - Auto-Detection
Description: Test automatic application detection from current directory.
Test Cases:
- Create test application
- Navigate INTO application folder:
cd applications/pending/[folder]/ - Run:
/archive-application not-interested(no app name) - Verify correct application is detected and archived
Validation:
- Auto-detection identifies correct application
- Archiving proceeds without application name parameter
- Success message shows detected application name
- Application moved to correct archive folder
Deliverable: Test results documentation
Dependencies: Task 7 (basic functionality working)
Task 11: OpenSpec Validation
Description: Validate all OpenSpec specifications are correctly formatted.
Actions:
- Run:
openspec validate archive-applications --strict - Resolve any validation errors
- Run:
openspec validate(validate entire project) - Ensure all specs pass validation
Validation:
openspec validate archive-applications --strictpasses- No formatting errors in proposal.md
- No formatting errors in spec files
- All requirements have at least one scenario
Deliverable: Clean validation results
Dependencies: Tasks 3-4 (all specs created)
Task 12: Documentation Review
Description: Review all documentation for clarity, completeness, and accuracy.
Actions:
- Review
proposal.mdfor completeness - Review
tasks.mdfor task ordering and clarity - Review
archive-application.mdcommand for user-friendliness - Review
CLAUDE.mdupdates for integration with existing docs - Review spec files for requirement coverage
Validation:
- All documents are clear and well-organized
- No ambiguous or confusing sections
- Examples are helpful and accurate
- Error messages are user-friendly
- Integration with existing workflow is seamless
Deliverable: Documentation review notes
Dependencies: Tasks 1-4 (all documentation created)
Task 13: Final Integration Check
Description: Verify archiving integrates smoothly with existing application workflow.
Test Workflow:
- Create complete application:
/new-application "FinalTest - Role" - Populate:
/populate-application(with documents in input/) - Validate:
/validate-application - Generate cover letter:
/write-cover-letter - Generate email:
/write-application-email - Archive:
/archive-application rejected
Validation:
- All commands work in sequence
- Safety warning appears (cover letter and email detected)
- --force flag allows archiving
- All generated documents preserved in archive
- Workflow feels natural and intuitive
Deliverable: End-to-end workflow validation
Dependencies: All previous tasks (complete implementation)
Task Summary
| Task | Description | Priority | Est. Time | Dependencies |
|---|---|---|---|---|
| 1 | Create archive command file | P1 | 60 min | None |
| 2 | Update framework docs | P1 | 20 min | Task 1 |
| 3 | Create archiving spec | P1 | 30 min | Task 1 |
| 4 | Update management spec | P1 | 15 min | Task 3 |
| 5 | Verify template status field | P2 | 5 min | None |
| 6 | Create archive folders | P2 | 5 min | None |
| 7 | Test basic archiving | P1 | 15 min | Tasks 1-2 |
| 8 | Test safety checks | P1 | 15 min | Task 7 |
| 9 | Test error handling | P1 | 15 min | Task 7 |
| 10 | Test auto-detection | P2 | 10 min | Task 7 |
| 11 | OpenSpec validation | P1 | 10 min | Tasks 3-4 |
| 12 | Documentation review | P2 | 20 min | Tasks 1-4 |
| 13 | Final integration check | P1 | 20 min | All tasks |
Total Estimated Time: ~4 hours
Parallelization Opportunities
Tasks that can be done in parallel:
- Tasks 1, 5, 6 (independent)
- Tasks 3, 4 (both specs, can work simultaneously)
- Tasks 8, 9, 10 (all testing, can run concurrently)
Critical path: Task 1 → Task 2 → Task 7 → Tasks 8-10 → Task 13
Validation Checklist
After all tasks complete, verify:
/archive-applicationcommand works from within application folder/archive-applicationcommand works with application name parameter- Safety warnings appear when documents exist
--forceflag bypasses warnings- Status field is updated with correct timestamp
- Applications move to correct archive folder
- All files and folders are preserved
- Error messages are clear and helpful
- OpenSpec validation passes
- Documentation is complete and accurate
- Integration with existing workflow is seamless
Rollback Plan
If issues arise during implementation:
- Command not working: Comment out command file, revert CLAUDE.md changes
- Spec validation fails: Fix spec formatting issues, re-validate
- File corruption: Archive operations preserve originals, can restore from archive
- Integration issues: Archive feature is additive, can be disabled without affecting other commands
Success Criteria
Implementation is complete when:
- All tasks have passing validation
- OpenSpec validation passes with
--strictflag - All test scenarios pass
- Documentation is clear and complete
- Feature integrates smoothly with existing workflow
- No breaking changes to existing functionality
Status: Task list ready for implementation Total Tasks: 13 Estimated Time: ~4 hours Priority Distribution: 9 P1, 4 P2