Skip to main content

Agent profile switcher for USER.md, SOUL.md, and AGENTS.md persona sets.

Project description

🎭 dprofile

PyPI version Python versions License: MIT CI

Instant Persona Switching for AI Agents.

dprofile is a safe, deterministic profile switcher designed for the modern Agent era. It treats persona sets (USER.md, SOUL.md, AGENTS.md) as atomic units, allowing both humans and AI Agents to swap identities in milliseconds.

SKILL.md is the primary Agent interface for this project. It defines the workflow and safety rules. The CLI is the secondary deterministic executor and fallback guide.

中文版 (Chinese Version)


✨ Key Features

  • 🤖 Agent-Native: Designed to be called by Agents to self-evolve or switch sub-agent configurations.
  • 🛡️ Safety First: Automatic backups, state tracking, and validation of target directories.
  • 🏗️ The Three-Layer Model:
    • USER.md: Who you are helping (Background & Preferences).
    • SOUL.md: Who you are (Identity & Values).
    • AGENTS.md: How you work (Tools & Protocols).
  • 🔗 Hybrid Modes: Switch via Symlinks (for live updates) or Copy (for portable exports).

🚀 Quick Start

Start by installing the Agent skill. In your Agent, ask:

Install the dprofile skill from github.com/pythias/dprofile.

After the skill is installed, ask the Agent to use a profile:

Use the coding profile for this project with Codex.

The Agent should read SKILL.md, classify the target, and choose the correct operation. For code projects, that usually means generating adapter files through dprofile init.

The CLI is optional but recommended for deterministic execution:

pip install dprofile

📖 Usage Patterns

1. Agent Configs

Agents use dprofile to switch their own identity or configure specialized worker profiles in Agent-owned config directories.

# Agent instruction: "Switch my Codex persona to 'architect'."
dprofile switch architect --target-dir ~/.codex

2. Code Projects

Code projects may be opened by many Agents and IDEs, so dprofile treats USER.md, SOUL.md, and AGENTS.md as profile source files rather than files to drop into a repository root.

For project directories, use the adapter workflow described in SKILL.md: generate under .dprofile/generated/<adapter>/ first, then activate only the Agent-specific files you want, such as CLAUDE.md, .cursor/rules/dprofile.mdc, .github/copilot-instructions.md, GEMINI.md, or AGENTS.md.

Adapters do not all receive the same source layers. Claude and Gemini get the full profile context, while Cursor, Copilot, Codex, and OpenCode default to the operating protocol layer so project instructions stay focused.

# Install project instructions for one AI assistant
dprofile init coding --target-dir . --ai codex

# Install for several assistants
dprofile init coding --target-dir . --ai claude,cursor,copilot

# Generate only, without activating native files
dprofile apply coding --target-dir . --agents all

3. Optional CLI (Human or Automation)

Developers can manage Agent-owned config directories directly.

# List all available personas
dprofile list

# Switch a dedicated Agent config directory to 'coding' mode
dprofile switch coding --target-dir ./my-project/.agent-config

🗃️ Bundled Profiles

dprofile comes with 25+ production-ready personas categorized for quick access:

🏗️ Engineering & AI

  • architect: System boundaries and engineering decisions.
  • coding: Direct implementation and fixes.
  • reviewer: Risk-first feedback and code quality.
  • debugger: Hypothesis-driven root cause analysis.
  • ops: SRE, production, and infrastructure.
  • ai-infra: GPUs, vLLM, MCP, and inference optimization.
  • ml-researcher: Model experiments and benchmarks.

📝 Content & Design

  • writer: Long-form content and editing.
  • copywriter: Conversion, headlines, and clarity.
  • social-media: Platform-native posts (X, Red, Weibo).
  • designer: UI systems and visual design.

🚀 Strategy & Product

  • product-manager: Scenarios, scope, and PRDs.
  • founder-mode: High-leverage judgment and growth.
  • sales: Persuasion, demos, and follow-ups.
  • customer-support: Resolution and FAQ management.

🧠 Critical Thinking & Utility

  • slow-thinker: Deep reasoning and alternatives.
  • challenger: Rigorous pushback and assumption testing.
  • minimalist: Extreme conciseness.
  • prompt-engineer: Agent workflows and tool routing.
  • executor: Direct task execution.
  • completionist: End-to-end delivery with tests/docs.

🛠️ Commands

Command Description
dprofile guide Explain when to use switch, init, and apply.
dprofile list List all available profiles in the library.
dprofile init Install project adapter files for one or more AI assistants.
dprofile apply Generate project adapter files, optionally activating verified outputs.
dprofile switch Switch an Agent-owned config directory to a specific profile.
dprofile show Inspect current state or a specific profile.
dprofile diff Compare two profiles side-by-side.
dprofile validate-target Ensure a directory is safe for profile management.

🤝 Development & Release

Testing

python3 -m unittest discover -s tests -v

Publishing a Release

  1. Update version in pyproject.toml and dprofile/__init__.py.
  2. Create and push a tag:
    git tag v0.1.1
    git push origin main && git push origin v0.1.1
    

📄 License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dprofile-0.3.0.tar.gz (31.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dprofile-0.3.0-py3-none-any.whl (46.5 kB view details)

Uploaded Python 3

File details

Details for the file dprofile-0.3.0.tar.gz.

File metadata

  • Download URL: dprofile-0.3.0.tar.gz
  • Upload date:
  • Size: 31.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dprofile-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0c1f0b1daf702a6758d888474e2c1235b8f83ac96a74c0b94d08b85e1fb6aab5
MD5 8d51dcc73414b5147bfa4a2dc24473a1
BLAKE2b-256 ee265b0270d5337d36ce05a9861dd4f3e06eff7b2eadc18c95bd2aa521bbfefe

See more details on using hashes here.

Provenance

The following attestation bundles were made for dprofile-0.3.0.tar.gz:

Publisher: publish.yml on pythias/dprofile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dprofile-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: dprofile-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 46.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dprofile-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f3c98d8f2ed6dfafc77ea5cefed40f696acc4911a989bbd96c41cea42605c5c6
MD5 2dc49d55eec89b81c57e5037fc9e3b85
BLAKE2b-256 f34baf420f224db7e92cdb9915a7aedbec55ca0e587f7863ea6da10f1b697c98

See more details on using hashes here.

Provenance

The following attestation bundles were made for dprofile-0.3.0-py3-none-any.whl:

Publisher: publish.yml on pythias/dprofile

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page