First contract

Start Here

Run a tiny PersonaKit example and learn what each command proves before agent work begins.

This walkthrough does not ask PersonaKit to make a code change. It asks PersonaKit to prove the operating contract that an agent would receive before making a change.

1. Validate The Example Root

cd Site/public/examples/swift-cli-maintenance
personakit validate --root personakit-root

Expected shape:

Validation summary: personas=1 kits=1 directives=1 intents=0 references=0 skills=3 essentials=1 errors=0

What this proves: the authored PersonaKit root is structurally valid. The persona, directive, kit, skill declarations, essential, and session can be loaded before any agent work starts.

2. Inspect The Resolved Contract

personakit contract --root personakit-root --session cli-maintenance

The output is longer than this, but these are the first fields to care about:

{
  "sessionId" : "cli-maintenance",
  "personaId" : "cli-maintainer",
  "directiveId" : "bounded-cli-fix",
  "authorizedSkillIds" : [
    "code-editing"
  ],
  "forbiddenSkillIds" : [
    "autonomous-agent-loop",
    "deployment-runner"
  ],
  "injectedContractIds" : [
    "persona-activation-contract",
    "skill-authorization-contract"
  ],
  "isAuthorized" : true
}

What this proves: the named session resolves to one role, one directive, injected built-in contracts, and an explicit capability boundary. PersonaKit is no longer relying on prompt memory or implied intent.

3. Export The Handoff Context

personakit export --root personakit-root --session cli-maintenance

What this proves: the resolved operating contract can be exported as inspectable handoff context before any coding tool starts work.

How To Read The Payload

Section What To Check
Resolution The session, persona, directive, and kits match the work mode you intended.
Persona The role has the right responsibilities, values, and non-goals.
Skill Contract The needed capability is authorized and dangerous capabilities are forbidden.
Applied Kits The durable rules that shape this work mode are included.
Essentials Required grounding is present, including built-in PersonaKit contracts.
Directive The steps, stop points, acceptance criteria, and verification fit the task.
Handoff Context The exported Markdown is ready to copy into the coding tool you use for the actual work.

What You Proved

PersonaKit Studio uses this same resolved-contract model for visual inspection and pack maintenance, but this guide keeps the CLI and static example root as the primary practical path.

Next Step

Now that you have seen a resolved contract, learn how the pieces compose before choosing a root to adapt.

Continue to Learn PersonaKit