Agentic Project Governance
Bilingual Release v1.0.0

Agentic Project Governance

انسان‌ها و سیستم‌های AI متفاوت؛ یک درک مصوب از پروژه.

Different humans and AI systems. One approved project understanding.

فارسی + English Markdown + YAML Diagram runtime: Mermaid v11 Initial public release Light / Dark themeRelease: v1.0.0apg.opspro.ir
نسخه فارسی و English هر دو بر پایه یک Design Baseline مشترک ساخته شده‌اند. نام فایل‌ها، کد، Config، Tree و Mermaid عمداً انگلیسی نگه داشته شده‌اند تا قرارداد فنی بین دو زبان ثابت بماند.

حاکمیت پروژه برای همکاری انسان و عامل‌های هوش مصنوعی#

راهنما و مشخصات مخزن — نسخه v1.0.0#

وضعیت: نسخه عمومی اولیه
نام کاری مخزن: agentic-project-governance
نام کوتاه: APG
نسخه مشخصات: 1.0
نویسنده و نگهدارنده اولیه: احمد شیخی (Ahmad Sheikhi) — Senior DevOps Engineer
هدف: ایجاد یک ساختار روشن و مستقل از Vendor برای اینکه انسان‌ها و عامل‌های هوش مصنوعی بتوانند روی یک پروژه با قواعد، Context و روش اعتبارسنجی مشترک کار کنند.

APG در یک نگاه#

APG قرارداد مصوب حاکمیت پروژه است: یک چارچوب مستقل از Vendor و Repository-native که مشخص می‌کند منابع، قواعد، اختیار و Validation چگونه تعریف و Resolve شوند. APG روی پروژه اعمال می‌شود؛ خود پروژه، یک Agent یا یک سیستم اجرایی نیست.

APG یک Governance Contract و Standardization Framework است، نه یک استاندارد رسمی صنعت. این چارچوب روش اعلام و Resolve کردن Governance را استاندارد می‌کند، نه روش کار همه پروژه‌ها را.

مفهومنقش
APGقرارداد Canonical و Human-approved حاکمیت پروژه
AGENTS.md، CLAUDE.md، GEMINI.md و Copilot instructionsAdapter یا نقطه ورود Tool به همان قرارداد؛ هیچ‌کدام خود APG نیستند
.governance/manifest.yamlGovernance Index قابل‌خواندن توسط ماشین که محل Resolve شدن اطلاعات معتبر و قواعد را اعلام می‌کند
AI Agent، MCP Server و Prompt/System Instructionsتولیدکننده و/یا مصرف‌کننده، یا ابزار Runtime؛ منبع Governance Authority نیستند
Project Documentationحقیقت پروژه را در منبعی نگه می‌دارد که Manifest آن را معتبر اعلام کرده است
CI/CD و IAM/RBACکنترل‌ها را اجرا و Evidence تولید می‌کنند؛ APG جایگزین آن‌ها نیست
Project-management toolsکار را برنامه‌ریزی و پیگیری می‌کنند؛ APG جایگزین آن‌ها نیست

Manifest نه Agent است، نه MCP Server، Workflow Engine، Prompt، Database، سیستم اجرایی یا Infrastructure Inventory.

هسته کوچک APG چهار پرسش دارد:

1. What is authoritative?
2. Which rules apply here?
3. What is allowed?
4. What proves the result?

این هسته از Sources، Rules، Authority و Validation / Evidence تشکیل می‌شود و باید Explicit، Repeatable، Verifiable، Vendor-neutral، Human-approved و Repository-native بماند.

APG references existing authoritative project facts and owns the governance contract around them.

برای نمونه، یک پروژه می‌تواند docs/SDS.xlsx را برای Infrastructure Inventory، docs/architecture.md را برای Architecture، VERSION را برای Release Identity و .gitlab-ci.yml را برای Deployment Automation معتبر اعلام کند.

README.md:      PRD = srv-old
docs/SDS.xlsx:  PRD = srv-03

اگر Manifest فایل docs/SDS.xlsx را برای Infrastructure معتبر اعلام کرده باشد، همه مصرف‌کنندگان باید PRD = srv-03 را از همان فایل Resolve کنند. Manifest به حقیقت پروژه اشاره می‌کند؛ آن Inventory را کپی نمی‌کند.

Codex، Claude، Gemini و سایر سیستم‌های AI می‌توانند Discover، Propose، Generate، Consume و Validate کنند، اما خودشان Governance Authority نیستند. انسان یا سازوکار معتبر موجود در سازمان، واقعیت‌ها و تصمیم‌های Authority را Resolve و Approve می‌کند.

UNRESOLVED:
Production deployment authority is not defined.
Human or authoritative-source resolution required.

Approver نباید حدس زده شود. چرخه ساده عبارت است از:

Discover → Propose → Human / authoritative resolution
→ Approve → Record → Validate → Reuse

APG خروجی متنی یکسان از Toolهای مختلف نمی‌خواهد. با یک قرارداد مصوب مشترک، Fact، Source، Rule، Authority، Validation Requirement و Governance Decision باید یکسان Resolve شوند. بیان متفاوت پذیرفتنی است؛ تفسیر متناقض Governance نیست.

APG زمانی بیشترین ارزش را دارد که ابهام Governance ریسک عملیاتی ایجاد کند: کسب‌وکارهای متوسط و بزرگ، پروژه‌های چندتیمی، محیط‌های Production-critical یا Regulated، همکاری با Vendor بیرونی، مالکیت و مستندات پراکنده، یا استفاده از چند سیستم AI و Automation.

APG برای هر Repository لازم نیست. برای پروژه شخصی کوچک، Prototype، آزمایش موقت یا Repository ساده تک‌نفره، README.md یا AGENTS.md ممکن است کافی باشد. صرف استفاده از AI دلیل Adoption نیست.

APG به GitFlow، Jira، Kubernetes، GitHub، GitLab، Vendor خاص AI، SDS یا ساختار سازمانی خاصی نیاز ندارد.

APG should be introduced when the cost of ambiguity becomes higher than the cost of governance.

رفتن به نسخه English


1. APG چیست؟#

APG یک مدل هوش مصنوعی، Agent Runtime یا ابزار اجرای خودکار نیست.

APG یک قرارداد داخل Repository است. این قرارداد به انسان و AI توضیح می‌دهد:

خلاصه ایده:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

ابزار AI ممکن است عوض شود؛ قرارداد پروژه باید پایدار بماند.


1.1 مدل ذهنی ساده#

برای فهم APG این تشبیه کافی است:

جزء نقش
GOVERNANCE.md قانون اساسی پروژه
Project Sources / optional PROJECT.md منابع معتبر پروژه؛ PROJECT.md فقط در صورت نیاز
AGENTS.md نقطه ورود و Router
Policies قواعد و محدودیت‌های لازم‌الاجرا
Workflows روش استاندارد انجام کار
Context اطلاعات و دانش لازم برای فهم پروژه
Roles حدود مسئولیت هر نقش
Validation شواهدی که صحت نتیجه را ثابت می‌کند
Adapters لایه سازگاری با Codex، Claude، Gemini، Copilot و ابزارهای بعدی

نکته مهم این است که همه‌چیز داخل یک AGENTS.md بزرگ ریخته نشود.


1.2 APG چه مشکلی را حل می‌کند؟#

در پروژه‌های AI-assisted معمولاً این مشکلات دیده می‌شود:

APG برای همین موارد یک ساختار ثابت، قابل مرور و قابل نگهداری تعریف می‌کند.


1.3 چه کسانی می‌توانند از APG استفاده کنند؟#

APG فقط برای برنامه‌نویس یا DevOps نیست.

هر پروژه‌ای که قواعد، اطلاعات، مراحل تکرارشونده، مسئولیت، Approval و Validation داشته باشد می‌تواند از این مدل استفاده کند.

نمونه‌ها:

پروژه حتی لازم نیست کد داشته باشد.


2. مثال‌های کاربردی#

2.1 DevOps و Infrastructure Automation#

فرض کنید تیم شما Linux، Ansible، Docker، Kubernetes، CI/CD و Production را مدیریت می‌کند.

Agent ممکن است بتواند یک Playbook درست بنویسد، اما بدون Governance نمی‌داند:

ساختار نمونه:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Workflow نمونه:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

در این مدل، AI فقط Automation تولید نمی‌کند؛ روش درست کار در این پروژه را هم می‌فهمد.


2.2 Software Engineering#

در یک پروژه Software ممکن است Frontend، Backend، API، Test و Release هرکدام Rule متفاوت داشته باشند.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Root Governance می‌تواند بگوید:

Backend و Frontend می‌توانند Rule محلی خودشان را اضافه کنند، بدون اینکه Governance اصلی را دوباره بنویسند.


2.3 Human Resources#

در HR، مسئله اصلی Deployment نیست؛ Privacy، Fairness، معیارهای استخدام و مالک تصمیم نهایی مهم‌اند.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Governance می‌تواند روشن کند:


2.4 مهندسی صنایع و بهبود فرایند#

APG برای Process Improvement هم کاربرد دارد.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Workflow نمونه:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

APG در اینجا مشخص می‌کند:


2.5 Business Operations#

برای کارهایی مثل Purchasing، Vendor Onboarding، Approval، Escalation و Service Request هم می‌توان از همین ساختار استفاده کرد.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

مثلاً:


2.6 Data و Analytics#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

در این حوزه:

موضوع محل مناسب
تعریف KPI Context / Metric Definition
اختیار تغییر KPI Authority / Policy
روش تغییر Pipeline Workflow
اثبات صحت داده Validation

2.7 Research و Documentation#

حتی Repository بدون کد هم می‌تواند از APG استفاده کند.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Ruleهای نمونه:


3. کاربر جدید از کجا شروع کند؟#

برای شروع، کل Reference Repository را Copy نکنید.

یک پروژه مصرف‌کننده فقط Core موردنیاز APG را اضافه می‌کند و منابع معتبر موجود پروژه را از طریق Manifest معرفی می‌کند.

3.1 Minimal Core#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

PROJECT.md اختیاری است. Manifest باید Sourceهای معتبر موجود پروژه را Reference کند.

3.3 AGENTS.md#

این فایل Entry Point و Router است و Agent را به Governance، Manifest، Scoped Instructions و منابع معتبر مرتبط با Task هدایت می‌کند.

Optional Extensions: Workflows، Context helpers، Roles، Templates، Additional Policies و Profiles فقط در صورت نیاز اضافه می‌شوند.


4. اصول طراحی#

4.1 Repository منبع حقیقت است#

AI Tool باید Governance پروژه را مصرف کند، نه اینکه خودش منبع اصلی Ruleها باشد.

4.2 Governance با Prompt فرق دارد#

Rule پایدار باید داخل Repository باشد، نه در Chat History یا Prompt موقت.

4.3 هر نوع اطلاعات جای خودش را دارد#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;
نوع سؤال
Governance چه کسی اختیار دارد و چه Ruleی قابل نقض نیست؟
Project Definition این پروژه چیست؟
Policy چه محدودیتی اعمال می‌شود؟
Workflow کار چگونه انجام می‌شود؟
Context چه اطلاعاتی باید بدانیم؟
Role مسئولیت این نقش چیست؟
Task درخواست فعلی چیست؟
Validation چه Evidenceای نتیجه را معتبر می‌کند؟

4.4 Rule محلی می‌تواند دقیق‌تر باشد، نه ضعیف‌تر#

Child Rule می‌تواند Parent را تخصصی‌تر یا محدودتر کند.

اما نباید بدون سازوکار صریح، Security، Compliance یا Approval را ضعیف کند.

4.5 فقط Context مرتبط باید Load شود#

Agent نباید برای هر Task کل Repository Governance را بخواند.

4.6 Validation بدون Evidence معتبر نیست#

Agent نباید فقط با جمله «کار درست است» نتیجه را معتبر اعلام کند.


5. Prior Art و منشأ ایده‌ها#

APG ادعا نمی‌کند AGENTS.md، Hierarchical Instructions یا Agent Context را اختراع کرده است.

این پروژه روی ایده‌هایی بنا شده که در ابزارهای مختلف وجود دارند و آن‌ها را در یک ساختار Vendor-neutral کنار هم قرار می‌دهد.

OpenAI Codex#

منابع:

Anthropic Claude Code#

منبع:

GitHub Copilot#

منابع:

Gemini CLI#

منابع:

چیزی که APG اضافه می‌کند#

ترکیب زیر طراحی APG است:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

6. ساختار Reference Repository#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

7. قرارداد فایل‌های اصلی#

7.1 README.md#

صفحه معرفی عمومی پروژه است.

باید کوتاه و قابل فهم باشد و شامل این موارد باشد:

7.2 AGENTS.md#

Entry Point و Router است.

وظایف:

7.3 GOVERNANCE.md#

بالاترین سند Normative پروژه است.

شامل:

7.4 PROJECT.md#

PROJECT.md یک Project Source اختیاری است، نه یک Requirement عمومی APG.

اگر Sourceهای معتبر پروژه از قبل وجود دارند، Manifest باید همان Sourceها را Reference کند.


8. .governance/#

این Directory محل Canonical Governance است و به Vendor خاص وابسته نیست.

8.1 manifest.yaml#

یک Index کوچک Machine-readable است:

spec_version: "1.0"

governance:
  root: "GOVERNANCE.md"
  entry_adapter: "AGENTS.md"

project_sources:
  overview:
    - "README.md"

resolution:
  instruction_file: "AGENTS.md"
  inheritance: "root-to-leaf"
  source_strategy: "declared-authoritative-sources"
  context_strategy: "task-relevant-only"
  local_rules_may:
    - specialize
    - restrict
  local_rules_may_not:
    - silently_weaken_parent_policy
    - bypass_required_approval
    - bypass_security_controls
    - replace_authoritative_sources_without_governance_change

core:
  authority_policy: ".governance/policies/authority.md"
  validation_policy: ".governance/policies/validation.md"

extensions:
  policies: ".governance/policies"
  workflows: ".governance/workflows"
  context: ".governance/context"
  roles: ".governance/roles"
  templates: ".governance/templates"

validation:
  require_evidence: true
  allow_unvalidated_claims: false

Manifest جای Governance Markdown را نمی‌گیرد؛ فقط Structure را قابل بررسی می‌کند.


9. Policies#

Policy می‌گوید چه محدودیتی باید رعایت شود.

نمونه:

نمونه Change Class:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

10. Workflows#

Workflow می‌گوید کار با چه ترتیب استانداردی انجام شود.

Workflow Governance را Override نمی‌کند.

Default#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Implementation#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Review#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Handover#

حداقل باید مشخص کند:


11. Context#

Context شامل اطلاعات لازم برای فهم پروژه است، نه Rule.

نمونه:

اطلاعات متغیر مانند Current Release یا Active Migration باید تاریخ به‌روزرسانی داشته باشند.


12. Roles#

Role حدود مسئولیت را مشخص می‌کند.

Role قرار نیست یک Persona نمایشی بسازد.

Contributor#

Reviewer#

Operator#


13. Templates#

Templateها برای خروجی‌های تکراری استفاده می‌شوند.

Task#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Decision#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Report#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Handover#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

14. AGENTS.md سلسله‌مراتبی#

نمونه:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

برای Task داخل infrastructure/ansible/playbooks/:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

هر Child فقط Ruleهای مخصوص Scope خودش را نگه می‌دارد.


15. Rule Precedence#

APG بین Load Order و Authority تفاوت می‌گذارد.

ترتیب مفهومی:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

اصل مهم:

Rule نزدیک‌تر لزوماً Rule قدرتمندتر نیست.

یک Local Rule نمی‌تواند Approval یا Security Constraint بالاتر را حذف کند.


16. حل تعارض Ruleها#

در Conflict:

  1. Scope هر Rule مشخص شود؛
  2. Authority Level بررسی شود؛
  3. معلوم شود Specialization مجاز است یا نه؛
  4. Protected Constraint حفظ شود؛
  5. اگر ابهام Risk را تغییر می‌دهد، Agent باید متوقف شود و Guess نکند.

17. Context Resolution#

APG باید Context را مرحله‌ای Resolve کند:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

هدف این است که Agent فقط اطلاعات لازم برای Task فعلی را بگیرد.


18. Validation و Evidence#

این مفاهیم یکسان نیستند:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

مثال:

Statusهای پیشنهادی:

Status معنی
PASS Validation لازم انجام شده و موفق بوده است.
FAIL Validation انجام شده و شکست خورده است.
BLOCKED Dependency، Permission، Authority یا Input مانع ادامه است.
NO_CHANGE تغییری لازم یا انجام نشده است.
NOT_VALIDATED کار ممکن است انجام شده باشد، اما Evidence لازم وجود ندارد.

19. Human Authority#

APG باید مرز Analysis و Action را مشخص کند.

Classهای نمونه:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

نمونه:

authority:
  observe:
    default: allowed
  propose:
    default: allowed
  modify:
    default: task-scoped
  deploy:
    default: approval-required
  delete:
    default: approval-required
  publish:
    default: approval-required

این فقط Governance است؛ Enforcement واقعی همچنان باید در IAM، CI/CD، OS و Tool Runtime انجام شود.


20. Vendor Adapters#

Core باید مستقل از Tool باقی بماند.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Adapter فقط باید Tool را به Canonical Governance وصل کند.

نباید Policy را Duplicate یا Governance موازی ایجاد کند.


21. Profiles#

Profile مجموعه Defaultهای اختیاری برای یک Domain است.

v1.0:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

آینده:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Profile می‌تواند Policy، Workflow، Role و Template اضافه کند، اما Core Semantics را تغییر نمی‌دهد.


22. حداقل Adoption#

یک پروژه واقعی نباید کل Reference Repository را Copy کند.

حداقل شروع:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

هر Component فقط زمانی اضافه شود که مسئله واقعی حل کند.


23. Reference Repository در برابر پروژه واقعی#

Reference Repository شامل Specification، Example، Profile، Adapter و Tool است.

اما پروژه مصرف‌کننده فقط بخش‌های موردنیازش را استفاده می‌کند.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

هدف APG کم کردن ابهام است، نه زیاد کردن Documentation.


24. Multi-Domain Project#

یک Repository بزرگ می‌تواند چند Scope داشته باشد:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

هر Subtree Rule خودش را دارد و Governance ریشه را Inherit می‌کند.


25. Versioning#

مدل پیشنهادی:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

مثال:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

از 1.0.0 به بعد، هر Breaking Change در Core Semantics باید Major Version جدید داشته باشد.


26. Security#

Governance File محل Secret نیست.

این موارد نباید وارد فایل‌های Reusable شوند:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Governance فقط باید روش Secret Management را Reference کند.


27. Staleness#

همه اطلاعات طول عمر یکسان ندارند:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

اطلاعات متغیر باید Last Updated داشته باشند.


28. Authoring Rules#

Governance خوب باید:

Governance نباید:


29. Normative Keywords#

در Specification رسمی می‌توان از این واژه‌ها استفاده کرد:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

معنی دقیق آن‌ها باید در نسخه رسمی مشخص شود.


30. Governance Change#

Non-breaking#

Potentially Breaking#

Breaking Change نیاز به Specification Review دارد.


31. Decision Records#

تصمیم‌های معماری مهم باید ثبت شوند.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

ساختار پیشنهادی:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

32. تصمیم‌های اصلی v1.0#

D-001 — Vendor-neutral Core#

Core به یک Vendor وابسته نیست.

D-002 — Repository-native Contract#

Governance و دانش پایدار همراه Repository نگهداری می‌شوند.

D-003 — AGENTS.md Router است#

AGENTS.md محل Dump همه Ruleها و Contextها نیست.

D-004 — Separation of Concerns#

Policy، Workflow، Context، Role و Task از هم جدا هستند.

D-005 — Root-to-leaf Scoping#

Subtree می‌تواند Rule دقیق‌تر داشته باشد.

D-006 — Protected Constraints#

Rule محلی نمی‌تواند Security یا Approval بالاتر را مخفیانه ضعیف کند.

D-007 — Evidence-bound Validation#

Validation Claim بدون Evidence معتبر نیست.

D-008 — Minimal Consumption#

پروژه واقعی فقط Component لازم را استفاده می‌کند.

D-009 — Thin Adapters#

Adapter فقط Compatibility Layer است.

D-010 — No Runtime Dependency#

APG بدون نصب برنامه هم باید قابل فهم و قابل استفاده باشد.


33. Scope نسخه v1.0.0#

Included#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Deferred#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

34. Roadmap#

v1.0 — Initial Public Release#

Structure و Governance Semantics را مشخص می‌کند.

v1.1 — Validation and Adapters#

Validator، Schema Validation و Adapterها کامل‌تر می‌شوند.

v1.2 — Profiles#

Profileهای بیشتر برای Data، Security، HR، Research و Industrial Engineering.

v2.0 — Cross-Repository Governance#

Shared Policy Pack، Organization Inheritance و Version Pinning.

v1.0 — Stable Specification#

قبل از 1.0 بهتر است:


35. معیار موفقیت#

اگر یک انسان یا Agent جدید وارد Repository شود، باید بتواند بدون توضیح شفاهی نویسنده اولیه پاسخ این سؤال‌ها را پیدا کند:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

اگر این سؤال‌ها پاسخ روشن داشته باشند، پروژه از نظر APG قابل فهم است.


36. تعریف یک‌جمله‌ای#

Agentic Project Governance یک ساختار Vendor-neutral و Repository-native است که مشخص می‌کند انسان‌ها و عامل‌های AI چگونه پروژه را بفهمند، تحت چه قواعدی کار کنند، حدود اختیارشان چیست، نتیجه را چگونه اعتبارسنجی کنند و در پایان چه چیزی تحویل دهند.


37. Baseline نسخه v1.0#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

38. درباره نویسنده#

احمد شیخی (Ahmad Sheikhi)
Senior DevOps Engineer
Initial Author & Maintainer — Agentic Project Governance (APG)

Copyright © 2026 Ahmad Sheikhi.


پایان نسخه فارسی — v1.0.0#


Agentic Project Governance#

Repository Specification — v1.0.0#

Status: Initial public release
Working repository name: agentic-project-governance
Short name: APG (provisional)
Specification version: 1.0 Guide revision: 2026-08-17
Primary goal: Define a vendor-neutral, repository-native governance structure for human–AI project work.

APG at a Glance#

APG is the approved project governance contract: a vendor-neutral, repository-native framework that defines how sources, rules, authority, and validation are declared and resolved. APG is applied to a project; it is not the project, an agent, or an executable system.

APG is a governance contract and standardization framework, not an official industry standard. It standardizes how governance is declared and resolved, not how every project must operate.

ConceptRole
APGThe canonical, human-approved project governance contract
AGENTS.md, CLAUDE.md, GEMINI.md, and Copilot instructionsTool-facing adapters or entry points into the same contract; none is APG itself
.governance/manifest.yamlA machine-readable governance index declaring where authoritative information and rules are resolved from
AI agent, MCP server, and prompt/system instructionsGenerators and/or consumers, or runtime tools; they are not the governance authority
Project documentationHolds project truth where the manifest declares it authoritative
CI/CD and IAM/RBACEnforce controls and produce evidence; APG does not replace them
Project-management toolsPlan and track work; APG does not replace them

The manifest is not an agent, MCP server, workflow engine, prompt, database, executable system, or infrastructure inventory.

The small APG core answers four questions:

1. What is authoritative?
2. Which rules apply here?
3. What is allowed?
4. What proves the result?

That core is Sources, Rules, Authority, and Validation / Evidence. It is designed to remain explicit, repeatable, verifiable, vendor-neutral, human-approved, and repository-native.

APG references existing authoritative project facts and owns the governance contract around them.

For example, a project might declare docs/SDS.xlsx authoritative for infrastructure inventory, docs/architecture.md for architecture, VERSION for release identity, and .gitlab-ci.yml for deployment automation.

README.md:      PRD = srv-old
docs/SDS.xlsx:  PRD = srv-03

If the manifest declares docs/SDS.xlsx authoritative for infrastructure, every consumer must resolve PRD = srv-03 from that file. The manifest references project truth; it does not copy the inventory.

Codex, Claude, Gemini, and other AI systems may discover, propose, generate, consume, and validate. They are not themselves the governance authority. Humans or existing authoritative organizational mechanisms resolve and approve organizational facts and authority decisions.

UNRESOLVED:
Production deployment authority is not defined.
Human or authoritative-source resolution required.

Do not infer an approver. The simple lifecycle is:

Discover → Propose → Human / authoritative resolution
→ Approve → Record → Validate → Reuse

APG does not require identical prose from different tools. Given the same approved contract, consumers should resolve the same fact, source, rule, authority, validation requirement, and governance decision. Different wording is acceptable; contradictory governance interpretation is not.

APG is most useful where governance ambiguity creates operational risk: medium-sized businesses, larger organizations, multi-team projects, production-critical or regulated environments, external-vendor work, distributed documentation and ownership, or environments using multiple AI systems and automation tools.

APG is not for every repository. A README.md or AGENTS.md may be sufficient for a small personal project, prototype, temporary experiment, or simple single-developer repository. AI use alone is not a reason to adopt APG.

APG does not require GitFlow, Jira, Kubernetes, GitHub, GitLab, any specific AI vendor, an SDS, or any specific organizational structure.

APG should be introduced when the cost of ambiguity becomes higher than the cost of governance.


1. Executive Summary#

Modern AI coding and work agents already support persistent project instructions, scoped instructions, reusable skills, and repository context. The problem is that each tool exposes these capabilities differently, and projects often mix policy, project knowledge, workflow instructions, role behavior, and task context into one large prompt or one vendor-specific file.

Agentic Project Governance (APG) proposes a small, portable project contract that lives with the repository.

The framework is not an AI model, agent runtime, orchestration platform, prompt library, or replacement for CI/CD. It is a structure for making a project understandable and governable by humans and AI agents.

The core idea is:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

A model or tool may change. The project contract should remain.


1.1 Start Here — What This Actually Does#

If this is your first time reading APG, do not begin by thinking about AGENTS.md, AI models, prompts, or tooling.

Start with a simpler question:

How should a project explain its rules, context, responsibilities, and proof of completion so that both humans and AI agents can work on it consistently?

APG gives that information a predictable home inside the repository.

A project using APG should make it possible for a new human or AI agent to answer:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The framework does not decide the business logic for you.

It gives you a structure in which your own business, engineering, operational, legal, HR, process, or technical rules can be expressed consistently.

Think of APG as a project operating system#

A useful mental model is:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The AI model is not the system of record.

The project repository is.


1.2 Who Can Use APG?#

APG is intentionally domain-neutral.

It can be used anywhere a project has:

This includes software engineering, DevOps, infrastructure, operations, HR, industrial engineering, research, finance, documentation, compliance, product work, data engineering, and many other domains.

The project does not need to produce code.

It only needs work that benefits from explicit structure and repeatability.


1.3 Example — DevOps and Infrastructure Automation#

Scenario#

A platform team manages:

Without governance, an AI agent may know how to generate an Ansible playbook but still not know:

APG project structure#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

What the agent learns#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Now the agent is not only capable of generating automation.

It understands how automation must be produced and operated inside this specific project.


1.4 Example — Software Product Development#

Scenario#

A company is building a SaaS application with:

Different teams and agents work on different areas.

Structure#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Example scoped behavior#

The root project may define:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The backend subtree may add:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The frontend subtree may instead add:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

One project contract, different local rules.


1.5 Example — Human Resources and Recruitment#

APG is not limited to engineering.

Scenario#

An HR team uses AI to help with:

The main risk is not deployment.

The risk is inconsistency, privacy, bias, authority, and unclear decision ownership.

Structure#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Governance examples#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The same APG concepts still work:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Only the business domain changes.


1.6 Example — Industrial Engineering and Process Improvement#

Scenario#

An industrial engineering team is optimizing a production or service process.

Work may include:

Structure#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Example workflow#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

An AI agent can help calculate, analyze, document, or propose changes, but the project governance defines:

This is the same governance problem as infrastructure automation, expressed in a different domain.


1.7 Example — Business Operations#

Scenario#

A business operations team manages recurring work such as:

Possible structure#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

APG can make it explicit that:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

1.8 Example — Data and Analytics#

Scenario#

A data team uses AI for:

Structure#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The framework can distinguish:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

1.9 Example — Documentation, Research, and Knowledge Work#

A non-code repository can also use APG.

Example#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Possible governance:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Again, no software code is required for APG to be useful.


1.10 What a New User Actually Does#

A first-time user should not copy the full APG reference repository into a consuming project.

Install only the APG core that is needed and declare existing authoritative project sources through the manifest.

Minimal Core#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

PROJECT.md is optional. The manifest should reference existing authoritative project-native sources.

AGENTS.md#

This file is the entry point and router into governance, the manifest, scoped instructions, and relevant authoritative sources.

Optional Extensions: Workflows, context helpers, roles, templates, additional policies, and profiles are added only when needed.


1.11 The Same Framework Across Different Professions#

The following table shows how APG concepts translate across domains.

APG Concept DevOps / Infrastructure Software HR Industrial Engineering Business Operations Data / Analytics
Governance Production/change authority Release/security rules Hiring/privacy authority Safety/process-change authority Approval/financial authority Data/privacy authority
Project Context Topology, environments Architecture, APIs Roles, hiring criteria Process map, equipment Vendors, service catalog Data model, metric catalog
Policy Security, validation Testing, dependencies Privacy, fairness Safety, data quality Financial controls Access, metric governance
Workflow Canary/deploy Implement/review/release Screen/interview/onboard Study/pilot/standardize Request/approve/escalate Pipeline/dashboard/metric
Role Operator, reviewer Contributor, reviewer Recruiter, hiring manager IE, process owner Requester, approver Analyst, data owner
Validation Health checks, tests Tests, build, review Human review, criteria trace Measured KPI improvement Approval evidence Reconciliation, quality checks
Handover Runbook/status Release notes Hiring/onboarding record Updated standard work Case/transaction record Data lineage/report

The framework stays the same.

The domain content changes.


1.12 When APG Is Useful — and When It Is Not#

APG is useful when#

APG may be unnecessary when#

APG should create clarity, not ceremony.

2. Problem Statement#

AI agents can generate code, infrastructure, documents, analysis, websites, data pipelines, and operational changes. However, generation alone does not solve project governance.

Common failure modes include:

APG addresses these problems by defining an explicit hierarchy and separation of concerns.


3. Goals#

APG v1.0 aims to provide:

  1. A repository-native project contract.
  2. Vendor-neutral governance.
  3. Hierarchical and scoped instructions.
  4. Explicit rule precedence.
  5. Separation of policy, workflow, context, role, and task.
  6. Minimal context loading.
  7. Evidence-based validation and reporting.
  8. Explicit human approval boundaries.
  9. A structure usable by software, infrastructure, data, operations, documentation, HR, research, and other project types.
  10. Compatibility layers for AI tools without making those tools the source of truth.
  11. A minimal bootstrap and validation mechanism.
  12. A structure that can be extended without changing the core model.

4. Non-Goals#

APG v1.0 is intentionally not:

The framework governs how project knowledge and operating rules are represented. Execution remains the responsibility of the selected human and/or AI tooling.


5. Design Principles#

5.1 Project over tool#

The repository is the durable source of project truth.

AI tools are consumers of project governance, not owners of it.

5.2 Governance over prompt accumulation#

Durable rules belong in governed project files, not in long-lived prompt fragments or chat history.

5.3 Separation of concerns#

The framework distinguishes:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Each category answers a different question:

Category Question
Governance Who has authority and what rules cannot be violated?
Project Sources Where do authoritative project facts live?
Policy What constraints apply?
Workflow How should a class of work be performed?
Context What facts must be known?
Role What responsibilities and perspective apply?
Task What is being requested now?
Validation What evidence proves the result?

5.4 Scope should follow the repository tree#

Instructions should become more specific as work moves deeper into a project subtree.

5.5 Child rules may specialize, not silently weaken#

A local rule may make a parent rule more specific or more restrictive.

A local rule must not silently bypass security, approval, compliance, or other protected parent constraints.

5.6 Load only relevant context#

Agents should not load the entire governance repository for every task.

Context should be resolved from scope and task requirements.

5.7 Evidence over assertion#

A result is not validated because an agent says it is valid.

Validation requires evidence.

5.8 Explicit authority#

Actions such as deployment, deletion, production changes, secrets operations, financial actions, publishing, or other high-impact actions should have explicit authority boundaries.

5.9 Plain-text portability#

The core should remain readable without proprietary software.

Markdown and small machine-readable manifests are preferred.

5.10 Adapters must remain thin#

Tool-specific files should route a tool into canonical project governance.

They should not become independent copies of the project's rules.


6. Prior Art and Design Lineage#

APG does not claim to invent repository instructions or hierarchical AI context.

Its contribution is the composition of these ideas into a vendor-neutral project-governance architecture.

Existing concepts used as prior art#

OpenAI Codex — AGENTS.md

Codex supports repository instruction discovery using AGENTS.md, including instruction resolution through a project hierarchy.

Source:

Anthropic Claude Code — CLAUDE.md and scoped rules

Claude Code supports persistent project instructions, recursive project memory, nested CLAUDE.md files, imports, and path-scoped rule organization.

Source:

GitHub Copilot — repository and path-specific instructions

GitHub Copilot supports repository-wide instructions and path-specific instructions.

Source:

Gemini CLI — GEMINI.md and hierarchical context

Gemini CLI supports project context files, hierarchical context loading, imports, and on-demand agent skills.

Source:

APG-specific synthesis#

The following architecture is an APG design decision rather than a vendor standard:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

7. Repository Structure#

The v1.0 public reference repository is:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

8. Root File Contracts#

8.1 README.md#

Purpose#

Public entry point for humans.

Contains#

Must not contain#

The complete governance specification.

The README should remain consumable in a few minutes.


8.2 AGENTS.md#

Purpose#

Portable AI-agent entry point and router.

Important design rule#

AGENTS.md is not the canonical database of all project rules.

It tells an AI agent how to resolve the project contract.

  1. Identify the repository governance files.
  2. Tell the agent to inspect project evidence before modifying anything.
  3. Describe scoped instruction inheritance.
  4. Point to the policy and workflow resolver.
  5. Define minimum validation/reporting expectations.
  6. Tell the agent how to react to conflicts or missing authority.

Prefer a concise routing document rather than a large prompt.

A typical root file should be approximately 50–150 lines, depending on project complexity.


8.3 GOVERNANCE.md#

Purpose#

The repository's constitutional contract.

This is the highest repository-level normative document in APG.

Contains#

Example concerns#

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

8.4 PROJECT.md#

Purpose#

PROJECT.md is an optional project source, not a universal APG requirement.

If authoritative project-native sources already exist, the manifest should reference them.


8.5 CHANGELOG.md#

Tracks framework releases and specification changes.

Recommended format:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

8.6 CONTRIBUTING.md#

Defines how the public community contributes.

Should cover:


8.7 SECURITY.md#

Defines responsible security reporting.

It should not contain secrets, operational credentials, or sensitive implementation data.


8.8 LICENSE#

The project should ship with an explicit open-source license before public release.

License selection should be a deliberate maintainer decision.


9. .governance/ — Canonical Governance Layer#

.governance/ contains the reusable and project-specific governance components used by the root contract.

The directory is intentionally vendor-neutral.


9.1 .governance/README.md#

Explains the internal structure and authoring rules for governance components.

This is primarily for contributors and maintainers.


9.2 .governance/manifest.yaml#

Machine-readable governance manifest.

Purpose#

Provide a small stable index that tools can validate without parsing every Markdown document.

v1.0 manifest shape#

spec_version: "1.0"

governance:
  root: "GOVERNANCE.md"
  entry_adapter: "AGENTS.md"

project_sources:
  overview:
    - "README.md"

resolution:
  instruction_file: "AGENTS.md"
  inheritance: "root-to-leaf"
  source_strategy: "declared-authoritative-sources"
  context_strategy: "task-relevant-only"
  local_rules_may:
    - specialize
    - restrict
  local_rules_may_not:
    - silently_weaken_parent_policy
    - bypass_required_approval
    - bypass_security_controls
    - replace_authoritative_sources_without_governance_change

core:
  authority_policy: ".governance/policies/authority.md"
  validation_policy: ".governance/policies/validation.md"

extensions:
  policies: ".governance/policies"
  workflows: ".governance/workflows"
  context: ".governance/context"
  roles: ".governance/roles"
  templates: ".governance/templates"

validation:
  require_evidence: true
  allow_unvalidated_claims: false

The manifest must remain small.

It is an index, not a replacement for Markdown governance.


10. Policies#

Policies answer:

What constraints apply regardless of how the task is implemented?


10.1 policies/authority.md#

Defines authority boundaries.

Examples:


10.2 policies/change-control.md#

Defines change classes and change requirements.

Possible categories:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The framework does not require every domain to use all categories.


10.3 policies/security.md#

Defines security constraints.

Examples:


10.4 policies/validation.md#

Defines what constitutes acceptable evidence.

Examples:


10.5 policies/documentation.md#

Defines what must be documented after material changes.

Examples:


11. Workflows#

Workflows answer:

How should this type of work normally proceed?

Policies constrain workflows.

Workflows do not override governance.


11.1 workflows/default.md#

Generic lifecycle for work without a specialized workflow.

Recommended sequence:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

11.2 workflows/implementation.md#

Used for creating or changing project artifacts.

Typical stages:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

11.3 workflows/review.md#

Used when evaluating existing work.

Typical stages:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

A review should not silently become an implementation task.


11.4 workflows/handover.md#

Defines completion information needed when work changes ownership.

Examples:


12. Context#

Context answers:

What facts does the agent need to know?

Context is descriptive, not normative.

This distinction is critical.


12.1 context/architecture.md#

High-level architecture and component relationships.

Should focus on facts required to understand the system.


12.2 context/conventions.md#

Project conventions.

Examples:

If a convention is mandatory for security or governance reasons, its normative requirement belongs in policy and may be referenced here.


12.3 context/glossary.md#

Defines project-specific terminology.

Useful for domains where acronyms and internal terms would otherwise be ambiguous.


12.4 context/current-state.md#

Optional volatile context.

Examples:

This file should include a visible Last Updated value.

Agents should treat stale current-state information cautiously.


13. Roles#

Roles answer:

What responsibility or review perspective applies to this task?

Roles are not fictional personalities.

A role defines responsibilities, boundaries, and expected outputs.


13.1 roles/contributor.md#

Typical responsibilities:


13.2 roles/reviewer.md#

Typical responsibilities:


13.3 roles/operator.md#

Typical responsibilities:

Projects may define their own roles.

Examples:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

14. Templates#

Templates standardize recurring artifacts without forcing a domain-specific workflow.


14.1 templates/task.md#

Suggested fields:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

14.2 templates/decision.md#

Suggested fields:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

This can later evolve into ADR compatibility if desired.


14.3 templates/report.md#

Suggested fields:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

14.4 templates/handover.md#

Suggested fields:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

15. Hierarchical AGENTS.md#

Hierarchical instruction resolution is central to APG.

Example project:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

For work inside:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

the effective instruction chain is conceptually:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

A child AGENTS.md should contain only rules and routing information specific to its scope.

It should not duplicate the root governance document.


16. Suggested Scoped AGENTS.md Contract#

APG may use optional YAML front matter to make scope explicit while remaining readable as normal Markdown.

Example:

---
apg:
  spec_version: "1.0"
  scope: "./"
  inherits: true
  policies:
    - "/.governance/policies/security.md"
    - "/.governance/policies/validation.md"
  workflow:
    - "/.governance/workflows/implementation.md"
---

# Infrastructure Instructions

## Scope

These instructions apply to this directory and its descendants.

## Local Requirements

- Inspect existing infrastructure definitions before creating new ones.
- Prefer existing modules, roles, and automation.
- Do not perform production changes without applicable authority.
- Validate syntax before execution where supported.

## Local Context

See `architecture.md` in this subtree when the task affects deployment topology.

Front matter is an APG convention.

Native AI tools are not required to implement APG parsing for the text to remain useful.


17. Instruction Precedence#

APG distinguishes loading order from authority precedence.

A tool may load files differently, but the project governance model must explicitly define which instruction wins.

Recommended conceptual precedence:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Important rule:

More specific does not automatically mean more authoritative.

Example:

A local file may say:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

If root governance requires human approval for production deployment, the local instruction cannot remove that approval requirement.


18. Rule Conflict Resolution#

When two instructions conflict:

Step 1 — Determine scope#

Check whether both instructions actually apply to the current task.

Step 2 — Determine authority#

Use governance precedence, not file proximity alone.

Step 3 — Determine whether specialization is allowed#

A child may specialize a parent rule where the parent permits specialization.

Step 4 — Protect non-weakenable constraints#

Security, approval, compliance, and destructive-action constraints should not be silently weakened.

Step 5 — Block if ambiguity changes risk#

If resolving the ambiguity would materially change authority or risk, the task should stop at the decision boundary rather than guessing.


19. Context Resolution#

APG uses progressive context resolution.

The agent should not consume all project documents by default.

Conceptual resolver:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

This is intentionally compatible with the direction of current agent tools that support scoped instructions or on-demand capabilities, while APG's exact resolver is its own framework-level abstraction.


20. Evidence and Validation Model#

APG separates:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

These are not interchangeable.

Example:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

The agent must not produce:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

when validation was not actually performed.

Recommended reporting vocabulary:

Status Meaning
PASS Required validation was performed and succeeded.
FAIL Required validation was performed and failed.
BLOCKED Required progress or validation could not continue because a dependency, permission, authority, or input is missing.
NO_CHANGE The inspected target required no modification or no modification was performed.
NOT_VALIDATED Work may exist, but the stated validation was not performed or evidence is unavailable.

Projects may extend the vocabulary but should not redefine these statuses ambiguously.


21. Human Authority Model#

A core APG concept is an explicit decision boundary between analysis and action.

Example classes:

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

A project may map these to human roles.

Example:

authority:
  observe:
    default: allowed
  propose:
    default: allowed
  modify:
    default: task-scoped
  deploy:
    default: approval-required
  delete:
    default: approval-required
  publish:
    default: approval-required

This is a governance model, not an access-control system.

Actual enforcement remains the responsibility of the runtime environment, IAM, CI/CD, operating system, and connected tools.


22. Vendor Adapter Model#

The project core is vendor-neutral.

Adapters translate or route the project contract into the conventions used by a specific tool.

flowchart TB
    G["APG Canonical Governance"]

    G --> C["Codex Adapter"]
    G --> CL["Claude Adapter"]
    G --> GM["Gemini Adapter"]
    G --> CP["Copilot Adapter"]

    C --> A["AGENTS.md"]
    CL --> CM["CLAUDE.md"]
    GM --> GMM["GEMINI.md"]
    CP --> CI["copilot-instructions.md"]

    classDef governance fill:#123d27,stroke:#38c976,stroke-width:2px,color:#ffffff;
    classDef adapter fill:#16231b,stroke:#5d876b,stroke-width:1.5px,color:#ffffff;
    classDef file fill:#0b100d,stroke:#385243,stroke-width:1px,color:#dce8df;

    class G governance;
    class C,CL,GM,CP adapter;
    class A,CM,GMM,CI file;

Adapters should:

Adapters should not:


23. Profiles#

Profiles provide optional domain defaults.

They are not part of the mandatory core.

Initial profiles included in v1.0:

generic/
software/
devops/

Future profiles may include:

data/
security/
research/
documentation/
product/
hr/
legal/
finance/

A profile may add:

A profile must not change the APG core semantics.


24. Examples#

24.1 examples/minimal/#

Shows the smallest useful APG project.

Suggested tree:

minimal/
├── AGENTS.md
├── GOVERNANCE.md
├── PROJECT.md
└── .governance/
    ├── manifest.yaml
    ├── policies/
    │   └── validation.md
    └── workflows/
        └── default.md

24.2 examples/monorepo/#

Demonstrates scoped instructions.

monorepo/
├── AGENTS.md
├── GOVERNANCE.md
├── PROJECT.md
├── frontend/
│   └── AGENTS.md
├── backend/
│   └── AGENTS.md
└── infrastructure/
    ├── AGENTS.md
    └── ansible/
        └── AGENTS.md

24.3 examples/operations/#

Demonstrates stronger authority and change-control boundaries.

Example lifecycle:

Scope
→ Precheck
→ Canary
→ Approval Boundary
→ Apply
→ Validation
→ Report

This workflow is domain-specific and is deliberately not forced on every APG project.


25. Tools#

The framework should remain useful without any executable tooling.

Tools are convenience functions.


25.1 tools/init-project.sh#

Purpose:

Initialize APG structure inside a repository.

Possible future interface:

./tools/init-project.sh \
  --target /path/to/project \
  --profile software

v1.0 requirements:


25.2 tools/validate-project.sh#

Purpose:

Validate the APG structure itself.

Possible checks:

manifest exists
manifest spec version is supported
declared files exist
root governance exists
project definition exists
entrypoint exists
referenced policy files exist
referenced workflow files exist
scoped files do not reference missing documents
required headings exist
no obvious secret patterns exist in governance files

The validator checks structure.

It does not prove that the project's business rules are correct.


26. Documentation Set#

docs/architecture.md#

Deep explanation of components and boundaries.

docs/governance-model.md#

Normative governance semantics.

docs/instruction-resolution.md#

How root and scoped instructions are resolved.

docs/authoring-guide.md#

How maintainers should write good governance documents.

docs/adapter-model.md#

Rules for model/tool integrations.

docs/extension-model.md#

How profiles, roles, workflows, policies, and adapters can be added safely.

docs/prior-art.md#

Detailed lineage and references to existing tools and concepts.


27. Public GitHub Support Files#

.github/ISSUE_TEMPLATE/bug.yml#

For defects in framework behavior, documentation, templates, or tooling.

.github/ISSUE_TEMPLATE/proposal.yml#

For changes to:

.github/PULL_REQUEST_TEMPLATE.md#

Recommended checklist:

- Scope is clear.
- The change does not duplicate existing governance.
- Core semantics remain vendor-neutral.
- Documentation was updated if behavior changed.
- Examples were updated where applicable.
- Validation was performed.
- Breaking changes are identified.

28. Mermaid — Core Architecture#

G CORE APG Core Semantics PROF Profiles CORE->PROF ADAPT Adapters CORE->ADAPT PROJ Project-specific Governance CORE->PROJ SW Software PROF->SW DO DevOps PROF->DO GEN Generic PROF->GEN CDX Codex ADAPT->CDX CLD Claude ADAPT->CLD GEM Gemini ADAPT->GEM COP Copilot ADAPT->COP LOCAL Scoped Instructions PROJ->LOCAL CONTEXT Context PROJ->CONTEXT POLICY Policies PROJ->POLICY WORKFLOW Workflows PROJ->WORKFLOW
Mermaid source
flowchart TD
    H[Human / Team] --> T[AI Tool or Agent]
    T --> A[Tool Adapter]
    A --> E[Project Entry Point]

    E --> G[GOVERNANCE.md]
    E --> P[PROJECT.md]
    E --> S[Scoped Instructions]

    G --> R[Governance Resolver]
    P --> R
    S --> R

    R --> POL[Policies]
    R --> WF[Workflow]
    R --> ROLE[Role]
    R --> CTX[Relevant Context]

    POL --> X[Task Execution]
    WF --> X
    ROLE --> X
    CTX --> X

    X --> V[Validation]
    V --> EV[Evidence]
    EV --> REP[Report / Handover]
    REP --> H

Meaning#

The AI tool does not directly define project behavior.

It enters through a compatibility layer, resolves the canonical project contract, performs the task under applicable governance, validates the result, and returns evidence.


29. Mermaid — Governance Precedence#

G Q What kind of information is this? GOV Authority / invariant → Governance or Policy Q->GOV CTX Fact about project → Context Q->CTX WF Procedure → Workflow Q->WF ROLE Responsibility → Role Q->ROLE TASK Current request → Task Q->TASK AD Tool compatibility → Adapter Q->AD EV Proof of result → Evidence Q->EV
Mermaid source
flowchart TD
    EXT[External Platform / Security Controls]
    ORG[Organization Mandatory Policy]
    GOV[Repository GOVERNANCE.md]
    PP[Protected Project Policies]
    PAR[Parent Scoped Instructions]
    LOC[Nearest Scoped Instructions]
    WF[Applicable Workflow]
    ROLE[Role Guidance]
    TASK[Current Task]
    DEF[Framework Defaults]

    EXT --> ORG
    ORG --> GOV
    GOV --> PP
    PP --> PAR
    PAR --> LOC
    LOC --> WF
    WF --> ROLE
    ROLE --> TASK
    TASK --> DEF

Key rule#

Lower layers may add specificity when allowed, but they do not automatically gain authority to weaken higher-level protected constraints.


30. Mermaid — Hierarchical Instruction Resolution#

G H Human / Team T AI Tool or Agent H->T A Tool Adapter T->A E Project Entry Point A->E G GOVERNANCE.md E->G P PROJECT.md E->P S Scoped Instructions E->S R Governance Resolver G->R P->R S->R POL Policies R->POL WF Workflow R->WF ROLE Role R->ROLE CTX Relevant Context R->CTX X Task Execution POL->X WF->X ROLE->X CTX->X V Validation X->V EV Evidence V->EV REP Report / Handover EV->REP REP->H
Mermaid source
flowchart TD
    TASK[Task targets infrastructure/ansible/playbooks]
    ROOT[Root AGENTS.md]
    INFRA[infrastructure/AGENTS.md]
    ANS[ansible/AGENTS.md]
    POL[Applicable Policies]
    WF[Applicable Workflow]
    CTX[Required Context]
    EXEC[Effective Task Context]

    TASK --> ROOT
    ROOT --> INFRA
    INFRA --> ANS
    ANS --> POL
    POL --> WF
    WF --> CTX
    CTX --> EXEC

This represents APG's conceptual resolver.

Exact native loading behavior depends on the selected AI tool.


31. Mermaid — Task Lifecycle#

G TASK Task scope ROOT Root AGENTS.md TASK->ROOT INFRA Parent AGENTS.md ROOT->INFRA LOCAL Nearest AGENTS.md INFRA->LOCAL POL Policies LOCAL->POL WF Workflow POL->WF CTX Context WF->CTX EXEC Effective Task Context CTX->EXEC
Mermaid source
flowchart LR
    S[Scope] --> I[Inspect]
    I --> C[Resolve Context]
    C --> P[Plan]
    P --> A{Authority available?}

    A -- No --> B[BLOCKED / Proposal Only]
    A -- Yes --> E[Execute]

    E --> V[Validate]
    V --> R{Evidence sufficient?}

    R -- Yes --> PASS[Report Verified Result]
    R -- No --> NV[Report NOT_VALIDATED]

    PASS --> H[Handover / Complete]
    NV --> H
    B --> H

32. Mermaid — Extension Model#

G EXT 1. External platform / security restrictions ORG 2. Organization mandatory policy EXT->ORG GOV 3. Repository GOVERNANCE.md ORG->GOV PP 4. Protected project policies GOV->PP PAR 5. Parent scoped instructions PP->PAR LOC 6. Nearest scoped instructions PAR->LOC WF 7. Applicable workflow LOC->WF ROLE 8. Role guidance WF->ROLE TASK 9. Current task ROLE->TASK DEF 10. Framework defaults TASK->DEF
Mermaid source
flowchart TD
    CORE[APG Core Semantics]

    CORE --> PROF[Profiles]
    CORE --> ADAPT[Adapters]
    CORE --> PROJ[Project-Specific Governance]

    PROF --> SW[Software]
    PROF --> DO[DevOps]
    PROF --> GEN[Generic]

    ADAPT --> CDX[Codex]
    ADAPT --> CLD[Claude]
    ADAPT --> GEM[Gemini]
    ADAPT --> COP[Copilot]

    PROJ --> LOCAL[Scoped Instructions]
    PROJ --> CONTEXT[Project Context]
    PROJ --> POLICY[Project Policies]
    PROJ --> WORKFLOW[Project Workflows]

Core semantics remain independent of profiles and tool adapters.


33. Mermaid — Information Ownership#

G S Scope I Inspect S->I C Resolve Context I->C P Plan C->P A Authority? P->A B BLOCKED / Proposal Only A->B No E Execute A->E Yes H Handover / Complete B->H V Validate E->V R Evidence sufficient? V->R PASS Verified Result R->PASS Yes NV NOT_VALIDATED R->NV No PASS->H NV->H
Mermaid source
flowchart TB
    Q{What kind of information is this?}

    Q -->|Authority / invariant| GOV[Governance or Policy]
    Q -->|Fact about project| CTX[Context]
    Q -->|Procedure| WF[Workflow]
    Q -->|Responsibility| ROLE[Role]
    Q -->|One current request| TASK[Task]
    Q -->|Tool compatibility| ADAPTER[Adapter]
    Q -->|Proof of result| EVIDENCE[Validation Evidence]

This decision tree prevents the common failure mode of putting everything into one agent instruction file.


34. Minimal APG Adoption#

A project should not be required to copy the entire reference repository.

Minimum practical adoption:

project/
├── AGENTS.md
├── GOVERNANCE.md
├── PROJECT.md
└── .governance/
    ├── manifest.yaml
    ├── policies/
    │   └── validation.md
    └── workflows/
        └── default.md

Additional components are added only when they solve a real project need.

This is a key design principle:

The reference repository may be comprehensive. A consuming project should remain minimal.


35. Full Reference Repository vs Consuming Project#

These are different concepts.

Reference repository#

The public APG repository contains:

Consuming project#

A real project imports only what it needs.

Example:

my-api/
├── AGENTS.md
├── GOVERNANCE.md
├── PROJECT.md
├── .governance/
│   ├── manifest.yaml
│   ├── policies/
│   │   ├── security.md
│   │   └── validation.md
│   └── workflows/
│       └── implementation.md
├── src/
└── tests/

APG should not create governance bloat.


36. Example — Multi-Domain Project#

A larger organization may use:

company-project/
├── AGENTS.md
├── GOVERNANCE.md
├── PROJECT.md
│
├── product/
│   └── AGENTS.md
│
├── software/
│   ├── AGENTS.md
│   ├── frontend/
│   │   └── AGENTS.md
│   └── backend/
│       └── AGENTS.md
│
├── infrastructure/
│   ├── AGENTS.md
│   ├── ansible/
│   │   └── AGENTS.md
│   └── kubernetes/
│       └── AGENTS.md
│
├── documentation/
│   └── AGENTS.md
│
└── hr/
    └── AGENTS.md

Each subtree can specialize its own operating rules while inheriting repository governance.

This is the intended mechanism for allowing one framework to support very different domains without pretending that all domains share the same workflow.


37. Versioning Model#

Proposed framework versioning:

MAJOR.MINOR.PATCH

Example:

1.0.0
1.1.0
2.0.0

Starting with 1.0.0, breaking changes to core governance semantics require a major version.

A consuming project should record the APG specification version it targets:

spec_version: "1.0"

38. Compatibility Philosophy#

APG should distinguish three levels:

Core compatibility#

The project follows APG structure and governance semantics.

Adapter compatibility#

A specific AI tool can discover and use the project contract conveniently.

Native feature compatibility#

APG takes advantage of tool-specific capabilities such as:

Native features may improve usability but must not be required to understand the core project contract.


39. Security Principles#

APG governance files should never become a secret store.

Do not place:

passwords
API keys
private keys
access tokens
production credentials
sensitive personal data

inside reusable governance documents.

Governance may reference a secrets-management mechanism but should not contain the secret itself.

Adapters must not duplicate sensitive runtime data.


40. Staleness Model#

Project knowledge has different lifetimes.

Recommended classification:

Governance       -> slow-changing
Project identity -> slow-changing
Architecture     -> medium-changing
Workflow         -> medium-changing
Current state    -> fast-changing
Task             -> temporary
Evidence         -> execution-specific

Fast-changing information should identify recency.

Example:

# Current State

Last Updated: 2026-08-17
Owner: Platform Team

Agents should avoid treating stale operational state as authoritative.


41. Authoring Rules#

Governance files should:

Governance files should not:


APG documentation may use:

MUST
MUST NOT
SHOULD
SHOULD NOT
MAY

Their exact normative interpretation should be documented in the future formal specification.

In v1.0, they are used conservatively and consistently.


43. Governance Change Rules#

Changes to the governance model are more significant than normal content changes.

Recommended rule classes:

Non-breaking#

Examples:

Potentially breaking#

Examples:

Potentially breaking changes should require explicit specification review.


44. Decision Records#

Important architectural choices should be recorded rather than repeatedly debated.

Suggested future structure:

docs/decisions/
├── 0001-vendor-neutral-core.md
├── 0002-agents-as-router.md
├── 0003-policy-context-separation.md
└── 0004-root-to-leaf-scope.md

A decision record should include:

Status
Context
Decision
Consequences
Alternatives

Decision records are included in v1.0 without changing core semantics.


45. Proposed Initial Decisions#

The following decisions define the v1.0 baseline.

D-001 — Vendor-neutral canonical core#

Decision: Project governance must not depend on one model vendor.

D-002 — Repository-native contract#

Decision: Durable governance and project knowledge live with the project repository.

D-003 — AGENTS.md is a router#

Decision: AGENTS.md is an entry point and scoped instruction mechanism, not a dumping ground for all project knowledge.

D-004 — Separate policy, workflow, context, role, and task#

Decision: Each class of information has independent ownership and lifecycle.

D-005 — Root-to-leaf scoping#

Decision: Project subtrees may introduce increasingly specific instructions.

D-006 — Protected constraints cannot be silently weakened#

Decision: Specificity alone does not grant authority to bypass parent governance.

D-007 — Evidence-bound validation#

Decision: Validation claims require evidence.

D-008 — Minimal consumption#

Decision: Real projects import only the governance components they need.

D-009 — Thin adapters#

Decision: Vendor-specific files route into canonical governance rather than duplicating it.

D-010 — No runtime dependency#

Decision: The framework remains understandable and useful without installing a program.


46. v1.0.0 Release Scope#

The first public version should include only the features necessary to demonstrate the model completely.

Required#

README
GOVERNANCE
PROJECT
root AGENTS
manifest
core policies
core workflows
context examples
role examples
templates
three project examples
four adapter examples
two small shell tools
architecture documentation
instruction-resolution documentation
prior-art documentation
GitHub contribution files

Explicitly deferred#

MCP integration
agent orchestration
remote memory
vector storage
central policy server
automatic context embedding
complex CLI
Python package
npm package
GUI
SaaS service
multi-repository federation
organization policy distribution
signed governance bundles
policy-as-code engine

47. Suggested Roadmap#

v1.0 — Initial Public Release#

Establish the repository contract, governance semantics, bilingual guide, reference implementation, examples, adapters, bootstrap tool, validator, and GitHub Pages publication model.

v1.1 — Validation and Adapters#

Possible additions:

v1.2 — Profile Ecosystem#

Possible additions:

v2.0 — Cross-Repository Governance#

Research areas:

Post-1.0 maturity goals#

48. Success Criteria#

APG is successful if a new human or AI agent can enter an unfamiliar repository and answer:

What is this project?
What am I allowed to do?
What am I not allowed to do?
Which rules apply here?
What context do I need?
Which workflow should I follow?
Who owns the decision?
What evidence is required?
How do I report the result?

without requiring the original author to explain the entire project through chat.


49. Conceptual Summary#

                    PROJECT
                       │
          ┌────────────┼────────────┐
          │            │            │
          ▼            ▼            ▼
     Governance     Definition   Instructions
          │                         │
          │                   Root → Scoped
          │                         │
          └────────────┬────────────┘
                       ▼
                   Resolver
                       │
        ┌──────────────┼──────────────┐
        ▼              ▼              ▼
     Policies       Workflows       Context
        │              │              │
        └──────────────┼──────────────┘
                       ▼
                      Role
                       │
                       ▼
                      Task
                       │
                       ▼
                   Execution
                       │
                       ▼
                   Validation
                       │
                       ▼
                    Evidence
                       │
                       ▼
                Report / Handover

The important abstraction is:

The AI is replaceable. The project contract is durable.


50. One-Sentence Definition#

Agentic Project Governance is a vendor-neutral, repository-native structure for defining how humans and AI agents understand, govern, execute, validate, and hand over work within a project.


51. Post-1.0 Design Questions#

The v1.0 baseline is intentionally small. Future versions may evaluate:

  1. Should APG define a formal RFC process for core semantic changes?
  2. How should organization-level policy inheritance work across repositories?
  3. Should governance bundles support signatures or integrity metadata?
  4. When should the shell validator be complemented by a portable structured validator?
  5. Which additional domain profiles provide enough reusable value to belong in the reference repository?

These questions do not block v1.0 adoption.

52. v1.0 Baseline#

For the first implementation, the recommended choices are:

Project name:          Agentic Project Governance
Canonical directory:  .governance/
Manifest:              Required
AGENTS front matter:   Optional
Roles:                 Included but optional to consuming projects
Adapters:              Codex, Claude, Gemini, Copilot examples
Decision records:      Include initial architecture decisions
Tooling:               Small POSIX-style shell bootstrap + validator
Runtime dependency:    None
Core format:           Markdown + YAML

This baseline is small enough to implement and complete enough to demonstrate the framework's real value.


End of v1.0.0#


Author#

Ahmad Sheikhi
Senior DevOps Engineer
Initial Author & Maintainer — Agentic Project Governance (APG)

Copyright © 2026 Ahmad Sheikhi.