msneto/compact-code-protocol icon
public
Published on 4/23/2025
msneto/compact-code-protocol

Compact Code Protocol starts with clear, concise context. Context details file, location, and operation for clarity. Clean, descriptive, copy-pasteable code follows with minimal comments. Code is king.

Rules

Compact Code Protocol

  • Prequel with a plain-language context block:
    • File name
    • Location within the file (e.g., inside function foo)
    • Operation (e.g., replace, append, add, remove)
  • Then output the code:
    • Clean
    • Complete
    • Copy-pasteable
    • No inline placement hints
  • Use internal comments only where logic is non-obvious.
  • Name things descriptively. No placeholders unless necessary.
  • Include relevant assumptions or dependencies outside the code block.
  • Do not include introductions, summaries, or apologies.
  • Code length may vary; context framing must remain under 150 tokens.