ad-hoc-profile-load

Load an agent profile on demand to adopt a specific role for the current session. Applies the profile's identity, governance scope, boundaries, and initialization declaration without requiring a running mission. Triggers: "act as the architect", "load the reviewer profile", "switch to implementer", "use the researcher persona", "start a session as planner", "adopt the curator role", "initialize profile", "assume the designer identity". Does NOT handle: mission advancement (use runtime-next), charter interview/generation (use charter-doctrine), or profile creation (use spec-kitty agent profile create).

1,029 stars

Best use case

ad-hoc-profile-load is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Load an agent profile on demand to adopt a specific role for the current session. Applies the profile's identity, governance scope, boundaries, and initialization declaration without requiring a running mission. Triggers: "act as the architect", "load the reviewer profile", "switch to implementer", "use the researcher persona", "start a session as planner", "adopt the curator role", "initialize profile", "assume the designer identity". Does NOT handle: mission advancement (use runtime-next), charter interview/generation (use charter-doctrine), or profile creation (use spec-kitty agent profile create).

Teams using ad-hoc-profile-load should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/ad-hoc-profile-load/SKILL.md --create-dirs "https://raw.githubusercontent.com/Priivacy-ai/spec-kitty/main/src/doctrine/skills/ad-hoc-profile-load/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/ad-hoc-profile-load/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How ad-hoc-profile-load Compares

Feature / Agentad-hoc-profile-loadStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Load an agent profile on demand to adopt a specific role for the current session. Applies the profile's identity, governance scope, boundaries, and initialization declaration without requiring a running mission. Triggers: "act as the architect", "load the reviewer profile", "switch to implementer", "use the researcher persona", "start a session as planner", "adopt the curator role", "initialize profile", "assume the designer identity". Does NOT handle: mission advancement (use runtime-next), charter interview/generation (use charter-doctrine), or profile creation (use spec-kitty agent profile create).

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# ad-hoc-profile-load

Load an agent profile interactively to adopt a specific role for the current
session. This skill is for ad-hoc use outside the mission runtime loop — when
a user wants an agent to behave as a particular role without starting a formal
mission.

---

## When to Use This Skill

Use this when the user asks you to:

- Act as a specific agent role (architect, reviewer, implementer, etc.)
- Load a profile for an interactive session
- Adopt role-scoped boundaries and governance context
- Switch roles mid-conversation

Do NOT use this when:

- A mission is running and `spec-kitty next` is driving the loop — the
  runtime assigns profiles automatically via DDR-011 matching
- The user wants to create a new profile — use `spec-kitty agent profile create`
- The user wants to modify an existing profile — edit the YAML directly

---

## Step 1: Resolve the Profile

If the user names a profile directly, load it. If they describe a role or
task, resolve the best match.

**By explicit ID:**

```bash
spec-kitty agent profile show <profile-id>
```

```python
from doctrine.agent_profiles import AgentProfileRepository

repo = AgentProfileRepository(project_dir=project_agents_dir)
profile = repo.resolve_profile("architect")
```

**By task context (when the user describes what they want to do):**

```python
from doctrine.agent_profiles.profile import TaskContext

context = TaskContext(
    languages=["python"],
    frameworks=["fastapi", "pytest"],
    file_patterns=["src/**/*.py"],
    domain_keywords=["architecture", "design"],
)

profile = repo.find_best_match(context)
```

**Discovery (when the user is unsure which profile to use):**

```bash
spec-kitty agent profile list
spec-kitty agent profile hierarchy
```

---

## Step 2: Apply the Profile

Once resolved, adopt the profile by internalizing three things:

### Identity

Read `initialization_declaration` — this is your startup persona statement.
Acknowledge it at the beginning of the session.

```python
print(profile.initialization_declaration)
# "I am Architect Alphonso. I design scalable, maintainable system
#  architectures using established design patterns and principles..."
```

### Boundaries

Read `specialization` — this defines your scope:

- `primary_focus` — what you actively do
- `secondary_awareness` — what you consider but don't own
- `avoidance_boundary` — what you must not do

Before taking any action, check whether it falls within your boundaries.
If the user asks you to do something in the avoidance boundary, acknowledge
the request and explain which role would handle it instead (using
`collaboration.handoff_to`).

### Governance Scope

The profile's `context_sources` declares which doctrine layers and specific
directives are relevant to this role. Load only those:

```python
from doctrine.service import DoctrineService

service = DoctrineService(shipped_root, project_root)

# Load directives referenced by this profile
for ref in profile.directive_references:
    directive = service.directives.get(f"DIRECTIVE_{ref.code}")
    # Apply this directive's constraints to your behavior
```

Do NOT load the full doctrine catalog. The profile scopes what matters.

---

## Step 3: Scope Governance Context

After adopting the profile, load charter context scoped to the action
the user wants to perform:

```bash
spec-kitty charter context --action implement --json
```

If the user hasn't named an action, infer it from the profile's
`canonical_verbs`:

| Profile | Canonical verbs | Default action |
|---|---|---|
| architect | design, evaluate, decide, model, specify | specify |
| planner | plan, prioritize, decompose, schedule | plan |
| implementer | implement, fix, refactor, test, debug | implement |
| reviewer | review, approve, reject, assess | review |
| researcher | research, investigate, evaluate, synthesize | specify |
| curator | curate, validate, update, reconcile | review |
| designer | design, prototype, sketch, iterate | specify |

---

## Step 4: Maintain Role Throughout the Session

### Respect Handoffs

When work falls outside your boundaries, name the appropriate role:

```
"This requires implementation work. That's in Implementer Ivan's scope —
I can hand off my architectural notes for them to execute."
```

The profile's `collaboration` section defines:
- `handoff_to` — roles you delegate work to
- `handoff_from` — roles that delegate to you
- `works_with` — roles you collaborate with in parallel

### Pull Doctrine On Demand

When you need guidance mid-session, pull specific tactics or directives
relevant to your current task — don't reload the full context:

```python
# Need guidance on a design decision?
tactic = service.tactics.get("adr-drafting-workflow")

# Need to check a quality gate?
directive = service.directives.get("DIRECTIVE_030")
```

### Mode Selection

The profile's `mode_defaults` lists the working modes this role supports.
If the user's request maps to a specific mode, acknowledge it:

```python
for mode in profile.mode_defaults:
    # mode.mode → "analysis", "design", "review", etc.
    # mode.description → what this mode is for
    # mode.use_case → when to activate it
    pass
```

---

## Step 5: Tool Context Persistence (Optional)

To persist the profile for the current tool so it loads automatically on
next session:

```bash
spec-kitty agent profile init <profile-id>
```

This writes a `spec-kitty.profile-context.md` file to the active tool's
command directory (e.g., `.claude/commands/`, `.cursor/commands/`). The
profile context is then available to the agent on every invocation until
replaced.

---

## Quick Reference

```bash
# List profiles
spec-kitty agent profile list

# Inspect a profile
spec-kitty agent profile show architect

# View hierarchy
spec-kitty agent profile hierarchy

# Persist to tool context
spec-kitty agent profile init architect
```

```python
from doctrine.agent_profiles import AgentProfileRepository
from doctrine.service import DoctrineService

# Load profile
repo = AgentProfileRepository()
profile = repo.resolve_profile("architect")

# Read identity
profile.initialization_declaration
profile.specialization.primary_focus
profile.specialization.avoidance_boundary

# Load scoped doctrine
service = DoctrineService(shipped_root, project_root)
for ref in profile.directive_references:
    service.directives.get(f"DIRECTIVE_{ref.code}")

# Check boundaries before acting
if task_type in profile.specialization.avoidance_boundary:
    suggest_handoff(profile.collaboration.handoff_to)
```

Related Skills

spec-kitty-setup-doctor

1029
from Priivacy-ai/spec-kitty

Install, verify, and recover the modern Spec Kitty 2.0.11+ operating surface. Triggers: "set up Spec Kitty", "skills missing", "next is blocked", "runtime is broken", "doctrine assets are missing", "my agent can't find the skills". Does NOT handle: generic coding questions with no Spec Kitty context, direct runtime loop advancement, or editorial glossary maintenance.

spec-kitty-runtime-review

1029
from Priivacy-ai/spec-kitty

Review runtime-owned outputs using the Spec Kitty review workflow surface, then direct approval or rejection with structured feedback. Triggers: "review this work package", "check runtime output", "approve this step", "review WP", "is this WP ready to approve", "check this implementation". Does NOT handle: setup-only repair requests, direct implementation work, editorial glossary maintenance, or runtime loop advancement.

spec-kitty-runtime-next

1029
from Priivacy-ai/spec-kitty

Drive the canonical spec-kitty next --agent <name> control loop for mission advancement. Load agent profiles at init, apply action-scoped doctrine context at each step boundary, and pull specific tactics/directives on demand. Triggers: "run the next step", "what should runtime do next", "advance the mission", "what is the next task", "continue the workflow", "what step comes next". Does NOT handle: setup or repair requests, purely editorial glossary or doctrine maintenance, or direct code review.

spec-kitty-orchestrator-api-operator

1029
from Priivacy-ai/spec-kitty

Teach agents and external systems how to use spec-kitty orchestrator-api to drive workflows from outside the host CLI. Triggers: "use orchestrator-api", "build a custom orchestrator", "automate externally", "integrate CI with spec-kitty", "call spec-kitty from another tool", "orchestrator contract", "external automation". Does NOT handle: host-internal lane mutation (use the host CLI directly), runtime loop advancement (use spec-kitty next), mission sequencing logic (the mission state machine owns that), or setup/repair diagnostics.

spec-kitty-mission-system

1029
from Priivacy-ai/spec-kitty

Understand how Spec Kitty missions work: the 4 built-in mission types, how they define workflows via step contracts and action indices, how missions and work packages relate, how templates are resolved through the 5-tier chain, and how doctrine artifacts (procedures, tactics, directives) compose mission behavior. Triggers: "what missions are available", "how do missions work", "which mission should I use", "explain the mission system", "what is a mission", "change the mission", "mission templates", "step contracts", "action index", "mission procedures". Does NOT handle: runtime loop advancement (use runtime-next), setup or repair (use setup-doctor), governance (use charter-doctrine), or glossary curation (use glossary-context).

spec-kitty-mission-review

1029
from Priivacy-ai/spec-kitty

Review a fully merged Spec Kitty mission post-merge (all WPs done/approved) to verify spec→code fidelity, FR coverage, drift, risks, and security. Triggers: "review the merged mission", "post-merge mission review", "verify the completed mission", "audit the mission implementation", "mission-level acceptance review", "is this mission releasable", "final review before tagging", "cross-WP coverage audit". Does NOT handle: per-WP review during implementation (use spec-kitty-runtime-review), implement-review loop orchestration (use spec-kitty-implement-review), setup or repair (use spec-kitty-setup-doctor), or glossary maintenance (use spec-kitty-glossary-context).

spec-kitty-implement-review

1029
from Priivacy-ai/spec-kitty

Orchestrate the implement-review loop for Spec Kitty work packages using any configured agent. Covers agent dispatch, state transitions, rejection cycles, arbiter escalation, and dependency-aware sequencing across all 13 supported coding agents. Triggers: "implement and review WPs", "run the implement-review loop", "orchestrate WP implementation", "dispatch agents for WPs", "coordinate implement and review", "sprint through WPs". Does NOT handle: specify/plan/tasks phases, setup or repair, glossary maintenance, or direct code editing by the orchestrator.

spec-kitty-glossary-context

1029
from Priivacy-ai/spec-kitty

Curate and apply canonical terminology across Spec Kitty missions. Triggers: "update the glossary", "use canonical terms", "check terminology", "add a term", "fix term drift", "glossary conflicts", "resolve ambiguity", "review terminology consistency". Does NOT handle: runtime loop advancement, setup or repair requests, agent configuration, or direct code implementation tasks.

spec-kitty-git-workflow

1029
from Priivacy-ai/spec-kitty

Understand how Spec Kitty manages git: what git operations Python handles automatically, what agents must do manually, worktree lifecycle, auto-commit behavior, merge execution, and the safe-commit pattern. Triggers: "how does spec-kitty use git", "worktree management", "auto-commit", "who commits what", "git workflow", "merge workflow", "rebase WPs", "worktree cleanup", "safe commit". Does NOT handle: runtime loop advancement (use runtime-next), setup or repair (use setup-doctor), mission selection (use mission-system).

spec-kitty-charter-doctrine

1029
from Priivacy-ai/spec-kitty

Run charter interview, generation, context, and sync workflows for project governance in Spec Kitty 3.x. Access doctrine artifacts programmatically via DoctrineService. Resolve agent profiles. Load action-scoped governance context iteratively, not all at once. Triggers: "interview for charter", "generate charter", "sync charter", "use doctrine", "set up governance", "charter status", "extract governance config", "load doctrine", "agent profile", "DoctrineService", "action index". Does NOT handle: generic spec writing not tied to governance, direct runtime loop advancement, setup/repair diagnostics, or editorial glossary maintenance.

spec-kitty-bulk-edit-classification

1029
from Priivacy-ai/spec-kitty

Recognize when a mission is a bulk edit and drive the occurrence-classification guardrail on the user's behalf. Triggers: user says any variant of "rename X to Y", "change the terminology", "migrate all occurrences", "replace across the codebase", "the X feature is now the Y feature", "sed everywhere", or any request that touches the same identifier/path/key in many files. Also triggers on gate errors mentioning "change_mode", "occurrence_map.yaml", "Bulk Edit Gate: BLOCKED", or "Bulk Edit Review: Diff Compliance". Does NOT handle: line-level semantic refactors inside one file, adding a new feature that creates new identifiers without changing existing ones, or reviewing finished missions for fidelity.

spec-kitty-constitution-doctrine

1012
from Priivacy-ai/spec-kitty

Run constitution interview, generation, context, and sync workflows for project governance in Spec Kitty 2.x. Triggers: "interview for constitution", "generate constitution", "sync constitution", "use doctrine", "set up governance", "constitution status", "extract governance config". Does NOT handle: generic spec writing not tied to governance, direct runtime loop advancement, setup/repair diagnostics, or editorial glossary maintenance.