constitution

constitution is an agent for Claude Code from ZTE-AICloud/Co-OmniSpec. It costs 34 tokens per session (4,269 once invoked), scanned A, original, MIT.

A project-governance workflow that creates or updates a constitution file: a document describing the project's rules and principles. It also keeps related planning templates in sync.

In plain words
What is it for?
Use it to fill in a project's constitution, update its principles, and align design, specification, and task templates with those changes.
Why use it?
It removes the need to maintain project rules and their dependent templates by hand. It provides a defined place for decisions about standards, versions, and compliance.

Agent for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions subagents; mentions Claude Code.

Installs and runs on its own, but its text points at files inside its plugin — anything it tells you to read at a ${CLAUDE_PLUGIN_ROOT} path is only there once the plugin is installed. Installing the plugin gets both.

Part of the omni-dsdd plugin — 40 skills, 16 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/zte-aicloud/co-omnispec/constitution
Clone the repo
git clone --depth 1 https://github.com/ZTE-AICloud/Co-OmniSpec

Made for: Claude Code.

Or install omni-dsdd, the plugin that ships this one along with the rest of its 40 skills, 16 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for constitution

README.md
[![agentmods](https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/constitution.svg)](https://agentmods.dev/agents/zte-aicloud/co-omnispec/constitution)
Your own site
<a href="https://agentmods.dev/agents/zte-aicloud/co-omnispec/constitution"><img src="https://agentmods.dev/badge/agents/zte-aicloud/co-omnispec/constitution.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,269 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.04269
Opus 5 $0.00017 $0.02135
Sonnet 5 $0.00007 $0.00854
Haiku 4.5 $0.00003 $0.00427

Measured 6d ago against content hash c7150c1d0a54, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

constitution scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

omni-dsdd/agents/constitution.md · 240 lines

How it starts

The opening of the file, as written. The whole thing — 240 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目章程创建与更新

用户输入

$ARGUMENTS

在继续之前, 你必须考虑用户的消息内容(如果不为空).


环境初始化

本技能所有读写路径均基于以下变量。后续步骤不得用裸相对路径 .omni-infra/... 绕过它们。

变量 含义 用途
CLAUDE_PLUGIN_ROOT Omni 插件安装根目录 定位插件内 omni-infra/ 种子、init_omni_infra.sh
CLAUDE_WORKING_DIR 用户当前工作区目录(可为 Git 仓库子目录) 定位工作区 .omni-infra/ 下章程与模板
KNOWLEDGE_DIR 私域知识库根目录(私域知识检索用,与反构文档库独立) 定位知识源目录与 knowledge.config.yaml;由 Step 0.2 解析(读 .omni-infra/knowledge.path,缺失回退 omni-doc

工作区路径约定(全文统一使用)

符号 展开路径
章程文件 ${CLAUDE_WORKING_DIR}/.omni-infra/memory/constitution.md
设计模板 ${CLAUDE_WORKING_DIR}/.omni-infra/templates/design-template.md
任务模板 ${CLAUDE_WORKING_DIR}/.omni-infra/templates/tasks-template.md
规范模板 ${CLAUDE_WORKING_DIR}/.omni-infra/templates/spec-template.md
知识库路径标记 ${CLAUDE_WORKING_DIR}/.omni-infra/knowledge.path(init 脚本写入的生效 KNOWLEDGE_DIR 绝对路径,constitution 读取)
知识源检查路径 ${KNOWLEDGE_DIR}(读 knowledge.path;缺失回退 ${CLAUDE_WORKING_DIR}/omni-doc
知识检索配置 ${KNOWLEDGE_DIR}/knowledge.config.yaml(由 sdd 初始化脚本 init_omni_infra.sh 生成,非本技能职责)
插件 omni-infra 种子 ${CLAUDE_PLUGIN_ROOT}/omni-infra/(仅 .omni-infra 尚未存在时参考)
插件 knowledge 配置模板 ${CLAUDE_PLUGIN_ROOT}/skills/knowledge-retrieval/knowledge.config.yamlinit_omni_infra.sh 拷贝源)

Step 0.1 检查变量是否已存在

test -n "${CLAUDE_PLUGIN_ROOT:-}" && test -d "${CLAUDE_PLUGIN_ROOT}"
test -n "${CLAUDE_WORKING_DIR:-}" && test -d "${CLAUDE_WORKING_DIR}"
test -n "${KNOWLEDGE_DIR:-}"   # 仅判非空;不要求目录必须存在(私域知识库为可选)

CLAUDE_PLUGIN_ROOT / CLAUDE_WORKING_DIR 两项均通过 → 进入 Step 0.3。
任一项失败 → 执行 Step 0.2。
KNOWLEDGE_DIR 仅为空时参与 Step 0.2 补全(已非空则沿用,不强制目录存在)。

Step 0.2 补全缺失变量(仅 Agent 层执行一次)

CLAUDE_PLUGIN_ROOT

  1. 若 Claude Code 已注入且目录存在:沿用。
  2. 若仍缺失,按顺序降级(须验证 ${路径}/skills/constitution/SKILL.md 存在):
    • Skill 加载上下文中的插件安装根;
    • ${CLAUDE_WORKING_DIR} 或其上级查找含 .claude-plugin/plugin.json 的目录;
  3. export CLAUDE_PLUGIN_ROOT="<绝对路径>"
  4. 失败 → 终止并提示配置插件。

Read the full file on GitHub · 240 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 240 lines · 34 tokens per session scan A c7150c1d0a54

Subscribe to this mod's changes

constitution is an agent published in the GitHub repository ZTE-AICloud/Co-OmniSpec (54 stars, last pushed 1mo ago), licensed MIT. It adds 34 tokens to every session and 4,269 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.