vulcan project init
vulcan project init sets VULCAN up in a project. It has two modes:
- Without
--preset, it scaffolds the project layer of an existing project (from here to After init). - With
--preset, it creates a new monorepo with its first app (Create a monorepo with --preset).
The scaffold writes configuration files, agent routing, rules, a knowledge bundle and a Makefile. It also appends the agent entries to .gitignore, installs the lint tools with bun add -d, and ends with a numbered list of what is left to do. vulcan project init never overwrites an existing file; .gitignore is the one file it appends to, and it keeps every line already there.
To scaffold a project, run vulcan project init at the repository root:
$ bun node_modules/.bin/vulcan project init
created AGENTS.md
created .agents/rules.md
created .agents/knowledge/index.md
created .configs/lints/oxlint.config.mts
created .configs/lints/eslint.config.mjs
created .configs/vulcan.config.mts
created .configs/vulcan/index.mts
created .configs/vulcan/project.mts
created .configs/vulcan/agent.mts
created .configs/vulcan/guard.mts
created .configs/vulcan/board.mts
created .configs/vulcan/knowledge.mts
created .configs/vulcan/check.mts
created .configs/vulcan/common.mts
created .dockerignore
created bunfig.toml
created Makefile
updated .gitignore: + CLAUDE.md CLAUDE.*.md .claude/ .agents/plans .agents/local/ **/.env **/.env.* !**/.env.example
left to do:
1. describe the project in .agents/knowledge/index.md, then delete the vulcan:scaffold line
2. bun node_modules/.bin/vulcan project sync && bun node_modules/.bin/vulcan project doctorThe config comes split: .configs/vulcan.config.mts holds the small keys and imports the large sections from the modules of .configs/vulcan/ (see one file, or split into modules). With a config already there, none of them is written.
When a package needs installing, installing <packages> appears between the file lines and left to do:, followed by the output of bun add -d.
Run vulcan project init in a directory that holds a package.json (bun init writes one). Without it, vulcan project init writes nothing and exits with code 1, because bun add would otherwise install into the nearest parent project:
$ bun node_modules/.bin/vulcan project init
vulcan project init: no package.json in ~/work/demo - run 'bun init' first, or use --preset to create a new projectOptions
Without --preset, vulcan project init uses one option, --key. The other init flags (--project, --app, --backend-dir, --frontend-dir, --shared-dir, --api, --no-api, --scope) are accepted and ignored. Any argument that no init mode takes is refused with vulcan project init: unknown argument '<argument>' and nothing is written.
| Option | What it does |
|---|---|
--key <KEY> | The project's flow key: 2 to 8 uppercase letters or digits |
The key is written to the config as project: { key: 'KEY' }. A flow is named VULZ-<key>-<number>, such as VULZ-ACME-15. Without --key, a terminal asks (the key made from the project name is the default). With no terminal the key is made from the project name (its letters and digits in capitals, the first 8), init says which, and a name that makes fewer than 2 is an error that asks for --key. An existing config is kept, and the key is not asked.
The config file is .configs/vulcan.config.mts, a TypeScript module that uses satisfies VulcanConfig. It is written only when it does not exist yet; an existing one is reported as kept.
Generated files
vulcan project init can write ten files, and appends to an eleventh, .gitignore:
The project name in the generated files comes from package.json name, or from the directory name when there is none. It fills the token in AGENTS.md, rules.md, the knowledge index and the Makefile.
| File | Purpose | What you edit |
|---|---|---|
AGENTS.md | Routing file that points coding agents to base rules, project rules and facts | Usually nothing; it holds routing only |
.agents/rules.md | Project rule extensions that build on the base rules | Add project rules with bare rule IDs |
.agents/knowledge/index.md | Entry point of the project knowledge bundle in okf v0.2 format | Describe the project |
.configs/lints/oxlint.config.mts | Lint configuration for oxlint extending @venizia/dev-configs | Add project linter rule overrides when needed |
.configs/lints/eslint.config.mjs | Lint configuration for ESLint naming conventions extending @venizia/dev-configs | Add project naming convention overrides when needed |
.dockerignore | Keeps dependencies, build output, .git and agent files out of a Docker build context | Edit it freely; init never overwrites it |
.configs/vulcan.config.mts | Main VULCAN configuration file for agents, rule slots and packages | Configure coding agents, rule slots, and workspace packages |
bunfig.toml | Bun's telemetry off, and the [fmt] section bun fmt reads | Edit it freely; init never overwrites it, sync never touches it |
Makefile | Root Makefile that includes shared VULCAN make targets from vulcan.mk | Add project make targets |
More on the rows:
.dockerignoreis the same listinit --presetwrites.bunfig.tomlholdstelemetry = false, a comment thatbun fmtalso inherits it from a parent folder, so it sits at the root and[fmt]applies to every folder below it, and the[fmt]sectionbun fmtreads (printWidth = 100,singleQuote = true,arrowParens = "always", the shared style, andflavor = "oxfmt", which keeps oxfmt's output when oxfmt is not a dependency). It is the only formatter configuration:initwrites no.configs/formatters/oxfmt.config.mts. No release-age gate: a gate of a few days fails a fresh install whose version floors are the latest releases.
Report statuses
For each file and hint, vulcan project init prints one line with an eight-column status field:
| Status | Meaning |
|---|---|
created | vulcan project init wrote the file from a shipped template |
updated | vulcan project init appended missing lines to .gitignore; the lines already there are kept |
kept | The file exists on disk and vulcan project init left it unchanged; an existing config is reported as kept |
add | A required line is missing from a file that vulcan project init does not edit, printed as a hint |
skipped | vulcan project init did not write the two lint configs because package.json declares workspaces |
When you run vulcan project init again on an initialized project, existing files receive the kept status:
$ bun node_modules/.bin/vulcan project init
kept AGENTS.md
kept .agents/rules.md
kept .agents/knowledge/index.md
kept .configs/lints/oxlint.config.mts
kept .configs/lints/eslint.config.mjs
kept .configs/vulcan.config.mts
kept .dockerignore
kept bunfig.toml
left to do:
1. describe the project in .agents/knowledge/index.md, then delete the vulcan:scaffold line
2. .gitignore has .env rules of its own and was left as it is: check that they ignore **/.env **/.env.* !**/.env.example the way you want
3. bun node_modules/.bin/vulcan project sync && bun node_modules/.bin/vulcan project doctor
tell VULCAN how you like to work (language, how to address you, tone): run 'bun node_modules/.bin/vulcan profile'In this second run, Makefile produces no line because the include line already exists, and no install runs because the dependencies are declared. Item 3 appears because the .gitignore already holds .env rules of its own, which init does not change. The last line appears until you have a profile.
Special cases and hints
vulcan project init handles two special project conditions and prints hints for manual adjustments.
Workspaces projects
If package.json declares workspaces, vulcan project init omits the two lint configs at the root.
A project made with --preset gets a prepare script in its root package.json, so bun install runs vulcan project sync in every fresh clone (the script reads no terminal and cannot fail the install). vulcan project init in an existing directory leaves your package.json alone: vulcan project doctor notes the missing script and prints the line. The command prints status skipped with the reason:
skipped .configs/lints: a workspaces project keeps them per app (apps/<name>/.configs/lints/); the templates are in node_modules/@venizia/vulcan/base/templates/The MCP file
vulcan project init does not write .mcp.json. The file is an agent file like the others: vulcan project sync writes it, on each machine, only when you chose an agent that reads it (Claude Code, omp or Copilot CLI), with the atlas entry, and lists it in your clone's .git/info/exclude. A project that already tracks a .mcp.json keeps it untouched (sync).
Configuration hints
vulcan project init prints a hint for a missing entry in a file it does not edit:
- For
Makefile: printsadd Makefile: -include node_modules/@venizia/vulcan/base/make/vulcan.mkwhen the include line is missing.
Every add line is also listed in left to do: as add <hint>, and stays until you make the edit yourself, because init only hints.
Gitignore
vulcan project init appends the lines below to .gitignore when they have no line of their own, and creates the file when there is none:
CLAUDE.md
CLAUDE.*.md
.claude/
.agents/plans
.agents/local/profile.json
.agents/local/
**/.env
**/.env.*
!**/.env.exampleThe three .env lines are the list the generated .dockerignore carries too, so a .env.local or a .env.production is neither committed nor copied into an image, and .env.example stays. A .gitignore that already has a .env rule is left alone on those three lines. Git applies the last matching line, so lines appended after yours would override a negation such as !.env.development. In that case init adds the other lines, does not add the three .env lines, and says in left to do: to check that your rules ignore what you want. A comment that only mentions .env is not a rule.
Existing lines are kept in order, and the new lines follow them. Run on an initialized project, vulcan project init changes nothing.
Dependencies
vulcan project init runs bun add -d for every package below that dependencies and devDependencies do not declare:
| Project | Packages installed |
|---|---|
| Single package | oxlint, oxlint-tsgolint, eslint, @venizia/dev-configs |
package.json declares workspaces | @venizia/dev-configs |
The three lint tools are optional peers of @venizia/dev-configs, so bun never installs them on its own. A workspaces project keeps the lint configs, and so the lint tools, in each app. Before it runs, vulcan project init prints installing <packages> with the list. If bun add fails, vulcan project init prints vulcan project init: 'bun add ...' failed - run it yourself, still prints left to do:, and exits with code 1.
Set VULCAN_NO_INSTALL=1 to print the command as skipped bun add -d ... (VULCAN_NO_INSTALL) instead of running it. The test suites use this to run offline.
After init
vulcan project init ends with left to do:, a numbered list. Item 1 is always the knowledge index; the add hints follow, then the sync and doctor command.
To configure your project, edit .configs/vulcan.config.mts. It is a split config: the file only joins the seven groups, and each group is a module in .configs/vulcan/.
import type { VulcanConfig } from '@venizia/vulcan';
import { agent, board, check, common, guard, knowledge, project } from './vulcan/index.mts';
export default {
project,
agent,
guard,
board,
knowledge,
check,
common,
} satisfies VulcanConfig;The starter modules are small. project.mts holds the key you gave, and agent.mts the agents and the one rule setting every project starts with; the other five are empty objects to fill in:
// .configs/vulcan/project.mts
import type { VulcanConfig } from '@venizia/vulcan';
export const project = {
key: 'ACME',
} satisfies VulcanConfig.Project;
// .configs/vulcan/agent.mts
import type { VulcanConfig } from '@venizia/vulcan';
export const agent = {
list: ['claude'],
rules: { 'V-W-01': 'on-user-word' },
} satisfies VulcanConfig.Agent;To complete your knowledge setup, edit .agents/knowledge/index.md. The generated file contains a scaffold marker:
<!-- vulcan:scaffold - describe the project here, then delete this line -->vulcan project doctor runs the scaffold check (the doctor reference). If .agents/knowledge/index.md still contains vulcan:scaffold, vulcan project doctor fails with exit code 1. To pass the check, describe the project in .agents/knowledge/index.md and delete the marker line.
Create a monorepo with --preset
vulcan project init --preset <name> creates a new project folder: a monorepo with its first app inside. A preset is a framework's app template, shipped in the framework's npm package (Presets). Run it where the project folder should go. The project does not exist yet, so call the package by its full name:
bun x @venizia/vulcan project init --preset ignisA name without a scope means the package @venizia/<name>, so ignis is @venizia/ignis. Any npm name works, name@version pins a version, and the default is the latest tag.
In a terminal that can draw menus, every question is a menu, not a typed answer; see Interactive prompts. The samples below show what a plain terminal (
TERM=dumb) asks.
In a terminal, init asks for every name. With a published preset the side of the app is not known until the package is read, so init asks the project name first, fetches the package, then asks the rest in the same order with the side named:
$ bun x @venizia/vulcan project init --preset ignis
? Project name (the monorepo folder) > my-product
? Project key for flow ids, as VULZ-<key>-<number> (uppercase letters and digits, 2 to 8 of them) (MYPRODUC) > ACME
Fetching preset @venizia/ignis@latest ...
? Backend folder (holds every backend app) > services
? Name of this backend app > core-api
? Shared code folder (empty to skip) > libs
created package.json
created .gitignore
created README.md
created .dockerignore
created bunfig.toml
created libs/.gitkeep
created services/core-api/tsconfig.json
created services/core-api/.env.example
created services/core-api/src/application.ts
created services/core-api/src/index.ts
created services/core-api/src/smoke.test.ts
created services/core-api/src/controllers/hello.controller.ts
created services/core-api/.configs/lints/oxlint.config.mts
created services/core-api/.configs/lints/eslint.config.mjs
created services/core-api/.configs/formatters/.ignore
created services/core-api/.configs/builders/Dockerfile
created services/core-api/.configs/builders/compile.ts
created services/core-api/package.json
created AGENTS.md
created .agents/rules.md
created Makefile
created .configs/vulcan.config.mts
created .agents/knowledge/index.md
created .agents/knowledge/packages/core-api.md
bun install v1.4.3 (c6da4a4d3)
+ @venizia/vulcan@0.4.8
236 packages installed [69.23s]
Which coding agents do you use in this project? (comma-separated; Enter accepts the detected list: claude, omp)
detected: claude, omp
available: claude, omp, codex, cursor, copilot-cli, copilot-vscode, antigravity, pi, none
? Agents > claude
created CLAUDE.md
created .claude/settings.json (shipped, slot and agent.claude.settings over personal keys)
created .claude/skills/build-a-feature
created .claude/skills/docs-update
created .claude/skills/docs-writing
created .claude/skills/fix-a-bug
created .claude/skills/plan-a-change
created .claude/skills/report-back
created .claude/skills/research
created .claude/skills/retro
created .claude/skills/review-a-change
created .claude/skills/ship
created .claude/skills/visualize-work
created .mcp.json
created .agents/local/vulcan.manifest.json
created .agents/atlas.manifest.json
replaced AGENTS.md (Atlas block)
created .agents/local/profile.json
replaced .git/info/exclude
$ bun check
✓ No type errors in 5 files [201.02ms]
$ devz lint
Found 0 warnings and 0 errors.
Finished in 311ms on 8 files with 97 rules using 12 threads.
Checking formatting...
All matched files use the correct format.
Finished in 12ms on 8 files using 12 threads.
$ bun test
bun test v1.4.3 (c6da4a4d3)
src/smoke.test.ts:
✓ core-api > GET /hello says hello [0.79ms]
✓ core-api > GET /doc/explorer serves the API reference [3.34ms]
2 pass
0 fail
4 expect() calls
Ran 2 tests across 1 file. [921.00ms]
vulcan project doctor: OK
check: OK - OKF v0.2 + house rules - 3 files, 1 concepts
Done. Next:
cd my-product && make dev
open http://localhost:3000/api/hello
open http://localhost:3000/api/doc/explorerThe timings, the detected line and the install output differ on your machine. The fetch is one line: the output of bun add is kept and printed only when the fetch fails, so it never lands between two questions. The agents question appears because a project made from a preset has no agents list in its config for sync to take as a suggestion; it is stored in .agents/local/profile.json (Choosing your agents). Without a terminal, sync writes the Claude files and prints one line saying how to choose.
A local preset (file:<folder>) works the same, and its side is known at once, so init asks the backend or frontend folder second without fetching. The package itself is then written to the catalog as file:<absolute path> and init prints a warning: line about it. With VULCAN_NO_INSTALL=1 the install, git init, sync and the checks print as skipped instead of running; VULCAN's own tests use that.
Because .git is not in the build context, an image cannot ask git for its commit: pass it as build arguments, docker build -f <app>/.configs/builders/Dockerfile --build-arg APP_BUILD_COMMIT="$(git rev-parse HEAD)" --build-arg APP_BUILD_BRANCH="$(git rev-parse --abbrev-ref HEAD)" ., run from the project root.
The .gitignore it writes holds node_modules/, dist/, *.tsbuildinfo, the agent entries and the .env patterns above, so the files tsc leaves behind after the checks do not show up as untracked. When the preset declares urls, the last lines are one open http://localhost:3000<path> per path instead of the root.
Flags
Without a terminal (CI, scripts), every name comes from a flag. A missing one is an error that names it. With a published preset the app side is not known yet, so the first one named is --app:
$ bun x @venizia/vulcan project init --preset ignis --project fresh < /dev/null
project key FRESH, made from the name: flows will be VULZ-FRESH-<number>; to use another, change project.key in the config
vulcan project init: missing --app (Name of the first app) - names are never chosen for youWith a local preset (file:) the side is known, so the folder flag is named first:
$ bun x @venizia/vulcan project init --preset file:./acme-api --project fresh < /dev/null
vulcan project init: missing --backend-dir (Backend folder (holds every backend app)) - names are never chosen for you| Flag | Meaning |
|---|---|
--preset <name|file:path> | The preset package. Required. Its presence selects this mode |
--project <name> | The project name and the folder to create in the current directory |
--backend-dir <path> | The folder that holds backend apps, a path of 1 to 4 segments (frontends/apps). Used when the preset is a backend |
--frontend-dir <path> | The folder that holds frontend apps, a path of 1 to 4 segments. Used when the preset is a frontend |
--app <name> | The name of the first app |
--shared-dir <path> | A folder, a path of 1 to 4 segments, for code shared between apps. Optional: leave it out, or answer empty, to skip it |
--key <KEY> | The project's flow key, as above. Written to the new config |
--scope <@scope> | The npm scope of the first app's package. Optional |
--keyis asked in a terminal right after the project name (the key made from the name is the default), else made from the name.--scope @acmenames the first app@acme/<app>. The folder and the dir registered in the config stay bare. A menu asks for it (empty for none); a plain terminal does not.
A name is lowercase letters, digits and -, and starts with a letter or digit. In a terminal an invalid name is asked again; with a flag it is an error. VULCAN never invents a name, so none of these has a default.
What it creates
$ cd my-product && find . -type f -not -path '*/node_modules/*' -not -name bun.lock | LC_ALL=C sort
./.agents/knowledge/index.md
./.agents/knowledge/packages/core-api.md
./.agents/rules.md
./.agents/local/profile.json
./.agents/local/vulcan.manifest.json
./.claude/settings.json
./.claude/vulcan-managed.json
./.configs/vulcan.config.mts
./.dockerignore
./.gitignore
./.mcp.json
./AGENTS.md
./CLAUDE.md
./Makefile
./README.md
./bunfig.toml
./libs/.gitkeep
./package.json
./services/core-api/.configs/builders/Dockerfile
./services/core-api/.configs/builders/compile.ts
./services/core-api/.configs/formatters/.ignore
./services/core-api/.configs/lints/eslint.config.mjs
./services/core-api/.configs/lints/oxlint.config.mts
./services/core-api/.env.example
./services/core-api/package.json
./services/core-api/src/application.ts
./services/core-api/src/controllers/hello.controller.ts
./services/core-api/src/index.ts
./services/core-api/src/smoke.test.ts
./services/core-api/tsconfig.jsonThe files sync wrote (.agents/local/profile.json, .agents/local/vulcan.manifest.json, .mcp.json, CLAUDE.md, .claude/, and the .claude/skills/* links, which find -type f does not list) are in the tree too.
| File | What it holds |
|---|---|
package.json | A private root with workspaces (services/*, libs/*), a catalog, and a dev script |
<folder>/<app>/ | The preset's files, plus a package.json whose dependencies are catalog: |
.gitignore, README.md, Makefile | The ignore list for agent files, a title, and the VULCAN targets plus make dev |
.dockerignore | The build context of a Dockerfile built from the root |
bunfig.toml | The same file the scaffold above writes: telemetry = false and the [fmt] section. Edit it freely |
AGENTS.md, .agents/rules.md | The same layer as the scaffold above |
.agents/local/vulcan.manifest.json, .agents/local/profile.json, .mcp.json, CLAUDE.md, .claude/ | What the first sync writes (see below) |
.configs/vulcan.config.mts | name, layout, one packages entry per app, and the preset's atlas sources |
.agents/knowledge/ | An index and one concept per app |
<shared>/.gitkeep | Keeps the shared folder in git |
More on the rows:
package.json: thecatalogholds every version the preset declares. Thedevscript isbun run --filter '*' server:dev, whichmake devcalls: it starts every app that has aserver:devscript (ruleV-B-05) and skips the rest.@venizia/vulcanis pinned to the exact running version..dockerignore: it lists**/node_modules,**/dist,**/*.tsbuildinfo,**/coverage,**/*.log,.git,.claude,.agents/plans, the secrets**/.envand**/.env.*with!**/.env.examplekept (in that order, after a comment saying why), and the per-machine files of every coding agent (the onessynckeeps in.git/info/exclude). The lockfile, everypackage.jsonand the sources are not listed: the image needs them. Edit it freely;initonly creates a project, so it never overwrites one.- The first
syncwrites the manifest, your choice of agents, the atlas entry for the agents that read.mcp.json, and the Claude adapters.
Between the vulcan:apps:start and vulcan:apps:end comments, the config holds a block that init and add rewrite. Edit the config outside that block.
What it runs
After the files, init runs these in order, in the new project:
bun installgit initon the branchdevelop; whengitis missing,initprintsinstall git, then run: git init -b developwith the project folder and goes onvulcan project sync, run by the installed version; in a terminal it first asks which coding agents you use- each script listed in the preset's
checks, withbun run <script>in the app vulcan project doctorvulcan okf check --strict
The first failure stops the command with that command's output. The project stays on disk for you to inspect. When everything passes, init prints Done. Next:, cd <project> && make dev and one open http://localhost:<devPort><path> line per path in the preset's urls, or the root when it declares none. The port is the one the preset declares for the first app (a frontend app too).
Add more apps later with vulcan package add.
Refusals
init --preset exits 1 before writing anything when:
| Message | Cause and fix |
|---|---|
vulcan project init: my-product exists and is not empty - init --preset only creates a new project | The folder has content. Pick a new project name |
vulcan project init: missing --backend-dir (Backend folder (holds every backend app)) - names are never chosen for you | No terminal and a flag is missing. Pass it |
vulcan project init: --backend-dir and --shared-dir both name 'code' - each kind of code needs its own folder | Two of --backend-dir, --frontend-dir and --shared-dir name the same folder. Give each its own |
vulcan project init: --project 'Fresh' is not a name: lowercase letters, digits and '-' | A flag holds an invalid name |
vulcan project init: @acme/api@1.0.0 has preset version 2; this VULCAN reads version 1 - upgrade @venizia/vulcan | The preset is newer than this VULCAN. Upgrade VULCAN |
vulcan project init: @acme/none@1.0.0 ships no VULCAN preset (no "vulcan": { "presets": { "app" } } in its package.json) | The package is not a preset |
vulcan project init: @acme/api@1.0.0: ./dist/presets/app/preset.json: ... | preset.json breaks the format. The author fixes it |
vulcan project init: no package at ~/work/nope - was it installed? | The file: path has no package.json |
The preset.json message continues with the detail, such as side one of: backend, frontend; devPort Invalid input: expected number, received undefined.
A file: preset is allowed but warns, because it writes a file:<path> entry into catalog that does not work on another machine or in CI.
An npm preset is installed into a scratch folder first and read from there, so a refusal never leaves a half-made project.