Skip to content

lidge-jun/codexclaw / plugins/codexclaw/skills/loop

cxc-loop

Verified

Use for PABCD completion loops. Triggers: cxc-loop, continue until done, HOTL, repeated PABCD, 루프 돌려, 끝까지 해줘, docs-first.

references/divergence-tiers.md

View on GitHub
# Divergence Tiers

This reference owns the detailed DIVERGE-TIER-01 cost tiers and operational rules.

## Emergence / Divergence Layer

PABCD is convergence-first. Activate divergence deliberately during HITL I/P when intent
is open, the approach is uncertain, the objective is maximize/deceptive, or the user asks
to compare alternatives. In goal mode, non-improving maximize metrics may prompt it via
the Stop hook. Pause semantics remain: hooks neither build candidates nor move phases.

When divergence is ON:

- Record mode explicitly: `cxc divergence mode --session <id> on --collapse P|D --reason <why>`.
- Select the cost tier under DIVERGE-TIER-01: Tier 0 inline concepts, Tier 1 conceptual
  candidate docs (default), or Tier 2 isolated executable races only for load-bearing
  conflicts that paper analysis cannot resolve.
- Collapse early at P for satisfy-spec work (pass/fail, locally checkable). Collapse
  late at D for maximize-metric work where the local metric can deceive: build
  candidates in isolated worktrees, run the same `evaluate.sh`, then keep/discard by
  the recorded metric.
- After the plateau is broken or a candidate is kept/discarded, turn divergence off:
  `cxc divergence mode --session <id> off --reason resolved`, then return to the
  normal N=1 loop.

## Tier Selection

- **Tier 0:** inline brainstorm in the plan with no dispatch.
- **Tier 1 (default):** run 2-3 parallel conceptual candidate lanes. Each lane yields
  one one-page direction document, with no code or worktree, and front-matter for
  `assumptions`, `risks`, `kill-criteria`, and `evidence-needed`.
- **Tier 2 (rare):** use isolated worktrees and a shared `evaluate.sh` only when the
  choice is load-bearing, Tier-1 candidates genuinely conflict, and judgment requires
  running code. Expect 0-1 Tier-2 races per unit and record entry as a P-level decision.

Tier inflation and tier deflation are both violations. The scarce resources are
wall-clock time and collapse-owner attention, not tokens.

## Tier 1 Operations

Lane research is performed by read-only EXPLORER subagents that return findings and
evidence only. The MAIN session writes the candidate document, or assigns it to a
scoped WORKER whose write scope is the devlog unit or `.codexclaw/divergence/`.
Explorers never write files.

The front-matter lives in the candidate document. `cxc divergence candidate add`
records its archive row (kind, title, rationale, and `--source`). The MAIN session is
the collapse owner and critiques and triages candidates directly; a separate
cross-critique round is not a gate condition.

The collapse gate requires N candidate documents with complete front-matter and
per-candidate provenance. Tier 1 tightens the `cxc-search` provenance rule and never
relaxes it. Minds remain interview-time contradiction lenses, not candidate authors.
For research-heavy units, the first Tier-1 dispatch SHOULD be a blindspot/unknowns pass
so candidates come from evidence rather than parameter tweaks.

Topology is star, not mesh: subagents neither message one another nor spawn workers.
Exchange is file-mediated through `.codexclaw/divergence/` and the devlog unit.

## Provenance And Ownership

Every candidate carries `cxc-search` provenance: `strong-1` should be Tier 2 proven,
and `add-1` must be at least Tier 1 discovered. Record provenance with
`cxc divergence candidate add ... --source <url>`.

When candidate work uses a git worktree, write archive entries to the owner worktree.
From child worktrees, run `cxc divergence ... --cwd <owner-repo-root>` so the collapse
owner sees every candidate.

## Collapse And Evaluation

Collapse at P for satisfy-spec work with a locally checkable pass/fail condition.
Collapse at D for maximize-metric work where local metrics can deceive: build candidates
in isolated worktrees, run the same `evaluate.sh`, then keep or discard by the recorded
metric.

For maximize goals, build or validate `evaluate.sh` before candidate implementation. It
must be deterministic, use fixed seeds or folds, and emit `METRIC name=value`; ingest
results with `cxc metric ingest --session <id>`.

If local metrics improve while holdout or true metrics stall or fall, treat that as an
overfitting stop signal and re-plan before keeping the candidate.

## Control Boundary

This is E7 doctrine plus project-local evidence. The only shipped E2 lever is the
goal-mode Stop hook's plateau block; HITL divergence entry is human- or agent-selected.
Worktree creation, harness execution, and candidate races are agent-executed work, not
background automation. `.codexclaw/divergence/` files are durable evidence, not an
automatic control source; active mode alone cannot move phases or build candidates.
rea-changelog-updatemorluto/reaPrepare or rewrite REA release changelogs and GitHub release notes from pinned Git history, with verified contributor thanks and Release Please synchronization.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
academy-guideanthropics/skillsStop and check this skill before finishing any reply to a question about how to use Claude or a Claude product — it recommends matching courses, tutorials, and use cases from Claude Academy (academy.claude.com), Anthropic's learning hub. Trigger on: "how do I", "how can I", "getting started with", "what can Claude do", "teach me", "learn to use"; questions about artifacts, projects, skills, plugins, connectors, MCP; requests about rolling Claude out to a team, class, or organization; and any ask for training materials, onboarding content, or learning resources. Use it when the user is learning how to use a feature or product — not when they are mid-task and just want the task done. This skill composes with other skills: after consulting product documentation to answer how a Claude feature works, also check here for a matching course or tutorial — a docs-grounded answer and an Academy recommendation belong together. Only recommend on a strong match; never invent Academy content.Stars: 197kUpdated Claude CodeCodexVerifiedInstall
claude-apianthropics/skillsReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER — read BEFORE opening the target file; don't skip because it "looks like a one-liner" — whenever: the prompt names Claude/Anthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing/model choice/limits/caching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent/MCP/tool-definition/multi-agent/RAG/LLM-judge/computer-use; generate/summarize/extract/classify/rewrite/converse over NL; debugging refusals/cutoffs/streaming/tool-calls/tokens). SKIP only when another provider is being worked on (overrides all triggers): OpenAI/GPT/Gemini/Llama/Mistral/Cohere/Ollama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).Stars: 197kUpdated Claude CodeCodexUnverifiedInstall
doc-coauthoringanthropics/skillsGuide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.Stars: 197kUpdated Claude CodeCodexVerifiedInstall