Skip to content

j-mauro-r/SAT-Dengue-V2 / .agents/skills/deepworkplan/onboard

deepworkplan-onboard

Verified

Make any repository AI-first — reason (never template) an adapted AGENTS.md, docs/, per-module docs and .agents/ kit from the real repo, discover and verify its full and scoped validation commands and source-to-test mapping, install the DeepWorkPlan skill, and, for a repository onboarded under an earlier version, perform a targeted, non-destructive, idempotent harness upgrade. Use when the developer wants to onboard or upgrade a repository for AI agents.

FileKindSize
SKILL.mdskill md59.7 KB
addons.mdmarkdown18.0 KB
all-addons.mdmarkdown10.2 KB
command-templates/agent-create.mdmarkdown904 B
command-templates/dwp-create.mdmarkdown1.3 KB
command-templates/dwp-execute.mdmarkdown884 B
command-templates/dwp-refine.mdmarkdown943 B
command-templates/dwp-resume.mdmarkdown891 B
command-templates/dwp-status.mdmarkdown881 B
command-templates/dwp-upgrade.mdmarkdown911 B
command-templates/dwp-verify.mdmarkdown889 B
command-templates/skill-create.mdmarkdown889 B
presets/README.mdmarkdown7.0 KB
presets/angular.mdmarkdown7.5 KB
presets/astro-svelte.mdmarkdown6.7 KB
presets/django.mdmarkdown7.8 KB
presets/fastapi.mdmarkdown7.8 KB
presets/flutter.mdmarkdown7.1 KB
presets/generic.mdmarkdown6.5 KB
presets/go.mdmarkdown6.7 KB
presets/laravel.mdmarkdown6.8 KB
presets/nestjs.mdmarkdown7.0 KB
presets/nextjs.mdmarkdown7.8 KB
presets/node-ts-service.mdmarkdown6.7 KB
presets/nuxt.mdmarkdown7.2 KB
presets/python-package-cli.mdmarkdown6.8 KB
presets/rails.mdmarkdown6.8 KB
presets/react-native.mdmarkdown7.2 KB
presets/rust.mdmarkdown6.7 KB
presets/spring-boot.mdmarkdown7.4 KB
presets/sveltekit.mdmarkdown7.0 KB
presets/swift-ios.mdmarkdown7.6 KB
presets/terraform.mdmarkdown7.8 KB
presets/ts-lambda.mdmarkdown7.5 KB
presets/vue-vite.mdmarkdown6.7 KB
templates/onboarding-plan.mdmarkdown9.1 KB
v6.mdmarkdown4.7 KB

presets/rails.md

View on GitHub
# Preset — Ruby on Rails (Ruby)

> Reasoning aid, not a template. Verify every assumption against the live repo;
> detected reality wins. Capture the **real** validation command, not the
> example below.

## Signals that identify this stack

- A `Gemfile` declaring `rails` (and `Gemfile.lock` pinning it), `bin/rails` and
  `bin/rake` executables, and `config/application.rb` requiring `rails/all`.
- The MVC layout under `app/`: `app/models`, `app/controllers`, `app/views`,
  plus `app/helpers`, `app/jobs`, `app/mailers`, and (modern) `app/javascript`.
- Routing in `config/routes.rb`; the database layer in `db/migrate/*` migrations
  and `db/schema.rb` (or `db/structure.sql`).
- Configuration under `config/` (`environments/{development,test,production}.rb`),
  and encrypted secrets in `config/credentials.yml.enc` + `config/master.key`.
- Test framework from what's present: **RSpec** (`spec/`, `.rspec`,
  `rspec-rails` in the Gemfile) **or** Minitest (`test/`, the Rails default).
  **Infer from what exists.**

## What to look for in recon

- The **real** test command: `bundle exec rspec` (RSpec) or `bin/rails test`
  (Minitest), plus system/integration variants (`bin/rails test:system`).
  Confirm the directory (`spec/` vs `test/`) and any factories
  (`factory_bot`) vs fixtures.
- The **real** lint/format gate: `rubocop` (often `bundle exec rubocop`,
  `.rubocop.yml`), Standard, or `erb_lint`/`brakeman` — capture how it's
  invoked.
- The migration workflow (`bin/rails db:migrate`, `db:rollback`,
  `db:schema:load`) and whether the schema is `schema.rb` or `structure.sql`.
- Background jobs (Active Job adapter: Sidekiq/Resque/GoodJob), and the
  front-end approach (Hotwire/Turbo + Stimulus, importmaps/jsbundling,
  ViewComponent).
- Where secrets/config live: `config/credentials*`, `Rails.application.config`,
  `ENV`, and the multi-environment layout.

## Stack-specific skills/agents/commands to generate

- Skills: `model-add` (model + migration + spec), `migration` (write/apply a
  migration safely), `controller` (controller + routes + request spec),
  `endpoint`/`resource` (resourceful route + controller + view/JSON),
  optionally `job` (Active Job) and `mailer` if present.
- Agents: baseline roles + a `migration-author` / `db-reviewer` persona aware of
  reversible migrations and zero-downtime concerns.
- Commands: the five DWP commands + `code-review`, `pr`, `commit`.

## Doc emphases

- `ARCHITECTURE.md` — request → route → controller → model → view/serializer
  flow, Active Record associations, jobs/mailers, Hotwire/Turbo if present.
- `TESTING_GUIDE.md` — RSpec vs Minitest, model/request/system specs, factories
  vs fixtures, how to run a single spec/test file.
- `SECURITY.md` — `config/credentials` + `master.key` handling, strong
  parameters, CSRF, auth (Devise/has_secure_password), Brakeman.
- Per-module docs: per domain area (its models, controllers, jobs, mailers).

## Typical validation command (FIND the real one)

Often `bundle exec rubocop && bundle exec rspec`, or `bin/rails test` for a
Minitest app. **Do not assume** the test framework or lint setup — read the
`Gemfile`, `.rubocop.yml`, `bin/`, and CI, and capture the exact command.

## Testing and validation (verified vs example)

The uniform section every preset carries (`README.md` → "The testing section
every preset carries"). Everything below is an **illustrative example until it
is verified against the target repository** in Phase 1 — run the scoped example
on a real path and record the selected/executed count. Items marked *reference
run* were verified once in this skill's contributor environment with the tool
version stated; the target repo's version may differ, so re-verify. Items marked
*documented example* were **not** run here — confirm the exit code and the
selection count in the target repo before trusting them in a gate.

### 1. Full commands
- Tests: `bundle exec rspec` (RSpec) **or** `bin/rails test` (+ `bin/rails test:system`) (Minitest) from the app root; `bin/rails db:test:prepare` first when the schema changed.
- Static: `bundle exec rubocop`, `bundle exec brakeman -q` (security scan), `bundle exec erb_lint --lint-all` where present; `bin/rails zeitwerk:check` as the autoload sanity check.

### 2. Scoped invocation
**RSpec** (documented example — Ruby is not available in the contributor environment): `bundle exec rspec spec/models/order_spec.rb` (file), `spec/models/order_spec.rb:42` (one example by line), `-e 'computes the total'` (by description), `--tag focus` / `--tag ~slow` (by metadata), `spec/models/` (directory). **Minitest**: `bin/rails test test/models/order_test.rb`, `test/models/order_test.rb:42`, `-n /total/` (name regex), `bin/rails test test/models` (directory). **Evidence:** RSpec's `N examples, 0 failures` / Minitest's `N runs, M assertions` — `N` non-zero.

### 3. Scoped static checks
- `bundle exec rubocop app/models/order.rb` (documented example) scopes natively to files/directories. `brakeman` and `zeitwerk:check` are app-wide by nature.

### 4. Source-to-test mapping
`spec/models/order_spec.rb` ↔ `app/models/order.rb`; `spec/requests/orders_spec.rb` ↔ `app/controllers/orders_controller.rb` + routes; `spec/services/…` ↔ `app/services/…`; system specs under `spec/system/`; Minitest mirrors under `test/`. Factories in `spec/factories/` (FactoryBot) or `test/fixtures/`.

### 5. Affected consumers
No native impact selector; reason from the model graph (associations, concerns, callbacks) and controllers/jobs that touch the model. **Blind spots:** callbacks and concerns (`include`) with no explicit call site, `config/routes.rb`, initializers, `config/*.yml`, migrations/`db/schema.rb`, views/partials/helpers, ActiveJob/Sidekiq jobs, `.env*`. A concern, initializer, routing or schema change affects many specs ⇒ the full run.

### 6. Escalation and fallback
Shared/core: `app/models/concerns/`, `app/controllers/concerns/`, `ApplicationRecord`/`ApplicationController`, `lib/`, shared services, `spec/support/`. Always full run: `Gemfile`/`Gemfile.lock`, `config/**`, `db/schema.rb`/migrations, `.rspec`/`spec_helper.rb`/`rails_helper.rb`, `.rubocop.yml`. **Fallback:** `bundle exec rubocop && bundle exec rspec` (or `bin/rails test`).

### 7. Layers and posture
Unit (model/service specs with minimal DB touch, PORO specs) — fast base; request specs as the integration layer for routing + controller + view; a few system specs (browser) for critical flows. Unit-first; keep system specs few.

### 8. Zero-selection behavior
RSpec prints `0 examples, 0 failures` and exits **0** when a filter matches nothing (documented) — a silent empty run; set `config.fail_if_no_examples = true` (RSpec ≥ 3.7) in `spec_helper.rb` or check the count. Minitest prints `0 runs` and exits **0** likewise — check the count. A wrong file path fails loudly (`cannot load such file`).
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall