Implement reputation display commands — reputation, reputation <faction>, standing #222

Open
opened 2026-03-16 01:40:02 +00:00 by freemo · 0 comments
Owner

Metadata

Field Value
Epic #204 — Reputation UI & Commands
Legendary #199 — Reputation & Social Standing
Type Feature
Priority Medium
Points 5
MoSCoW Must Have
Branch feature/m4-reputation-display-commands
Commit Message Implement reputation display commands — reputation, reputation <faction>, standing (#222)

Background and Context

Players need intuitive commands to check their reputation standings across all factions, settlements, and NPCs they have interacted with. The reputation display system provides both a summary view and a detailed per-entity view.

The reputation command (with standing as an alias) shows all non-neutral reputation entries grouped by entity type: Factions first, then Settlements, then NPCs. Each entry shows the entity name, numeric score, and tier name with color coding. The detailed view for a specific entity adds information about current gameplay effects and recent reputation changes.

These commands are the primary way players interact with the reputation system and must be clear, informative, and well-formatted for the MUD terminal interface.

Expected Behavior

  1. reputation (no arguments):

    • Displays all non-neutral reputation entries grouped by type.
    • Format:
      === Your Reputation ===
      
      -- Factions --
      Merchant Guild:    +42 (Respected)
      Thieves Guild:     -68 (Hated)
      
      -- Settlements --
      Oakvale:           +15 (Friendly)
      
      -- NPCs --
      Blacksmith Tormund: +55 (Honored)
      
    • Entries within each group are sorted by score descending.
    • Shows "You have no notable reputation standings." if all entries are Neutral.
  2. reputation <name>:

    • Shows detailed view for a specific entity:
      === Reputation with Merchant Guild ===
      Score:  +42 / 100
      Tier:   Respected (+26 to +50)
      Type:   Faction
      
      Current Effects:
        Merchant prices: 0.8x buy / 1.2x sell
        Access: All areas open
      
      Recent Changes:
        -2 (decay) — 1 day ago
        +10 (completed quest) — 3 days ago
      
  3. standing: Alias for reputation, behaves identically.

Acceptance Criteria

  • reputation command displays all non-neutral entries grouped by Factions, Settlements, NPCs.
  • Entries are sorted by score descending within each group.
  • Shows appropriate message when player has no notable standings.
  • reputation <name> shows detailed view with score, tier, type, effects, and recent changes.
  • reputation <name> shows appropriate message if entity not found.
  • standing command is a working alias for reputation.
  • Output is well-formatted for MUD terminal display (80 columns max).
  • Color coding applied to tier names (red for negative, green for positive, white for neutral).

Subtasks

  • Create lib/aethyr/core/commands/reputation.rb with the reputation command handler.
  • Implement summary view with grouping by entity type.
  • Implement sorting within groups (score descending).
  • Implement empty standings message.
  • Implement detailed single-entity view with score, tier, type.
  • Implement current effects display in detailed view.
  • Implement recent changes display in detailed view (requires change history tracking).
  • Add change history tracking to ReputationVector (last N changes with timestamp and source).
  • Register standing as alias for reputation in command parser.
  • Implement color coding for tier names.
  • Docs: Update YARD comments on affected classes and methods. Update relevant Docusaurus documentation pages if applicable.
  • Tests (Cucumber): Add tests/unit/reputation_commands.feature covering summary view, grouped display, sorting, empty standings, detailed view, entity-not-found, alias, and color coding.
  • Tests (Cucumber Integration): Add integration feature in tests/integration/ for reputation display after various reputation-changing events.
  • Tests (Profiling): Run bundle exec rake unit_profile and verify no performance regressions.
  • Quality: Verify coverage >=97% via bundle exec rake unit. If coverage is <97% then review the current unit test coverage report at build/tests/unit/coverage/ and use it to write new Cucumber based unit tests to improve code coverage. Specifically, write Cucumber/Gherkin style unit tests that are descriptively named and specifically improve coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun bundle exec rake unit to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Quality: Run bundle exec rake (default task: unit tests with coverage) and bundle exec rake integration, fix any errors if needed ensuring both pass across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
## Metadata | Field | Value | |-------|-------| | **Epic** | #204 — Reputation UI & Commands | | **Legendary** | #199 — Reputation & Social Standing | | **Type** | Feature | | **Priority** | Medium | | **Points** | 5 | | **MoSCoW** | Must Have | | **Branch** | `feature/m4-reputation-display-commands` | | **Commit Message** | `Implement reputation display commands — reputation, reputation <faction>, standing (#222)` | ## Background and Context Players need intuitive commands to check their reputation standings across all factions, settlements, and NPCs they have interacted with. The reputation display system provides both a summary view and a detailed per-entity view. The `reputation` command (with `standing` as an alias) shows all non-neutral reputation entries grouped by entity type: Factions first, then Settlements, then NPCs. Each entry shows the entity name, numeric score, and tier name with color coding. The detailed view for a specific entity adds information about current gameplay effects and recent reputation changes. These commands are the primary way players interact with the reputation system and must be clear, informative, and well-formatted for the MUD terminal interface. ## Expected Behavior 1. **`reputation`** (no arguments): - Displays all non-neutral reputation entries grouped by type. - Format: ``` === Your Reputation === -- Factions -- Merchant Guild: +42 (Respected) Thieves Guild: -68 (Hated) -- Settlements -- Oakvale: +15 (Friendly) -- NPCs -- Blacksmith Tormund: +55 (Honored) ``` - Entries within each group are sorted by score descending. - Shows "You have no notable reputation standings." if all entries are Neutral. 2. **`reputation <name>`**: - Shows detailed view for a specific entity: ``` === Reputation with Merchant Guild === Score: +42 / 100 Tier: Respected (+26 to +50) Type: Faction Current Effects: Merchant prices: 0.8x buy / 1.2x sell Access: All areas open Recent Changes: -2 (decay) — 1 day ago +10 (completed quest) — 3 days ago ``` 3. **`standing`**: Alias for `reputation`, behaves identically. ## Acceptance Criteria - [ ] `reputation` command displays all non-neutral entries grouped by Factions, Settlements, NPCs. - [ ] Entries are sorted by score descending within each group. - [ ] Shows appropriate message when player has no notable standings. - [ ] `reputation <name>` shows detailed view with score, tier, type, effects, and recent changes. - [ ] `reputation <name>` shows appropriate message if entity not found. - [ ] `standing` command is a working alias for `reputation`. - [ ] Output is well-formatted for MUD terminal display (80 columns max). - [ ] Color coding applied to tier names (red for negative, green for positive, white for neutral). ## Subtasks - [ ] Create `lib/aethyr/core/commands/reputation.rb` with the `reputation` command handler. - [ ] Implement summary view with grouping by entity type. - [ ] Implement sorting within groups (score descending). - [ ] Implement empty standings message. - [ ] Implement detailed single-entity view with score, tier, type. - [ ] Implement current effects display in detailed view. - [ ] Implement recent changes display in detailed view (requires change history tracking). - [ ] Add change history tracking to ReputationVector (last N changes with timestamp and source). - [ ] Register `standing` as alias for `reputation` in command parser. - [ ] Implement color coding for tier names. - [ ] Docs: Update YARD comments on affected classes and methods. Update relevant Docusaurus documentation pages if applicable. - [ ] Tests (Cucumber): Add `tests/unit/reputation_commands.feature` covering summary view, grouped display, sorting, empty standings, detailed view, entity-not-found, alias, and color coding. - [ ] Tests (Cucumber Integration): Add integration feature in `tests/integration/` for reputation display after various reputation-changing events. - [ ] Tests (Profiling): Run `bundle exec rake unit_profile` and verify no performance regressions. - [ ] Quality: Verify coverage >=97% via `bundle exec rake unit`. If coverage is <97% then review the current unit test coverage report at `build/tests/unit/coverage/` and use it to write new Cucumber based unit tests to improve code coverage. Specifically, write Cucumber/Gherkin style unit tests that are descriptively named and specifically improve coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `bundle exec rake unit` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [ ] Quality: Run `bundle exec rake` (default task: unit tests with coverage) and `bundle exec rake integration`, fix any errors if needed ensuring both pass across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done.
freemo added this to the v1.3.0 milestone 2026-03-16 01:40:02 +00:00
freemo self-assigned this 2026-03-16 01:40:02 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference: aethyr/Aethyr#222
No description provided.