ca-init
Opt this repo into codeArbiter — scaffold the root-level .codearbiter/ state store.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 11
- Forks
- 3
01 前言 Front Matter
- name
- ca-init
- description
- Opt this repo into codeArbiter — scaffold the root-level .codearbiter/ state store.
- argument-hint
- [--stage N] [--greenfield|--brownfield] | --check
03 SKILL.md 正文
/ca-init — first-run scaffold
Stand up the root-level .codearbiter/ project-state store that opts a repo into arbiter
management. This is the v2 replacement for vendoring/init-vendor: no symlinks, no shims, no dual
root. It writes the activation flag and the empty state files, then hands off to the populator.
.codearbiter/CONTEXT.md frontmatter arbiter: enabled is the single activation flag — it gates
the SessionStart persona injection. The scaffolded
CONTEXT.md is a stub (no initialization sentinel), so after scaffolding the project still needs
populating before normal operation.
<!-- catalog-command-modes:start -->
Explicit population strategies
<!-- command-mode:--greenfield legacy-route:decompose -->
--greenfield selects the exact <plugin-root>/skills/ca-decompose/SKILL.md workflow.
<!-- command-mode:--brownfield legacy-route:create-context -->
--brownfield selects the exact <plugin-root>/skills/ca-create-context/SKILL.md workflow.
The two flags are mutually exclusive and neither may combine with --check. --stage N may
accompany one only while .codearbiter/CONTEXT.md is absent: scaffold at that stage, then enter the
selected workflow. When an uninitialized stub already exists, skip the refusing scaffolder and enter
the selected workflow directly. An initialized marker or source-shape mismatch retains the selected
legacy workflow's BLOCK. Without an explicit strategy, continue with the unchanged auto-detection
procedure below.
<!-- catalog-command-modes:end -->
Procedure
-
Run the scaffolder against the repo's git toplevel (resolved by the script):
python "<plugin-root>/hooks/init-codearbiter.py"It is idempotent and refuses if
.codearbiter/CONTEXT.mdalready exists — it never overwrites state. Pass--stage Nto set the initial maturity value (default1). Use--checkto report state without creating anything. -
It creates
.codearbiter/with:CONTEXT.md(arbiter: enabled,stage: N, stub body),open-tasks.md,open-questions.md,overrides.log(audit header), andlast-checkpoint(0). -
Then route to the populator — the stub is not yet usable:
- Source code already exists in the repo → route to
/ca-create-context(brownfield: scouts read the codebase and synthesize the full context, writing the initialization sentinel). - Greenfield (no meaningful source) → route to
/ca-decompose(layered interview).
The populator is mandatory, not optional: it authors
tech-stack.md,coding-standards.md, andsecurity-controls.md(and writes the initialization sentinel). The pipeline gates BLOCK on reading those files —writing-plansandtddneedtech-stack.md, the security gates needsecurity-controls.md— so/ca-featurerun on a freshly-scaffolded stub will STOP at pre-flight until the populator has run.session-startsurfaces this asNOT INITIALIZEDevery session. - Source code already exists in the repo → route to
-
Report what was created and which populator you are routing to.
When NOT to use
.codearbiter/already scaffolded → the scaffolder refuses; run/ca-create-contextor/ca-decomposeto populate, or/ca-statusto see state.- You only want to re-check detection state → run the scaffolder with
--check.
Hard gate
MUST NOT hand-author .codearbiter/CONTEXT.md frontmatter — the scaffolder is the sanctioned path so
the activation flag and state-file shapes match what the hook parses. MUST NOT mark a
stub initialized; only the populator writes the initialization sentinel.
04 同仓库更多 Skills
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
obsidian-clipper-template-creator
Guide for creating templates for the Obsidian Web Clipper. Use when you want to create a new clipping template, understand available variables, or format clipped content.
python-api
Programmatic Object-Detection-Metrics API guidance for BoundingBox, BoundingBoxes, Evaluator, enums, coordinate conversion, AP/mAP semantics, and source-style import diagnostics.
file-evaluation
Folder-based PASCAL VOC AP/mAP evaluation from ground-truth and detection text files.
object-detection-metrics
Guides legacy Object-Detection-Metrics PASCAL VOC AP/mAP evaluation from detection text folders and direct Python API classes.
nx-workspace-patterns
Configure and optimize Nx monorepo workspaces. Use when setting up Nx, configuring project boundaries, optimizing build caching, or implementing affected commands.