agentleFS
BhangeeF16BhangeeF16/kaizen/skills/init-workspace/SKILL.md

init-workspace

Skill0 starsChanged 4 months agoMITView on GitHub

Use when a project has no recorded intelligence-layer location yet and the user wants to get started, set up the knowledge graph, bootstrap this plugin, or begin planning/design/implementation work for the first time in this project. Also use when asked to "initialize the workspace," "set up the knowledge graph," or when a SessionStart nudge reports that no intelligence-layer location is recorded for this project.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 3 are distinctive, and 8 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 8

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If .kaizen/workspace.map.yaml does not exist, but .agent/workspace.map.yaml does, go to Migration below instead of the first-run flow.

    line 14
  2. Very specific:

    If this project already ran the old, pre-.kaizen version of this skill, .agent/workspace.map.yaml will exist.

    line 18
  3. Very specific:

    If they decline, stop here and continue using .agent/workspace.map.yaml as-is for this session (report its recorded product-knowledge path).

    line 21
  4. Very specific:

    If they accept, copy the full contents of .agent/ into .kaizen/, leaving the original .agent/ directory untouched on disk.

    line 22
  5. Very specific:

    Write .kaizen/workspace.map.yaml per step 5 of the first-run flow below, then continue at step 6 (graph scaffold) of that flow.

    line 24
  6. Very specific:

    If neither .kaizen/workspace.map.yaml nor .agent/workspace.map.yaml exists:

    line 29
  7. Very specific:

    Ask the user directly, as a required question (do not guess or default silently): "Where would you like the intelligence layer (run …

    line 31
  8. Distinctive:

    Create the intelligence-layer directory if it does not already exist.

    line 34
  9. Very specific:

    Write (or create, if the directory does not yet exist) .kaizen/workspace.map.yaml in the project root with both resolved paths, for example:

    line 35
  10. Distinctive:

    If Bash is available in the current session, run it from the project root:

    line 45
  11. Distinctive:

    If Bash is not available, do not attempt to shell out.

    line 52

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Init Workspace

This skill runs the one-time setup that lets every other skill in this plugin know where this project's run workspaces and its graph-native knowledge layer live. It is topology-agnostic: it makes no assumption about any particular repository layout, alias set, or folder name beyond .kaizen itself.

When this skill has already run

Before doing anything else, check whether .kaizen/workspace.map.yaml exists in the current project (relative to the project root — the directory Claude Code was started in, or the nearest parent that looks like the project root if unclear). If it already exists, read it and report the recorded intelligence-layer and knowledge-graph paths back to the user in one line — do not ask the onboarding questions again or recreate anything.

If .kaizen/workspace.map.yaml does not exist, but .agent/workspace.map.yaml does, go to Migration below instead of the first-run flow.

Migration from .agent/

If this project already ran the old, pre-.kaizen version of this skill, .agent/workspace.map.yaml will exist. Never migrate silently and never delete .agent/. Instead:

  1. Tell the user plainly that this project has an existing .agent/ intelligence layer, and offer to migrate it to .kaizen/ — do not perform the copy until they say yes.
  2. If they decline, stop here and continue using .agent/workspace.map.yaml as-is for this session (report its recorded product-knowledge path); do not proceed to the first-run flow.
  3. If they accept, copy the full contents of .agent/ into .kaizen/, leaving the original .agent/ directory untouched on disk. Do not overwrite anything that already exists at the .kaizen/ destination.
  4. Ask the knowledge-graph question (step 2 of the first-run flow below) fresh — the old .agent/workspace.map.yaml only ever recorded a single product-knowledge path in the old six-folder, non-graph format, which is not itself a graph and is not converted automatically. Note this plainly to the user: the old product-knowledge content still exists at its old path, untouched, and moving its contents into graph nodes (via kaizen graph new) is a separate, later exercise, not something this migration step does for them.
  5. Write .kaizen/workspace.map.yaml per step 5 of the first-run flow below, then continue at step 6 (graph scaffold) of that flow.
  6. Report back: what was copied, the old .agent/ path (still present, untouched), and the new .kaizen/workspace.map.yaml location.

First-run flow

If neither .kaizen/workspace.map.yaml nor .agent/workspace.map.yaml exists:

  1. Ask the user directly, as a required question (do not guess or default silently): "Where would you like the intelligence layer (run workspaces) to live?" Accept a relative or absolute path. Offer ./.kaizen as the default, but let the user override it.
  2. Ask a second, independent required question: "Where would you like the knowledge graph to live?" Offer <intelligence-layer path>/graph as the default, but let the user override it — including pointing it at a path outside the intelligence-layer directory entirely, or in a separate git repository. This is deliberately a second question, not derived silently from the first: a deploying project's own durable knowledge often already lives in its own separate repository, independent of where run-workspace scratch state lives.
  3. Resolve both answers to absolute paths.
  4. Create the intelligence-layer directory if it does not already exist. Never overwrite anything already present in it.
  5. Write (or create, if the directory does not yet exist) .kaizen/workspace.map.yaml in the project root with both resolved paths, for example:

    intelligence-layer: /absolute/path/to/.kaizen
    knowledge-graph: /absolute/path/to/.kaizen/graph

    .kaizen/workspace.map.yaml is always the fixed, discoverable anchor for this project — even when the resolved knowledge-graph path (or the resolved intelligence-layer path itself) points somewhere else entirely, this map file itself always lives at that one project-root-relative location so other skills never have to guess where to look first.

  6. Scaffold the knowledge graph at the resolved knowledge-graph path:
    • If Bash is available in the current session, run it from the project root:

      python3 "${CLAUDE_PLUGIN_ROOT}/bin/kaizen.py" graph init --path "<resolved knowledge-graph path>"

      This creates the nodes/<TYPE>/ folder for each of the fifteen node types plus an empty index.json/edges.jsonl, and is safe to run again over an existing graph — it never truncates existing content.

    • If Bash is not available, do not attempt to shell out. Instead, carry the exact command above into the step-7 summary so a human or a Bash-capable session can run it, and state plainly that the graph has not been scaffolded yet.
  7. Report back a short, concrete summary: both resolved paths, whether the graph was scaffolded (or, if Bash was unavailable, the exact command to run), and that .kaizen/workspace.map.yaml now records these locations so these questions will not be asked again in this project.

Notes

  • This skill only manages the intelligence-layer and knowledge-graph locations. It does not scaffold or ask about backend/frontend source code locations — those are out of scope for this milestone's onboarding flow.
  • ${CLAUDE_SKILL_DIR} always resolves to this skill's own folder (skills/init-workspace/) regardless of how the plugin was installed.
  • If the user's answer to either question is ambiguous or missing required information (for example, they say "somewhere sensible" with no path), ask a clarifying follow-up rather than picking a path yourself — this mirrors the plugin's broader "ask a required question rather than hide an unknown behind an assumption" convention.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.