redbox-feature-implementation-review
Review completed ReDBox feature implementations against a growing ruleset and emit structured issues for agent remediation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Review completed ReDBox feature implementations against a growing ruleset and emit structured issues for agent remediation.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
ReDBox uses embedded Angular applications within EJS views instead of a single SPA. Each feature is often its own Angular project.
Angular services in ReDBox typically extend `HttpClientService` to handle base URLs, configuration, and CSRF protection.
ReDBox controllers live in `@researchdatabox/redbox-core` and are surfaced to Sails.js through generated shims.
Create detailed feature designs, implementation plans, and task lists for ReDBox/Redbox features that use Waterline models, services, webservice (REST) controllers, ajax controllers, embedded Angular apps, views, and navigation config. Use when asked to design/plan a feature or produce a task list for this stack, especially when explicit sections, non-SPA Angular patterns, and interleaved tests are required.
Build or update ReDBox form field components end-to-end across Angular form rendering and sails-ng-common config typing/visitor infrastructure. Use when creating a new form component class/model, adding component config properties, wiring component dictionaries, handling config migration/template extraction, or adding form-component tests.
ReDBox uses a JSON-based DSL for configuring record forms, workflows, and record types.
| name | Redbox Feature Implementation Review |
| description | Review completed ReDBox feature implementations against a growing ruleset and emit structured issues for agent remediation. |
Use this skill after a feature implementation lands (services, controllers, models, Angular app) to verify adherence to platform rules and report actionable issues that can be looped back into an agent for fixes.
implementation_plan.md for expected schema, flows, and required components.implementation_plan.md and list expected services, models, controllers, routes, and UI surfaces.as any, (object as any), as unknown as, or other patterns that cast to any to bypass TypeScript types.
any hides mismatches and leads to runtime failures.as any).area to match the location of the cast (use services for service code, models for Waterline models, controllers for backend controllers, and angular for Angular/front-end code).
Example: packages/redbox-core/src/services/FooService.ts -> area: services.as any casts in model/service code as blocker; in controllers or angular code treat as major or minor depending on context but always report.area matches the file type where the cast appears.CoreService.
packages/redbox-core/src/services.packages/redbox-core/test.typescript/test/unit (prefer typescript/test/unit/services).sails.services), so declaring declare const SomeService or creating local service aliases in controllers or other modules (a common pattern added by debugging agents) is unnecessary and can cause confusion or type drift.SomeService, sails.services.someservice, or via dependency access patterns used elsewhere in the repo) and remove local declare const statements or redundant const X = globalThis.X aliases.controllers or angular depending on where the declaration appears.minor for stylistic fixes, major if the declaration hides or masks a different service implementation.declare const VocabularyService: ...).implementation_plan.md.packages/redbox-core/src/waterline-models.globalThis to access Waterline models.
Vocabulary, VocabularyEntry) by Sails at runtime. Wrapping them again with globalThis lookups (e.g., globalThis as typeof globalThis & { Vocabulary?: ... }) is unnecessary and noisy; prefer referencing the global model by name and, if needed, cast to the appropriate model interface for typing only (e.g., const VocabularyModel = Vocabulary as unknown as VocabularyWaterlineModel).globalThis accessor objects.services, controllers where Waterline models are used.minor for stylistic/clarity fixes, major if the globalThis indirection caused incorrect model resolution.globalThis is used to access models.globalThis lookups with direct model names and add a local typed alias only for TypeScript typing (see example above).CoreController.this.sendResp for responses.
res.json, res.send, this.apiRespond, or this.ajaxRespond./:branding/:portal/<path>./:branding/:portal/api/<path>.packages/redbox-core/src/configmodels/MenuConfig.ts) and any branding defaults touched by the feature.packages/redbox-core/test.test/bruno.HttpClientService.ng test <app-name> (located under angular/projects/<app-name>/), and any e2e or integration suites as appropriate.If any issues are found: return a JSON payload with an issues array. Each issue must include:
id: short unique identifier (e.g., svc-extends-core).area: services, models, controllers, or angular.rule: the rule text that failed.severity: blocker, major, or minor.message: clear, actionable description.file: path to the violating file.lines: line range string (e.g., L12-L40) or null if unknown.evidence: snippet or description pointing to the violation.suggested_fix: concise change that resolves the issue.If no issues are found: output the exact ASCII string (without quotes):
NO ISSUES FOUND
Example payload when issues exist: { "issues": [ { "id": "controller-sendresp", "area": "controllers", "rule": "All controller actions use this.sendResp for responses.", "severity": "major", "message": "Controller action uses res.json instead of this.sendResp.", "file": "packages/redbox-core/src/controllers/MyController.ts", "lines": "L88-L96", "evidence": "res.json({ ok: true })", "suggested_fix": "Replace res.json with this.sendResp(res, 200, payload)." } ] }