Skip to content

feat(dg): plain help text, spelled-out plurals, rounded prices and a help lint (E2) - #378

Merged
PastaPastaPasta merged 13 commits into
masterfrom
feat/e2-voice-dg
Oct 5, 2026
Merged

PastaPastaPasta merged 13 commits into
masterfrom
feat/e2-voice-dg

Conversation

@PastaPastaPasta

@PastaPastaPasta PastaPastaPasta commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

What

The dg half of epic E2 (Voice): help and output a maintainer would write.

  • Help text in plain words. Help and notes no longer use internal names: forge-v2, "gh-shaped", headUpdate, forkOf, starBeat, config.backend, "consensus", "client rule", "on chain" and "recovery words". The top line is now "Work with Dash Forge from the command line". Long command summaries are split into a short summary and a details paragraph, so dg --help fits on one line per command.
  • One way to say who enforces a rule. Branch policy, archiving and member writes say "Forge apps enforce it, not Platform" in help and in dg repo policy output, matching the web's chip. A refused merge still says that nothing was pushed and no merge event was posted.
  • Plurals spelled out. (s) plurals in output use fmt::plural / fmt::plural_with ("2 assets", "1 address"). A few older inline if n == 1 { "" } else { "s" } spots already spell plurals correctly and are left as they are.
  • Rounded prices. Cost lines round to three significant figures (~0.0102 DASH, not ~0.01017812 DASH). A tiny fee never shows as ~0. dg cost and dg cost audit print amounts to the credit so their rows still add up. --json keeps exact credits.
  • Names before ids. An identity with a DPNS name prints as alice.dash (Fi8bQ2xk…) instead of the 44-character id followed by the name. An identity with no name still prints its full id. --json keeps full ids.
  • Help lint and snapshot. src/help_lint.rs tests every command's summary and details, every flag's help, and every value's help against the style guide's banned list. It also compares dg --help with tests/snapshots/dg-help.txt (DG_UPDATE_SNAPSHOTS=1 rewrites it).

Why

The agent-isms review (R1, R4, R10) found protocol jargon in dg help, 218 lazy (s) plurals, 8-decimal prices and full identity ids printed next to the names that identify them. The web copy is in #369. This PR applies the same rules to the CLI and adds the test that keeps them in place.

How tested

  • cargo fmt --check, cargo clippy --workspace --all-targets -D warnings and cargo test --workspace pass locally.
  • A high-effort code review ran on the first commit and found nine issues. All nine are fixed in e8834b5b:
    • the stale not-deployed test string
    • ~0 for tiny fees
    • rounding in dg cost
    • the lint skipping long help and value help
    • leftover policy and recovery wording
    • address(es)
    • the merge-refusal note
    • duplicated plural helpers (plural now calls plural_with)
    • the group notice's revision count
  • A second high-effort review covered the fix commit and the name change. Its findings are fixed in fc746810:
    • prices keep three significant figures at every size (0.00517, not 0.0052; 32.5, not 32.54)
    • dg cost prints amounts to the credit, so its rows add up
    • every CLI prompt and message says "recovery phrase"
    • dg collab list keeps its role column aligned when some members show a name
    • the help lint also checks after-help, and reports each problem once
    • a unit test covers the group notice's count by contract
  • Read against sakura with a build of this branch: help for dg, dg repo star and dg repo policy, plus collab list, release list, issue list and repo list on forge-v2-demo. The output is in /Users/pasta/workspace/dash-forge-qa/evidence/p0/voice/dg/after.txt.

Limits

  • The demo repo's identities have no DPNS names, so the sakura capture shows full ids. The name-first format is covered by a unit test.
  • The docs work (a Networks page, and errors.md entries that open with what happened and what to do) is a separate follow-up.

🤖 Generated with Claude Code

PastaPastaPasta and others added 3 commits October 4, 2026 13:05
…help lint

Rewrite dg help and notes that leaked internal names (forge-v2, gh-shaped, headUpdate, forkOf, starBeat, config.backend, consensus, client rule, on chain, recovery words), split the longest command summaries into a summary and a details paragraph, and spell out every (s) plural in dg output with fmt::plural.

Prices in cost lines are rounded to three significant figures (~0.0102 DASH, not ~0.01017812 DASH); --json keeps exact credits.

Add help_lint tests: every command summary and flag help is checked against the style guide's banned list, and dg --help is compared with tests/snapshots/dg-help.txt (DG_UPDATE_SNAPSHOTS=1 rewrites it).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Round prices with forge_core::user_error::dash so a tiny fee never shows as ~0, keep exact amounts in dg cost, lint long help and value help too, finish the branch-policy, archive and recovery-phrase wording, spell out the doctor address plural, and count newer contract revisions by contract.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Human output read 'Fi8b…44 characters… (alice.dash)'. It now reads 'alice.dash (Fi8bQ2xk…)'; ids without a name stay in full, and --json keeps full ids.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 37 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dae97ac5-49b9-49e7-bff4-eaaf78ddcb9d
📥 Commits

Reviewing files that changed from the base of the PR and between 7177d17 and 4ae980a.

📒 Files selected for processing (33)
  • crates/dg/src/auth/group.rs
  • crates/dg/src/auth/keys.rs
  • crates/dg/src/auth/mod.rs
  • crates/dg/src/auth/new.rs
  • crates/dg/src/auth/store.rs
  • crates/dg/src/ci.rs
  • crates/dg/src/collab.rs
  • crates/dg/src/common.rs
  • crates/dg/src/cost.rs
  • crates/dg/src/doctor.rs
  • crates/dg/src/fmt.rs
  • crates/dg/src/help_lint.rs
  • crates/dg/src/import.rs
  • crates/dg/src/issue.rs
  • crates/dg/src/keys.rs
  • crates/dg/src/label.rs
  • crates/dg/src/main.rs
  • crates/dg/src/maint.rs
  • crates/dg/src/meta.rs
  • crates/dg/src/pr/branch.rs
  • crates/dg/src/pr/mod.rs
  • crates/dg/src/pr/review.rs
  • crates/dg/src/release.rs
  • crates/dg/src/repo.rs
  • crates/dg/src/repo_settings.rs
  • crates/dg/src/repo_sync.rs
  • crates/dg/src/storage.rs
  • crates/dg/src/webhook.rs
  • crates/dg/tests/snapshots/dg-help.txt
  • crates/forge-core/src/keyring.rs
  • crates/forge-core/src/platform/identity.rs
  • crates/forge-core/src/user_error.rs
  • crates/git-remote-dash/src/helper.rs
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

PastaPastaPasta and others added 2 commits October 4, 2026 13:56
Round prices to three significant figures at every size, print dg cost to the credit so its rows add up, say recovery phrase in every CLI message, keep dg collab list's roles aligned when names are shown, lint after-help and report each long-help problem once, and test the group notice's count by contract.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PastaPastaPasta
PastaPastaPasta merged commit 380a422 into master Oct 5, 2026
34 checks passed
@PastaPastaPasta
PastaPastaPasta deleted the feat/e2-voice-dg branch October 5, 2026 09:10
PastaPastaPasta added a commit that referenced this pull request Oct 5, 2026
A summary under 40 words with the details below it, and recovery phrase rather than recovery words, as the help lint from master (#378) requires.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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