Files
Bewerbungszauberer/openspec/changes/archive-applications/tasks.md
T
gurixandClaude Sonnet 4.5 c91999d78c chore: archive fix-coverletter-template-path change
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>
2026-01-12 21:51:51 +01:00

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:

  1. Create file: src/.claude/commands/archive-application.md
  2. Follow pattern from write-cover-letter.md and write-application-email.md
  3. 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:

  1. Add new section "Archiving Applications" after "Application Management" section
  2. Include:
    • When to archive applications
    • Command syntax and examples
    • Safety check explanation
    • Archive folder structure
    • Integration with workflow
  3. Update "Available Commands" list with /archive-application
  4. 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:

  1. Create directory: openspec/specs/application-archiving/
  2. Create file: openspec/specs/application-archiving/spec.md
  3. Include requirements with scenarios for:
    • Application Archiving Command
    • Safety Warnings for Generated Documents
    • Status and Timestamp Tracking
    • Archive Folder Structure
  4. 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:

  1. Open: openspec/specs/application-management/spec.md
  2. Add new requirement: "Application Lifecycle Management"
  3. 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:

  1. Open: src/.claude/templates/application-template.md
  2. Verify line 12 contains: - **Status**: Draft
  3. Verify Status field is in Metadata section
  4. 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:

  1. Create directory: src/applications/rejected/
  2. Create directory: src/applications/not-interested/
  3. Add .gitkeep files to preserve empty directories in version control

Validation:

  • src/applications/rejected/ exists
  • src/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:

  1. Create test application: /new-application "TestCo - Test Role"
  2. Navigate to application folder
  3. Run: /archive-application rejected
  4. Verify:
    • Application moved to applications/rejected/
    • Status field updated with timestamp
    • All files preserved (application.md, input/, attachments/)

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:

  1. Create test application with cover letter and email
  2. Run: /archive-application rejected (without --force)
  3. Verify warning message appears
  4. Verify archiving is blocked
  5. Run: /archive-application rejected --force
  6. 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:

  1. Invalid reason: /archive-application accepted
  2. Application not found: /archive-application rejected NonExistent
  3. Not in application folder: Run from root without parameter
  4. 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:

  1. Create test application
  2. Navigate INTO application folder: cd applications/pending/[folder]/
  3. Run: /archive-application not-interested (no app name)
  4. 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:

  1. Run: openspec validate archive-applications --strict
  2. Resolve any validation errors
  3. Run: openspec validate (validate entire project)
  4. Ensure all specs pass validation

Validation:

  • openspec validate archive-applications --strict passes
  • 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:

  1. Review proposal.md for completeness
  2. Review tasks.md for task ordering and clarity
  3. Review archive-application.md command for user-friendliness
  4. Review CLAUDE.md updates for integration with existing docs
  5. 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:

  1. Create complete application: /new-application "FinalTest - Role"
  2. Populate: /populate-application (with documents in input/)
  3. Validate: /validate-application
  4. Generate cover letter: /write-cover-letter
  5. Generate email: /write-application-email
  6. 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-application command works from within application folder
  • /archive-application command works with application name parameter
  • Safety warnings appear when documents exist
  • --force flag 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:

  1. Command not working: Comment out command file, revert CLAUDE.md changes
  2. Spec validation fails: Fix spec formatting issues, re-validate
  3. File corruption: Archive operations preserve originals, can restore from archive
  4. Integration issues: Archive feature is additive, can be disabled without affecting other commands

Success Criteria

Implementation is complete when:

  1. All tasks have passing validation
  2. OpenSpec validation passes with --strict flag
  3. All test scenarios pass
  4. Documentation is clear and complete
  5. Feature integrates smoothly with existing workflow
  6. 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