|
| 1 | +<!-- as:rules --> |
| 2 | +Be concise and token-efficient. Give direct answers, minimal examples, and no extra background. |
| 3 | +No sycophantic openers or closing fluff. No emojis or em-dashes. |
| 4 | + |
| 5 | +These rules apply to every task in this project unless explicitly overridden. |
| 6 | +Bias: caution over speed on non-trivial work. Use judgment on trivial tasks. |
| 7 | +Use sub-agents to delegate tasks. |
| 8 | + |
| 9 | +## Rule 1 — Think Before Coding |
| 10 | +State assumptions explicitly. If uncertain, ask rather than guess. |
| 11 | +Present multiple interpretations when ambiguity exists. |
| 12 | +Push back when a simpler approach exists. |
| 13 | +Stop when confused. Name what's unclear. |
| 14 | + |
| 15 | +## Rule 2 — Simplicity First |
| 16 | +Minimum code that solves the problem. Nothing speculative. |
| 17 | +No features beyond what was asked. No abstractions for single-use code. |
| 18 | +Test: would a senior engineer say this is overcomplicated? If yes, simplify. |
| 19 | + |
| 20 | +## Rule 3 — Surgical Changes |
| 21 | +Touch only what you must. Clean up only your own mess. |
| 22 | +Don't "improve" adjacent code, comments, or formatting. |
| 23 | +Don't refactor what isn't broken. Match existing style. |
| 24 | + |
| 25 | +## Rule 4 — Goal-Driven Execution |
| 26 | +Define success criteria. Loop until verified. |
| 27 | +Don't follow steps. Define success and iterate. |
| 28 | +Strong success criteria let you loop independently. |
| 29 | + |
| 30 | +## Rule 5 — Use the model only for judgment calls |
| 31 | +Use me for: classification, drafting, summarization, extraction. |
| 32 | +Do NOT use me for: routing, retries, deterministic transforms. |
| 33 | +If code can answer, code answers. |
| 34 | + |
| 35 | +## Rule 6 — Token budgets are not advisory |
| 36 | +Per-task: 4,000 tokens. Per-session: 30,000 tokens. |
| 37 | +If approaching budget, summarize and start fresh. |
| 38 | +Surface the breach. Do not silently overrun. |
| 39 | + |
| 40 | +## Rule 7 — Surface conflicts, don't average them |
| 41 | +If two patterns contradict, pick one (more recent / more tested). |
| 42 | +Explain why. Flag the other for cleanup. |
| 43 | +Don't blend conflicting patterns. |
| 44 | + |
| 45 | +## Rule 8 — Read before you write |
| 46 | +Before adding code, read exports, immediate callers, shared utilities. |
| 47 | +"Looks orthogonal" is dangerous. If unsure why code is structured a way, ask. |
| 48 | + |
| 49 | +## Rule 9 — Tests verify intent, not just behavior |
| 50 | +Tests must encode WHY behavior matters, not just WHAT it does. |
| 51 | +A test that can't fail when business logic changes is wrong. |
| 52 | + |
| 53 | +## Rule 10 — Checkpoint after every significant step |
| 54 | +Summarize what was done, what's verified, what's left. |
| 55 | +Don't continue from a state you can't describe back. |
| 56 | +If you lose track, stop and restate. |
| 57 | + |
| 58 | +## Rule 11 — Match the codebase's conventions, even if you disagree |
| 59 | +Conformance > taste inside the codebase. |
| 60 | +If you genuinely think a convention is harmful, surface it. Don't fork silently. |
| 61 | + |
| 62 | +## Rule 12 — Fail loud |
| 63 | +"Completed" is wrong if anything was skipped silently. |
| 64 | +"Tests pass" is wrong if any were skipped. |
| 65 | +Default to surfacing uncertainty, not hiding it. |
| 66 | +<!-- /as:rules --> |
| 67 | + |
| 68 | +# LiteMapper repository instructions |
| 69 | + |
| 70 | +## Authority |
| 71 | + |
| 72 | +`SPECIFICATION.md` is the sole authoritative product contract. |
| 73 | + |
| 74 | +Read `SPECIFICATION.md` completely before planning, modifying code, or creating implementation documents. |
| 75 | + |
| 76 | +No other document may override `SPECIFICATION.md`. |
| 77 | + |
| 78 | +## Implementation scope |
| 79 | + |
| 80 | +Implement exactly one specification milestone per task unless the user explicitly authorizes a different scope. |
| 81 | + |
| 82 | +Do not begin a later milestone merely because the current milestone finishes early. |
| 83 | + |
| 84 | +Do not introduce: |
| 85 | + |
| 86 | +* undocumented public APIs; |
| 87 | +* deferred features; |
| 88 | +* runtime reflection; |
| 89 | +* runtime type scanning; |
| 90 | +* dynamic dispatch; |
| 91 | +* runtime code generation; |
| 92 | +* semantic behavior not defined by the specification. |
| 93 | + |
| 94 | +## Ambiguities and blockers |
| 95 | + |
| 96 | +If `SPECIFICATION.md` contains a normative ambiguity, contradiction, missing definition, or impossible requirement: |
| 97 | + |
| 98 | +1. record the issue in `DECISIONS.md` with exact section references, when that file exists; |
| 99 | +2. stop implementation; |
| 100 | +3. report the blocker; |
| 101 | +4. do not guess or implement competing alternatives. |
| 102 | + |
| 103 | +Non-semantic implementation choices may be recorded in `DECISIONS.md` without changing the specification. |
| 104 | + |
| 105 | +## Testing and validation |
| 106 | + |
| 107 | +Use MSTest with built-in assertions. |
| 108 | + |
| 109 | +Add failing tests before implementing each feature. |
| 110 | + |
| 111 | +Run focused tests while working and the complete required validation suite before declaring a milestone complete. |
| 112 | + |
| 113 | +Do not suppress diagnostics, weaken tests, or change expected behavior merely to make validation pass. |
| 114 | + |
| 115 | +Do not claim completion when a required command was skipped, failed, or could not be run. |
| 116 | + |
| 117 | +## Generated code |
| 118 | + |
| 119 | +Generated output must be deterministic. |
| 120 | + |
| 121 | +Capability detection must be based on compiler and compilation capabilities as defined by the specification, not assumptions derived solely from target-framework names. |
| 122 | + |
| 123 | +## Project documents |
| 124 | + |
| 125 | +When present, read these files before starting work: |
| 126 | + |
| 127 | +1. `IMPLEMENTATION_PLAN.md` |
| 128 | +2. `DECISIONS.md` |
| 129 | +3. `STATUS.md` |
| 130 | + |
| 131 | +`IMPLEMENTATION_PLAN.md` defines execution steps but cannot override the specification. |
| 132 | + |
| 133 | +`DECISIONS.md` records implementation decisions and unresolved proposals. Proposed semantic changes are not authoritative until explicitly approved and incorporated into `SPECIFICATION.md`. |
| 134 | + |
| 135 | +`STATUS.md` records current progress, validation evidence, blockers, and the next action. |
| 136 | + |
| 137 | +Keep these files current as required by the specification. |
| 138 | + |
| 139 | +## Updating this file |
| 140 | + |
| 141 | +You may add verified repository-specific operational guidance, including exact build, test, packaging, formatting, and benchmark commands. |
| 142 | + |
| 143 | +Do not remove, weaken, or reinterpret the user-authored normative rules in this file without explicit approval. |
0 commit comments