Commit graph

9 commits

Author SHA1 Message Date
Gandalf
e91fc6df17
fix(standards): add bootstrap-only comments to panic() examples
Agents were copying panic(err) patterns from code examples into business
logic. The examples are correct (panic IS acceptable in bootstrap/init),
but without explicit comments, agents treated them as general-purpose
patterns.

Added '// bootstrap-only: panic is acceptable in main/init; NEVER use
panic in business logic' comments to all panic() occurrences in:
- pm-team/skills/shared-patterns/code-example-standards.md
- dev-team/docs/standards/sre.md
- dev-team/docs/standards/golang/bootstrap.md
- dev-team/docs/standards/golang/core.md
- dev-team/docs/standards/golang/security.md
- platforms/opencode/standards/sre.md

Reported by: Garzão (#the-ring-feedbacks)
Refs: Ring agents generating panic() in service/handler code
2026-03-13 16:10:29 -03:00
Jefferson Rodrigues
e25427e549
fix(standards): align tracer pattern with plugin real implementation
Replace invented struct-field tracer (s.tracer.Start) with the actual
pattern from plugin-br-bank-transfer-jd: global OTel tracer via thin
wrapper package (telemetry.StartSpan).

- All s.tracer/h.tracer/r.tracer.Start → telemetry.StartSpan
- Add mandatory Telemetry Wrapper Package section with full tracer.go
- Update ASCII diagrams, instrumentation checklist, method template
- Update anti-patterns table to reference wrapper package
- Fix MIG-004 tracer criteria to match real pattern (global, not DI)

X-Lerian-Ref: 0x1
2026-03-11 20:17:31 -03:00
Jefferson Rodrigues
2eff85c55b
fix(standards): rename alias to libCommons and ensure tests in migration tasks
- Replace libUncommons alias with libCommons across golang.md and migrate-v4 skill
- Add explicit _test.go coverage to every MIG task acceptance criteria
- Add Task Generation Rule: files list MUST include test files
- Fix MIG-002 no-op line (libCommons alias stays, only import path changes)

X-Lerian-Ref: 0x1
2026-03-11 20:01:15 -03:00
Jefferson Rodrigues
510a2d8328
fix(standards): address PR review issues in v4 migration
- Re-add FORBIDDEN rule for direct Fiber response methods (chttp wrappers required)
- Fix bare tracer variable in pagination repository example (tracer → r.tracer)
- Standardize all error logging to clog.Err(err) instead of clog.Any("error", err)
- Remove cassert from MIG-003 acceptance criteria (de-para only, not new patterns)
- Add concrete OTel middleware setup in router example (chttp.NewTelemetryMiddleware)

X-Lerian-Ref: 0x1
2026-03-11 17:51:17 -03:00
Jefferson Rodrigues
59d23409c3
feat(standards): migrate Go standards from lib-commons v2 to v4
Update golang.md with all v4 patterns:
- Import aliases: lib prefix → c prefix (libCommons→libUncommons, libZap→czap, etc.)
- Logging: Printf-style → structured fields (clog.String, clog.Int, clog.Err)
- Config: SetConfigFromEnvVars → InitLocalEnvConfig + nested structs with envDefault
- Bootstrap: Launcher/ServerManager → explicit lifecycle with signal.NotifyContext + cruntime
- Telemetry: InitializeTelemetry → NewTelemetry + ApplyGlobals
- Context tracking: NewTrackingFromContext → dependency-injected logger
- 8 new sections: cassert, cruntime, cmetrics, csafe, ccrypto, cbackoff, circuit breaker, outbox

Add ring:dev-migrate-v4 skill and /ring:migrate-v4 command:
- Surgical de-para migration (replaces only what exists, no new patterns added)
- Visual HTML report via ring:visual-explainer
- Tasks in ring:dev-cycle format (MIG-001 to MIG-006 + MIG-FINAL)
- v4-only patterns reported as opportunities, not obligations

X-Lerian-Ref: 0x1
2026-03-11 17:51:17 -03: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
cdec509d83
refactor(session): replace custom handoff workflow with native Plan Mode
feat(default): add session-handoff skill to enable seamless context resume
refactor(arch): move complex orchestration from commands into skills
feat(pm-team): add orchestrator skills for pre-dev planning workflows
feat(dev-team): add skill to manage development cycle state (status/cancel)
feat(default): add skill to formalize git commit generation process
refactor(default): prune granular skills to focus core library on workflows
fix(pmo-team): align pmo-retrospective skill name with ring convention
docs: update all documentation to reflect major skill refactoring
2026-03-09 07:24:07 -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
Gandalf
f85aa61440
feat: add OpenCode platform integration (consolidate ring-for-opencode)
Move OpenCode runtime plugin and installer into Ring monorepo under platforms/opencode/.
The installer reads skills, agents, and commands directly from the Ring monorepo's
canonical directories (default/, dev-team/, pm-team/, etc.) — zero asset duplication.

What's included:
- installer.sh: reads from Ring dirs, applies frontmatter/tool transforms, installs to ~/.config/opencode/
- plugin/: TypeScript runtime (RingUnifiedPlugin) with hooks, lifecycle, loaders
- src/: CLI (doctor, config-manager)
- prompts/: session-start and context-injection templates
- standards/: coding standards (from dev-team/docs/)
- ring.jsonc: default config with full 86-skill/35-agent/33-command inventory

What's NOT included (intentionally):
- assets/ directory: eliminated, content comes from Ring monorepo
- scripts/codereview/: eliminated, replaced by mithril
- using-ring-opencode skill: uses canonical using-ring instead

Transforms applied by installer:
- Agent: type→mode, strip version/changelog/output_schema/input_schema
- Skill: keep name+description frontmatter, body unchanged
- Command: strip argument-hint (unsupported by OpenCode)
- All: normalize tool names (Bash→bash, Read→read, etc.)
- All: strip Model Requirement sections from agents

Replaces: LerianStudio/ring-for-opencode repository
Generated-by: Gandalf
AI-Model: claude-opus-4
2026-03-07 22:46:47 -03:00