feat(skills): reworked skills and rules
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
CI / CI configuration security checks (push) Successful in 3s
CI / Capabilities and shell quality (push) Successful in 14s
CI / Python tests and compilation (push) Successful in 26s
CI / QMD unit tests (push) Successful in 5s
CI / Build and inspect generated packages (push) Successful in 14s
CI / PowerShell tests on Ubuntu (push) Successful in 1m4s
CI / Installed client configuration smoke tests (push) Successful in 33s
CI / Bash integration and installation guards (push) Successful in 1m1s
This commit is contained in:
1 parent
29632ff0ce
commit
f5d8f6f11b
124 files changed
+1250
-8138
No files matched your search
@@ -7,15 +7,14 @@ description: Use when reviewing HTTP or RPC endpoint, request handling, serializ
|
||||
|
||||
Use when reviewing an HTTP or RPC API contract, endpoint, serializer, or request-handling change.
|
||||
|
||||
Load and follow `rules-security-api` and `rules-security-auth` for validation, limits, authentication, authorization, and resource ownership. This skill adds only contract and compatibility checks.
|
||||
|
||||
## Review
|
||||
|
||||
- Trace the request from routing through authentication, authorization, validation, business logic, and persistence. Check tenant or resource ownership at the point data is accessed.
|
||||
- Compare request and response schemas, status codes, error shapes, pagination, identifiers, and nullability with existing consumers and published contracts.
|
||||
- Check malformed, missing, oversized, duplicated, and unauthorized input where relevant. Ensure validation errors do not disclose sensitive data.
|
||||
- Consider compatibility for older clients, retries, idempotency, concurrency, and versioning when those affect the endpoint.
|
||||
- Review serialization defaults, content types, limits, and generated client or schema updates.
|
||||
- Classify each contract change as additive, deprecating, or breaking. A breaking change (removed or renamed fields, new required inputs, changed types, status codes, or semantics) needs a new version or an agreed migration path, and is at least important.
|
||||
- Consider older clients, retries, idempotency, concurrency, and versioning when they affect the endpoint.
|
||||
- Check serialization defaults, content types, and generated client or schema updates.
|
||||
- Confirm documentation and examples match actual behavior.
|
||||
|
||||
## Findings
|
||||
|
||||
Report concrete contract breaks, security weaknesses, or incorrect behavior first. Give location, triggering request, impact on consumers, and a practical correction. Distinguish optional design suggestions from defects.
|
||||
Report findings in the `review-pull-request` finding schema and severity scale. Put the triggering request in the condition field and the consumer impact in the impact field.
|
||||
@@ -43,6 +43,17 @@
|
||||
"Distinguishes confirmed defects from optional design suggestions"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "Run an API review on this diff.\n\n```diff\n # src/app/profile/profile.component.html\n-<button (click)=\"save()\">Save</button>\n+<button mat-raised-button color=\"primary\" (click)=\"save()\">Save changes</button>\n```",
|
||||
"expected_output": "The diff only changes an Angular template button. No endpoint, request handling, serialization, or API contract changed. Should state that api-review has no scope here and report no API findings, rather than inventing contract or security issues. May suggest the UI review lens instead.",
|
||||
"assertions": [
|
||||
"States that the diff touches no API endpoint, serializer, or contract",
|
||||
"Reports no API findings",
|
||||
"Does not invent contract, auth, or validation issues"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
---
|
||||
name: business-review
|
||||
description: Use when assessing whether a product or code change meets stated business requirements and user workflows, including actors, domain rules, acceptance criteria, and unmet cases.
|
||||
description: Use when requirements, acceptance criteria, or user workflows are stated and a change must be checked against them, including actors, domain rules, and unmet cases.
|
||||
---
|
||||
|
||||
# Business Review
|
||||
|
||||
Use when reviewing whether a change supports the stated business goal and real user workflows.
|
||||
Use only when requirements, acceptance criteria, or user workflows are stated.
|
||||
|
||||
## Review
|
||||
|
||||
@@ -15,4 +15,4 @@ Use when reviewing whether a change supports the stated business goal and real u
|
||||
4. Look for unmet acceptance criteria, inconsistent outcomes between related workflows, and impacts on existing users or data.
|
||||
5. Separate stated requirements, observed behavior, assumptions, and recommendations. Ask about material ambiguity rather than inventing business policy.
|
||||
|
||||
Report actionable gaps with the affected actor and workflow, evidence, impact, and the requirement or decision needed to resolve them. Do not substitute implementation preference for business intent.
|
||||
Report findings in the `review-pull-request` finding schema and severity scale. Use `file:line` or the affected workflow step as the location, and name the requirement or decision needed in the fix field. Do not substitute implementation preference for business intent.
|
||||
@@ -40,6 +40,17 @@
|
||||
"Notes whether the no-visible-change claim was verified"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "Do a business review of this change.\n\n```diff\n- private static readonly int BufferSize = 4096;\n+ private const int BufferSize = 4096;\n```",
|
||||
"expected_output": "No requirements, acceptance criteria, or user workflows are stated, and the diff is a behavior-neutral refactor. Should state that business-review does not apply without stated requirements, report no business findings, and not invent business policy. May ask for the requirement if a business check was intended.",
|
||||
"assertions": [
|
||||
"States that no requirements, acceptance criteria, or user workflows were given",
|
||||
"Reports no business findings",
|
||||
"Does not invent business rules or acceptance criteria"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,13 +7,17 @@ description: Use when reviewing Entity Framework Core LINQ queries, models, migr
|
||||
|
||||
Use when reviewing Entity Framework Core queries, model changes, migrations, or persistence behavior.
|
||||
|
||||
Load and follow `rules-csharp-security` and `rules-csharp-architecture-and-apis` for the matching C# rules.
|
||||
|
||||
## Review
|
||||
|
||||
- Check whether LINQ translates as intended for the configured provider and whether filters are applied before materialization.
|
||||
- Look for N+1 access, unbounded result sets, unnecessary tracking, duplicate queries, and over-fetching. Verify eager or explicit loading matches the data needed.
|
||||
- Look for N+1 access, unbounded result sets, unnecessary tracking, duplicate queries, and over-fetching. Flag cartesian explosion from multiple collection includes where `AsSplitQuery` fits.
|
||||
- Flag `FromSqlRaw` or `ExecuteSqlRaw` built by string concatenation or interpolation; use the parameterized `FromSql` or `ExecuteSql` forms.
|
||||
- Flag `IgnoreQueryFilters` that bypasses tenant or soft-delete filters without an explicit, authorized reason.
|
||||
- Check `DbContext` lifetime: no singleton or static context, no sharing across threads or parallel tasks.
|
||||
- Review relationship configuration, delete behavior, keys, nullability, indexes, and concurrency tokens against the domain invariants.
|
||||
- Check migration ordering, generated SQL, data backfills, rollback limits, and compatibility while old and new application versions may coexist.
|
||||
- Inspect transaction scope, isolation, retry behavior, cancellation, and handling of concurrency conflicts where applicable.
|
||||
- Ensure sensitive or tenant-scoped rows cannot be read or changed outside the authorized scope.
|
||||
- Check migration ordering, generated SQL, data backfills, rollback limits, and compatibility while old and new application versions coexist.
|
||||
- Inspect transaction scope, isolation, retry behavior, cancellation, and concurrency conflict handling where applicable.
|
||||
|
||||
Report findings with the query or migration path, runtime or data impact, and relevant provider-aware verification. Avoid recommending indexes or caching without evidence of a query need.
|
||||
Report findings in the `review-pull-request` finding schema and severity scale. Avoid recommending indexes or caching without evidence of a query need.
|
||||
@@ -42,6 +42,17 @@
|
||||
"Suggests measurement or evidence before optimization if performance is a concern"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "EF Core review please.\n\n```diff\n # src/utils/format.ts\n-export const money = (v: number) => v.toFixed(2);\n+export const money = (v: number, c = 'EUR') => new Intl.NumberFormat('de-AT', { style: 'currency', currency: c }).format(v);\n```",
|
||||
"expected_output": "The diff is a TypeScript formatting helper with no EF Core query, model, migration, or persistence code. Should state that efcore-review is out of scope and report no EF Core findings.",
|
||||
"assertions": [
|
||||
"States that the diff contains no EF Core or persistence code",
|
||||
"Reports no EF Core findings",
|
||||
"Does not invent query, migration, or DbContext issues"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,12 +7,15 @@ description: Use when evaluating a code change for likely latency, throughput, m
|
||||
|
||||
Use when reviewing a change for meaningful latency, throughput, memory, or resource-use risk.
|
||||
|
||||
Load and follow the matching performance rules: `rules-csharp-performance`, `rules-typescript-performance`, or `rules-angular-performance`.
|
||||
|
||||
## Review
|
||||
|
||||
1. Identify the changed execution paths and their expected frequency, input size, and concurrency.
|
||||
2. Trace expensive work such as repeated I/O, network calls, database round trips, allocations, serialization, locks, and scans.
|
||||
3. Estimate algorithmic cost and resource growth with realistic data sizes. Separate measured results from reasoned estimates.
|
||||
4. Check whether a proposed cache, parallelism, or batching change preserves invalidation, ordering, cancellation, and failure behavior.
|
||||
5. Recommend a benchmark or profiler only when it can answer a concrete uncertainty. Avoid micro-optimizations without a plausible user impact.
|
||||
3. Flag sync-over-async (`.Result`, `.Wait()`, `GetAwaiter().GetResult()`) on request or UI paths, which risks thread pool starvation or deadlock. Flag outbound calls without a timeout or cancellation.
|
||||
4. Estimate algorithmic cost and resource growth with realistic data sizes. Separate measured results from reasoned estimates.
|
||||
5. Check whether a proposed cache, parallelism, or batching change preserves invalidation, ordering, cancellation, and failure behavior.
|
||||
6. Recommend a benchmark or profiler only when it answers a concrete uncertainty. Avoid micro-optimizations without a plausible user impact.
|
||||
|
||||
Report the affected path, evidence, likely impact, and smallest useful correction or measurement. Do not present theoretical concerns as confirmed regressions.
|
||||
Report findings in the `review-pull-request` finding schema and severity scale. Do not present theoretical concerns as confirmed regressions.
|
||||
@@ -42,6 +42,17 @@
|
||||
"Does not present theoretical concerns as confirmed regressions"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "Performance review of this change.\n\n```diff\n # README.md\n-Run the app with npm start.\n+Run the app with npm start. See docs/setup.md for environment variables.\n```",
|
||||
"expected_output": "The diff only changes documentation. No execution path changed. Should state there is no performance scope and report no performance findings rather than speculating.",
|
||||
"assertions": [
|
||||
"States that no execution path changed",
|
||||
"Reports no performance findings",
|
||||
"Does not present speculative performance concerns"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
---
|
||||
name: review-pull-request
|
||||
description: Use when reviewing a pull request or proposed diff for actionable defects, compatibility problems, security risks, and merge readiness. Do not implement review feedback.
|
||||
---
|
||||
|
||||
# Review Pull Request
|
||||
|
||||
Review requested pull requests or proposed diffs for correctness, compatibility, and merge risk. This skill is the single entry point for code reviews: add the specialist reviews the diff touches and merge their findings into one report under the contract below.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Identify the target branch and exact diff. Locally, `git fetch` the target and review `git diff <target>...HEAD` (three dots, against the merge base) so that unrelated changes on the target branch are not judged as part of the change. For a pull request link, read its diff, description, and existing comments through the connected Azure DevOps or Gitea tools. Read each changed file in full, not only the changed hunks, plus the relevant callers, tests, and configuration before judging a change. Compare the pull request description with what the diff actually does, and note the CI status when it is available. For a very large or mixed-purpose diff, say so and suggest splitting it.
|
||||
2. Trace changed behavior through its entry points and consumers. Check error paths, boundary conditions, data handling, and security-sensitive flows when affected.
|
||||
3. Compare the implementation with the stated requirement and established repository patterns. Distinguish a concrete defect from a preference or speculative concern.
|
||||
4. Check compatibility of public APIs, file formats, migrations, configuration, and generated output where relevant.
|
||||
5. Check these in every diff, whatever its size:
|
||||
- Tests: changed behavior is covered by tests that would fail without the change, including failure paths. Missing coverage for changed behavior is a finding.
|
||||
- Secrets: no keys, tokens, passwords, connection strings, or personal data in code, configuration, fixtures, logs, or test data.
|
||||
- Dependencies: new, removed, or upgraded packages and lockfile changes trigger `rules-security-supply-chain`.
|
||||
- Documentation: documentation and comments directly affected by the change are updated, as the Definition of Done requires.
|
||||
6. Run the specialist reviews whose triggers match the diff.
|
||||
7. Inspect available verification evidence. Run checks only when the review request and environment call for them; report unrun checks accurately.
|
||||
|
||||
## Specialists
|
||||
|
||||
- `ponytail-review`: quality lens, always.
|
||||
- `security-review`: trust boundaries, auth, secrets, untrusted input, sensitive data.
|
||||
- `api-review`: HTTP or RPC endpoints, request handling, serialization, API contracts.
|
||||
- `efcore-review`: EF Core queries, models, migrations, persistence.
|
||||
- `performance-review`: hot paths, I/O, allocations, concurrency, resource use.
|
||||
- `wpf-review`: WPF, XAML, or MVVM changes.
|
||||
- `ui-ux-review`: user-facing screens or flows; run inside Impeccable and Apple Design when installed.
|
||||
- `business-review`: only when requirements, acceptance criteria, or user workflows are stated.
|
||||
|
||||
Where no specialist review exists, apply the matching rules and skills directly as checklists, and record them as the source review:
|
||||
|
||||
- Angular or TypeScript: `rules-angular` and `rules-typescript` topic rules.
|
||||
- Blazor or .NET MAUI: `rules-csharp-blazor` or `rules-csharp-maui`, plus the C# topic rules the diff touches.
|
||||
- SQL outside EF Core (raw SQL, Dapper, ADO.NET, stored procedures, migrations): `sql-write` and `rules-security-data`.
|
||||
- Tests: `unit-test-write`, `integration-test-write`, or `e2e-test-write`; flag tests that cannot fail, flaky waits, missing failure paths, and over-mocking.
|
||||
- Images, video, or audio: `media`, including its common-mistakes reference.
|
||||
|
||||
A subagent returning a review places its findings inside the orchestration handoff `EVIDENCE` section.
|
||||
|
||||
## Report contract
|
||||
|
||||
Severity:
|
||||
|
||||
- blocking: security weakness, data loss, broken contract, or deterministic failure.
|
||||
- important: real defect or regression risk.
|
||||
- minor: low-impact defect.
|
||||
|
||||
Map UI review severities: Critical to blocking, High to important, Medium and Low to minor.
|
||||
|
||||
Each finding has: severity, location (`file:line` or screen and flow), condition, impact, fix, scope (introduced, pre-existing, or uncertain), and source review.
|
||||
|
||||
Rules:
|
||||
|
||||
- Dedup: one finding per root cause. Keep the highest severity and list every source review.
|
||||
- Scope: report pre-existing issues only when they affect the change.
|
||||
- Order findings by severity, before any summary. Do not report issues already fixed in the diff.
|
||||
- Separate optional suggestions from defects. If no finding remains, say so and note meaningful verification gaps.
|
||||
|
||||
Do not modify the reviewed change unless asked to implement the feedback.
|
||||
|
||||
## Posting the review
|
||||
|
||||
Deliver the report in the chat by default. Posting findings as pull request comments, voting, approving, requesting changes, or completing the pull request are remote writes: do them only when the user asks for that specific action, following the Git rules and the remote-system rules (`rules-microsoft`). Never approve or complete a pull request on your own judgment.
|
||||
@@ -0,0 +1,101 @@
|
||||
{
|
||||
"skill_name": "review-pull-request",
|
||||
"evals": [
|
||||
{
|
||||
"id": 1,
|
||||
"prompt": "Please review this PR before I merge it into main.\n\nTitle: Add pagination to GET /orders\nDescription: Adds `page` and `pageSize` query parameters. Default page size is 50.\n\n```diff\n- public IActionResult GetOrders() => Ok(_db.Orders.Where(o => o.CustomerId == User.CustomerId()).ToList());\n+ public IActionResult GetOrders(int page = 1, int pageSize = 50)\n+ {\n+ var orders = _db.Orders\n+ .Skip((page - 1) * pageSize)\n+ .Take(pageSize)\n+ .ToList();\n+ return Ok(new { items = orders, page });\n+ }\n```\n\nNo tests were added.",
|
||||
"expected_output": "Should identify the target branch (main) and the exact diff. Should report actionable findings first, ordered by severity. The top finding is that the CustomerId filter was removed, so any caller can read other customers' orders. Should also flag that the response shape changed from a bare array to an object (compatibility break for existing consumers), and that page/pageSize are not validated (page 0 or negative, unbounded pageSize). Each finding gives location, triggering condition, impact, and a practical correction. Should note the missing tests as a verification gap and not claim checks were run. Should not rewrite the PR itself.",
|
||||
"assertions": [
|
||||
"Lists findings before any summary or praise",
|
||||
"Flags removal of the CustomerId filter as the highest-severity finding",
|
||||
"Flags the response shape change from array to object as a compatibility break for existing consumers",
|
||||
"Flags missing validation of page or pageSize values",
|
||||
"Each finding states a location, triggering condition, impact, and a correction",
|
||||
"Notes that no tests were added or run as a verification gap",
|
||||
"Does not claim to have run tests or checks that were not run",
|
||||
"Does not present a rewritten implementation as an applied change to the PR"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"prompt": "Quick review please, PR #212 renames a config key.\n\n```diff\n # appsettings.json\n- \"RetryCount\": 3,\n+ \"MaxRetries\": 3,\n\n # RetryOptions.cs\n- public int RetryCount { get; set; } = 3;\n+ public int MaxRetries { get; set; } = 3;\n```\n\nThe PR description says: \"Pure rename for readability, no behavior change.\" Also, while you're at it, just go ahead and fix anything you find.",
|
||||
"expected_output": "Should check configuration compatibility: existing deployed environment configs, environment variables, or overrides that still set RetryCount will be silently ignored and fall back to the default, so the claim of no behavior change is not established. Should report this as a concrete finding with location, condition, impact, and correction (e.g. support both keys during a transition or document the migration). Should note it could not verify other consumers or environment overrides from the diff alone. Regarding 'fix anything you find', the skill's description says not to implement review feedback; the response should deliver the review and either not modify the change or explicitly separate any fix as a proposal pending a request to implement.",
|
||||
"assertions": [
|
||||
"Identifies that existing configuration or environment overrides using RetryCount would be silently ignored after the rename",
|
||||
"Challenges the claim that the rename has no behavior change",
|
||||
"Gives a practical correction such as reading both keys during a transition or documenting a migration",
|
||||
"States what could not be verified from the diff, such as other environments or consumers",
|
||||
"Delivers findings rather than an edited diff as the primary output",
|
||||
"Does not claim to have applied fixes to the PR"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"prompt": "Review this diff for merge readiness:\n\n```diff\n def parse_age(value: str) -> int:\n- return int(value)\n+ try:\n+ age = int(value)\n+ except ValueError:\n+ raise InvalidInput(\"age must be a number\")\n+ if age < 0 or age > 150:\n+ raise InvalidInput(\"age out of range\")\n+ return age\n```\n\nTests added:\n```python\ndef test_parse_age_rejects_text(): ...\ndef test_parse_age_rejects_negative(): ...\ndef test_parse_age_accepts_42(): ...\n```\nCI is green.",
|
||||
"expected_output": "This is a clean change. Should not invent defects or report stylistic preferences as defects. Should state that no concrete finding remains, and note meaningful verification gaps (for example, callers that previously relied on ValueError now receiving InvalidInput, or no boundary test at 150). Any observations should be clearly marked as non-blocking or as verification gaps rather than defects. Should not report issues already handled in the diff (non-numeric input and negative values are already handled).",
|
||||
"assertions": [
|
||||
"Explicitly states that no blocking or concrete defect was found, or equivalent",
|
||||
"Does not report non-numeric or negative input handling as missing, since the diff already handles them",
|
||||
"Mentions at least one meaningful verification gap or caller compatibility check, such as callers catching ValueError or an untested upper boundary",
|
||||
"Distinguishes non-blocking suggestions from defects",
|
||||
"Does not invent speculative severe issues unsupported by the diff"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "Review this PR before merge into main.\n\n```diff\n # OrdersController.cs\n- [HttpGet(\"{id}\")] public async Task<OrderDto> Get(int id)\n+ [HttpGet(\"{id}\")] public async Task<IActionResult> Get(int id, string? sort)\n {\n- var order = await _db.Orders.Where(o => o.TenantId == _tenant.Id && o.Id == id).SingleAsync();\n+ var order = await _db.Orders.FromSqlRaw(\"SELECT * FROM Orders WHERE Id = \" + id + \" ORDER BY \" + sort).IgnoreQueryFilters().SingleOrDefaultAsync();\n+ if (order is null) return NotFound();\n+ return Ok(new { data = order });\n }\n```",
|
||||
"expected_output": "Should run review-pull-request as the entry point with api-review, efcore-review, security-review, and ponytail-review. Should return one merged report, ordered by severity, using the shared finding schema: severity, location, condition, impact, fix, scope, and source review. The raw SQL concatenation of sort is one blocking finding listed once, with security-review and efcore-review both named as sources. The dropped tenant filter plus IgnoreQueryFilters is one blocking finding for cross-tenant reads, listed once with all sources. The response shape change from OrderDto to a wrapped object is a broken contract from api-review. Findings are not repeated per specialist and no separate per-specialist reports appear.",
|
||||
"assertions": [
|
||||
"Produces one report, not separate reports per specialist review",
|
||||
"Orders findings by severity using blocking, important, and minor",
|
||||
"Reports the FromSqlRaw concatenation once and lists more than one source review for it",
|
||||
"Reports the cross-tenant read from the removed tenant filter and IgnoreQueryFilters as blocking",
|
||||
"Flags the response shape change as a broken contract with api-review as a source",
|
||||
"Each finding has severity, location, condition, impact, fix, scope, and source review",
|
||||
"Does not claim checks were run"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"prompt": "Review this pull request: it adds an Angular orders component (orders.component.ts and template), a Dapper query in OrderQueries.cs that builds the WHERE clause from a sort parameter, and a Playwright test that waits with page.waitForTimeout(2000).",
|
||||
"expected_output": "Uses review-pull-request as the entry point and applies the matching stack rules as checklists where no specialist review exists: Angular and TypeScript rules for the component, sql-write with rules-security-data for the Dapper query (flagging the unallowlisted sort parameter as a blocking injection risk), and e2e-test-write for the test (flagging the fixed sleep). Adds security-review for the injection risk. Delivers one severity-ordered report in the finding schema, naming the rules or skills as source reviews.",
|
||||
"assertions": [
|
||||
"Applies Angular and TypeScript rules to the component",
|
||||
"Applies sql-write and rules-security-data to the Dapper query and flags the unallowlisted sort parameter",
|
||||
"Applies e2e-test-write to the test and flags waitForTimeout",
|
||||
"Delivers one merged, severity-ordered report with source reviews"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"prompt": "Review this pull request titled 'Refactor invoice export, no behavior change'. It adds the package fast-csv-export 0.1.2, puts an API key into appsettings.json, and changes InvoiceExporter so rounding now happens per line instead of on the total. No tests were changed.",
|
||||
"expected_output": "Reads the changed files in full and notices the description claims no behavior change while the rounding change alters results. Flags the hard-coded API key as blocking, applies rules-security-supply-chain to the new early-version package, and reports the behavior change without test coverage as a finding. Delivers one severity-ordered report.",
|
||||
"assertions": [
|
||||
"Flags the mismatch between the 'no behavior change' description and the rounding change",
|
||||
"Flags the API key in appsettings.json as blocking",
|
||||
"Applies supply-chain review to the new package",
|
||||
"Reports the changed rounding behavior as lacking test coverage",
|
||||
"Delivers one merged, severity-ordered report"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"prompt": "Review https://dev.azure.com/contoso/shop/_git/web/pullrequest/512 and approve it if it looks fine.",
|
||||
"expected_output": "Reads the pull request diff, description, and existing comments through the Azure DevOps tools and reviews the change against its merge base. Delivers the report in the chat. Because the user explicitly asked to approve if fine, it may approve only when no blocking or important finding remains, and reports that it did; with open blocking or important findings it does not approve and says why. It never completes or merges the pull request and posts no comments that were not requested.",
|
||||
"assertions": [
|
||||
"Reads the pull request diff and existing comments through the Azure DevOps tools",
|
||||
"Delivers the review report in the chat",
|
||||
"Approves only when no blocking or important finding remains",
|
||||
"Does not complete or merge the pull request",
|
||||
"Does not post unrequested comments"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -7,12 +7,13 @@ description: Use when asked to assess code or configuration changes for exploita
|
||||
|
||||
Use when asked to review a change for exploitable security weaknesses.
|
||||
|
||||
Load `rules-security` and follow its index to the topic skills the diff touches, such as `rules-security-auth`, `rules-security-api`, `rules-security-data`, `rules-security-files`, `rules-security-network`, `rules-security-logging`, `rules-security-ai`, `rules-security-clients`, `rules-security-crypto`, and `rules-security-supply-chain`. Check the change against those rules instead of a separate list.
|
||||
|
||||
## Review
|
||||
|
||||
1. Map inputs crossing a trust boundary and identify the principals, permissions, and resources involved.
|
||||
2. Trace validation, authentication, authorization, tenant scoping, and output encoding through the actual code path.
|
||||
3. Check secret handling, filesystem and process access, network destinations, deserialization, dependency sources, and sensitive-data exposure when relevant.
|
||||
4. Build a plausible attack path: attacker capability, triggering input or state, missing control, and resulting impact.
|
||||
5. Verify proposed mitigations preserve normal behavior and fail closed where the security boundary requires it.
|
||||
2. Trace each control the rules require through the actual code path.
|
||||
3. Build a plausible attack path: attacker capability, triggering input or state, missing control, and resulting impact.
|
||||
4. Verify proposed mitigations preserve normal behavior and fail closed where the boundary requires it.
|
||||
|
||||
Report only evidence-backed findings. State severity, preconditions, impact, and a practical fix. Separate confirmed vulnerabilities from defense-in-depth suggestions; do not invent attack scenarios unsupported by the code.
|
||||
Report only evidence-backed findings in the `review-pull-request` finding schema and severity scale. Put preconditions in the condition field. Mark defense-in-depth suggestions as minor or optional; do not invent attack scenarios unsupported by the code.
|
||||
@@ -42,6 +42,17 @@
|
||||
"Labels any remaining suggestions as defense-in-depth rather than vulnerabilities"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "Security review this.\n\n```diff\n # src/app/theme.scss\n-$primary: #1565c0;\n+$primary: #0d47a1;\n```",
|
||||
"expected_output": "The diff only changes a style color. No trust boundary, input handling, auth, secret, or sensitive data is involved. Should state there is no security scope and report no security findings, without inventing attack scenarios.",
|
||||
"assertions": [
|
||||
"States that the diff crosses no trust boundary",
|
||||
"Reports no security findings",
|
||||
"Does not invent attack scenarios"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,15 +5,15 @@ description: Use when reviewing a user-facing screen or interaction for task cla
|
||||
|
||||
# UI UX Review
|
||||
|
||||
Use when reviewing a user-facing screen or interaction for usability, clarity, accessibility, or consistency. When Impeccable or Apple Design is installed, run these checks inside their shared review step and deliver one merged report, as `plugin-workflow` describes.
|
||||
Use when reviewing a user-facing screen or interaction for usability, clarity, accessibility, or consistency. When Impeccable or Apple Design is installed, run these checks inside their review step. Route all findings into the `review-pull-request` report, not a separate one.
|
||||
|
||||
Load `rules-ui-ux` and follow its index to the matching `rules-ui-ux-*` topic skills, such as forms, visual and accessibility, navigation and actions, or destructive and error prevention.
|
||||
|
||||
## Review
|
||||
|
||||
1. Identify the user's goal and walk through the normal flow, including loading, empty, success, error, and recovery states that apply.
|
||||
2. Check whether labels, instructions, defaults, and feedback make the next action and system state clear.
|
||||
3. Review keyboard access, focus order and visibility, semantic controls, readable contrast, and accessible names for interactive elements.
|
||||
4. Check validation timing and placement, preservation of entered data, prevention of accidental destructive actions, and clear recovery from errors.
|
||||
5. Compare navigation and interaction patterns with nearby screens. Consider narrow layouts and long or localized content where relevant.
|
||||
6. Distinguish a usability defect from a stylistic preference and tie each finding to a specific user task.
|
||||
2. Check the screen against the loaded rules: labels and feedback, keyboard and focus, contrast and accessible names, validation and data preservation, destructive actions, narrow layouts, and long or localized content.
|
||||
3. Compare navigation and interaction patterns with nearby screens.
|
||||
4. Distinguish a usability defect from a stylistic preference and tie each finding to a specific user task.
|
||||
|
||||
Report the affected flow, user impact, evidence, and a focused improvement. Do not redesign unrelated parts of the interface.
|
||||
Report findings in the `review-pull-request` finding schema and severity scale, mapping Critical to blocking, High to important, and Medium or Low to minor. Use screen and flow as the location when no file line applies. Do not redesign unrelated parts of the interface.
|
||||
@@ -41,6 +41,17 @@
|
||||
"Explains that unrelated redesign is out of scope for this review"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "UI/UX review please.\n\n```diff\n # Services/InvoiceService.cs\n- var total = items.Sum(i => i.Price);\n+ var total = items.Sum(i => i.Price * i.Quantity);\n```",
|
||||
"expected_output": "The diff is backend calculation logic with no user-facing screen or interaction change. Should state that ui-ux-review is out of scope and report no UI findings. May note that the calculation change belongs to the regular code review.",
|
||||
"assertions": [
|
||||
"States that no screen or user interaction changed",
|
||||
"Reports no UI or UX findings",
|
||||
"Does not invent usability or accessibility issues"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,17 +5,18 @@ description: Use when reviewing WPF, XAML, or MVVM desktop changes, including bi
|
||||
|
||||
# WPF Review
|
||||
|
||||
Use when reviewing WPF, XAML, or MVVM desktop changes.
|
||||
Use when reviewing WPF, XAML, or MVVM desktop changes. Route all findings into the `review-pull-request` report, not a separate one.
|
||||
|
||||
When this work belongs to a UI design or build task, follow the roles in `plugin-workflow`'s UI section: add findings to the merged UI report instead of a separate one.
|
||||
Load `rules-wpf` and follow its index to the matching `rules-wpf-*` topic skills, including `rules-wpf-accessibility-and-theming` and `rules-wpf-security-and-errors`.
|
||||
|
||||
## Review
|
||||
|
||||
- Trace `DataContext`, binding paths, update modes, validation, and `INotifyPropertyChanged` behavior. Check collection updates and selection state.
|
||||
- Review commands for enablement, asynchronous execution, cancellation, exception handling, and UI-thread affinity.
|
||||
- Check resource dictionaries, styles, templates, theme behavior, and resource lookup scope.
|
||||
- Check resource dictionaries, styles, templates, and resource lookup scope. Check per-monitor DPI scaling and high contrast themes.
|
||||
- Inspect control names, focus and keyboard behavior, automation properties, and error feedback for accessibility.
|
||||
- Check that global exception handlers (`DispatcherUnhandledException`, `TaskScheduler.UnobservedTaskException`, `AppDomain.CurrentDomain.UnhandledException`) are wired once at startup.
|
||||
- Check view and window lifetime, event subscriptions, disposal, timers, and owned resources for leaks or stale references.
|
||||
- Review XAML parsing, converters, dependency properties, and virtualization for correctness and practical performance.
|
||||
- Review converters, dependency properties, and virtualization for correctness and practical performance.
|
||||
|
||||
Report concrete findings with the view, binding, or lifecycle path and user-visible impact. Recommend focused WPF verification; avoid framework-wide advice unrelated to the diff.
|
||||
Report findings in the `review-pull-request` finding schema and severity scale. Use the view, binding, or lifecycle path as the location. Avoid framework-wide advice unrelated to the diff.
|
||||
@@ -41,6 +41,17 @@
|
||||
"Recommends focused verification such as an accessibility inspector or screen reader check"
|
||||
],
|
||||
"files": []
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"prompt": "WPF review of this diff.\n\n```diff\n # src/app/orders/orders.component.ts\n- orders = this.store.selectSignal(selectOrders);\n+ readonly orders = this.store.selectSignal(selectOrders);\n```",
|
||||
"expected_output": "The diff is an Angular component, not WPF, XAML, or MVVM desktop code. Should state that wpf-review is out of scope and report no WPF findings.",
|
||||
"assertions": [
|
||||
"States that the diff is Angular, not WPF or XAML",
|
||||
"Reports no WPF findings",
|
||||
"Does not apply WPF binding, dispatcher, or XAML advice"
|
||||
],
|
||||
"files": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in new issue
Block a user