Problem
Unknown fields in prompt front-matter (e.g. `processingLabel` instead of
`inProcessLabel`) are caught by the strict YAML decoder (`KnownFields(true)`)
and logged as errors — but only at run-time, once per cron tick. A typo in a
config file therefore causes every cron invocation to fail until someone
notices the log.
Real incident: `processingLabel` vs `inProcessLabel` in
`loop/sharedinbox/prompts/code.md` and `plan.md` went undetected across
many cron runs.
Requirements
-
Strict YAML everywhere — `KnownFields(true)` must be used for every
config file parsed by agentloop: `acpx-config`, `config.yaml`, and all
prompt `.md` front-matter. Prompt and acpx-config already do this; verify
`config.yaml`.
-
Upfront validation on startup — before dispatching any agent work,
`agentloop` and `agentloop cron` should load and validate all config
files in the loop directory. Any unknown field or missing required field
should abort the run with a clear, actionable error that names the file and
field.
-
`agentloop validate` subcommand — a fast, side-effect-free command
that checks every config file in a loop directory and prints errors, for
use in CI / pre-commit hooks:
agentloop validate [--loop <dir>]
Exit 0 = all configs valid. Exit 1 = one or more errors, all listed.
Acceptance criteria
- `agentloop validate` with a prompt containing `processingLabel` exits 1
and names the file and field.
- `agentloop` / `agentloop cron` with the same bad config exits non-zero
before spawning any agent.
- All existing config structs use `KnownFields(true)`.
Problem
Unknown fields in prompt front-matter (e.g. `processingLabel` instead of
`inProcessLabel`) are caught by the strict YAML decoder (`KnownFields(true)`)
and logged as errors — but only at run-time, once per cron tick. A typo in a
config file therefore causes every cron invocation to fail until someone
notices the log.
Real incident: `processingLabel` vs `inProcessLabel` in
`loop/sharedinbox/prompts/code.md` and `plan.md` went undetected across
many cron runs.
Requirements
Strict YAML everywhere — `KnownFields(true)` must be used for every
config file parsed by agentloop: `acpx-config`, `config.yaml`, and all
prompt `.md` front-matter. Prompt and acpx-config already do this; verify
`config.yaml`.
Upfront validation on startup — before dispatching any agent work,
`agentloop` and `agentloop cron` should load and validate all config
files in the loop directory. Any unknown field or missing required field
should abort the run with a clear, actionable error that names the file and
field.
`agentloop validate` subcommand — a fast, side-effect-free command
that checks every config file in a loop directory and prints errors, for
use in CI / pre-commit hooks:
Exit 0 = all configs valid. Exit 1 = one or more errors, all listed.
Acceptance criteria
and names the file and field.
before spawning any agent.