Commit graph

36 commits

Author SHA1 Message Date
Fred Amaral
9cb5a72737
fix(codereview): align reviewer references and harden lib-commons/multi-tenant agents
Propagates the 10-reviewer peer list across agent frontmatter, Position/Critical prose, shared-patterns, skill dispatchers, gate validators, and docs — resolving drift left behind when multi-tenant-reviewer and lib-commons-reviewer were added to the pool. Also fixes broken shared-pattern paths in lib-commons-reviewer and adds substantive blocker criteria to multi-tenant-reviewer plus codebase-context severity heuristic (Lerian third-rail vs external recommendation) to lib-commons-reviewer.

X-Lerian-Ref: 0x1
2026-04-18 20:18:16 -03:00
Fred Amaral
14d84dbaa0
feat(review): add multi-tenant and lib-commons agents to review cycle
docs: align all documentation with the new 10-reviewer workflow
docs(lib-commons): update skill to reflect major v5.0.2 release
chore(hooks): tune context reminder hook to reduce token consumption
2026-04-18 19:32:16 -03:00
Fred Amaral
33c9e97d03
fix(codereview): complete cache-first standards injection end-to-end
The cache-first feature injected <standards> blocks into 5 reviewer dispatch prompts, but only performance-reviewer parsed them — code, business-logic, security, and test reviewers ignored the injection and re-fetched standards on every run. The orchestrator-side half shipped without the consumer-side half.

Each of the 4 default reviewer agents now has a Standards Loading (Cache-First) section implementing the canonical three-tier resolution: cache hit from state.cached_standards, cache miss via WebFetch with warning, standalone fallback to hardcoded URLs. The per-reviewer fallback URL lists are unique and derived from each reviewer's standards_slice.

The 5-way verbatim duplication of the dispatch block in codereview/SKILL.md is collapsed to per-reviewer URL-slice markers that reference shared-patterns/standards-cache-protocol.md as the single source of truth. The shared pattern now carries the canonical <standards> template, orchestrator pseudocode, three-tier protocol, rolling-standards policy, and an anti-rationalization table defending cache-first behavior. Net 117-line reduction in codereview/SKILL.md.

X-Lerian-Ref: 0x1
2026-04-18 10:44:17 -03:00
Fred Amaral
600a505c9a
docs: propagate performance-reviewer as 8th codereview agent across all downstream references
Update all skills, agents, shared patterns, docs, and platform configs that still referenced 7 code review agents to reflect the 8th reviewer (ring:performance-reviewer). Includes agent self-descriptions, dispatch instructions, anti-rationalization tables, slicing math, gate tables, and opencode schema definitions.

X-Lerian-Ref: 0x1
2026-04-14 15:53:45 -03:00
Fred Amaral
fa6c4c87e8
docs(frontmatter): create canonical schema to standardize component metadata
feat(hooks): add schema validator and enhance skill generation
refactor(*): align all components with the new frontmatter schema
refactor(commands): replace arguments object with simple argument-hint
refactor(agents): remove invalid version field from agent frontmatter
test(hooks): add unit tests for frontmatter validation and generation
2026-04-06 09:52:28 -07:00
Fred Amaral
c1d4fe6d45
feat(review): add dead-code-reviewer agent for orphan detection
Introduces a new parallel reviewer, `ring:dead-code-reviewer`, to
systematically identify orphaned code resulting from changes. This
enhances codebase hygiene by detecting unused helpers, types, and
tests, thereby reducing technical debt and improving maintainability.

The parallel code review system is expanded from 6 to 7 concurrent
reviewers. All related workflows, skills, commands, and documentation
have been updated to integrate this new capability.

- Add the `ring:dead-code-reviewer` agent, which analyzes code across
 three concentric rings (target, direct dependents, ripple effect) to
 find unreachable code.
- Update the `/ring:codereview` command and `ring:requesting-code-review`
 skill to dispatch all 7 reviewers in a single parallel step.
- Adjust project documentation, including architecture diagrams, manuals,
 and agent guides, to reflect the 7-reviewer workflow.
2026-03-09 21:17:22 -03:00
Fred Amaral
0e7e5ca396
refactor: decouple agents from specific model requirements
Removes the hard-coded `model: "opus"` requirement from all agent
definitions, skill examples, and command documentation. The orchestrator
is now responsible for model selection, making the agent framework more
flexible and model-agnostic.

Key changes include:
- Removing the `model` parameter from all agent frontmatter and Task
 tool examples.
- Deleting the "Model Requirement" hard gate and self-verification
 sections from all agent prompts. This simplifies the prompts and
 removes model-specific enforcement logic.
- Updating core documentation (ARCHITECTURE, MANUAL, README) to reflect
 that model selection is an orchestrator concern.
- Removing redundant `changelog` and `last_updated` fields from agent
 frontmatter, as this information is tracked by source control.

This architectural shift allows the orchestrator to dynamically choose
the best model for a given task based on complexity, cost, or speed,
without being constrained by the agent's definition. It simplifies
agent maintenance and prepares the system for easier integration of
future AI models.
2026-03-08 16:33:12 -03:00
Fred Amaral
44f72ee6a3
feat(review): add consequences-reviewer to parallel code review
Code reviews that focus only on changed files can miss how those
changes break other parts of the codebase. Callers, contract
consumers, and dependent modules can be inadvertently affected, leading to
bugs that are difficult to detect in a localized review.

This commit introduces a new agent, `ring:consequences-reviewer`, to
systematically trace these "ripple effects." Its purpose is to analyze
the downstream impact of code changes by walking caller chains and
verifying consumer contracts.

The core parallel code review workflow, orchestrated by the
`/ring:codereview` command, now dispatches six agents in parallel
instead of five. All related documentation, skills, and agent prompts
have been updated to reflect this more robust 6-reviewer process.
2026-02-20 17:18:33 -03:00
Jefferson Rodrigues
1a770a9d0b
fix(default): normalize enforcement words to sentence start in reviewers
Move MUST/CANNOT/REQUIRED/MANDATORY to beginning of instruction sentences and lowercase context words (all/any/each/every) per lexical salience guidelines across business-logic, code, and test reviewers.

X-Lerian-Ref: 0x1
2026-02-13 00:41:24 -03:00
Jefferson Rodrigues
507c4433df
fix(default): expand Standards Compliance and add XML tags to reviewers
Expand business-logic-reviewer Standards Compliance Report with standards checklist, report template, and documentation rules. Wrap Pressure Resistance, When Not Needed, and Standards Compliance sections in XML semantic tags for code-reviewer and test-reviewer.

X-Lerian-Ref: 0x1
2026-02-13 00:32:47 -03:00
Jefferson Rodrigues
aa56ad163c
fix(default): add XML semantic tags and enforcement-first blocks to agents
Wrap Pressure Resistance, When Not Needed, and Standards Compliance sections in XML semantic tags for business-logic and security reviewers. Replace weak minimal review phrasing with enforcement-first MANDATORY blocks across code, test reviewers. Add required tag to codebase-explorer standards handoff.

X-Lerian-Ref: 0x1
2026-02-13 00:09:41 -03:00
Jefferson Rodrigues
ddfe56248d
fix(default): add missing CLAUDE.md mandatory sections to reviewer agents
Add Pressure Resistance, When Not Needed, and Standards Compliance Report sections to business-logic-reviewer, code-reviewer, security-reviewer, and test-reviewer. Add Non-Negotiables to code-reviewer. Add Standards Compliance Report (N/A) to codebase-explorer. All sections follow nil-safety-reviewer reference pattern.

X-Lerian-Ref: 0x1
2026-02-12 23:53:39 -03:00
Fred Amaral
a22f7fc3f7
Revert "docs: update prose and examples to use ring- format"
This reverts commit b69a16c405.
2026-02-09 09:32:25 -03:00
Fred Amaral
b69a16c405
docs: update prose and examples to use ring- format
Transform all user-facing Ring component references from colon-based
notation (ring:) to a standardized hyphen-based format (ring-).

This change affects skill names, agent names, and slash commands in all
documentation, guides, and examples. The goal is to create a consistent
and user-friendly namespace that is easier to read and type.

For example:
- Skill/Agent references like `ring:code-reviewer` become `ring-code-reviewer`
- Slash commands like `/ring:codereview` become `/ring-codereview`

The colon-based format (`ring:`) is intentionally preserved in YAML
frontmatter (`name: ring:skill-name`) for internal metadata, separating
the user-facing display name from the internal tooling identifier.
2026-02-08 22:26:17 -03:00
Fred Amaral
29b383e14b
refactor(agents): remove model directives from default/ agents
Remove model: opus from frontmatter and Model Requirements sections

from all 7 default/ agents to allow model inheritance from Task invocation.

Affected agents:

- code-reviewer

- business-logic-reviewer

- security-reviewer

- test-reviewer

- nil-safety-reviewer

- write-plan

- codebase-explorer

X-Lerian-Ref: 0x1
2026-02-04 18:06:33 -03:00
Fred Amaral
6309c51213
refactor(core): prefix all components with 'ring:' for a unified API
feat(codereview): add data-flow and context-compilation analysis tools
2026-01-14 03:10:38 -03:00
Fred Amaral
c5e9c57799
refactor(naming): prefix default entities with 'ring:' namespace
This change introduces a namespacing convention for all built-in agents,
commands, and skills to prevent potential naming collisions with
user-defined entities.

All default entity names in the frontmatter are now prefixed with
'ring:'. For example, 'name: code-reviewer' becomes
'name: ring:code-reviewer'.

This creates a clear distinction between core framework components and
custom ones, improving the system's overall robustness and
extensibility.
2026-01-12 14:35:51 -03:00
Fred Amaral
99a097ea47
feat(reviewers): add CodeRabbit nitpick pattern coverage
Expands Ring reviewers to detect patterns commonly flagged by CodeRabbit:

test-reviewer.md:
- Category 9: Error Handling in Test Code (silenced errors detection)
- Anti-Pattern 7: Silenced Errors in Test Code (Go/TS examples)
- Anti-Pattern 8: Misleading Test Names
- Anti-Pattern 9: Testing Language Behavior
- Enhanced Category 5: Assertion Quality with validation tables

code-reviewer.md:
- Dead Code Detection section (unused vars, no-op assignments, dead imports)
- Cross-Package Duplication detection

nil-safety-reviewer.md:
- API Response Initialization section (nil slice JSON serialization)
- Added omitempty tag documentation
- New patterns: nil slice/map in API response

ai-slop-detection.md:
- Stateless Structs pattern (Go-specific over-engineering)

reviewer-blocker-criteria.md:
- Updated test-reviewer from 8 to 9 categories

Coverage: 100% of identified CodeRabbit nitpick patterns now detected.
X-Lerian-Ref: 0x1
2026-01-09 18:42:26 -03:00
Fred Amaral
2cd2792f6d
fix(reviewers): address code review findings from 5-reviewer analysis
Changes based on parallel code review by code-reviewer, business-logic-reviewer,
security-reviewer, test-reviewer, and nil-safety-reviewer:

High priority fixes:
- Add self-verification section to test-reviewer for checklist enforcement
- Add conflict resolution guidance to codereview.md orchestration
- Create reviewer-quality-feedback.md shared pattern for accuracy tracking

Medium priority fixes:
- Add inline Model Requirements sections to code/business-logic/security reviewers
- Remove overlapping Test Quality section from code-reviewer
- Update reviewer-orchestrator-boundary.md to show all 5 reviewers
- Add prompt injection resistance to reviewer-anti-rationalization.md
- Fix interface nil check pattern with Kind() guard in nil-safety-reviewer
- Expand error-then-use pattern to cover (nil, nil) returns
- Add test security checks category to test-reviewer

Low priority fixes:
- Add TypeScript patterns (Array.find, Map.get) to nil-safety-reviewer
- Update test-reviewer blocker criteria to 4 items
- Clarify nullish coalescing gap description

X-Lerian-Ref: 0x1
2026-01-09 17:44:11 -03:00
Fred Amaral
3df2970318
feat(reviewers): add test and nil-safety agents, refactor to shared patterns
This commit significantly expands the automated code review capabilities
by introducing two new specialized reviewers and refactoring the existing
agent architecture for improved maintainability and scalability.

The primary goal is to provide more comprehensive feedback by assessing
test quality and nil/null pointer safety, which are common sources of bugs.

To avoid massive duplication of instructions with the introduction of
new agents, common reviewer principles have been extracted into a new
`shared-patterns` directory. This makes each reviewer agent's prompt
more focused on its specific domain and ensures consistency across all
reviewers.

Changes:
- Add `test-reviewer` to analyze test quality, coverage, edge cases,
 and anti-patterns.
- Add `nil-safety-reviewer` for Go and TypeScript to trace and report
 nil/null pointer risks.
- Create a `shared-patterns` directory containing common logic for agent
 model requirements, severity calibration, anti-rationalization,
 pressure resistance, and output schemas.
- Refactor `code-reviewer`, `business-logic-reviewer`, and
 `security-reviewer` to reference these shared patterns, significantly
 reducing their file size and complexity.
- Update the `codereview` command and `requesting-code-review` skill to
 orchestrate all five reviewers in parallel.
2026-01-09 17:15:14 -03:00
Fred Amaral
c589bc8ca1
feat(agents): introduce system-wide AI slop detection and prevention
AI agents can generate plausible but flawed code ("AI slop") that
includes hallucinated dependencies, scope creep, and context-unaware
implementations. This is a primary source of bugs and security risks.

To address this, introduce a system-wide framework for detecting and
preventing AI slop, centered around a new shared skill document:
`ai-slop-detection.md`.

This framework is integrated across the agent ecosystem:
- Specialist agents (engineers, DevOps) now perform a mandatory
 pre-submission self-check to catch their own slop before review.
- Reviewer agents (code, security, business) use new mandatory
 checklists to enforce quality gates against slop from other agents.
- Validation agents (QA, SRE) must verify command outputs to prevent
 reporting hallucinated metrics or test results.

This provides a defense-in-depth strategy against common AI failure
modes, improving code quality and mitigating supply-chain attack
vectors like "slopsquatting."
2025-12-28 10:32:42 -03:00
Jefferson Rodrigues
af1ff23fc6
fix(code-reviewer): align VERDICT values with output_schema
Change 'CONDITIONAL (with conditions)' to 'NEEDS_DISCUSSION' to match
output_schema.verdict_values: [PASS, FAIL, NEEDS_DISCUSSION]

X-Lerian-Ref: 0x1
2025-12-23 03:40:35 -03:00
Jefferson Rodrigues
6f435ea98d
fix(code-reviewer): add blank line for MD058 and Standards Compliance Report section
- Add blank line between Anti-Rationalization heading and table (MD058)
- Add Standards Compliance Report section with required output fields:
  VERDICT, Issues Found, What Was Done Well, Recommendations, Evidence/References
- Add severity definitions table (CRITICAL/HIGH/MEDIUM/LOW)

X-Lerian-Ref: 0x1
2025-12-23 03:31:55 -03:00
Jefferson Rodrigues
fd0313fa28
feat(reviewers): enforce orchestrator boundary pattern
- Add shared-patterns/reviewer-orchestrator-boundary.md defining the
  'Reviewers REPORT, Agents FIX' principle
- Add 'Orchestrator Boundary' section to all three reviewer agents:
  - code-reviewer.md: CANNOT use Edit/Create tools, must report only
  - business-logic-reviewer.md: CANNOT modify code, must report only
  - security-reviewer.md: CANNOT fix vulnerabilities, must report only
- Include anti-rationalization tables for 'I'll just fix this' temptation
- Document workflow: reviewer reports -> orchestrator dispatches -> agent fixes

This ensures consistent separation of concerns across all reviewers.

Generated-by: Claude
AI-Model: claude-sonnet-4-20250514
2025-12-23 01:23:10 -03:00
Jefferson Rodrigues
f4ef03b244
refactor: remove ring-{plugin}: prefix from agent/skill/command names
Simplify naming convention by removing fully qualified prefixes from all components. Names now use simple format (e.g., code-reviewer instead of ring-default:code-reviewer).

X-Lerian-Ref: 0x1
2025-12-16 01:50:31 -03:00
Jefferson Rodrigues
4cd6651cac
fix: use fully qualified agent names (ring-{plugin}:{agent})
Update all agent references to use the ring-{plugin}:{agent-name} format instead of bare agent names. This ensures consistent naming across all plugins and prevents ambiguity in multi-plugin environments.

X-Lerian-Ref: 0x1
2025-12-15 22:13:38 -03:00
Jefferson Rodrigues
bd9bc7d2ad
fix: update all internal references to use ring-{plugin}:{name} format
- Agent invocation examples in 44 agent files
- Subagent_type references in skill files
- Skill tool references across all plugins
- Command references in pmo-team, ops-team, tw-team commands
- docs/platforms/claude-code.md examples
- dev-team/skills/shared-patterns/shared-orchestrator-principle.md
2025-12-15 20:14:32 -03:00
Jefferson Rodrigues
5473e2a41b
refactor: standardize naming to ring-{plugin}:{component} format
Update all agents, skills, and commands across 9 plugins to use fully qualified names in YAML frontmatter. This enables unambiguous component identification in multi-plugin environments.

Changes:

- 42 agents: name field updated to ring-{plugin}:{agent-name}

- 87 skills: name field updated to ring-{plugin}:{skill-name}

- 27 commands: name field updated (added frontmatter where missing)

- CLAUDE.md: Fixed contradictory examples in naming conventions

- ARCHITECTURE.md: Updated invocation examples throughout

X-Lerian-Ref: 0x1
2025-12-15 19:52:14 -03:00
Jefferson Rodrigues
228a79cb20
refactor: rename shared-patterns files with semantic prefixes
- Rename execution-report.md to output-execution-report.md
- Rename anti-rationalization.md to shared-anti-rationalization.md
- Rename orchestrator-principle.md to shared-orchestrator-principle.md
- Rename pressure-resistance.md to shared-pressure-resistance.md
- Rename red-flags.md to shared-red-flags.md
- Rename tdd-prompt-templates.md to template-tdd-prompts.md
- Update all references across skills, agents, and documentation

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
2025-12-15 19:22:07 -03:00
Fred Amaral
03e6136464
feat(agents): add model self-verification to prevent incorrect usage
docs(standards): mandate explicit model parameter for specialized agents
feat(reviewers): add guidance for skipping reviews on trivial changes
refactor(docs): simplify shared pattern files for better reusability
fix(security): add SSRF to blocker criteria and OWASP version check
fix(docs): align heading levels and table formats for consistency
2025-12-14 00:05:33 -03:00
Fred Amaral
cf635e4da6
feat(agents, skills): enforce CLAUDE.md compliance and refactor definitions
This commit introduces a major overhaul to increase agent reliability,
predictability, and resistance to common failure modes. It enforces a
strict new standard for agent instructions across the entire system.

The "CLAUDE.md compliance" adds several mandatory sections to all agent
prompts, providing explicit, non-negotiable rules of engagement:
- `Blocker Criteria`: Defines what decisions an agent can and cannot make,
 and when it must stop and escalate. Includes non-negotiable rules.
- `Severity Calibration`: Provides a strict rubric for classifying issue
 severity to ensure consistency.
- `Pressure Resistance`: Equips agents with standard responses to resist
 user pressure to skip steps or compromise quality.
- `Anti-Rationalization Table`: A critical defense mechanism that lists
 common flawed heuristics and forces the agent to follow a required,
 safer action instead.

refactor(skills): centralize shared patterns and use namespaced IDs

To support the agent updates and improve maintainability, this change
also refactors skill definitions.

New shared pattern files (`anti-rationalization.md` and
`pressure-resistance.md`) are created within each team's skills to
centralize common instructions and reduce prompt duplication.

Furthermore, all skill dependencies in `SKILL.md` files are updated to
use fully-qualified, namespaced IDs (e.g., `ring-default:writing-plans`).
This removes ambiguity in skill resolution and clarifies the dependency
graph between different teams and their respective skills.
2025-12-14 00:05:32 -03:00
Fred Amaral
09de6889c3
refactor: adopt fully qualified agent names for invocation
Standardize agent invocation to use the format 'ring-{plugin}:{agent}'.

This change prevents potential name collisions between agents from
different plugins and makes agent ownership explicit. For example,
'code-reviewer' is now unambiguously 'ring-default:code-reviewer'.

All documentation, agent definitions, skills, and commands are updated
to reflect this new convention. The 'Task' tool parameter is also
updated from 'agent' to 'subagent_type' for consistency.

The built-in 'general-purpose' agent is exempt from this prefix.
2025-12-02 00:34:03 -03:00
Fred Amaral
9fd87eddcd
refactor(commands): Relocate pre-dev commands and namespace by plugin
Move the `pre-dev-feature` and `pre-dev-full` commands from the
`default` plugin to the `pm-team` plugin. This change aligns the
pre-development workflow with its logical product management function,
improving architectural clarity and modularity.

To support this multi-plugin structure, command invocation is updated
to a namespaced format: `/ring-{plugin}:{command}`. This prevents
potential command name collisions between different plugins.

fix(ralph-wiggum): Improve robustness of loop state and shell execution

Strengthen the shell script execution in `ralph-wiggum` commands by
encapsulating logic in `bash -c '...'`. This provides safer variable
expansion and prevents unintended globbing.

The session validation logic in the `stop-hook` is now more resilient,
handling varied quoting in the state file and failing securely if a
transcript path cannot be resolved.
2025-11-27 11:35:06 -03:00
Fred Amaral
89efe84e22
ci(workflow): add action to automate version bumps and release tags
feat(agent): introduce codebase-explorer for deep code analysis
feat(installer): dynamically load plugins in installer for easier updates
refactor(metadata): standardize skill and agent frontmatter for better tooling
2025-11-25 20:19:23 -03:00
Fred Amaral
948482d923
fix(hooks): implement robust JSON escaping in reminder script
The previous `sed`-based escaping was incomplete, only handling
backslashes and double quotes. This could generate invalid JSON if
instruction files contained control characters like tabs or carriage
returns, causing API requests to fail.

This commit replaces the `sed` command with a comprehensive `awk` script
that correctly escapes all necessary JSON control characters (`\"`, `\\`,
`\t`, `\r`, `\f`) and converts newlines to `\n` literals. This ensures
the generated JSON payload is RFC 8259 compliant and robust.

Additionally, the script is made executable, and changelogs are added
to the reviewer agent definitions for version tracking.
2025-11-24 16:55:29 -03:00
Fred Amaral
2174000367
refactor(architecture): transition to monorepo for plugin marketplace
feat(plugin): introduce `ring-default` with core skills and agents
feat(hooks): add CLAUDE.md auto-generation and enhanced session start
docs: align documentation with new monorepo structure and vision
2025-11-24 14:38:32 -03:00
Renamed from agents/code-reviewer.md (Browse further)