{"id":48467426,"url":"https://github.com/rtfpessoa/code-factory","last_synced_at":"2026-04-07T05:02:41.660Z","repository":{"id":338219058,"uuid":"1144168630","full_name":"rtfpessoa/code-factory","owner":"rtfpessoa","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-30T17:05:07.000Z","size":890,"stargazers_count":0,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T18:18:57.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rtfpessoa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-28T11:25:06.000Z","updated_at":"2026-03-30T17:05:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rtfpessoa/code-factory","commit_stats":null,"previous_names":["rtfpessoa/code-factory"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rtfpessoa/code-factory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfpessoa%2Fcode-factory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfpessoa%2Fcode-factory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfpessoa%2Fcode-factory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfpessoa%2Fcode-factory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtfpessoa","download_url":"https://codeload.github.com/rtfpessoa/code-factory/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtfpessoa%2Fcode-factory/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31500403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-07T05:02:38.163Z","updated_at":"2026-04-07T05:02:41.644Z","avatar_url":"https://github.com/rtfpessoa.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# code-factory\n\nrtfpessoa's personal [Claude Code](https://docs.anthropic.com/en/docs/claude-code) and [OpenCode](https://opencode.ai) marketplace. It packages reusable skills and agents for structured feature delivery, docs workflows, and git operations.\n\n## Quick Reference\n\n| Command | Plugin | Purpose |\n|---------|--------|---------|\n| `/do` | productivity | Orchestrate feature delivery with phase/state tracking |\n| `/rfc` | productivity | Write RFCs and design docs with iterative research |\n| `/debug` | productivity | Systematic debugging with root-cause-first workflow |\n| `/doc` | productivity | Create/update/improve/audit Markdown docs |\n| `/workspace` | productivity | Manage Datadog remote development workspaces |\n| `/reflect` | productivity | Capture session learnings into knowledge files |\n| `/wrap-up` | productivity | End-of-session checklist: ship, reflect, publish |\n| `/brag` | productivity | Update brag document with recent accomplishments |\n| `/daily` | productivity | Daily work journal and weekly summaries in Obsidian vault |\n| `/notes` | productivity | Obsidian notes: 1:1s, meetings, career plans, promotions |\n| `/performance-feedback` | productivity | Write evidence-backed performance reviews |\n| `/brainstorm` | productivity | Brainstorm and sharpen ideas into clear problem statements |\n| `/datadog` | productivity | Query Datadog products (logs, metrics, APM, monitors) via pup CLI |\n| `/code-simplify` | productivity | Simplify and refactor code for clarity without changing behavior |\n| `/ai-cli` | productivity | Evaluate and improve CLI design for AI agent usage |\n| `/skill-workbench` | productivity | Create or improve skills and agents |\n| `/review` | productivity | Review a pull request with structured findings |\n| `/tour` | productivity | Guided code walkthroughs (interactive or written) |\n| `/commit` | git | Create structured git commits |\n| `/atcommit` | git | Organize and validate atomic commit sets |\n| `/fixup` | git | Create fixup commits targeting earlier branch commits |\n| `/pr` | git | Create PRs (draft/open) or mark draft as ready |\n| `/branch` | git | Create a well-named feature branch |\n| `/pr-fix` | git | Address PR review feedback end-to-end |\n| `/fix-conflicts` | git | Resolve merge/rebase/cherry-pick/revert conflicts |\n| `/worktree` | git | Create an isolated git worktree |\n\n## Plugins\n\n### productivity\n\n**Skills:**\n\n- [`/do`](#do-lifecycle) -- Full lifecycle feature orchestration (see detailed breakdown below).\n- `/rfc` -- RFC authoring workflow with refinement, research, exploration, consistency check, and write phases.\n- `/debug` -- Root-cause-first debugging protocol (`REPRODUCE -\u003e INVESTIGATE -\u003e FIX -\u003e VERIFY`) with persistent state.\n- `/doc` -- Documentation lifecycle management (create, update, improve, maintain, audit, sync, status) with templates.\n\n- `/review` -- Structured PR review across correctness, security, design, testing, and style.\n- `/tour` -- Codebase tours in interactive or written modes.\n- `/workspace` -- Datadog workspace lifecycle management (`create`, `list`, `delete`, `ssh`, `connect`, `validate`).\n- `/reflect` -- Session learning extraction with confidence-based auto-apply/queue behavior. Includes self-improvement analysis for skill gaps, friction, and automation opportunities.\n- `/wrap-up` -- End-of-session checklist: commits via `/atcommit`, deploys if available, cleans up tasks, runs `/reflect` for learnings, and drafts publishable content.\n- `/brag` -- Brag document management: auto-collects work from GitHub, Jira, Confluence, git, and daily logs; asks interactive questions for undiscoverable work; maintains monthly docs at `~/log/YYYY-MM/brag.md`.\n- `/daily` -- Daily work journal and weekly summaries in Obsidian: captures work activity, meetings, achievements, team pulse, travel, learning, and kudos. Weekly summary mode (`/daily summary`) aggregates daily notes with GitHub PRs, Jira tickets, and Confluence pages into dual-format output (Confluence + Slack). Resolves people names via Obsidian People directory with wikilinks and backlinks. Feeds into `/brag` as a data source.\n- `/notes` -- Obsidian notes management: 1:1 records, meeting notes, per-person career plans, promotion proposals, achievements tracking, and general notes. Shares `~/docs/People/` directory with `/daily` for graph integration.\n- `/performance-feedback` -- Evidence-backed performance review writer: gathers data from 1:1 notes, achievements, daily logs, brag docs, GitHub PRs, Jira tickets, and Confluence pages for a specific person over a review period, then synthesizes into structured feedback by dimension (impact, technical quality, collaboration, growth, communication).\n- `/brainstorm` -- Problem-focused brainstorming: sharpens vague ideas into clear problem statements through iterative diagnostic questions. Saves brainstorms to `~/docs/brainstorms/`. Integrated with `/do` as an optional pre-refinement step.\n- `/datadog` -- Datadog product query via pup CLI: APM, logs, metrics, monitors, error tracking, RUM, infrastructure, security signals, incidents, SLOs, synthetics, CI/CD, and 30+ other API domains.\n- `/code-simplify` -- Code simplification across any scope (file, directory, package, branch diff, staged changes, or entire repo). Preserves behavior while improving clarity and maintainability.\n- `/ai-cli` -- CLI design evaluation and improvement for AI agents: scores against 8 Agent DX axes aligned with the AXI (Agent eXperience Interface) framework (machine-readable output, raw payload input, schema introspection, context window discipline, input hardening, safety rails, agent knowledge packaging, efficiency \u0026 composition), recommends prioritized improvements, and guides implementation.\n- `/skill-workbench` -- Skill and agent creation/improvement toolkit.\n\n**Agents:**\n\n- `orchestrator` -- State-machine orchestrator for `/do` lifecycle execution.\n- `refiner` -- Clarifies vague requests into actionable feature specs.\n- `explorer` -- Read-only codebase mapper and extension-point finder.\n- `researcher` -- Internal/external research synthesis.\n- `planner` -- Plan author that converts research into executable tasks.\n- `consistency-checker` -- Iteratively fixes contradictions in planning artifacts.\n- `reviewer` -- Plan quality/completeness reviewer.\n- `implementer` -- Plan-driven implementation agent.\n- `spec-reviewer` -- Verifies implementation matches spec exactly.\n- `code-quality-reviewer` -- Evaluates maintainability/testing/convention quality.\n- `validator` -- Runs checks and validates acceptance criteria with evidence.\n\n- `skill-grader` -- Scores evaluation runs with pass/fail evidence.\n- `skill-comparator` -- Blind A/B output comparator for skill evaluations.\n- `brainstormer` -- Problem-focused thinking partner for brainstorming sessions.\n- `red-teamer` -- Adversarial reviewer finding failure modes, flawed assumptions, and edge cases.\n- `code-simplifier` -- Single-file code simplification agent for clarity, consistency, and maintainability.\n- `memory-extractor` -- Extracts reusable learnings from session transcripts.\n\n### git\n\n**Skills:**\n\n- `/commit` -- Structured commit flow with staging assistance and fixup detection.\n- `/atcommit` -- Atomic commit grouping based on dependency analysis.\n- `/fixup` -- Commit matching and autosquash-ready fixup creation.\n- `/pr` -- PR creation flow with base detection, commit analysis, and ready-mode support.\n- `/branch` -- Branch naming from ticket/description using local conventions.\n- `/pr-fix` -- Pull and resolve PR review threads, apply changes, and reply/resolve. Supports `--auto` for bot/CI automation and `--auto-human` for fully autonomous mode.\n- `/fix-conflicts` -- Conflict-state-aware conflict resolution workflow.\n- `/worktree` -- Detached worktree creation from the default branch.\n\n## `/do` Lifecycle\n\nFull lifecycle feature orchestration — from vague idea to merged PR. Supports interactive (approve at each phase) or autonomous (`--auto`) modes. Pre-fetches external references (URLs, tickets, PRs) from the feature description before orchestration begins. All state persists in `~/docs/plans/do/\u003cname\u003e/` for cross-session resume.\n\n### Phase Diagram\n\n```\nREFINE ──→ RESEARCH ──→ PLAN_DRAFT ──→ PLAN_REVIEW ──→ EXECUTE ──→ VALIDATE ──→ DONE\n                            ^               |    |           ^          |\n                            |               v    v           |          v\n                            |          consistency  +--------+-- (fix forward) ──+\n                            |            check      |\n                            |               |       |\n                            |               v       |\n                            +──── (changes requested)\n```\n\n### Phase Details\n\n| Phase | Agents | What Happens | Output |\n|-------|--------|-------------|--------|\n| **REFINE** | `refiner` | Clarify vague requests. Propose 2-3 approaches with trade-offs, get user preference. One question at a time (prefer multiple choice). | Refined spec: problem statement, chosen approach, scope, acceptance criteria |\n| **RESEARCH** | `explorer` + `researcher` (parallel) | Explorer maps local codebase (modules, patterns, conventions). Researcher searches Confluence + external docs. Both mandatory. | Context, assumptions, constraints, risks, open questions |\n| **PLAN_DRAFT** | `planner` | Convert research into milestones and tasks. Plan embeds relevant context inline (not links only). | Milestones, task breakdown (TDD-first), validation strategy, recovery plan |\n| **PLAN_REVIEW** | `consistency-checker` → `reviewer` | **Step 1:** Consistency checker fixes contradictions, mismatched IDs, path inconsistencies, terminology drift (edits directly, max 10 iterations, `sonnet` model). **Step 2:** Reviewer critiques coverage, paths, dependencies, safety, executability. May loop back to PLAN_DRAFT. | Review report, required changes |\n| **EXECUTE** | `implementer` + `spec-reviewer` + `code-quality-reviewer` | Batched execution with shift-left validation and two-stage review (see below). TDD enforced for behavioral tasks. Atomic commits at milestone boundaries via `/atcommit`. | Implemented code, atomic commits |\n| **VALIDATE** | `validator` | Run automated checks + quality scorecard (1-5 per dimension). All dimensions must score ≥ 3/5. May loop back to EXECUTE. | Validation report, acceptance evidence, quality scorecard |\n| **DONE** | — | Write retrospective, run final test suite. Create PR (interactive: user chooses; autonomous: auto-creates). | PR URL or merge commit |\n\n### EXECUTE Phase — Batch Loop\n\n```\nPlan Critical Review → Pre-flight (build + test baseline) → Execute Batch (3 tasks) → Batch Report → Feedback → Next Batch\n                                                                  |                                       ^\n                                                                  v                                       |\n                                                            Per-task loop:                          (loop batches)\n                                                            Dispatch implementer → Shift-left (lint/format/typecheck)\n                                                                  → Spec review (max 2 fix cycles)\n                                                                  → Code quality review (max 2 fix cycles)\n                                                                  → Next task\n                                                            At MILESTONE BOUNDARY:\n                                                            Run /atcommit → group changes by concept → 3-5 atomic commits\n```\n\n**Per-task sequence:**\n\n1. Dispatch fresh `implementer` with full task text + scene-setting context (milestone position, prior task summary, upcoming tasks, discoveries, architecture)\n2. Implementer asks questions → answers provided → implements → self-reviews → reports (no commit)\n3. **Shift-left validation** (deterministic — orchestrator runs directly): lint + format + type-check. Auto-fixes formatting. Returns to implementer if errors persist.\n4. `spec-reviewer` verifies implementation matches spec (nothing missing, nothing extra, nothing misunderstood)\n5. If issues → implementer fixes → re-review (max 2 fix cycles, then escalate)\n6. `code-quality-reviewer` assesses maintainability, testing, conventions, plan alignment\n7. If critical issues → implementer fixes → re-review (max 2 fix cycles, then escalate)\n8. Mark task complete, update state, proceed to next task in batch (no commit yet)\n\n**TDD enforcement** (behavioral tasks only):\n\n1. Write failing test (complete, not placeholder)\n2. Run test — verify it fails for the expected reason\n3. Write minimal implementation to pass the test\n4. Run test — verify it passes and no regressions\n\nCode written before its test is deleted and restarted.\n\n**Milestone boundary commits:** `/atcommit` analyzes file dependencies and groups changes by concept (e.g., package + tests, integration layer, config + wiring). Typical result: 3-5 atomic commits per feature.\n\n**Stop conditions:** missing dependencies, systemic test failures, unclear instructions, repeated verification failures, or plan-invalidating discoveries.\n\n### Workspace Modes\n\n| Mode | Description |\n|------|-------------|\n| Worktree + branch (default) | Isolated git worktree with feature branch — main workspace stays clean |\n| Branch only | Feature branch in current directory |\n| Current branch | Work on the already checked-out branch |\n| Datadog workspace | Remote cloud development environment via `/workspace` |\n\n### State Files\n\nAll artifacts live in `~/docs/plans/do/\u003cname\u003e/`:\n\n| File | Written After | Contents |\n|------|---------------|----------|\n| `FEATURE.md` | Creation | YAML frontmatter, acceptance criteria, progress, decisions, outcomes |\n| `RESEARCH.md` | RESEARCH | Codebase map, research brief, findings, open questions |\n| `PLAN.md` | PLAN_DRAFT | Milestones, task breakdown, validation strategy, recovery |\n| `REVIEW.md` | PLAN_REVIEW | Review feedback, required changes |\n| `VALIDATION.md` | VALIDATE | Test results, acceptance evidence, quality scorecard |\n\n### Input Isolation\n\nUser descriptions are wrapped in `\u003cfeature_request\u003e` tags to prevent prompt injection into subagents.\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/rtfpessoa/code-factory.git\n   cd code-factory\n   ```\n\n2. Run bootstrap:\n\n   ```bash\n   ./init.sh\n   ```\n\n   `init.sh` performs the full local setup:\n\n   - Installs or updates `rtk` via `cargo install --git https://github.com/rtk-ai/rtk --config net.git-fetch-with-cli=true`.\n   - Symlinks root configs:\n\n     | Source | Destination |\n     |--------|-------------|\n     | `mcp.json` | `~/.mcp.json` |\n     | `settings.json` | `~/.claude/settings.json` |\n     | `opencode.jsonc` | `~/.config/opencode/opencode.jsonc` |\n\n   - Symlinks files from `hooks/` into `~/.claude/hooks/`.\n   - Regenerates `.opencode/` assets by running `./sync-opencode.sh`.\n   - Symlinks generated `.opencode/{skills,agents,commands,plugins}` into `~/.config/opencode/`.\n   - Symlinks `.githooks/*` into `.git/hooks/` for this local clone.\n\n   If a destination already exists as a regular file, bootstrap records an error and exits non-zero so you can fix the conflict explicitly.\n\n3. Validate the repo state:\n\n   ```bash\n   make all\n   ```\n\n## Development Notes\n\n- Source of truth is under `productivity/` and `git/`; do not edit generated files under `.opencode/` directly.\n- `make all` runs checks (`make check`) and config linting (`make lint`).\n- `make check` also verifies OpenCode sync freshness (`./sync-opencode.sh --check`).\n- Re-run `./init.sh` after changing local bootstrap-managed files.\n\n## Configuration Files\n\n### `settings.json` (Claude Code)\n\nClaude Code global configuration: environment flags, permission rules, default model (`opus`), MCP server enablement, installed marketplaces/plugins, and hooks (including Stop-hook invocation of `/reflect`).\n\n### `opencode.jsonc` (OpenCode)\n\nOpenCode CLI configuration in JSONC. Includes provider setup (Anthropic, OpenAI, Google, NVIDIA NIM, LM Studio), default model selection (`openai/gpt-5.3-codex`), permission policies, agent presets, and MCP wiring.\n\n### `mcp.json` (MCP servers)\n\nDeclares Atlassian, Datadog, and chrome-devtools MCP servers for Claude Code.\n\n### `sync-opencode.sh`\n\nGenerates `.opencode/skills`, `.opencode/agents`, and `.opencode/commands` from plugin source definitions, including frontmatter/tool-name transformations and stale-check mode (`--check`).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtfpessoa%2Fcode-factory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtfpessoa%2Fcode-factory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtfpessoa%2Fcode-factory/lists"}