Skip to main content
ClaudeWave
Skill1 repo starsupdated 3d ago

ark-place

Where does new code go? Names the folder from the rules file and writes the file there.

Install in Claude Code
Copy
git clone --depth 1 https://github.com/pedroknigge/arkgate /tmp/ark-place && cp -r /tmp/ark-place/templates/agent-skills/ark-place ~/.claude/skills/ark-place
Then start a new Claude Code session; the skill loads automatically.

SKILL.md

# /ark-place — Where does this code go?

**When:** you are adding a new file or artifact and need the layer, folder, and name.
**Not when:** session 0 / config is missing or lying (`/ark-adopt`) or an existing violation cluster (`/ark-autopilot`).

## Steps

1. CLI-first: if the local CLI already resolved the root, skip waiting on MCP. Identity is optional then.
2. Place with **filePath required** (`ark_place` or read `ark.config.json` + `.ark/golden-pattern.json`). Fail-closed without a path — never invent `components/*.tsx` or default to Presentation.
3. Write it there. Then `arkgate-check`.

## Checklist

- `filePath` is known before the call. Description alone is not a path.
- Golden pattern is load-bearing when present. Adopt generates it.
- Do not default a repository to Presentation.
- When the matched layer has `layers[].description`, print that caption next to the
  layer name and globs. Omit when absent — do not invent a caption or `/ark-describe`.
- When `arkRun` is on: scaffold through the kernel (no `new` of managed types; declare
  `uses` / `reactsTo` / `raises` / `sends`; factory only in `arkRun.kernelRoots`,
  `compositionRoots` alias). Extra off → do not introduce the kernel. Enable it
  via `/ark-adopt`. Skills never enforce.
- When `arkOrder` is on: factory only in `arkOrder.planeRoots`; Domain stays plane-free;
  first freeze ξ with `release()`; later ξ is `proposeRelease` then `apply`. Extra off
  → do not introduce the plane. Enable it via `/ark-adopt`. Skills never enforce.

## Autonomy contract

Invoking this skill **is** the approval. If the user described an artifact, **write the
files** in this turn (prepare-write + scaffold). A path table alone is incomplete.
The CLI is a **sensor and gate**. **CLI budget:** `ark_identity` then `ark_place` when using MCP
(or skip identity if the CLI already resolved the root); otherwise read `ark.config.json`; write;
`ark-check`. Do not ask which layer they prefer.

**Still never:** weaken `ark.config.json`; invent `mechanical-safe` kinds; claim leftover
design work is finished because one file landed.

## Improvement compass (process preflight)

When doctor is available, read `doctor.improvementCompass` (or the human **Improvement compass** section).
Name 1–3 **residual** lenses in plain language before skill-shopping. Always `notAScore` — never invent
0–10 scores or Excellent/Good ranks.

**What the user should feel next:** fewer blocked AI writes, clearer folders, safer domain — then jargon.

**Anti false-done:** empty plan A + residual lenses / design-weak → **Incomplete? yes**. Green edges alone
are not “architecture finished.”

**AI-easy architecture:** ports over concrete I/O in domain; one concern per module; golden pattern for
new files; place before write (`/ark-place` / prepare-write).

**Out of scope (honest):** scalability/performance, full app-security tooling (SAST), and full resilience
patterns are **out-of-scope** lenses — say so; do not invent Ark enforcement for them.

**Where so the AI doesn’t mess up next time** — golden pattern + layer home before the write.

## Layer captions (process)

When `ark_place` / the contract includes `layers[].description`, print that caption
next to the layer name and globs. Omit it when the field is absent. Do **not** invent
a caption or `/ark-describe`.

## Deep modules (process)

- Place so new code stays **deep**: one small public surface per concern; hide implementation details.
- If the artifact is a port or adapter, **name the seam** and put the interface where callers should depend (usually Domain/Application), implementation on the outer side.
- Do not scaffold empty pass-through modules that fail the **deletion test** (complexity would vanish if deleted).

## When / not when

| Use `/ark-place` when… | Do **not** use it when… |
|------------------------|-------------------------|
| New artifact: where + **write** under the config | Existing violation cluster → `/ark-autopilot` |
| Naming / directory for a known kind | Session 0 / config missing or lying → `/ark-adopt` (then come back) |
| Kernel-managed artifact when `arkRun` is already on | Extra not chosen yet → `/ark-adopt` (advisory `arkRun`); evaluate / migrate a hand-rolled bus → `/ark-runtime` |
| Plane-root artifact when `arkOrder` is already on | Extra not chosen yet → `/ark-adopt` (advisory `arkOrder`); skip cluster grind → `/ark-autopilot` |

The user describes something they need to build (a saga, a background job, an
event handler, a repository, an HTTP client, a use case, a projection, …).
Your job: name the layer it belongs to, the directory, the naming convention,
and — if they asked to build it — scaffold it there correctly.

**No artifact given?** If the skill is invoked with nothing to place, don't error
and don't guess — the artifact is the one thing only the user knows. Read the
contract (step 1) and print the placement map from it: one row per declared layer
with layer name, globs, and `layers[].description` when present (omit when absent),
what belongs there, its directory, and which layers it may/may not import,
plus the not-yet-adopted `suggestedLayers` as a footnote. Then ask what they want
to place. That map is derived entirely from the repo, so producing it is real work,
not a stalling question.

## Dual engine (mandatory)

| Engine | Role |
|--------|------|
| **Deterministic** | CLI / MCP / contract sensors — exit codes, plan kinds, coverage numbers, install status |
| **Exploratory** | You open **this** repo's real files and product surface before concluding |

The CLI is a **sensor**, never the whole job. Claiming done without the exploratory bar for this skill is **incomplete**.



## MCP workspace binding (mandatory)

Before any `ark_*` MCP tool, call `ark_identity` with `project.expectedRoot` set to the exact
workspace root. Continue only when `binding.status === "matched"` and `authoritative === true`;
retain `projectIdentity.projectId`, then pass both `expectedRoot` and `expected