Repository navigation
Add project configuration and document-glob support #14
Description
Activity
This was generated by AI during triage.
Agent Brief
Category: enhancement
Summary: Add a small, non-executable project configuration for mdcode documents, roots, and default filters.Current behavior:
Every workflow must repeat document paths, working roots, and filters on the command line. There is no mdcode configuration convention or configuration validation.Desired behavior:
A repository can define common defaults in mdcode.config.json. The CLI discovers that file from the working directory or accepts an explicit --config path. Commands use configuration values as defaults, while explicit CLI options intentionally override them.Key interfaces:
- Configuration file — JSON only, named mdcode.config.json. Do not execute JavaScript or TypeScript configuration.
- Configuration shape — documents is an array of Markdown paths or globs; sourceRoot and outputRoot define default operation roots; filter supplies default language and metadata filtering.
- Path resolution — resolve configuration-relative paths against the configuration file directory and apply existing guarded-path rules to file operations.
- CLI precedence — explicit command-line document inputs, roots, and filters override the corresponding configuration defaults.
- Validation — reject malformed JSON, unknown/invalid field shapes, unmatched required document selections, and unsafe paths with actionable messages.
Acceptance criteria:
- mdcode.config.json supports document paths or globs, sourceRoot, outputRoot, and default filters.
- The CLI discovers the default configuration or loads an explicit --config path for check and synchronization workflows.
- Explicit CLI options override configuration defaults predictably.
- Configuration paths are resolved relative to the configuration file and unsafe paths fail clearly.
- Invalid configuration produces actionable validation errors.
- Documentation includes a complete consumer configuration, local command, and CI example.
- Tests cover discovery, explicit selection, glob expansion, precedence, and validation errors.
Out of scope:
- Executable JavaScript or TypeScript configuration.
- Watch-mode behavior, which is issue Add a safe watch mode for local documentation development #18.
- Redefining plan, apply, diff, or check semantics from issue Add plan, diff, apply, and check workflows for agent-driven sync #6.
- A multi-project monorepo configuration model beyond paths/globs that work from one config file.
Verification status:
Confirmed: no existing mdcode configuration convention exists. This issue remains blocked by #6.- addedenhancementNew feature or requestNew feature or requestready-for-agentFully specified and ready for an AFK agentFully specified and ready for an AFK agent
on Aug 8, 2026 - added a commit that references this issue
on Oct 4, 2026
What to build
Add a project-level mdcode configuration that defines the Markdown documents, source roots, filters, and validation defaults for a repository. Consumers should be able to run common workflows without repeating command-line wiring in every local script and CI job.
Acceptance criteria
Blocked by