codi-cli / schemas
schemas
Type Aliases
AgentFrontmatterInput
type AgentFrontmatterInput = object;
Defined in: schemas/agent.ts:102
Validates the YAML frontmatter of a .codi/agents/<name>.md file.
Agent definitions are sub-agents that can be invoked during skill execution. Each agent has a system prompt (the Markdown body) and frontmatter that controls its behavior, tool access, and model settings.
Type Declaration
background?
optional background?: boolean;
color?
optional color?: string;
description?
optional description?: string;
disallowedTools?
optional disallowedTools?: string[];
effort?
optional effort?: "high" | "medium" | "low" | "max";
isolation?
optional isolation?: string;
managed_by?
optional managed_by?: "codi" | "user";
maxTurns?
optional maxTurns?: number;
mcpServers?
optional mcpServers?: string[];
memory?
optional memory?: "user" | "project" | "none";
model?
optional model?: string;
name
name: string;
permissionMode?
optional permissionMode?: "unrestricted" | "readonly" | "limited";
skills?
optional skills?: string[];
tools?
optional tools?: string[];
version?
optional version?: number;
AgentFrontmatterOutput
type AgentFrontmatterOutput = object;
Defined in: schemas/agent.ts:103
Validates the YAML frontmatter of a .codi/agents/<name>.md file.
Agent definitions are sub-agents that can be invoked during skill execution. Each agent has a system prompt (the Markdown body) and frontmatter that controls its behavior, tool access, and model settings.
Type Declaration
background?
optional background?: boolean;
color?
optional color?: string;
description
description: string;
disallowedTools?
optional disallowedTools?: string[];
effort?
optional effort?: "high" | "medium" | "low" | "max";
isolation?
optional isolation?: string;
managed_by
managed_by: "codi" | "user";
maxTurns?
optional maxTurns?: number;
mcpServers?
optional mcpServers?: string[];
memory?
optional memory?: "user" | "project" | "none";
model?
optional model?: string;
name
name: string;
permissionMode?
optional permissionMode?: "unrestricted" | "readonly" | "limited";
skills?
optional skills?: string[];
tools?
optional tools?: string[];
version
version: number;
EvalCase
type EvalCase = object;
Defined in: schemas/evals.ts:49
Validates a single evaluation test case for a skill.
Eval cases define prompts and expected behaviors used to assess skill quality during development and evolution.
Type Declaration
description
description: string;
expectations
expectations: string[];
files
files: string[];
id
id: string;
lastRunAt?
optional lastRunAt?: string;
passed?
optional passed?: boolean;
passRate?
optional passRate?: number;
prompt
prompt: string;
EvalsData
type EvalsData = object;
Defined in: schemas/evals.ts:50
Validates the evals.json file for a skill.
Each skill can have an evals.json file in its directory containing test
cases used to evaluate the skill’s behavior and guide evolution.
Type Declaration
cases
cases: object[];
lastUpdated?
optional lastUpdated?: string;
skillName
skillName: string;
FeedbackAgent
type FeedbackAgent = typeof FEEDBACK_AGENTS[number];
Defined in: schemas/feedback.ts:65
FeedbackEntry
type FeedbackEntry = object;
Defined in: schemas/feedback.ts:64
Validates a complete skill feedback entry stored in .codi/feedback/.
Each entry records a single skill execution outcome with optional issues and
improvement suggestions. Entries are used by codi skill evolve to propose
targeted skill improvements.
Type Declaration
agent
agent: "claude-code" | "cursor" | "codex" | "windsurf" | "cline" | "copilot";
id
id: string;
issues
issues: object[];
outcome
outcome: "success" | "partial" | "failure";
skillName
skillName: string;
suggestions
suggestions: string[];
taskSummary
taskSummary: string;
timestamp
timestamp: string;
FeedbackIssue
type FeedbackIssue = object;
Defined in: schemas/feedback.ts:63
Validates a single issue reported in skill feedback.
Issues are structured observations about problems encountered during skill execution, used to drive skill evolution and improvement.
Type Declaration
category
category:
| "trigger-miss"
| "trigger-false"
| "unclear-step"
| "missing-step"
| "wrong-output"
| "context-overflow"
| "other";
description
description: string;
severity
severity: "high" | "medium" | "low";
FeedbackOutcome
type FeedbackOutcome = typeof FEEDBACK_OUTCOMES[number];
Defined in: schemas/feedback.ts:66
FlagConditionsOutput
type FlagConditionsOutput = object;
Defined in: schemas/flag.ts:101
Conditions that gate a “conditional” mode flag.
At least one field must be present. When multiple fields are set, all must match.
Type Declaration
agent?
optional agent?: string[];
file_pattern?
optional file_pattern?: string[];
framework?
optional framework?: string[];
lang?
optional lang?: string[];
FlagDefinitionOutput
type FlagDefinitionOutput = object;
Defined in: schemas/flag.ts:102
Validates a single flag entry in .codi/flags.yaml.
Flags control feature toggles and configuration values that are injected into agent instruction files during generation.
Type Declaration
conditions?
optional conditions?: object;
conditions.agent?
optional agent?: string[];
conditions.file_pattern?
optional file_pattern?: string[];
conditions.framework?
optional framework?: string[];
conditions.lang?
optional lang?: string[];
locked
locked: boolean;
mode
mode:
| "enforced"
| "enabled"
| "disabled"
| "inherited"
| "delegated_to_agent_default"
| "conditional";
value?
optional value?: string | number | boolean | string[];
FlagModeOutput
type FlagModeOutput =
| "enforced"
| "enabled"
| "disabled"
| "inherited"
| "delegated_to_agent_default"
| "conditional";
Defined in: schemas/flag.ts:100
Valid values for the mode field in a flag definition.
Controls how Codi manages the flag’s value in generated agent instruction files.
HookDefinitionOutput
type HookDefinitionOutput = object;
Defined in: schemas/hooks.ts:39
Validates a single hook definition entry in a hooks configuration file.
Type Declaration
command
command: string;
condition
condition: string;
name
name: string;
staged_filter?
optional staged_filter?: string;
HooksConfigOutput
type HooksConfigOutput = object;
Defined in: schemas/hooks.ts:40
Validates the generated .codi/hooks.yaml configuration file.
This file is produced by codi generate (not hand-authored) and describes
how hooks are installed and managed across supported hook runners.
Type Declaration
custom
custom: Record<string, object[]>;
hooks
hooks: Record<string, Record<string, object[]>>;
install_method
install_method: "git-hooks" | "husky-append" | "pre-commit-append" | "manual";
runner
runner: "codi" | "none" | "husky" | "pre-commit";
version
version: "1";
IssueCategory
type IssueCategory = typeof ISSUE_CATEGORIES[number];
Defined in: schemas/feedback.ts:67
McpConfigInput
type McpConfigInput = object;
Defined in: schemas/mcp.ts:46
Validates the contents of .codi/mcp.yaml.
Defines MCP (Model Context Protocol) servers available to agents in this project.
Server names defined here can be referenced in agent frontmatter via mcpServers.
Type Declaration
servers?
optional servers?: Record<string, {
args?: string[];
command?: string;
enabled?: boolean;
env?: Record<string, string>;
headers?: Record<string, string>;
type?: "stdio" | "http";
url?: string;
}>;
McpConfigOutput
type McpConfigOutput = object;
Defined in: schemas/mcp.ts:47
Validates the contents of .codi/mcp.yaml.
Defines MCP (Model Context Protocol) servers available to agents in this project.
Server names defined here can be referenced in agent frontmatter via mcpServers.
Type Declaration
servers
servers: Record<string, {
args?: string[];
command?: string;
enabled?: boolean;
env?: Record<string, string>;
headers?: Record<string, string>;
type?: "stdio" | "http";
url?: string;
}>;
ProjectManifestInput
type ProjectManifestInput = object;
Defined in: schemas/manifest.ts:74
Validates the contents of a project’s codi.yaml manifest file.
The manifest is the primary project configuration document at .codi/codi.yaml.
It declares the project name, which agents to target, and which presets are installed.
Type Declaration
agents?
optional agents?: string[];
description?
optional description?: string;
engine?
optional engine?: object;
engine.requiredVersion?
optional requiredVersion?: string;
layers?
optional layers?: object;
layers.agents?
optional agents?: boolean;
layers.context?
optional context?: boolean;
layers.rules?
optional rules?: boolean;
layers.skills?
optional skills?: boolean;
name
name: string;
presetRegistry?
optional presetRegistry?: object;
presetRegistry.branch?
optional branch?: string;
presetRegistry.url
url: string;
presets?
optional presets?: string[];
version
version: "1";
ProjectManifestOutput
type ProjectManifestOutput = object;
Defined in: schemas/manifest.ts:75
Validates the contents of a project’s codi.yaml manifest file.
The manifest is the primary project configuration document at .codi/codi.yaml.
It declares the project name, which agents to target, and which presets are installed.
Type Declaration
agents?
optional agents?: string[];
description?
optional description?: string;
engine?
optional engine?: object;
engine.requiredVersion?
optional requiredVersion?: string;
layers?
optional layers?: object;
layers.agents
agents: boolean;
layers.context
context: boolean;
layers.rules
rules: boolean;
layers.skills
skills: boolean;
name
name: string;
presetRegistry?
optional presetRegistry?: object;
presetRegistry.branch
branch: string;
presetRegistry.url
url: string;
presets?
optional presets?: string[];
version
version: "1";
RuleFrontmatterInput
type RuleFrontmatterInput = object;
Defined in: schemas/rule.ts:64
Validates the YAML frontmatter of a .codi/rules/<name>.md file.
Rules are Markdown documents with frontmatter that define coding standards, conventions, and guidelines injected into agent instruction files.
Type Declaration
alwaysApply?
optional alwaysApply?: boolean;
description
description: string;
language?
optional language?: string;
managed_by?
optional managed_by?: "codi" | "user";
name
name: string;
priority?
optional priority?: "high" | "medium" | "low";
scope?
optional scope?: string[];
type?
optional type?: "rule";
version?
optional version?: number;
RuleFrontmatterOutput
type RuleFrontmatterOutput = object;
Defined in: schemas/rule.ts:65
Validates the YAML frontmatter of a .codi/rules/<name>.md file.
Rules are Markdown documents with frontmatter that define coding standards, conventions, and guidelines injected into agent instruction files.
Type Declaration
alwaysApply
alwaysApply: boolean;
description
description: string;
language?
optional language?: string;
managed_by
managed_by: "codi" | "user";
name
name: string;
priority
priority: "high" | "medium" | "low";
scope?
optional scope?: string[];
type
type: "rule";
version
version: number;
SkillFrontmatterInput
type SkillFrontmatterInput = object;
Defined in: schemas/skill.ts:135
Validates the YAML frontmatter of a .codi/skills/<name>/SKILL.md file.
Skills are reusable agent workflows with structured frontmatter that controls how they are invoked, which platforms they target, and how they run.
Type Declaration
agent?
optional agent?: string;
allowedTools?
optional allowedTools?: string[];
argumentHint?
optional argumentHint?: string;
category?
optional category?: string;
compatibility?
optional compatibility?: ("claude-code" | "cursor" | "codex" | "windsurf" | "cline" | "copilot")[];
context?
optional context?: "fork";
description
description: string;
disableModelInvocation?
optional disableModelInvocation?: boolean;
effort?
optional effort?: "high" | "medium" | "low" | "max";
hooks?
optional hooks?: Record<string, string | string[]>;
license?
optional license?: string;
managed_by?
optional managed_by?: "codi" | "user";
metadata?
optional metadata?: Record<string, string>;
model?
optional model?: string;
name
name: string;
paths?
optional paths?: string | string[];
shell?
optional shell?: "bash" | "powershell";
tools?
optional tools?: string[];
type?
optional type?: "skill";
user-invocable?
optional user-invocable?: boolean;
version?
optional version?: number;
SkillFrontmatterOutput
type SkillFrontmatterOutput = object;
Defined in: schemas/skill.ts:136
Validates the YAML frontmatter of a .codi/skills/<name>/SKILL.md file.
Skills are reusable agent workflows with structured frontmatter that controls how they are invoked, which platforms they target, and how they run.
Type Declaration
agent?
optional agent?: string;
allowedTools?
optional allowedTools?: string[];
argumentHint?
optional argumentHint?: string;
category?
optional category?: string;
compatibility?
optional compatibility?: ("claude-code" | "cursor" | "codex" | "windsurf" | "cline" | "copilot")[];
context?
optional context?: "fork";
description
description: string;
disableModelInvocation?
optional disableModelInvocation?: boolean;
effort?
optional effort?: "high" | "medium" | "low" | "max";
hooks?
optional hooks?: Record<string, string | string[]>;
license?
optional license?: string;
managed_by
managed_by: "codi" | "user";
metadata?
optional metadata?: Record<string, string>;
model?
optional model?: string;
name
name: string;
paths?
optional paths?: string | string[];
shell?
optional shell?: "bash" | "powershell";
tools?
optional tools?: string[];
type
type: "skill";
user-invocable?
optional user-invocable?: boolean;
version
version: number;
SkillTestManifest
type SkillTestManifest = object;
Defined in: schemas/skill-test.ts:27
Type Declaration
skill
skill: string;
tiers
tiers: object;
tiers.behavior?
optional behavior?: object;
tiers.behavior.port?
optional port?: number;
tiers.behavior.server
server: string;
tiers.behavior.startScript
startScript: string;
tiers.behavior.tests
tests: string;
tiers.contract
contract: boolean;
tiers.logic?
optional logic?: object;
tiers.logic.lib
lib: string;
tiers.logic.tests
tests: string;
Variables
AgentFrontmatterSchema
const AgentFrontmatterSchema: ZodObject<AgentFrontmatterOutput>;
Defined in: schemas/agent.ts:16
Validates the YAML frontmatter of a .codi/agents/<name>.md file.
Agent definitions are sub-agents that can be invoked during skill execution. Each agent has a system prompt (the Markdown body) and frontmatter that controls its behavior, tool access, and model settings.
EvalCaseSchema
const EvalCaseSchema: ZodObject<EvalCase>;
Defined in: schemas/evals.ts:9
Validates a single evaluation test case for a skill.
Eval cases define prompts and expected behaviors used to assess skill quality during development and evolution.
EvalsDataSchema
const EvalsDataSchema: ZodObject<EvalsData>;
Defined in: schemas/evals.ts:39
Validates the evals.json file for a skill.
Each skill can have an evals.json file in its directory containing test
cases used to evaluate the skill’s behavior and guide evolution.
FEEDBACK_AGENTS
const FEEDBACK_AGENTS: readonly ["claude-code", "codex", "cursor", "windsurf", "cline", "copilot"];
Defined in: schemas/feedback.ts:5
Agent ids that can be the source of skill feedback entries.
FEEDBACK_OUTCOMES
const FEEDBACK_OUTCOMES: readonly ["success", "partial", "failure"];
Defined in: schemas/feedback.ts:8
Possible outcomes of a skill execution: ‘success’, ‘partial’, or ‘failure’.
FeedbackEntrySchema
const FeedbackEntrySchema: ZodObject<FeedbackEntry>;
Defined in: schemas/feedback.ts:52
Validates a complete skill feedback entry stored in .codi/feedback/.
Each entry records a single skill execution outcome with optional issues and
improvement suggestions. Entries are used by codi skill evolve to propose
targeted skill improvements.
FeedbackIssueSchema
const FeedbackIssueSchema: ZodObject<FeedbackIssue>;
Defined in: schemas/feedback.ts:30
Validates a single issue reported in skill feedback.
Issues are structured observations about problems encountered during skill execution, used to drive skill evolution and improvement.
FlagConditionsSchema
const FlagConditionsSchema: ZodObject<FlagConditionsOutput>;
Defined in: schemas/flag.ts:26
Conditions that gate a “conditional” mode flag.
At least one field must be present. When multiple fields are set, all must match.
FlagDefinitionSchema
const FlagDefinitionSchema: ZodObject<FlagDefinitionOutput>;
Defined in: schemas/flag.ts:65
Validates a single flag entry in .codi/flags.yaml.
Flags control feature toggles and configuration values that are injected into agent instruction files during generation.
FlagModeSchema
const FlagModeSchema: ZodEnum<FlagModeOutput>;
Defined in: schemas/flag.ts:8
Valid values for the mode field in a flag definition.
Controls how Codi manages the flag’s value in generated agent instruction files.
FlagValueSchema
const FlagValueSchema: ZodUnion<readonly [ZodBoolean, ZodNumber, ZodString, ZodArray<ZodString>]>;
Defined in: schemas/flag.ts:55
The valid value types for a flag.
HookDefinitionSchema
const HookDefinitionSchema: ZodObject<HookDefinitionOutput>;
Defined in: schemas/hooks.ts:5
Validates a single hook definition entry in a hooks configuration file.
HooksConfigSchema
const HooksConfigSchema: ZodObject<HooksConfigOutput>;
Defined in: schemas/hooks.ts:18
Validates the generated .codi/hooks.yaml configuration file.
This file is produced by codi generate (not hand-authored) and describes
how hooks are installed and managed across supported hook runners.
ISSUE_CATEGORIES
const ISSUE_CATEGORIES: readonly ["trigger-miss", "trigger-false", "unclear-step", "missing-step", "wrong-output", "context-overflow", "other"];
Defined in: schemas/feedback.ts:11
Categories for classifying issues found during skill feedback collection.
McpConfigSchema
const McpConfigSchema: ZodObject<McpConfigOutput>;
Defined in: schemas/mcp.ts:37
Validates the contents of .codi/mcp.yaml.
Defines MCP (Model Context Protocol) servers available to agents in this project.
Server names defined here can be referenced in agent frontmatter via mcpServers.
ProjectManifestSchema
const ProjectManifestSchema: ZodObject<ProjectManifestOutput>;
Defined in: schemas/manifest.ts:10
Validates the contents of a project’s codi.yaml manifest file.
The manifest is the primary project configuration document at .codi/codi.yaml.
It declares the project name, which agents to target, and which presets are installed.
RuleFrontmatterSchema
const RuleFrontmatterSchema: ZodObject<RuleFrontmatterOutput>;
Defined in: schemas/rule.ts:15
Validates the YAML frontmatter of a .codi/rules/<name>.md file.
Rules are Markdown documents with frontmatter that define coding standards, conventions, and guidelines injected into agent instruction files.
SkillFrontmatterSchema
const SkillFrontmatterSchema: ZodObject<SkillFrontmatterOutput>;
Defined in: schemas/skill.ts:19
Validates the YAML frontmatter of a .codi/skills/<name>/SKILL.md file.
Skills are reusable agent workflows with structured frontmatter that controls how they are invoked, which platforms they target, and how they run.
SkillTestManifestSchema
const SkillTestManifestSchema: ZodObject<SkillTestManifest>;
Defined in: schemas/skill-test.ts:3