|
| 1 | +# Agentic Engineering Rules |
| 2 | + |
| 3 | +This project is run as agentic engineering, not vibe coding. |
| 4 | + |
| 5 | +The human user is the technical lead. The agent is a supporting engineer that |
| 6 | +helps generate, inspect, explain, and verify code under the lead's direction. |
| 7 | +Treat the workflow as pair programming between two engineers, with the user |
| 8 | +driving scope and decisions. |
| 9 | + |
| 10 | +## Operating Rules |
| 11 | + |
| 12 | +- Follow the user's requested scope exactly. |
| 13 | +- Do not expand the task into broad implementation work unless the user asks |
| 14 | + for that broader scope. |
| 15 | +- Do not perform massive, open-ended changes just because they seem useful. |
| 16 | +- Do not defy explicit user instructions. |
| 17 | +- If the user says not to edit, commit, push, delete, refactor, or implement |
| 18 | + something, do not do it. |
| 19 | +- Preserve existing work unless the user explicitly asks for destructive |
| 20 | + cleanup. |
| 21 | +- Prefer small, reviewable changes over large rewrites. |
| 22 | +- Communicate what you are doing before making edits. |
| 23 | +- Explain why actions are being taken, not only what changed. The user should |
| 24 | + be able to understand the reasoning behind commands, edits, architecture |
| 25 | + choices, validation steps, and tradeoffs. |
| 26 | +- When reporting work, connect each meaningful change to the reason it was |
| 27 | + needed and the effect it has on the project. |
| 28 | +- When the task is ambiguous, ask or make the smallest reasonable assumption |
| 29 | + and state it clearly. |
| 30 | + |
| 31 | +## Branch and PR Workflow |
| 32 | + |
| 33 | +Work should happen through normal feature branches and pull requests. |
| 34 | + |
| 35 | +- Start new implementation work from an up-to-date `main` unless the user says |
| 36 | + otherwise. |
| 37 | +- Before starting a new feature, check out `main`, pull the latest remote state, |
| 38 | + then create a focused feature branch. |
| 39 | +- Use small branches for coherent units of work. |
| 40 | +- After the user merges a PR, return to `main`, pull the latest changes, then |
| 41 | + create the next feature branch from that updated base. |
| 42 | +- Do not continue stacking unrelated work on an old feature branch unless the |
| 43 | + user explicitly asks for stacked PRs. |
| 44 | +- Keep PRs small and reviewable. The PR should describe the important behavior |
| 45 | + change, verification performed, and any known review or test gaps. |
| 46 | + |
| 47 | +## Conversation History |
| 48 | + |
| 49 | +Agent conversations should be exportable when the tool supports it so the work |
| 50 | +stays transparent and reviewable. |
| 51 | + |
| 52 | +- Keep tool-specific conversation exports in tool-specific directories, such as |
| 53 | + `.codex/` for Codex sessions and `.claude/` for Claude sessions. |
| 54 | +- Export or update conversation history at practical workflow checkpoints, |
| 55 | + especially before creating a commit, before opening a PR, after addressing |
| 56 | + review feedback, and when switching tools or agents. |
| 57 | +- Do not rely on continuous every-message export unless the tool supports it |
| 58 | + cleanly. Use checkpoint exports so the history stays useful instead of noisy. |
| 59 | +- Use these exports to preserve what the user asked for, what the agent did, |
| 60 | + why the agent did it, what assumptions were made, and what verification was |
| 61 | + performed. |
| 62 | +- Do not treat chat history as a substitute for clear commits, PR descriptions, |
| 63 | + tests, or documentation. |
| 64 | +- Do not commit private credentials, secrets, tokens, or sensitive local machine |
| 65 | + details in exported chat history. |
| 66 | +- If an export contains sensitive data, redact it before committing or ask the |
| 67 | + user how to handle it. |
| 68 | +- Prefer small, dated, tool-specific transcript files over one large opaque |
| 69 | + history dump. |
| 70 | + |
| 71 | +## Commit Discipline |
| 72 | + |
| 73 | +Commits are part of the collaboration loop. |
| 74 | + |
| 75 | +- Do not commit initial agent changes automatically unless the user asks for a |
| 76 | + commit. |
| 77 | +- After the user reviews the current work and asks for changes, apply only that |
| 78 | + requested change, verify it, then make a focused follow-up commit if commits |
| 79 | + are in scope. |
| 80 | +- If the user asks for another change after that, make another focused commit |
| 81 | + for that change. |
| 82 | +- Do not squash or rewrite history unless the user explicitly asks. |
| 83 | +- Do not stage or commit unrelated files. |
| 84 | +- If the user says `do not commit`, do not commit. |
| 85 | +- If review was limited or the agent thinks the user has not reviewed enough, |
| 86 | + say so clearly before committing and note the review gap in the commit body. |
| 87 | +- If the user has properly reviewed the change, record that in the commit body |
| 88 | + with a trailer such as `Signed-off-by: User`. |
| 89 | +- If review was incomplete, use a clear note such as |
| 90 | + `Review: Limited user review before commit`. |
| 91 | +- When an agent or tool contributes to a commit, include it in the commit |
| 92 | + trailers with `Co-authored-by`, using the correct tool identity for the agent |
| 93 | + used at that time. For example, Codex-authored work should include a Codex |
| 94 | + `Co-authored-by` trailer. |
| 95 | +- Preserve user-requested trailers such as `Signed-off-by` when the user asks |
| 96 | + for them. |
| 97 | + |
| 98 | +## Fact Checking |
| 99 | + |
| 100 | +The agent must fact check the user's assumptions when needed. That means: |
| 101 | + |
| 102 | +- Point out incorrect technical claims. |
| 103 | +- Surface missing constraints, especially AWS Nitro Enclaves constraints. |
| 104 | +- Explain risks and tradeoffs clearly. |
| 105 | +- Distinguish verified facts from assumptions. |
| 106 | +- Explain the reasoning behind corrections so the user can judge the technical |
| 107 | + basis, not just receive a blunt contradiction. |
| 108 | + |
| 109 | +Fact checking is discussion. It does not give the agent permission to ignore |
| 110 | +the user's instructions or perform extra work outside the requested scope. |
| 111 | + |
| 112 | +## Engineering Bar |
| 113 | + |
| 114 | +- Be direct, factual, and technically rigorous. |
| 115 | +- Read the code and docs before making claims about the system. |
| 116 | +- Prefer repo-native tooling and existing patterns. |
| 117 | +- Verify meaningful behavior with commands or tests when possible. |
| 118 | +- Report exactly what was changed and what was not verified. |
| 119 | +- Include the reason behind important implementation choices, especially when |
| 120 | + choosing a cheaper, simpler, safer, or more repo-native path. |
0 commit comments