Skip to content

/edikt:init

Intelligent onboarding. Detects your project, infers architecture and rules, and installs everything in three steps.

Usage

/edikt:init

No arguments. edikt figures out the rest.

The three steps

[1/3] Scan

edikt scans your codebase — languages, frameworks, linters, existing docs, commit conventions, and governance tooling — and shows what it found:

[1/3] Scanning project...

  Code:       Go project, 142 files
              Chi framework, PostgreSQL
  Build:      make build
  Test:       make test
  Lint:       golangci-lint (.golangci-lint.yaml)
  AI config:  CLAUDE.md (34 lines)
  Docs:       3 ADRs in docs/decisions/
  Commits:    conventional commits detected
  Governance: verikt.yaml detected — architecture pack skipped

For greenfield projects (no code), edikt asks one question:

What are you building?

  Example: "A multi-tenant SaaS for restaurant inventory.
  Go + Chi, PostgreSQL, DDD with bounded contexts."

Describe yours in a few sentences:

[2/3] Configure

All available rules and agents in a single view. Recommended items are checked, everything else is available to toggle on:

Rules (✓ = recommended for your stack):

  Base:
    [x] code-quality       — naming, structure, size limits
    [x] testing            — TDD, mock boundaries
    [x] security           — input validation, no hardcoded secrets
    [x] error-handling     — typed errors, context wrapping
    [ ] api                — REST conventions, pagination, versioning
    [ ] architecture       — layer boundaries, import discipline (skipped: verikt detected)
    [ ] database           — migrations, indexes, N+1 prevention
    ...

  Language:
    [x] go                 — error handling, interfaces, goroutines
    ...

  Framework:
    [x] chi                — thin handlers, middleware chains
    ...

Agents (✓ = matched to your stack):

    [x] architect          — architecture review
    [x] backend            — Go patterns
    [x] dba                — PostgreSQL
    [x] qa                 — test strategy
    [x] docs               — documentation
    [ ] security           — OWASP, auth, secrets
    [ ] api                — API design, contracts
    ...

SDLC:
  Commits:    conventional commits (detected from git log)
  PR template: yes (GitHub repo detected)

Toggle items by name (e.g. "add api", "add security"),
or say "looks good" to proceed.

One screen. Say "looks good" when the selection is right. Toggle anything by name.

[3/3] Install

[3/3] Installing...

  ✓ Config          .edikt/config.yaml
  ✓ Project context docs/project-context.md
  ✓ Rules           6 packs → .claude/rules/
  ✓ Agents          5 specialists → .claude/agents/
  ✓ Hooks           .claude/settings.json (9 behaviors)
  ✓ CLAUDE.md       updated
  ✓ Directories     docs/architecture/, docs/plans/, docs/product/

What gets installed

FilePurpose
.edikt/config.yamlGovernance configuration
.claude/rules/*.mdRule packs (tagged <!-- edikt:generated -->)
.claude/agents/*.mdSpecialist agents matched to your stack
.claude/settings.json9 automatic behaviors (see below)
CLAUDE.mdProject block (safe merge — never overwrites existing content)
docs/project-context.mdProject identity
docs/architecture/Decisions + invariants directories with READMEs
docs/product/PRDs, specs, plans directories with READMEs

Automatic behaviors

9 lifecycle hooks, described by what they do:

BehaviorWhat happens
Session refreshSurfaces what changed since last session
Governance checkValidates setup before Claude writes code
Auto-formatFormats code after every edit
Decision detectionSuggests ADR capture when decisions are made
Plan injectionInjects active plan phase on every prompt
Context preservationPreserves plan state before compaction
Context recoveryRecovers plan + invariants after compaction
Agent loggingLogs agent activity, enforces quality gates
Rule trackingLogs which rule packs load each session

Agents

Always installed: architect, docs, qa

Stack-matched: Go → backend, dba · TypeScript + React → frontend, ux · security keywords → security

Manage with /edikt:agents.

Re-running

Running /edikt:init on an existing edikt project handles three scenarios:

Team member joining — config exists, local files match: "Nothing to do." If gaps exist (missing rules, no hooks), edikt syncs the gaps without overwriting anything.

Reconfigure — shows exactly what will change before writing anything. Files you've manually edited (no <!-- edikt:generated --> tag) are never overwritten.

Upgrade — for version upgrades, use /edikt:upgrade instead.

Natural language triggers

  • "set up edikt"
  • "initialize governance"
  • "configure this project"

Released under the Elastic License 2.0. Free to use, not for resale.