Principle-hierarchy agent constitution builder

Compile scattered commands into a prioritized agent constitution with rationales, counterexamples, tests, and rollback so unseen edge cases are resolved by principles rather than guesswork.

Prompt
Act as an agent-governance constitution compiler. Turn the scattered system instructions, project rules, and working preferences I provide into a testable, traceable, and reversible constitution. Never weaken safety, legal, privacy, permission, or production controls merely to make the result shorter. Inputs: - Current instructions: {verbatim text, source file or location, scope, owner, and last-modified time} - Agent mission and users: {jobs, audience, and success criteria} - Non-negotiable boundaries: {safety, legal, privacy, permission, data, and production rules} - Adaptive behavior preferences: {tone, length, initiative, tool choices, and delivery format} - Common jobs and unseen edge cases: {representative work, exceptions, and conflicts} - Real run evidence: {successes, failures, user corrections, incidents, and tests; mark missing evidence unverified} - Change control: {version owner, approver, test budget, and recovery location} Follow this process: 1. Build a traceable ledger. Record each instruction's text, source, owner, trigger scope, dependencies, latest evidence, and semantic overlap. Do not describe unread files, unrun tests, or guesses as facts. 2. Separate four layers: A, non-negotiable safety, legal, privacy, permission, and production guardrails; B, mission principles explaining why the agent exists and what outcomes it protects; C, behavioral guidance that may adapt to the task; and D, preferences such as tone or formatting. Never demote a guardrail into guidance or disguise a preference as a safety rule. 3. Derive principles from commands. For every layer B or C command, state the user outcome it protects, conditions where it applies, conditions where it stops applying, and an observable signal. Merge rules only when evidence supports equivalence. Keep layer A explicit, enforceable, and outside flexible interpretation. 4. Define what the agent is not. List three to seven likely failure identities or behaviors, such as an unsupported agreeer, an unauthorized executor, an evidence fabricator, or a judge that treats preference as fact. Pair every negative identity with an observable replacement behavior instead of a slogan. 5. Establish precedence. Resolve conflicts in this order: law and safety; permission and explicit authorization; truth and privacy; user goals and acceptance criteria; task guidance; expression preferences. When same-layer rules conflict, stop the affected action, show the conflict and evidence gap, and request a decision from the owner of that scope. Never silently choose the more convenient rule. 6. Test edge cases. Write at least five representative cases and three counterexamples with input, triggered rule, expected behavior, prohibited behavior, and pass criteria. Cover missing information, rule conflict, external writes, failure recovery, and a changed user request. 7. Control changes. Assign the constitution a version, owner, reason for change, test result, and previous recoverable version. Return a draft and semantic diff before any overwrite. High-risk changes require the named approval and an isolated test. 8. Final audit. Confirm that every guardrail remains, principles have evidence, guidance has applicability conditions, preferences yield to higher layers, unknowns are labeled, and no credentials or personal data were copied into the output. Return exactly: A. Executive summary; B. Instruction-source ledger; C. Four-layer constitution; D. Negative identities and replacement behaviors; E. Conflict precedence; F. Edge-case and counterexample tests; G. Version, approval, and rollback plan; H. Semantic diff from current instructions; I. Unverified items.

Inspiration source

This prompt is an original adaptation. The source X post appears below, and you can also open it directly on X.

The page loads the X embed automatically, which may share your IP address and browser information with X.

Open original on X

Loading the X post…

Editor's note

Use this when an agent has accumulated rules but still lacks a defensible way to resolve new cases. Supply original rules, real failures, and named owners; treat the result as a draft for isolated testing, not a direct production overwrite.

About this prompt

Ideal for planning, meetings, and decisions when you want to turn messy input into a clear, actionable output.

How to use this prompt

  1. 1

    Copy the prompt

    Click Copy prompt to grab the full text, ready to paste anywhere.

  2. 2

    Paste into your AI tool

    Drop it into ChatGPT, Claude, Gemini, or any AI assistant you use.

  3. 3

    Customize and run

    Fill in your context, goals, and constraints, then send it to get an organized plan or recommendation.

Frequently asked questions

What is the Principle-hierarchy agent constitution builder prompt for?

Compile scattered commands into a prioritized agent constitution with rationales, counterexamples, tests, and rollback so unseen edge cases are resolved by principles rather than guesswork.

How do I use this prompt with ChatGPT or other AI tools?

Copy the prompt, paste it into your AI assistant, replace any placeholders with your own details, and send it. You can also open it in the card maker to restyle and share it.

Is this prompt free to copy and customize?

Yes. Every prompt in the library is free to copy, adapt, and reuse, with no account required.

More prompts from the Productivity collection.

Productivity

Instruction half-life portfolio auditor

Classify system, project, and Skill instructions as patches, transferable methods, or private identity context, then use reversible tests to keep, defer, or archive them.

context-engineeringprompt-maintenance
Featured
Productivity

Ambiguity-to-task-spec refiner

Turn a half-formed idea into a reusable, deliverable task prompt through high-value questions, explicit assumptions, and acceptance tests.

prompt-designtask-spec
Featured
Productivity

Response style contract builder

Turn audience, information order, language level, length, and error-handling preferences into a reusable, testable AI response contract.

response stylecommunication