Skip to content
Agentmart
Submit a tool

init-project

Initialize or resync a re-discipline project.

Skill by adiazpar

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/adiazpar-init-project

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Initialize or resync a re-discipline project. Idempotent and non-destructive: creates what is missing, never overwrites existing content, updates only marker-bounded blocks, and reports what it did.

Use cases: writing

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/init-project

What's inside

Skill name
init-project
Description
Initialize or resync a re-discipline project. Idempotent and non-destructive: creates what is missing, never overwrites existing content, updates only marker-bounded blocks, and reports what it did.
License
MIT
Instructions
91 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

# Initialize A re-discipline Project

Run from anywhere inside the target project. New and existing projects
are the same procedure — they just start with different things missing.

## 0. Old-format check (hard stop)

If `.re-discipline/config.json` or campaign JSON records from
re-discipline 0.x exist: create and convert NOTHING. Tell the user:
"old-format re-discipline state detected — run the one-time migration
session first (an agent reads the old JSON and writes 1.0 markdown docs;
you review the diff before the old tree is deleted)." Stop.

## 1. Create the tree (only what's missing)

```
.re-discipline/
  CONVENTIONS.md      copy of <plugin-root>/templates/CONVENTIONS.md
  docs/  docs/ops/  active/  archive/
  golden.jsonl        empty file
  bin/re-search      native binary for this machine (re-search.exe on Windows)
  .gitignore          copy of <plugin-root>/templates/project-gitignore
```

After creating `.re-discipline/`, run the installed plugin's launcher:

```text
<plugin-root>/bin/re-search install-binary --root <absolute-project-root>
```

Quote both paths. On Windows, invoke `<plugin-root>/bin/re-search.exe`.
The launcher selects the native engine, and `install-binary` copies that running
engine to the project with the correct filename and executable permissions.
It returns JSON with `path` and `version`; use the returned `path` for
`{{RE_SEARCH}}` in the marker block. Do not ask the user to choose an OS,
architecture, binary, or build command. Do not copy the dispatcher by itself.
Run the returned project path with `--version` to verify it before reporting success.

Re-running init refreshes `CONVENTIONS.md`, `.gitignore`, and the project
binary from the plugin (these three are plugin-owned copies); everything else
is user data — never touch it.

Existing project binaries also refresh at session start or first tool use after
a plugin update. Do not require initialization solely to update an engine.
Initialization still creates new projects and refreshes conventions/instructions.

## 2. Shared memory decision

Read the policy line from the marker block in root `AGENTS.md` (the
canonical policy file). If no recorded decision exists, ask the user
once: "Use shared memory? Replaces Claude/Codex native memory with
`.re-discipline/docs/ops/` so all agents share the same recall.
[Recommended: yes]". Then converge:

- **enabled**: set `autoMemoryEnabled: false` in the project's
  `.claude/settings.json` (create the file if absent, preserving any
  existing keys). For Codex, apply the equivalent project-scoped memory
  switch if one exists; if none exists, the marker-block instruction is
  the mechanism.
- **disabled**: do NOT touch host memory settings at all — init only
  ever writes them when enabling.

## 3. Host wiring (one canonical agent file)

Root `AGENTS.md` is the single canonical agent file. Codex reads it
natively (it walks AGENTS.md files from the git root to the cwd); Claude
Code does NOT read it automatically and instead imports it. Wire both:

**AGENTS.md** — render `<plugin-root>/templates/marker-block.md` with
`{{SHARED_MEMORY}}` → `enabled`/`disabled` and `{{RE_SEARCH}}` → the
project path returned by `install-binary`, then apply:

- markers absent → append the block (create the file if missing);
- exactly one well-formed `<!-- re-discipline:start -->` …
  `<!-- re-discipline:end -->` pair → replace its contents;
- anything else (unpaired, duplicated, nested) → leave the file
  untouched and report it for manual repair.

**Root `CLAUDE.md`** — must contain the line `@AGENTS.md` (Claude Code's
documented import syntax, expanded at launch). If the file is missing,
create it containing exactly that line; if it exists without the line,
add it at the top; never duplicate the marker block into any CLAUDE.md.

**Pre-1.1 layouts**: if a re-discipline marker block exists in
`.claude/CLAUDE.md` or root `CLAUDE.md` (the old dual-block model),
remove that block (markers included) — the block lives only in
`AGENTS.md` now. Content outside markers is user-owned: never touch it.
`.codex/` needs no files — Codex does not read `.codex/AGENTS.md`.

## 4. Report

List what was created, refreshed, skipped, and any files needing manual
repair. Do not commit unless the user asks.

From adiazpar/re-discipline, MIT.

More from adiazpar/re-discipline

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
Oct 23, 2026 (6 days ago)
Last release
Sep 8, 2026 (1 month ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from adiazpar

Cite this page

init-project skill. Agent Mart. https://agentmart.dev/skills/adiazpar-init-project (last updated 2026-10-24)