Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions AGENTS.history.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"version": 2,
"entries": [
{
"rules": [
"SKILLS-ENF-01",
"SKILLS-ENF-02",
"ENF-01",
"ENF-02"
],
"decision": "Project-local instructions remain mandatory and closure-gating within the global instruction stack.",
"reason": "Repository-specific workflow rules must retain the same enforcement force as global instructions.",
"regression": "A local rule cannot be treated as optional or bypass completion blocking when applicable."
},
{
"rules": [
"SKILLS-CHECKOUT-01",
"SKILLS-WORKTREE-01",
"SKILLS-STAGE-01",
"FILE-02",
"FILE-03"
],
"decision": "Skill development occurs in one thread-owned external worktree while the primary checkout remains a controlled main or release surface.",
"reason": "Separating development from release and runtime generation prevents branch-state drift and accidental staging.",
"regression": "Skill source must not be developed in the primary checkout or staged into release without explicit staging, shipping, or preview intent."
},
{
"rules": [
"SKILLS-PREVIEW-01",
"SKILLS-SHIP-01",
"SKILLS-CREATE-01",
"SKILLS-SHIP-02"
],
"decision": "Installed previews and shipments are generated from the controlled checkout and release branch, with new-skill creation retaining its promotion exception.",
"reason": "Runtime copies must correspond to an intentional release state rather than an arbitrary task worktree.",
"regression": "Do not install from task worktrees, ship from feature branches, or lose post-shipment restoration and reinstall steps."
},
{
"rules": [
"SKILLS-GOV-01",
"SKILLS-GOV-02",
"SKILLS-PORT-01",
"SKILLS-RUNTIME-01",
"SKILLS-MAINT-01",
"SKILLS-STYLE-01",
"SKILLS-VERIFY-01",
"SKILLS-AUTO-01",
"SKILLS-HELP-01",
"SKILLS-CREDIT-01"
],
"decision": "Repository governance uses current control sources, portable runtime paths, aligned helpers, targeted verification, and explicit credit-cost review.",
"reason": "These constraints keep public skill sources portable and generated or recurring behavior aligned with its executable owner.",
"regression": "Do not apply advisory changes implicitly, embed user-local paths, bypass declared helper locations, or finish with prompt/helper or credit-cost drift."
}
]
}
123 changes: 71 additions & 52 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -1,74 +1,93 @@
## Instruction enforcement

- All instruction bullets in this file are mandatory, blocking, and
closure-gating for the phase, action, decision, artifact, or response they
govern.
- Do not proceed with or claim completion for any action, decision, artifact, or
response when an applicable instruction bullet is unmet, unverifiable, or in
conflict; report the blocker or conflict instead.
- [SKILLS-ENF-01] All instruction bullets in this file are mandatory,
blocking, and closure-gating for the phase, action, decision, artifact, or
response they govern.
- overlaps: ENF-01
- [SKILLS-ENF-02] Do not proceed with or claim completion for any action,
decision, artifact, or response when an applicable instruction bullet is
unmet, unverifiable, or in conflict; report the blocker or conflict instead.
- overlaps: ENF-02

Metadata: Project-specific rules for this skills repository.

Skills repo checkout and worktrees:

- The primary skills repo checkout used to generate installed Ceratops skill
copies must stay either on local `main` tracking `origin/main` or on a local
`release/*` branch created from `main` for an active unpublished batch.
- Do not develop or patch Ceratops skill source directly in the skills repo
checkout during create, update, audit, or repair work; for any task that
modifies skills, work in one thread-owned git worktree, name that worktree
- [SKILLS-CHECKOUT-01] The primary skills repo checkout used to generate
installed Ceratops skill copies must stay on local `main` tracking
`origin/main` or a local `release/*` branch created from `main` for an active
unpublished batch.
- limits: FILE-02
- [SKILLS-WORKTREE-01] Do not develop or patch Ceratops skill source directly
in the skills repo checkout during create, update, audit, or repair work. For
any task that modifies skills, work in one thread-owned git worktree, name it
after the thread rather than a subtask, reuse it for follow-on skill changes
in the same thread unless conflicting branch histories or explicit user
direction require a new one, and do not place it inside the skills repo
checkout.
- Keep installed Ceratops skill folders generated from the skills repo checkout
path, not from task worktrees. For local preview of unpublished batches,
refresh remote refs with `git fetch --prune origin`, then merge ready worktree
branches into the skills repo checkout's local `release/*` branch and run
`python scripts/install-skills.py` from that checkout instead of generating
installed skills from task worktrees.
- Do not stage skill-source changes into a local `release/*` batch unless the
task explicitly requests staging, shipping, or local preview sync.
- Skills-repo changes must ship from `release/*`, never directly from task or
feature branches.
- New Ceratops skill creation is the only default-staging exception:
`$ceratops-skill-lifecycle` create must finish with change-promotion and
install verification unless the user opts out.
- For staging or shipping, use `$ceratops-skill-lifecycle` change-promotion or
ship-to-remote. After shipping, restore the checkout from `origin/main`,
reinstall managed skills from `main`, and report retained worktrees or release
branches.
- self: exceeds-limit, list-heavy
- [SKILLS-PREVIEW-01] Keep installed Ceratops skill folders generated from the
skills repo checkout, not task worktrees. For unpublished local previews,
refresh remote refs with `git fetch --prune origin`, merge ready worktree
branches into the checkout's local `release/*` branch, and run
`python scripts/install-skills.py` there instead of generating installed
skills from task worktrees.
- self: list-heavy
- [SKILLS-STAGE-01] Do not stage skill-source changes into a local `release/*`
batch unless the task explicitly requests staging, shipping, or local preview
sync.
- limits: SKILLS-PREVIEW-01
- [SKILLS-SHIP-01] Skills-repo changes must ship from `release/*`, never
directly from task or feature branches.
- [SKILLS-CREATE-01] New Ceratops skill creation is the only default-staging
exception: `$ceratops-skill-lifecycle` create must finish with
change-promotion and install verification unless the user opts out.
- overrides: SKILLS-STAGE-01
- [SKILLS-SHIP-02] For staging or shipping, use `$ceratops-skill-lifecycle`
change-promotion or ship-to-remote. After shipping, restore the checkout from
`origin/main`, reinstall managed skills from `main`, and report retained
worktrees or release branches.
- self: list-heavy

Instruction and skill maintenance:

- Before proposing or editing `AGENTS.md`, `automation.toml`, `SKILL.md`, shared
skill sections, skill manifests, or helper-contract text, re-open the relevant
files from disk and use the current contents as the source of truth.
- Treat recommendations about instruction, automation, skill, and
helper-contract changes as advisory unless the user explicitly asks to apply a
named change.
- In repo-tracked files intended for public sharing or GitHub, including
repo-tracked `AGENTS.md`, `automation.toml`, `SKILL.md`, generated runtime
- [SKILLS-GOV-01] Before proposing or editing a repository control surface,
including `AGENTS.md`, `automation.toml`, `SKILL.md`, skill manifests, shared
sections, or helper contracts, re-open the relevant files from disk and use
the current contents as the source of truth.
- self: list-heavy
- [SKILLS-GOV-02] Treat recommendations about instruction, automation, skill,
and helper-contract changes as advisory unless the user explicitly asks to
apply a named change.
- [SKILLS-PORT-01] In repo-tracked files intended for public sharing or GitHub,
including `AGENTS.md`, `automation.toml`, `SKILL.md`, generated runtime
skill files, scripts, docs, and examples, do not hardcode user-local absolute
filesystem paths unless an external runtime explicitly requires them; use
repo-relative paths or portable variables such as `$CODEX_HOME`.
- For skill runtime workflows, invoke shared helpers through installed console
commands, `python -m <module>` entrypoints, or scripts copied into the
installed skill folder; do not locate shared helpers by absolute paths or by
the repo's parent directory.
- When a workflow needs a shared repo-maintenance script, run `scripts/<name>`
from the active source checkout root when available, otherwise from the
- self: list-heavy
- [SKILLS-RUNTIME-01] For skill runtime workflows, invoke shared helpers through
installed console commands, `python -m <module>` entrypoints, or scripts in
the installed skill folder; do not locate shared helpers by absolute paths or
by the repo's parent directory.
- overlaps: HELP-01
- [SKILLS-MAINT-01] When a workflow needs a shared repo-maintenance script, run
`scripts/<name>` from the active source checkout root when available, or the
installed skill folder; when a helper is skill-local, run it from that skill
folder or the corresponding source skill folder; stop as blocked if neither
declared location contains it.
- Prefer concise, principle-based, machine-oriented wording; avoid example lists
unless the examples are needed to disambiguate behavior.
- After instruction edits, verify the changed diff or reopened section and
confirm no new duplicate, contradiction, or dropped behavior was introduced.
- When an automation uses a script or helper, compare prompt and code before
finishing and keep outcome, blocker, cleanup, alert, and memory paths aligned.
- Put deterministic, testable, or procedural automation behavior in scripts or
helpers rather than prompt text when such helpers exist.
- When updating an automation, skill, instruction, or related helper script,
- [SKILLS-STYLE-01] Prefer concise, principle-based, machine-oriented wording;
avoid example lists unless needed to disambiguate behavior.
- overlaps: OUT-01, OUT-02
- [SKILLS-VERIFY-01] After instruction edits, verify the changed diff or
reopened section and confirm no new duplicate, contradiction, or dropped
behavior was introduced.
- [SKILLS-AUTO-01] When an automation uses a script or helper, compare prompt
and code before finishing and keep outcome, blocker, cleanup, alert, and
memory paths aligned.
- self: list-heavy
- [SKILLS-HELP-01] Put deterministic, testable, or procedural automation
behavior in scripts or helpers rather than prompt text when helpers exist.
- [SKILLS-CREDIT-01] When updating an automation, skill, instruction, or helper,
assess whether the change could materially increase recurring or avoidable
credit usage; if so, report that before treating the update as done.
- self: list-heavy
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,8 @@ Reusable Ceratops skills for Codex and other `SKILL.md`-compatible agents.
| Skill | Purpose |
| --- | --- |
| `ceratops-gh-repo-lifecycle` | Route GitHub repo lifecycle work across create-or-publish, contracts-review, health-audit, dependency-maintenance, ensure-pr, ship-change, and merge-pr actions. |
| `ceratops-propose-rules-update` | Design compact, regression-safe changes across interacting instruction scopes. |
| `ceratops-governance-lifecycle` | Route prompt optimization, advisory skill optimization, regression-safe instruction updates, and cross-scope governance consistency audits across action references. |
| `ceratops-credit-savings-analysis` | Analyze recent Codex runs for avoidable credit spend and recommend low-maintenance controls. |
| `ceratops-prompt-optimizer` | Rewrite rough prompts into clearer structured prompts without changing intent. |
| `ceratops-skill-optimize` | Propose advisory-only improvements for one skill by default or an explicitly requested skill set. |
| `ceratops-skill-lifecycle` | Route skill lifecycle work across create, make-repo-compatible, update, skills-contract-review, skills-consistency-review, fast-change, change-promotion, and ship-to-remote actions. |
| `ceratops-automation-run` | Run recurring automations with shared Ceratops alert, memory, and completion policy. |
| `ceratops-task-lifecycle` | Route task execution, fix-loop break, same-thread resume, handoff, and closure-check work across action references. |
Expand Down
3 changes: 2 additions & 1 deletion skills/ceratops-credit-savings-analysis/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ cannot be identified.
inspected evidence as implemented or still unimplemented; omit implemented
controls unless needed to justify that no still-unimplemented proposal
remains.
- Merge recommendations that share the same producer and control.
- When prompt-level savings cases exist, rank the top five evidence-backed
cases, or all available cases when fewer exist, using only information
available when each prompt was written; present them as
Expand All @@ -71,7 +72,7 @@ cannot be identified.
- If the active issue is one unresolved bug, use `$ceratops-task-lifecycle` with
the `fixloop-break` or `execute-in-stages` action first.
- If the user already knows the specific rule to change, use
`$ceratops-propose-rules-update`.
`$ceratops-governance-lifecycle` action `propose-rules-update`.

### Workflow

Expand Down
98 changes: 98 additions & 0 deletions skills/ceratops-governance-lifecycle/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
name: ceratops-governance-lifecycle
description: Route Ceratops governance work across prompt optimization, advisory skill optimization, regression-safe instruction updates, and cross-scope governance consistency audits. Use when Codex should rewrite a rough prompt without executing it, recommend exact changes to existing skills without applying them, diagnose and route approved instruction changes, or audit alignment across AGENTS files, automations, directly referenced helpers, and governance owners.
---

# Ceratops Governance Lifecycle

## Goal

Route governance work to the narrowest action reference while keeping prompt,
skill, instruction, and cross-scope audit decisions in one capability surface.

## Context

### Action References

- Optimize a raw prompt without executing it: `references/optimize-prompt.md`
- Propose advisory-only improvements to existing skills:
`references/optimize-skill.md`
- Design or apply an approved regression-safe instruction change:
`references/propose-rules-update.md`
- Audit cross-scope governance consistency:
`references/governance-consistency-audit.md`

### Inputs To Capture

- Action intent and the target prompt, skill set, instruction stack, automation,
helper contract, policy surface, or governance scope.
- Expected deliverable, strict constraints, current source text, and available
regression or history evidence.
- Whether the task is advisory-only or authorizes an exact mutation.

Infer missing inputs from current context and local sources before asking.

## Constraints

### Shared Action Rules

- Preserve the target's intended meaning, purpose, constraints, and established
behavior except where the selected action explicitly permits an authorized
change.
- Use only the action-scoped work and evidence needed to satisfy the selected
action's completion gate; do not inspect or change unrelated surfaces.
- Do not mutate an artifact unless the selected action pre-authorizes that exact
mutation or the user authorizes the exact artifact and change.
- Keep prompt optimization and skill optimization advisory-only: do not execute
the underlying task or mutate artifacts.
- For skill optimization, rule updates, and governance audits, inspect companion
artifacts only when they govern the same behavior, evidence, or output
contract.

### Skill-Specific Rules

- For instruction updates, mutate only the exact artifacts the user authorized
after the proposal action accepts the candidate.

### Boundaries

- Use this skill for prompt optimization, advisory skill optimization,
instruction-system change design or approved application, and cross-scope
governance consistency audits.
- Use `$ceratops-skill-lifecycle` to create a skill or apply skill-source,
metadata, manifest, helper, validation, or documentation changes.
- Use the owning lifecycle audit for domain-specific repository, code, runtime,
GitHub, or skill-contract consistency.

### Workflow

#### 1. Classify the action

- Use `optimize-prompt` when the deliverable is a rewritten prompt and the task
must not be executed.
- Use `optimize-skill` when the deliverable is an exact advisory skill-change
proposal and files must remain unchanged.
- Use `propose-rules-update` when the task changes or reviews durable rules,
instructions, automation prompts, skill rules, helper contracts, or their
interactions.
- Use `governance-consistency-audit` when the task checks alignment across
AGENTS files, automations, directly referenced helpers, and delegated
governance owners.

#### 2. Close from action evidence

- Follow only the selected action unless its explicit boundary requires a
lifecycle handoff.
- Match the final claim and output to the selected action's completion gate.

## Done When

### Completion Gate

- The narrowest action was selected and its completion gate passed or its exact
blocker was reported.

### Output Contract

Return only the selected action's required output, unresolved blockers, and
important retained or unverified state.
6 changes: 6 additions & 0 deletions skills/ceratops-governance-lifecycle/agents/openai.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
interface:
display_name: "Ceratops Governance Lifecycle"
short_description: "Optimize and audit Codex governance"
icon_small: "./assets/ceratops-logo-500.png"
icon_large: "./assets/ceratops-logo-500.png"
default_prompt: "Use $ceratops-governance-lifecycle to select and run the narrowest prompt, skill, instruction, or governance-audit action for this request: {{USER_REQUEST}}"
Loading