Skip to content

Feature request: Workflow for adding features to existing large codebases (50K+ LOC) #66

@developerisnow

Description

@developerisnow

Context

After digging into the codebase, I found that CodeMachine already has some building blocks for this use case. This issue is now more of a discussion/clarification request than a pure feature request.

Use Case

Adding medium-sized features (3-10K LOC) to existing large codebases (50K+ LOC)

This is different from:

  • Generating new projects from scratch (what codemachine-one optimizes for)
  • Small bug fixes
  • Complete rewrites/refactoring

What I Found in the Codebase

✅ Already Exists:

  1. Context Manager Agent (05-context-manager-agent.md) already does:

    • Phase 0: Project Reconnaissance (ls -R based ground-truth mapping)
    • Phase 1: Reads 2-4 most critical existing source files
    • Phase 2: Generates .codemachine/prompts/context.md with file summaries, recommendations, tips
  2. Controller workflows support track-based selection - could theoretically do:

export default {
  controller: true,
  tracks: {
    question: 'New project or add feature?',
    options: {
      new: { label: 'Full Generation' },
      feature: { label: 'Add to Existing' },
    },
  },
  steps: [
    // Skip heavy planning for feature addition
    resolveStep('principal-analyst', { tracks: ['new'] }),
    resolveStep('blueprint-orchestrator', { tracks: ['new'] }),
    resolveStep('context-manager'), // Both tracks
    resolveStep('code-generation'),
    resolveStep('git-commit'),
  ],
}
  1. Issue How to tweak workflow and resume codemachine ? #42 workaround: Manually add tasks to .codemachine/tasks/ and delete memory/behavior.json

❓ Questions Remaining:

  1. Is creating a custom feature-addition.workflow.js the recommended approach?
  2. Would you consider adding an official "lightweight" workflow template for this use case?
  3. Any tips for optimizing Context Manager for large (50K+ LOC) codebases - does it handle them well?

Related Issues

Thanks for the great tool! Just trying to understand the best path forward for this use case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions