Operational guide for AI agents using this policy template in real projects.
This repository is policy-first. It provides GitLab-oriented AI-assisted development rules, templates, commit policy, lightweight workflow skills, and Codex subagent definitions. Do not turn it into an application repository, a generic skill catalog, or a second AI framework.
Apply rules in this order:
AI_DEVELOPMENT_POLICY.mdCONTRIBUTING.md- root
SKILL.md - matching
skills/*/SKILL.md - active
.codex/agents/*.tomlwhen a Codex subagent is explicitly used docs/agents/*.mdwhen extra agent guidance is needed.codex/config.tomlas optional metadata only
If rules conflict, follow the narrower rule.
Policy, security, validation, Issue/MR template, and commit format rules in AI_DEVELOPMENT_POLICY.md win.
Do not enable agents.dir in .codex/config.toml.
- Clarify requirements before implementation.
- Do not implement immediately when the task is ambiguous.
- If no spec exists, create a minimal one first.
- Keep every change traceable to the request or spec.
- Work incrementally; avoid large unreviewable changes.
- Use existing files before creating new ones.
- Do not add speculative workflows, options, or abstractions.
- Do not revert unrelated user changes.
- Do not finish until the change is review-ready.
Use this internal lifecycle for repository work:
SPEC: define outcome, scope, constraints, acceptance criteria, and ambiguity.BUILD: implement the smallest coherent change.REVIEW: check correctness, risk, maintainability, validation, and policy compliance.SECURITY: add security review when auth, permissions, secrets, external input, privacy, or sensitive data are affected.DOCS: update docs when behavior, policy, workflow, templates, scripts, or API usage changes.
Do not require slash commands. Do not require explicit subagent selection for simple work. The main agent must still follow this lifecycle internally.
- Issue draft, scope, acceptance criteria →
SPEC - Implementation or bug fix →
SPECthenBUILD - Code review, regression risk, validation gap →
REVIEW - Auth, permissions, secrets, external input, privacy, sensitive data →
SECURITY - README, changelog, policy, templates, MR summary →
DOCS - Commit message, Issue, MR artifact → use the matching
skills/write-*rule
issue-agent→SPECbackend-developer→BUILDcode-reviewer→REVIEWsecurity-auditor→SECURITYdocs-agent→DOCS
Archived agents under .codex/agents/_archive/ are legacy references only.
Do not use archived agents as active execution choices.
Do not add specialized agents unless repeated real project work proves the core set is insufficient.
Use default mode when no subagent is explicitly requested. The main agent owns the full lifecycle:
- read the relevant policy files;
- read matching
skills/*/SKILL.mdonly when needed; - make a minimal spec before code changes;
- implement incrementally;
- prepare validation evidence;
- prepare review-ready output.
Use role-specific Codex subagents only for bounded work that can be reviewed independently. Define ownership before delegation. Subagents complement the lifecycle; they do not bypass it. The main author remains responsible for integration, validation, and final quality. Record subagent usage in the Issue or MR when used.
Repository-local skills are execution aids, not an auto-loaded framework. When the task matches, read the matching file before producing the artifact:
- Spec clarification:
skills/spec/SKILL.md - Incremental build:
skills/build/SKILL.md - Review preparation:
skills/review/SKILL.md - Issue draft/update/create:
skills/write-issue/SKILL.md - MR draft/update/create:
skills/write-mr/SKILL.md - AI-assisted commit message:
skills/write-commit/SKILL.md
If a required skill file is missing, stop and report it.
- Use
.gitlab/issue_templates/default.mdfor Issues. - Use
.gitlab/merge_request_templates/default.mdfor MRs. - Use
.gitmessage-ai-assisted.txtfor AI-assisted commits. - Select exactly one
Type,Size, andAI-Assistedvalue in Issues. - Mark
AI-Assisted: Yeswhen AI is used for drafting, planning, coding, review, or validation preparation. - Record validation command and result in the commit body or MR body.
- If no Issue exists, record the exception reason in the commit body or MR body.
- Use
[ai-assisted] <type>(<scope>): <summary>for AI-assisted commits.
Allowed commit types: feat, fix, refactor, test, docs, chore.
Reject these shortcuts:
- "This is too small to analyze first."
- "I can quickly patch this."
- "A tiny change does not need review."
- "The template is optional for this artifact."
- "Security review is unnecessary because the change is small."
Correct behavior:
- define the minimum spec;
- make the smallest scoped change;
- verify it;
- review it;
- record the required policy evidence.
- Start by identifying the lifecycle stage:
SPEC,BUILD,REVIEW,SECURITY, orDOCS. - Stay in main-agent mode unless a bounded subagent task is useful.
- Ask only when ambiguity changes the outcome.
- Keep Issue, MR, and commit bodies in Korean.
- Keep commands, paths, code identifiers, logs, API names, and proper nouns unchanged.
- Never expose secrets, tokens, passwords, or personal data.
- Update
CHANGELOG.mdwhen policy behavior, templates, scripts, validation procedure, or development process changes.