From jaan-to
Audits AI session history (Claude, Codex, Cursor) and existing workflow to produce a phased plan for maturing a vibe-coded project into a reliable, evaluated, safe AI system.
How this skill is triggered — by the user, by Claude, or both
Slash command
/jaan-to:pm-workflow-auditThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> Turn a vibe-coded project into a reliable, evaluated, safe AI workflow — a phased plan grounded in your real session history.
Turn a vibe-coded project into a reliable, evaluated, safe AI workflow — a phased plan grounded in your real session history.
$JAAN_CONTEXT_DIR/config.md - Configuration$JAAN_CONTEXT_DIR/boundaries.md - Trust rules$JAAN_TEMPLATES_DIR/jaan-to-pm-workflow-audit.template.md - Plan template$JAAN_LEARN_DIR/jaan-to-pm-workflow-audit.learn.md - Past lessons (loaded in Pre-Execution)${CLAUDE_PLUGIN_ROOT}/docs/extending/pm-workflow-audit-reference.md - Operational tables, rubrics, ID→source map, spawn prompts (read this)${CLAUDE_PLUGIN_ROOT}/docs/guides/perfect-ai-workflow.md - Build-order philosophy (best practices + checklist)${CLAUDE_PLUGIN_ROOT}/docs/extending/threat-scan-reference.md - Untrusted-Content Envelope + secret scanning${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md - Language resolution protocolParameters: $ARGUMENTS
| Flag | Default | Description |
|---|---|---|
--days=N | 14 | Session-history window to analyze |
--tools=... | claude,codex,cursor | Which AI tools' history to read |
--depth=quick|full | full | quick skips detect-* consumption and the graph reconstruction |
If no arguments provided, use all defaults. IMPORTANT: the parameters above are your input — use them directly, do NOT ask for them again.
MANDATORY — Read and execute ALL steps in: ${CLAUDE_PLUGIN_ROOT}/docs/extending/pre-execution-protocol.md
Skill name: pm-workflow-audit
Execute: Step 0 (Init Guard) → A (Load Lessons) → B (Resolve Template) → C (Offer Template Seeding)
If the file does not exist, continue without it.
Read and apply language protocol: ${CLAUDE_PLUGIN_ROOT}/docs/extending/language-protocol.md
Override field for this skill: language_pm-workflow-audit
threat-scan-reference.md.$JAAN_OUTPUTS_DIR and language persistence to settings.yaml. No curl/network/exec; SQLite is read only through the hardened session-reader.sh wrapper. See perfect-prompt-injection-defense.md [SEC-01/SEC-02].ultrathink
Use extended reasoning for workflow-graph reconstruction, trifecta mapping, knowledge classification, the phased plan, and the review/verify pass.
Run the shared, read-only, metadata-only reader (it detects OS + format + version and degrades gracefully). Substitute only a validated bounded integer for {days} (default 14) and allowlisted names (claude, codex, cursor) for {tools} — the reader is a fixed wrapper that re-validates both and passes them as argv, never evaling input:
bash "${CLAUDE_PLUGIN_ROOT}/scripts/lib/session-reader.sh" discover --days={days} --tools={tools} --project="$PWD"
The reader returns one JSON object: per-tool presence, formats, session/plan counts, tool-frequency signature, and memory presence — for Claude Code, Codex, and Cursor. Use it to characterize how the user works today (the tool-frequency mix reveals the vibe-coding signature: heavy Bash/Edit/Write vs. Read/search, MCP usage, subagent/Task usage, plan-mode usage).
If a tool is absent or in an unknown format, note it and continue — never fail. If Codex reports an unknown format, record a follow-up to run the deep-research fallback prompt (reference doc §9).
Reference: exact cross-OS paths for every tool are in
pm-workflow-audit-reference.md§3.
Enumerate the project's entire existing AI setup and classify each item into exactly one component (single source of truth). Delegate the read-only enumeration to the context-scout agent via Task (it has the right Read/Glob/Grep+git tools); reserve Step 1's reader for this skill. The inventory is metadata-only: capture component names, types, counts, and classifications — never raw prompts, code, or secrets/tokens (e.g. from .mcp.json/settings.json). Instruct context-scout to return redacted structural metadata only and to scrub any credential-like value it encounters.
Inventory these layers and classify per the knowledge-type → component table:
CLAUDE.md, .claude/CLAUDE.md, CLAUDE.local.md, ~/.claude/CLAUDE.md, AGENTS.md, .cursor/rules.claude/rules/*.md, permission deny/allow lists.claude/skills/*/SKILL.md, ~/.codex/skills, .codex/skills.claude/commands/*.md.claude/agents/*.md, agents/*.mdhooks/hooks.json, settings.json hooks.mcp.json, ~/.claude.jsonsettings.json/.local, managed settings~/.claude/projects/<repo>/memory/MEMORY.md, ~/.codex/memoriesjaan-to/outputs/, jaan-to/learn/ (if present)For each, record: what exists, its component class, overlap/duplication, prose-only guardrails (flag → should be a hook/permission), SSoT breaches, and gaps. The plan must reuse/reference what exists — never duplicate it.
Reference: inventory layers + classifier + misplacement flags are in
pm-workflow-audit-reference.md§1–§2.
$JAAN_OUTPUTS_DIR/detect/dev/ or /detect/product/ exist, consume them for the current-state picture. Else (and if --depth=full), offer to run /jaan-to:detect-dev / /jaan-to:detect-product or /jaan-to:team-ship --detect first.git log --oneline --since="{days} days ago" --stat for repeated file-groups and repeated corrections. Hash changed file paths (SHA-256, per Safety Rules) before grouping, analyzing, or reporting — never expose raw paths from --stat. Every repeated correction is an unencoded Rule, Method, or Template — list them as encoding candidates.--depth=quick)Reconstruct the workflow as an execution graph: per stage give input, output, owner (component), quality gate, next step. Then map the lethal-trifecta legs [SEC-01] per stage — (A) untrusted content, (B) private data, (C) external action — and record the Rule-of-Two status [SEC-02]. Mark uncertain conclusions [ASSUMPTION].
Draft the plan following the six-step philosophy and the output structure in pm-workflow-audit-reference.md §7 (Verdict → Workflow understanding → Knowledge map → Inventory → Reliability/gates/autonomy → Injection-defense checklist → Phased plan → First slice → Anti-over-engineering). Ground every recommendation in the reuse/citation map; cite an [ID] or a real file, or mark [ASSUMPTION]. Respect the order: no multi-agent or added autonomy without eval evidence.
Run the quality gates over the draft. In this version, run them INLINE (single-agent), section by section:
[ASSUMPTION], fix} (rubric: reference §5).Fold confirmed findings + standards remediations into the plan.
Codex Runtime Note: the optional fan-out to the
workflow-plan-reviewer/-verifier/-standards-auditoragents (viaTask, when eval-gated in a later version) requires Claude Code'sTasktool. On runtimes without it (Codex today), run this whole pass single-pass inline with the same rubrics — never fail. (Mirrorsqa-test-mutate.)
Present the preview:
WORKFLOW AUDIT — CONVERSION PLAN (preview)
══════════════════════════════════════════
Tools read: {claude ✓ / codex ✓(sqlite) / cursor —} | Window: {days}d
Sessions: {N} | Recent plans: {N} | Vibe signature: {top tools}
Existing components: {skills N, commands N, agents N, hooks N, mcp N} | Duplication flags: {N}
Trifecta: legs held per stage {…} | Rule-of-Two: {ok/violations}
MATURITY VERDICT: {stage} — biggest risk: {…}
NEXT ACTION: {single most important}
PHASED PLAN (6 steps): {one line each}
Review: {C confirmed / R refuted} findings folded in | Standards: {pass/warn/fail}
"Write this conversion plan and proceed? [y/n]"
Do NOT proceed to Phase 2 without explicit approval.
If "no": end gracefully, offer to adjust --days/--tools/--depth and re-run.
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/id-generator.sh"
SUBDOMAIN_DIR="$JAAN_OUTPUTS_DIR/pm/workflow-audit"
mkdir -p "$SUBDOMAIN_DIR"
NEXT_ID=$(generate_next_id "$SUBDOMAIN_DIR")
slug="{date-based-kebab-case-max-50-chars}"
OUTPUT_FOLDER="${SUBDOMAIN_DIR}/${NEXT_ID}-${slug}"
MAIN_FILE="${OUTPUT_FOLDER}/${NEXT_ID}-${slug}.md"
Preview the output configuration (ID, folder, main file).
Use the template: $JAAN_TEMPLATES_DIR/jaan-to-pm-workflow-audit.template.md. Fill all sections from §7 of the reference doc. Secret-scan the content before writing.
mkdir -p "$OUTPUT_FOLDER"
# write MAIN_FILE
source "${CLAUDE_PLUGIN_ROOT}/scripts/lib/index-updater.sh"
add_to_index "$SUBDOMAIN_DIR/README.md" "$NEXT_ID" "${NEXT_ID}-${slug}" "Workflow Audit — {date}" "{maturity stage}, {N}-step plan"
Confirm the written path and index update.
Offer, via AskUserQuestion (each opt-in):
/jaan-to:pm-roadmap-add (turns the phased plan into tracked items)./jaan-to:team-ship --roles=remediation (opt-in remediation role: skill-create, qa-tdd-orchestrate, qa-quality-gate, sec-audit-remediate). Gated: requires agent_teams_enabled: true + a fresh explicit approval (the one place external/consequential state changes — human-gated)./jaan-to:pm-skill-discover (automate repeated manual work), /jaan-to:skill-create (encode a new skill), /jaan-to:qa-tdd-orchestrate or /jaan-to:qa-quality-gate (eval foundation), /jaan-to:sec-audit-remediate (security), /jaan-to:detect-dev (re-audit).After the plan is written, ask:
"Any feedback on the workflow audit? [y/n]"
If yes, offer: [1] Fix now (update this plan) · [2] Learn (/jaan-to:learn-add pm-workflow-audit "{feedback}") · [3] Both.
If no: workflow complete.
--depth=quick)[ASSUMPTION]$JAAN_OUTPUTS_DIR/pm/workflow-audit/...; index updated; output secret-scannednpx claudepluginhub parhumm/jaan-to --plugin jaan-toAudits and improves agentic development setups (skills, memory, config, tools, git, transcripts) with a scored report and consent-based fixes. Supports shallow, deep, ultra, and yolo modes.
Coordinates adversarial plan-implement-review pipeline by spawning subagents for each role. Run after /brainstorm, /repo-eval, /repo-health, or /doc-health.
Audits Claude Code session logs for PBR workflow compliance (STATE.md updates, hooks, commits, skills) and UX quality (flows, friction, expectations). Supports date ranges and modes.