# Prompt Rules How every future AI phase prompt must behave. ## Core Rules 1. **Never duplicate permanent instructions.** Do not paste [master-prompt.md](master-prompt.md), project principles, or entire architecture docs into a phase prompt. 2. **Only describe the current phase.** Objective, Scope, Out of Scope, modules/services touched, completion criteria, and phase-specific constraints. 3. **Always use the framework documents.** Instruct the agent to read and follow `docs/ai-framework/` plus architecture, ADRs, registries, and development standards. 4. **Reference, don’t rewrite.** Link to templates, gates, and manifests instead of redefining them. 5. **No silent scope expansion.** Out of Scope must be explicit; agents must not implement adjacent phases. 6. **No business logic in framework prompts.** Framework docs stay process-only; phase prompts carry feature intent. 7. **Completion stops the agent.** After gates pass and handover is done, stop — do not start the next phase unless asked. ## Required Phase Prompt Skeleton ```markdown # Phase Follow the permanent AI Development Framework: - docs/ai-framework/README.md - docs/ai-framework/master-prompt.md - docs/ai-framework/development-loop.md - docs/ai-framework/quality-gates.md - docs/ai-framework/cursor-guidelines.md - docs/ai-framework/prompt-rules.md Also read docs/README.md, architecture/*, ADRs, development/*, module-registry, glossary, phase-manifest.yaml, service-manifest.yaml, and this phase’s documents. ## Objective ... ## Scope ... ## Out of Scope ... ## Required Templates (list only those that apply: service/module/entity/repository/service-layer/api/event/testing/documentation) ## Completion Criteria - Development loop completed - Quality gates passed - Phase handover completed - Registries/manifests/progress/next-steps updated - Stop after this phase only ``` ## Forbidden Prompt Behaviors - Re-stating Database-per-Service, tenancy, or FE/BE rules in full (link instead) - Asking to “also quickly do” the next phase - Allowing TODO leftovers for claimed work - Instructing agents to bypass quality gates - Overwriting accepted ADRs ## When to Extend the Framework If a permanent rule is missing, update `docs/ai-framework/` (and ADR if architectural) in a dedicated docs change — do not bury permanent rules inside a single phase prompt. ## Related Documents - [Master Prompt](master-prompt.md) - [Cursor Guidelines](cursor-guidelines.md) - [Phase Template](phase-template.md) - [docs/README.md](../README.md)