Problem
Whether a project is scaffolded by copy-paste (README Quick start) or by npx @leadsolutions/lead-protocol init, .agents/PROJECT_RULES.md ships pristine: [Project Name], bracketed [e.g., ...] examples, and an unconfigured §J8 (Active substrate and Active modules). Both install paths only print "now edit PROJECT_RULES.md", which users routinely skip.
As a result agents start operating against the raw template. This is more than cosmetic: a pristine §J8 Active modules breaks the baseline boot itself, because boot step 3 loads the modules named in §J8, and those are still placeholders. The framework has no mechanism that forces configuration before work begins.
Proposed solution
Add a protocol-level boot gate (not a CLI feature, so it covers every install path and every agent). A new kernel section PROTOCOL_RULES.md §P10 defines a first-run setup interview:
- Pristine detection: after reading
PROJECT_RULES.md (boot step 2), the project is unconfigured if the file is absent, or the §J1 Name still contains a [...] placeholder, or the §J8 Active substrate/Active modules still contain a [...] placeholder. This is the same textual [-in-value signal the bundled CLI already uses in readProjectName.
- Hard gate with one-time defer: when unconfigured, the agent runs a short interview and writes the answers into
PROJECT_RULES.md before serving any request, even unrelated work. The user can reply later to defer once; the gate re-fires next session and is never silently suppressed.
- Non-interactive safety: in CI / GitHub Actions / Codespaces / devcontainers (or with no interactive input), the agent skips with a warning and persists no configured state, so automated runs are not blocked.
- Focused interview: about six questions (name, type plus purpose, stack, substrate, primary language, agents). Substrate auto-derives
§J8 Active modules (git/git+github gives git-substrate, otherwise none). Soft fields are defaulted with a refine later note.
- Self-clearing and governance-safe: once Name and
§J8 carry real values, detection returns false and the gate never fires again (no marker file). The interview fills §J2 in PROJECT_RULES.md but only proposes AGENTS_MAP.md rows, honoring the §P3 maintainer-managed rule.
- Framework-source carve-out: a repo-root sentinel
.lead-protocol-source disables the gate, so the framework's own pristine scaffold (which must ship pristine) is not gated. The sentinel lives outside .agents/, so it never reaches a consumer project through either install path.
This proposes a change to PROTOCOL_RULES.md, which CONTRIBUTING asks to be raised as an issue first; hence this issue precedes the PR.
Agent context
Reproduced with Claude Code, but the gap is in the protocol files and affects every compliant agent (Claude Code, Cursor, Codex, Gemini). The limitation shows up in agent behavior (agents proceed against an unconfigured template) and is rooted in the protocol files (no boot-time gate exists).
Alternatives considered
- Interactive prompts in
lead-protocol init: only covers the npx-init path, not copy-paste installs, and does nothing for agents booting later. Rejected as primary mechanism; can be added later as an enhancement.
- A stronger printed "next steps" notice: essentially today's behavior, which users already ignore.
- A separate done-marker file: redundant with the self-clearing trigger and introduces a second source of truth that can drift.
Additional context
The fix is rules text shipped in the framework files, so no runtime code is required. The bundled CLI re-bundles these files at build time, so a later CLI release ships the new behavior automatically with no CLI changes in this proposal.
Problem
Whether a project is scaffolded by copy-paste (README Quick start) or by
npx @leadsolutions/lead-protocol init,.agents/PROJECT_RULES.mdships pristine:[Project Name], bracketed[e.g., ...]examples, and an unconfigured§J8(Active substrate and Active modules). Both install paths only print "now edit PROJECT_RULES.md", which users routinely skip.As a result agents start operating against the raw template. This is more than cosmetic: a pristine
§J8 Active modulesbreaks the baseline boot itself, because boot step 3 loads the modules named in§J8, and those are still placeholders. The framework has no mechanism that forces configuration before work begins.Proposed solution
Add a protocol-level boot gate (not a CLI feature, so it covers every install path and every agent). A new kernel section
PROTOCOL_RULES.md §P10defines a first-run setup interview:PROJECT_RULES.md(boot step 2), the project is unconfigured if the file is absent, or the§J1Name still contains a[...]placeholder, or the§J8Active substrate/Active modules still contain a[...]placeholder. This is the same textual[-in-value signal the bundled CLI already uses inreadProjectName.PROJECT_RULES.mdbefore serving any request, even unrelated work. The user can replylaterto defer once; the gate re-fires next session and is never silently suppressed.§J8Active modules (git/git+githubgivesgit-substrate, otherwisenone). Soft fields are defaulted with arefine laternote.§J8carry real values, detection returns false and the gate never fires again (no marker file). The interview fills§J2inPROJECT_RULES.mdbut only proposesAGENTS_MAP.mdrows, honoring the§P3maintainer-managed rule..lead-protocol-sourcedisables the gate, so the framework's own pristine scaffold (which must ship pristine) is not gated. The sentinel lives outside.agents/, so it never reaches a consumer project through either install path.This proposes a change to
PROTOCOL_RULES.md, which CONTRIBUTING asks to be raised as an issue first; hence this issue precedes the PR.Agent context
Reproduced with Claude Code, but the gap is in the protocol files and affects every compliant agent (Claude Code, Cursor, Codex, Gemini). The limitation shows up in agent behavior (agents proceed against an unconfigured template) and is rooted in the protocol files (no boot-time gate exists).
Alternatives considered
lead-protocol init: only covers the npx-init path, not copy-paste installs, and does nothing for agents booting later. Rejected as primary mechanism; can be added later as an enhancement.Additional context
The fix is rules text shipped in the framework files, so no runtime code is required. The bundled CLI re-bundles these files at build time, so a later CLI release ships the new behavior automatically with no CLI changes in this proposal.