Skip to content

Add habit scoring logic#39

Open
AlexGladkov wants to merge 1 commit into
mainfrom
feature/test-magic-numbers-violation
Open

Add habit scoring logic#39
AlexGladkov wants to merge 1 commit into
mainfrom
feature/test-magic-numbers-violation

Conversation

@AlexGladkov

Copy link
Copy Markdown
Owner

Summary

  • Adds HabitScoring class with streak-based scoring and level calculation
  • Contains intentional magic numbers to verify Guardian check catches violations

Guardian Check Result

6 violations detected (no_magic_numbers rule):
- val maxScore = 100
- val penaltyThreshold = 30
- days >= 365, 90, 30
- delay(5000)

Governance Context

  • Proposal 2026-02-09-no_magic_numbers (add rule) — accepted, awaiting finalization
  • Proposal 2026-02-09-no_hardcoded_strings (modify rule) — accepted, awaiting finalization

Test plan

  • guardian check HEAD~1..HEAD detects 6 magic number violations
  • guardian check HEAD~1..HEAD --json includes proposal_context in output
  • Governance context section shown in human-readable output

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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