Skip to content

Clean up template files during/after Simone init #81

@Helmi

Description

@Helmi

Description

The init_simone command currently copies template files (architecture.md.template, constitution.md.template, project.yaml.template) to create the actual configuration files, but leaves the template files behind. This creates unnecessary clutter in the .simone/ directory.

Context

  • Project area: MCP Server implementation
  • Complexity: 4/10 (moderate)
  • Current behavior: Templates are copied to create actual files, templates remain in place
  • Expected behavior: Templates should be moved/renamed instead of copied, or cleaned up after use

Technical Details

Affected files:

  • /mcp-server/src/templates/prompts/init_simone.yaml:55-57, 106-108, 130-132 - Template copy logic
  • /hello-simone/install-mcp.js:167-219 - Initial template download (working correctly)
  • Template files location: /mcp-server/templates/*.template

Requirements

  1. For new projects: When init_simone creates configuration files from templates, it should move/rename the templates instead of copying them
  2. For existing projects: When running init_simone on a project that already has both the real files and templates:
    • Detect the presence of both files
    • Ask the user if they want to clean up the template files
    • Remove templates if user confirms

Implementation Steps

  • Update init_simone.yaml prompt to use move/rename operations instead of copy
  • Add logic to detect leftover template files in existing projects
  • Implement user confirmation prompt for template cleanup
  • Test with both new project initialization and existing project updates
  • Update any related documentation if needed

Acceptance Criteria

  • Running init_simone on a new project results in no .template files remaining after completion
  • Running init_simone on an existing project with leftover templates prompts for cleanup
  • User can choose to keep or remove template files when prompted
  • The hello-simone installer continues to download templates as before
  • All tests pass and no regressions are introduced

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions