Skip to content

Layout boilerplate must be toolchain-injected, not hand-written in every prompt #37

Description

@omridevk

Problem

73 module prompts hand-write a "Where this code lives" section (workspace layout, crate subdirectory, touch-nothing-outside, run cargo test from root). This is pure boilerplate derivable from module name + frontmatter targets + project config. Duplicating it corpus-wide means any layout change silently invalidates every prompt at once, and moved modules drift out of sync with their own docs.

Direction

  • Gen assembles the layout preamble at prompt-composition time (cmd_gen_io) from frontmatter + a single project-level layout config; the agent still receives full instructions, but prompts stop declaring them.
  • Mechanical sweep deletes the hand-written sections from all 73 prompts, via the sanctioned-migration mechanism (same class as Tests-removal implementation (::: test directives) #13's 100-percent-or-triaged discipline) since it touches every prompt hash.
  • napl lint (napl fmt and napl lint prompt-only features #29) gains a rule rejecting hand-written layout sections so they cannot reappear.

Acceptance criteria

  • No .napl prompt in src/ contains a hand-written layout/location section.
  • Gen output is byte-identical before/after for an unchanged module (preamble injection reproduces the same effective instructions).
  • Lint rule enforces the ban.

Sequenced after the store rewrite (#30); pairs with #29 and the #13 migration machinery.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:p3Later work or needs redesign

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions