Codex is the primary integration target for Polysona. When you open Codex in the repo root, it automatically recognizesDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/LilMGenius/polysona/llms.txt
Use this file to discover all available pages before exploring further.
AGENTS.md and loads the full agent catalog and architecture overview. Skills live in skills/ and are mirrored to .agents/skills/ via a sync script — Codex auto-discovers that path, making all eight persona commands immediately available in your session with the $ prefix.
How Codex Integration Works
Polysona uses three mechanisms together to give Codex full context:AGENTS.mdauto-recognition — Codex readsAGENTS.mdfrom the repo root automatically. It contains the agent catalog, architecture overview, and quick-start instructions for both Codex and Claude Code.- Skill mirroring — Codex discovers repo skills from
.agents/skills/. Thescripts/sync-codex-skills.mjsscript copies every subdirectory fromskills/into.agents/skills/and writes a.generated-by-syncmarker file. This directory is already pre-synced in the repo; you only need to re-run the script after editingskills/. $command prefix — All persona commands use a$prefix in Codex:$interview,$introduce,$trend,$content [platform],$qa,$publish,$status,$export.
Setup
Sync skills to .agents/skills
This step mirrors The sync script output looks like:
skills/ into .agents/skills/ so Codex can discover them. The repo ships with a pre-synced copy, but run this after any edits to skills/.Open Codex in the repo directory
Launch Codex with the repo root as your working directory.
AGENTS.md is auto-discovered and the skills from .agents/skills/ become available.If an updated skill does not appear in Codex after running the sync script, restart your Codex session. Codex reads
.agents/skills/ at session start.Agent Definitions
The following agents are declared inagents/openai.yaml and correspond to the five pipeline stages:
agents/openai.yaml
Skill Sync Script
The sync script (scripts/sync-codex-skills.mjs) does three things:
- Reads every subdirectory from
skills/(the source of truth for skill definitions). - Removes the existing
.agents/skills/<name>directory (if present) and copies the updated version in. - Writes a
.generated-by-syncmarker file into.agents/skills/documenting the purpose of the directory.
- After adding a new skill directory under
skills/ - After editing an existing skill’s
SKILL.mdor supporting files - After pulling upstream changes that modify
skills/
.agents/skills/ persists in the repo.
Command Reference
| Command | Agent | Purpose |
|---|---|---|
$interview | profiler | Run the 10-framework psychology interview to extract persona data |
$introduce | — | Inject the active persona into the current session context |
$trend | trendsetter | Scan for domain trend topics relevant to your persona |
$content [platform] | content-writer | Generate platform-specific drafts conditioned on your persona |
$qa | virtual-follower | Simulate virtual followers and surface the TOP 5 draft recommendations |
$publish | admin | Publish selected content and record engagement metadata |
$status | — | Display the active persona and current pipeline state |
$export | — | Export persona-derived instructions into generated files for another workspace |
Lifecycle Hooks
Polysona ships three lifecycle hook scripts declared inhooks/hooks.json. Whether these hooks are executed automatically depends on your Codex host version’s support for repo-level hook manifests.
hooks/hooks.json
SessionStart
hooks/session-start.sh — Reads personas/_active.md to find the active persona, prints the first 10 lines of persona.md, and echoes the four core PLOON rules (no speculation, PLOON format, append-only interview-log, 10 frameworks / 5 ego layers). If no persona is found, it prompts you to run /interview.PreToolUse
hooks/pre-tool-use.sh — Guards against PLOON data loss. When the Write tool targets a path matching personas/*, it prints a warning reminding you to read the file first and to append to the interview-log section rather than overwriting the compressed core.PostToolUse
hooks/post-tool-use.sh — Scans tool output for common AI verbosity patterns (certainly, absolutely, as an AI, etc.) and prints a warning when they are detected, helping maintain a direct, non-sycophantic output style.