Skip to content

feat: add resetConfig() + comprehensive config tests - #47

Closed
TerminalGravity wants to merge 5 commits into
mainfrom
feat/config-reset-and-tests
Closed

feat: add resetConfig() + comprehensive config tests#47
TerminalGravity wants to merge 5 commits into
mainfrom
feat/config-reset-and-tests

Conversation

@TerminalGravity

Copy link
Copy Markdown
Collaborator

Adds resetConfig() export to clear the cached config singleton — useful for tests and long-running sessions where config files may change.

Also adds 10 tests for config.ts covering defaults, YAML loading, env var fallback/precedence, malformed YAML handling, and hasPreflightConfig().

Test count: 43 → 53.

… and contracts

The README references .preflight/ config extensively but there were no
concrete example files to copy. This adds a ready-to-use examples/.preflight/
directory with annotated config.yml, triage.yml, and contracts/api.yml,
plus a README explaining how to use them.
Created examples/USAGE_EXAMPLES.md with 8 real-world scenarios showing
what each tool looks like in practice: preflight_check catching vague
prompts, scope_work creating execution plans, enrich_agent_task for
sub-agents, sharpen_followup resolving ambiguity, session health checks,
semantic history search, weekly scorecards, and prompt grading.

Added link to usage examples in README nav bar.
- Reorder options: npx (zero install) → npm global → clone
- Add -y flag to npx for non-interactive use
- Explain what CLAUDE_PROJECT_DIR enables
- Note that .mcp.json paths must be absolute
- Use 'absolute' in path placeholders to prevent confusion
- Add resetConfig() to clear cached config singleton, enabling
  testability and config reload in long-running sessions
- Add 10 tests covering: defaults, caching, reset, YAML loading,
  triage.yml, related_projects, env var fallback, env var precedence,
  malformed YAML handling, hasPreflightConfig()
- Total test count: 43 → 53
@TerminalGravity

Copy link
Copy Markdown
Collaborator Author

Closing — superseded by newer PRs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant