Skip to content

Implement Step3: team customization#3

Merged
hidetzu merged 1 commit into
mainfrom
feat/step3-customization
Apr 1, 2026
Merged

Implement Step3: team customization#3
hidetzu merged 1 commit into
mainfrom
feat/step3-customization

Conversation

@hidetzu
Copy link
Copy Markdown
Owner

@hidetzu hidetzu commented Apr 1, 2026

Summary

  • Add .riskcheck.yaml config file support for team-specific scoring rules
  • riskcheck init command for config file generation
  • External tool integration via --complexity-file and --coverage-file

Related Spec

  • specs/usecases.md
  • specs/requirements.md (NFR-2 clarified)
  • specs/spec.md (module structure, CLI flags, init command updated)
  • specs/roadmap.md

Roadmap Step

  • Step1: Minimal Working Version
  • Step2: Practical Level
  • Step3: Team Customization

Changes

  • internal/config: YAML config loading with pointer types for nil-safety
  • internal/signal: All 7 existing signal constructors accept config injection
  • internal/signal/high_complexity.go: S-8 — external complexity JSON input
  • internal/signal/low_coverage.go: S-9 — external coverage JSON input
  • cmd/init.go: riskcheck init subcommand
  • cmd/root.go: Config loading, new flags, signal wiring with config
  • main.go: Error messages printed to stderr before exit
  • README.md: Full feature documentation (signals table, config, external tools, exit codes)
  • .riskcheck.yaml.example: Sample config with all options

Design Decisions

  • Constructor injection for config (no method chaining)
  • Pointer types in config to distinguish "not set" from zero values
  • S-8/S-9 accept riskcheck-defined JSON schema, not raw tool output
  • S-8/S-9 only evaluate files present in the diff
  • init refuses to overwrite existing config

Test Plan

  • Unit tests added (70+ tests across all packages)
  • Exit criteria verified:
    • .riskcheck.yaml overrides default behavior
    • External tool output can feed into scoring
    • All existing tests still pass (no regressions)

…ternal tool input

- Add .riskcheck.yaml config file support with YAML loading
- Constructor injection for all signal config overrides (thresholds, weights, paths, test patterns)
- riskcheck init command to generate config file
- S-8: high_complexity signal via --complexity-file (external JSON)
- S-9: low_coverage signal via --coverage-file (external JSON)
- CLI flags: --config, --complexity-file, --coverage-file
- Print errors to stderr before exit
- Update specs, README with full feature documentation
- 70+ unit tests across all packages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hidetzu hidetzu merged commit c28168b into main Apr 1, 2026
2 checks passed
@hidetzu hidetzu deleted the feat/step3-customization branch May 4, 2026 08:12
hidetzu added a commit that referenced this pull request May 4, 2026
…ternal tool input (#3)

- Add .riskcheck.yaml config file support with YAML loading
- Constructor injection for all signal config overrides (thresholds, weights, paths, test patterns)
- riskcheck init command to generate config file
- S-8: high_complexity signal via --complexity-file (external JSON)
- S-9: low_coverage signal via --coverage-file (external JSON)
- CLI flags: --config, --complexity-file, --coverage-file
- Print errors to stderr before exit
- Update specs, README with full feature documentation
- 70+ unit tests across all packages
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