Skip to content

Inconsistent behaviour with "files_to_modify" from roadmap.json #23

@ivankg

Description

@ivankg

Steps to Reproduce:

  1. Create a roadmap.json with a step that includes files_to_modify, e.g. step 01-01 listing specific adapter/use-case files
  2. Run /nw:execute @nw-software-crafter "app_name" "01-01"
  3. Observe the agent's behavior — it does not create or modify the files listed in files_to_modify
  4. The agent creates whatever files TDD demands, with no awareness of the planned file list

Expected Behavior: The software crafter should receive the files_to_modify list and use it as both implementation guidance (which files to create/modify) and a boundary constraint (don't touch files outside this list).

Root Cause Analysis:

The disconnect is in /nw:execute command (commands/execute.md):

  1. TASK_CONTEXT template (line 67) extracts these fields from the roadmap step:

    name|description|acceptance_criteria|test_file|scenario_name|quality_gates|
    implementation_notes|dependencies|estimated_hours|deliverables
    

    files_to_modify is NOT in this list — it's never extracted or passed to the agent.

  2. BOUNDARY_RULES (line 142) says:

    - Only modify files listed in step's files_to_modify
    

    This rule references files_to_modify, but the agent never receives this data in its prompt context.

  3. Result: The agent gets a boundary rule it cannot enforce because the data it references was never provided. The agent proceeds with pure TDD, creating files organically based on test demands.

Suggested Fix:

Add files_to_modify to the TASK_CONTEXT extraction list in commands/execute.md, line 67:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions