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

This commit is contained in:
Julian Lechner committed 2026-11-18 14:17:49 +01:00
1 parent 29632ff0ce
commit f5d8f6f11b
124 files changed
+1250 -8138

No files matched your search

@@ -0,0 +1,21 @@
---
name: work-item-definition
description: Use when a request is too vague to scope, estimate, or verify. Define the objective, scope, acceptance criteria, assumptions, dependencies, and only material open questions; do not implement it.
---
# Work Item Definition
Use when a request lacks enough detail to estimate or verify the intended technical outcome. When the work item lives in Azure DevOps or another tracker, read it first through the connected tools: description, acceptance criteria, comments, and linked items. Writing back, such as comments, fields, or state, follows the remote-system rules (`rules-microsoft`).
## Workflow
1. State the user or system outcome in concrete terms.
2. Inspect the current behavior the request touches through `research` before scoping. Cite what exists; mark what you could not inspect.
3. Define what is in scope and what is explicitly out of scope based on the request and current behavior.
4. Write observable acceptance criteria, including relevant failure or edge cases.
5. Record constraints, dependencies, compatibility requirements, and assumptions separately. Before accepting external technology constraints as established, MUST apply the planning checkpoint in `technical-research`; carry its evidence or unresolved gaps into the work item.
6. Ask only questions whose answers would materially change behavior, contracts, permissions, or acceptance. Choose safe reversible defaults for minor implementation details.
7. Identify unresolved risks and a proportionate verification approach.
8. Give a rough size (small, medium, or large, with the main driver). Split a large item into independently deliverable parts, each with its own acceptance criteria.
Return a bounded work item with objective, scope, criteria, assumptions, dependencies, and open questions. If the request is already well defined, keep its scope and only fill real gaps. Do not invent business rules or start implementation unless asked.
@@ -0,0 +1,74 @@
{
"skill_name": "work-item-definition",
"evals": [
{
"id": 1,
"prompt": "Ticket from product: \"Users should be able to export their data.\" That's all it says. Our app is a B2B time-tracking SaaS with workspaces, projects, and time entries. Turn this into something the team can estimate.",
"expected_output": "Should state the outcome in concrete terms. Should define in-scope and explicitly out-of-scope items. Should write observable acceptance criteria including failure or edge cases (e.g. empty data, large exports, permission denied). Should record constraints, dependencies, compatibility requirements, and assumptions separately. Should ask only material open questions (e.g. who may export: individual user vs workspace admin; which data; which format; GDPR-style full export vs report export). Should identify risks and a verification approach. Should not invent business rules as facts and should not implement.",
"assertions": [
"Contains an objective stated as a concrete user or system outcome",
"Contains separate in-scope and out-of-scope sections",
"Contains observable acceptance criteria",
"Includes at least one failure or edge case criterion such as unauthorized access or an empty or very large export",
"Lists assumptions separately from constraints and dependencies",
"Open questions are limited to material ones such as who may export, which data, or format",
"Does not present invented business rules as established requirements",
"Does not include implementation code"
],
"files": []
},
{
"id": 2,
"prompt": "Define a work item: \"Add SSO login using Azure AD B2C's new native passkey support, it works with our current MSAL.js 2.x setup.\"",
"expected_output": "Should produce a bounded work item. The request contains external technology claims (Azure AD B2C passkey support, MSAL.js 2.x compatibility); before accepting them as established constraints the agent must apply the technical-research planning checkpoint and carry the evidence or unresolved gaps into the work item. Should not simply restate the claim as fact. Should include objective, scope, acceptance criteria, assumptions, dependencies, open questions, and risks with a verification approach.",
"assertions": [
"Applies or references the technical-research planning checkpoint for the Azure AD B2C and MSAL.js claims",
"Marks the passkey support and MSAL.js 2.x compatibility as evidenced or explicitly unresolved rather than assumed",
"Contains objective, scope, acceptance criteria, assumptions, dependencies, and open questions",
"Lists MSAL.js and Azure AD B2C as dependencies",
"Identifies unresolved risks and a verification approach",
"Does not start implementing the login flow"
],
"files": []
},
{
"id": 3,
"prompt": "Make a work item for: \"The settings page Save button should show a spinner while saving.\" Ask me anything you need first.",
"expected_output": "This request is already fairly concrete. Despite the invitation to ask anything, the agent should ask only questions that materially change behavior, contracts, permissions, or acceptance, and choose safe reversible defaults for minor details (spinner style, exact placement). Should produce a compact work item with objective, scope, acceptance criteria (including save failure and double-click behavior), assumptions, and few or no open questions.",
"assertions": [
"Produces the work item rather than only a list of questions",
"Asks no questions about minor implementation details such as spinner style or color",
"States safe defaults as assumptions for minor details",
"Includes an acceptance criterion for the save failure state",
"Includes an acceptance criterion about preventing duplicate submissions while saving, or lists it as an open question",
"Keeps scope bounded to the Save button behavior"
],
"files": []
},
{
"id": 4,
"prompt": "Turn this into a work item: \"Add a `--since <ISO date>` option to the `audit list` CLI command that filters entries with timestamp >= the date. Invalid dates exit with code 2 and the message 'invalid --since date'. Other commands are unchanged. Done when unit tests cover valid, boundary, and invalid input.\"",
"expected_output": "The ticket is already well defined. Should inspect the current audit list command, then return a compact work item that keeps the stated scope and criteria. Should not add new features, extra options, or other commands, and should ask few or no questions.",
"assertions": [
"Inspects the current audit list command or states it could not",
"Keeps the criteria stated in the ticket, including exit code 2 and the error message",
"Does not add scope such as --until, time zones, or changes to other commands",
"Asks no questions, or only questions that would materially change behavior",
"Does not include implementation code"
],
"files": []
},
{
"prompt": "Define Azure DevOps work item 812 so the team can estimate it: 'Customer portal: allow invoice download, payment history, and address changes.'",
"expected_output": "Reads work item 812 from Azure DevOps first, then defines the outcome, scope, and criteria. Recognizes three independently deliverable parts and splits them, each with its own acceptance criteria, and gives a rough size per part. Does not write back to Azure DevOps unless the user asks.",
"assertions": [
"Reads the work item from Azure DevOps before defining it",
"Splits the item into independently deliverable parts with their own criteria",
"Gives a rough size for each part",
"Does not write to Azure DevOps without a request"
],
"files": [],
"id": 5
}
]
}
@@ -0,0 +1,59 @@
---
name: work-item-verification
description: Use when checking whether completed work satisfies a work item, ticket, or review request; map each acceptance criterion and the Definition of Done to evidence and give a clear completion verdict.
---
# Work Item Verification
Decide whether a completed change is done. Act as a verifier: inspect existing evidence and run only cheap checks that settle a specific criterion, never a full suite or a new architecture review. For a code review of the change itself, use `review-pull-request`.
## 1. Collect the criteria
- If the work item lives in Azure DevOps or another tracker, read it first through the connected tools: description, acceptance criteria, comments, and linked items.
- Note the objective, scope boundaries, acceptance criteria, and material constraints.
- If no acceptance criteria exist, derive them from the request and label each one as derived. If the request is too vague to derive them, use `work-item-definition` first.
## 2. Map each criterion to evidence
- Use direct evidence: changed files, observable behavior, command output, test results, or a user-confirmed outcome.
- Reuse adequate existing evidence before running a check, and run only checks that answer the criterion.
- A successful build is not proof of behavioral criteria.
- For criteria that rely on external technology behavior, apply the verification checkpoint in `technical-research`: compare the actual sources and versions with the implementation, not merely whether a lookup happened.
## 3. Check the Definition of Done
Apply `rules-definition-of-done` on top of the criteria:
- No unrelated changes.
- No temporary code, debug output, commented-out code, or unintended TODOs. A `shortcut:` comment that documents a known limit is intended.
- Directly affected documentation and comments updated.
- Generated output and consumers consistent with the change.
## 4. Decide
| Status | Meaning |
| --- | --- |
| met | Direct evidence shows the criterion holds. |
| unmet | Evidence shows the criterion does not hold. |
| unverified | No adequate evidence, or the check could not run; say why. |
The work item is **complete** only when every required criterion is met and every Definition of Done item passes. Otherwise it is **not complete**, and the report names what blocks it. Never report an unrun check as passed.
## 5. Report
```text
Work item: <id and title>
Verdict: complete | not complete
| Criterion | Status | Evidence |
| --- | --- | --- |
| <criterion, marked "derived" if inferred> | met / unmet / unverified | <file:line, command and result, or reason> |
Definition of Done: passed | failed (<item>)
Not run: <check> (<reason>)
Open decisions: <only if any>
```
## Writing back
Do not change the work item's state, fields, or comments unless the user asks for that specific action. Any write follows the remote-system rules (`rules-microsoft`), and a state change such as Resolved happens only when the verdict is complete.
@@ -0,0 +1,83 @@
{
"skill_name": "work-item-verification",
"evals": [
{
"id": 1,
"prompt": "Verify whether this work item is done.\n\nWork item WI-77: \"Password reset links expire.\"\nAcceptance criteria:\n1. Reset tokens expire after 30 minutes.\n2. Using an expired token shows \"This link has expired\" and a button to request a new link.\n3. A token can be used only once.\n4. The README's \"Account recovery\" section documents the expiry.\n\nEvidence: The diff adds `expiresAt = now + 30min` in `ResetTokenService.cs` and a test `Token_expires_after_30_minutes` (passing). The build is green. The README was not changed. No UI changes are in the diff.",
"expected_output": "Should map each criterion to direct evidence and mark it met, unmet, or unverified. Criterion 1: met (code plus passing test). Criterion 2: unmet or unverified (no UI change in the diff). Criterion 3: unverified (no evidence of single-use enforcement). Criterion 4: unmet (README not changed). Should not treat the green build as proof of criteria 2-4. Should give a concise completion status of not complete, listing what could not be checked.",
"assertions": [
"Lists each of the four criteria separately with a status",
"Marks criterion 1 as met citing the code change and passing test",
"Marks criterion 2 as unmet or unverified because no UI change is present",
"Marks criterion 3 as unverified or unmet due to no evidence of single-use enforcement",
"Marks criterion 4 as unmet because the README was not changed",
"States that the green build does not prove the behavioral criteria",
"Concludes the work item is not complete"
],
"files": []
},
{
"id": 2,
"prompt": "Check WI-102 is complete. Scope: \"Add a `--json` output option to the `report` command only; do not change other commands.\" Criteria: (a) `report --json` prints valid JSON; (b) existing text output unchanged. Evidence: tests for (a) and (b) pass. The diff also changes `export.ts` to default its output format to JSON and modifies `generated/cli-reference.md` by hand, while the generator script `scripts/gen-cli-docs.ts` was not run.",
"expected_output": "Criteria (a) and (b) are met by the passing tests. However, should confirm the implementation stayed within scope: the export.ts change violates the explicit scope boundary and changes behavior of another command. Should flag that generated output was hand-edited instead of regenerated, risking inconsistency. Should not claim completion while these issues remain; should record limitations and unresolved decisions.",
"assertions": [
"Marks criteria (a) and (b) as met citing the passing tests",
"Flags the export.ts change as outside the stated scope",
"Flags the hand-edited generated documentation and that the generator was not run",
"Does not declare the work item complete without qualification",
"Records the scope violation as a limitation or unresolved decision"
],
"files": []
},
{
"id": 3,
"prompt": "WI-140: \"Upgrade to Polly 8 and keep the existing retry policy behavior: 3 retries with exponential backoff starting at 200ms, retrying only on HTTP 5xx and 408.\" The diff replaces `Policy.Handle<HttpRequestException>().WaitAndRetryAsync(...)` with a `ResiliencePipelineBuilder` using `AddRetry(new RetryStrategyOptions { MaxRetryAttempts = 3, BackoffType = DelayBackoffType.Exponential, Delay = TimeSpan.FromMilliseconds(200) })`. No ShouldHandle predicate is set. The developer looked up Polly docs and says it's equivalent. All unit tests pass. Is it done?",
"expected_output": "The criterion depends on external technology behavior (Polly 8 defaults), so must apply the technical-research verification checkpoint: check the actual Polly 8 sources for what the default ShouldHandle covers and the exponential delay semantics, for the installed version, not merely accept that a lookup occurred. Without an explicit ShouldHandle limited to 5xx and 408, the 'retry only on 5xx and 408' criterion is unmet or at least unverified. Passing unit tests do not prove the retry conditions unless tests cover them. Should give criterion-by-criterion results and not claim completion.",
"assertions": [
"Applies or references the technical-research verification checkpoint for Polly 8 behavior",
"Checks the Polly 8 source or documentation for the installed version rather than accepting the developer's claim",
"Flags the missing ShouldHandle predicate as failing or leaving unverified the retry-only-on-5xx-and-408 criterion",
"Evaluates the 3 retries and 200ms exponential backoff criterion separately",
"States that passing unit tests do not prove the retry conditions unless they cover them",
"Does not claim the work item is complete"
],
"files": []
},
{
"id": 4,
"prompt": "Verify WI-210: \"Trim whitespace from the `email` field on signup.\" Criteria: (1) leading and trailing spaces are removed before saving; (2) an email made only of spaces is rejected with 'Email is required'. Evidence: the diff adds `email = email.trim()` before validation in `SignupService.ts`. New tests `trims_email` and `rejects_blank_email` assert both criteria and pass in the attached test output. No other files changed.",
"expected_output": "Both criteria have direct evidence from the diff and passing tests that cover them. Scope is respected. Should mark both met, reuse the attached test output instead of rerunning a full suite, and conclude the work item is complete.",
"assertions": [
"Marks criterion 1 as met citing the trim change and the trims_email test",
"Marks criterion 2 as met citing the rejects_blank_email test",
"Confirms no out-of-scope files changed",
"Does not run the full test suite or an architecture review",
"Concludes the work item is complete"
],
"files": []
},
{
"prompt": "Verify Azure DevOps work item 4711 is done and set it to Resolved if it is. The implementation is on the current branch.",
"expected_output": "Reads work item 4711 from Azure DevOps first (description, acceptance criteria, comments, linked items), maps each criterion to evidence, and checks the Definition of Done. Sets the state to Resolved only because the user explicitly asked for it and only if every criterion and Definition of Done item is met; otherwise reports what blocks completion and leaves the state unchanged.",
"assertions": [
"Reads the work item and its acceptance criteria from Azure DevOps before judging",
"Checks the Definition of Done in addition to the criteria",
"Changes the work item state only because the user requested it and only when complete",
"Leaves the state unchanged and reports blockers when anything is unmet or unverified"
],
"files": [],
"id": 5
},
{
"prompt": "Verify WI-320: 'Show the invoice total in the header.' Criterion: the header shows the total. The diff adds the total to the header, plus console.log('total', total) and a commented-out old header block. The header test passes.",
"expected_output": "Marks the criterion as met based on the diff and the passing test, but reports that the Definition of Done is not met because of the leftover debug output and commented-out code, so the work item is not complete.",
"assertions": [
"Marks the header criterion as met with evidence",
"Flags the console.log debug output and commented-out code as Definition of Done failures",
"Does not report the work item as complete"
],
"files": [],
"id": 6
}
]
}