Configure A New Project - alexherrero/agentm GitHub Wiki
Note
Goal: Open a repo the harness hasn't seen, run the detection flow, and persist an approved enablement config so every later phase resolves this repo's {slug, type, enabled skills/hooks}.
Prereqs: agentm v4.8.0+ (ships V4 #32), python3 on PATH, and a repo with a .git dir. A reachable vault (MEMORY_ROOT) to persist the config โ without one the proposal still renders but the write is skipped.
When you open an unconfigured code project, the SessionStart hook emits a one-line nudge offering to configure it. Saying "configure this project" or running /setup --detect scans the repo, renders a default-all-enabled proposal with a per-skill/per-hook rationale, and writes the approved enablement block to project.json on approval.
-
Open the unconfigured repo. The
harness-context-session-starthook fires a single line each session until the repo is registered or.agentm-no-registeris present:[agentm] New project โ I haven't configured this repo. Say 'configure this project' or run /setup --detect. -
Run the detection flow. Say "configure this project" or run
/setup --detect./setupruns detection as its first step (ยง0), before the inventory + interview:python3 scripts/detect_project.py . --format json # structured proposal (drives agent logic) python3 scripts/detect_project.py . --format text # operator-facing approval block
-
Read the proposed config block. Every enableable skill and hook starts enabled (
โ); each line carries a rationale โ a default reason, or a detection reason when a rule matched this repo. See Detection rules for the 10 rules and what each attaches a rationale to. -
Choose a/b/c:
-
(a) Register with all-enabled โ
python3 scripts/project_config.py register . -
(b) Register with custom selection โ answer per-skill/per-hook (Enter keeps the default of enabled), then pass each decline:
python3 scripts/project_config.py register . --disable <name> --disable <name>. Each--disablerecords anoperator_overridesentry. -
(c) Skip โ
touch .agentm-no-register. One-time scratch session; the nudge stays silent until you remove the marker.
-
(a) Register with all-enabled โ
-
On (a) or (b), finish registration.
registerwrites the enablement block toproject.json(see Project config) and registers the repo in the vaultrepo_registry. Then:- Create the project's
charter.mdatprojects/<slug>/charter.mdin the vault if it is absent. Confirm the project resolves withpython3 scripts/process_seam.py project-path tasks --cwd ., which prints where its tasks live, or withpython3 scripts/harness_memory.py list-plans(vault-state-pathis retired โ agentm-vault plan 15). - Accept or decline the offer to add a
vault_slug: <slug>line toAGENTS.md(operator-confirmed; never silent).
- Create the project's
-
Re-open the repo.
python3 scripts/project_config.py is-registered .printsregistered(exit 0) and the SessionStart nudge stays silent.
- Re-detect a configured project โ re-run the scan once the repo has changed.
- Detection rules reference โ the 10 built-in rules and what each detects.
-
Project config reference โ the
project.jsonenablement-block schema this flow writes. -
Auto-detect + auto-configure โ why the flow proposes-then-approves and why config lives in
project.json. - Install AgentM machine-wide โ the one-time install that precedes first-session configuration.