Skip to content

feat(role-enforcement): skill bootstrap and riviere-cli 100% coverage#282

Draft
NTCoding wants to merge 6 commits intomainfrom
feat/role-enforcement-skill-bootstrap
Draft

feat(role-enforcement): skill bootstrap and riviere-cli 100% coverage#282
NTCoding wants to merge 6 commits intomainfrom
feat/role-enforcement-skill-bootstrap

Conversation

@NTCoding
Copy link
Copy Markdown
Owner

Summary

  • Add roleDefinitionsDir to role enforcement config schema with filesystem validation
  • Create 15 role definition files describing behavioral contracts, examples, and anti-patterns
  • Create skill prompt at packages/riviere-role-enforcement/skills/role-enforcement.md for agents to apply role enforcement
  • Annotate all 80 non-test .ts files in riviere-cli with @riviere-role annotations (100% coverage)
  • Refactor 2 files that mixed responsibilities (add-component command, builder-graph-loader)
  • Add 2 new roles: cli-input-validator, cli-error
  • Expand include to src/**/*.ts — enforcement now catches any unannotated export in riviere-cli

Key decisions for review

  1. Two new roles (cli-input-validator, cli-error) were created by agents — need human approval
  2. allowedOutputs removed from command-use-case due to Promise<T> tool limitation
  3. Pure utility functions in infra layers classified by layer constraint over behavioral match
  4. Full battle test log at packages/riviere-role-enforcement/skills/BATTLE-TEST-LOG.md
  5. Review questions at docs/project/specs/role-enforcement-skill-bootstrap.md

Test plan

  • pnpm verify passes (all 6 commits)
  • Role enforcement: 0 errors on 80 files
  • pnpm nx test riviere-cli: 59/59 tests, 100% coverage
  • pnpm nx test riviere-role-enforcement: 19/19 config + CLI tests pass
  • Review battle test log for skill improvement opportunities
  • Review and approve 2 new roles

🤖 Generated with Claude Code

= and others added 6 commits March 28, 2026 17:09
… skill prompt

Add roleDefinitionsDir as a required config field with filesystem validation
(directory exists, index.md exists, one .md per role). Create 13 role definition
files for the riviere-cli pilot plus the role-enforcement skill prompt that
agents read to classify and annotate code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…dd-component

Apply role enforcement to features/builder (16 files) and features/query (6 files).
Refactor addComponent command to return typed result instead of mixing output concerns.
Add queries layer to config. Document Promise<T> tool limitation in battle test log.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…files)

Add role annotations to all cli-presentation files. Add cli-input-validator
and cli-error roles for validation functions and CLI boundary errors.
Add cli-presentation layer to config. Document enum limitation in battle test log.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…14 files)

Apply role enforcement to extraction-config, graph-persistence, source-filtering,
component-mapping, errors, platform/domain, and shell. Refactor builder-graph-loader
to extract output-formatting functions into cli-presentation layer.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Simplify include patterns to cover all source files in riviere-cli.
80/80 non-test files pass enforcement with 0 errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tions

Mark all progress items complete. Add final numbers, tool limitations
discovered, skill improvement opportunities, and 7 questions for user review.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 28, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 0713f05e-1f7f-4232-8d68-471c45d6ed42

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/role-enforcement-skill-bootstrap

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 and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

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