@adrata/adrata-mcp 1.0.2 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,179 @@
1
+ ---
2
+ name: qa-the-card
3
+ description: Deeply verify a Starfield card in Staging QA1 or Staging QA2, fix defects and rerun evidence until clean, then leave an auditable AI-to-human handoff without claiming deployment. Use when asked to QA, review, verify, sign off, or clear cards from a QA column.
4
+ ---
5
+
6
+ # QA the card
7
+
8
+ QA is an engineering pass, not a documentation pass. Reproduce every acceptance
9
+ claim, attack the implementation beyond the happy path, fix defects in scope,
10
+ and repeat until the card is genuinely ready for the next accountable reviewer.
11
+
12
+ The workflow semantics are fixed by
13
+ `company/decisions/2026-08-29-two-gate-ai-qa-human-production.md`; the required
14
+ evidence loop is fixed by
15
+ `company/decisions/2026-08-29-recorded-staging-qa-standard.md`. This skill is
16
+ their operating procedure.
17
+
18
+ ## Establish the real queue
19
+
20
+ 1. Read every active board or the all-boards roll-up before announcing a count.
21
+ A card's `product` may differ from the board holding it, so inspect both the
22
+ Adrata board and Adrata-labelled cards on another board. Re-read the queue
23
+ during a long session and at every deployment checkpoint because new cards
24
+ can arrive while QA is running. Report the delta, not only the new total.
25
+ 2. Limit mutations to the QA scope the user named. Read each card, its full
26
+ stage history, comments, acceptance criteria, flag, linked pull request, and
27
+ exact-SHA delivery evidence before testing it.
28
+ 3. Do not infer missing history from a sparse screen. Confirm the transition
29
+ rows through the governed API. A card created directly in an old QA column
30
+ may honestly have only one transition.
31
+ 4. Audit the criteria themselves. Each must describe an observable outcome and
32
+ be executable at the current gate. Add or correct missing coverage before
33
+ calling the card clean; never turn a vague criterion green by interpreting it
34
+ generously.
35
+
36
+ ## Preserve independent gates
37
+
38
+ - QA1 and QA2 are separate passes over separate column-history dwells. A prior
39
+ checkbox or receipt is evidence to inspect, not a substitute for rerunning it.
40
+ - An agent's QA2 credential must differ from the criterion author and the agent
41
+ credential whose clean receipt opened QA1. Never impersonate a human to bypass
42
+ this rule. A human may perform the final acceptance even when they own or
43
+ authored the card.
44
+ - For non-trivial QA2 work, use at least one independent adversarial reviewer
45
+ when subagents are authorized and available. Parallelize separable surfaces
46
+ such as UI, backend/security, and migration/deployment behavior. Give each
47
+ reviewer a bounded target and avoid concurrent edits to the same files.
48
+ - Multiple reviewers may find and challenge defects, but they do not assemble a
49
+ synthetic gate from partial identities. One eligible second-agent credential
50
+ must rerun or confirm every current criterion so the final QA2 receipt is
51
+ coherent and the badge can be derived honestly.
52
+ - Stagger expensive Rust builds on the shared Mac. More concurrent compilers can
53
+ make verification slower and can exhaust disk; an independent final result
54
+ must use the reviewer's own target artifacts and show any new test by name.
55
+
56
+ ## Run the fix-and-retest loop
57
+
58
+ For every criterion:
59
+
60
+ 1. Write down the observable, the environment, and the strongest practical way
61
+ to falsify it. Source inspection alone is not a pass.
62
+ 2. Reproduce the behavior before changing code when the deployed failure is
63
+ observable. Preserve the failing request, console output, screenshot, video,
64
+ trace, or exact database/API result.
65
+ 3. Exercise the happy path, boundary conditions, failure states, authorization
66
+ boundaries, retries/idempotency, and a realistic regression path. For a
67
+ migration, prove both representative old state and transactional rerun. For
68
+ a deployment, prove the exact deployed SHA and behavior during replacement,
69
+ not only the final steady state.
70
+ 4. If anything fails, fix it within the same card when passing the card's
71
+ existing acceptance outcome necessarily requires that fix. Add the narrowest
72
+ regression test that would have caught it, rerun the focused suite, then rerun
73
+ the broader affected contracts. Do not merely describe a defect and stop
74
+ while a safe in-scope fix remains.
75
+ 5. Repeat adversarial review after the fix. A first green rerun is evidence, not
76
+ automatic sign-off.
77
+
78
+ Keep the card in its QA column throughout this loop unless the user or board
79
+ policy explicitly asks for a bounce. Never hide an incomplete pass by moving it
80
+ forward.
81
+
82
+ ## Visual QA requires visual evidence
83
+
84
+ Use Playwright for every user-facing change. A DOM assertion or source review
85
+ does not establish that the screen is visually correct.
86
+
87
+ - Record a WebM video of the real interaction and take screenshots of the states
88
+ that decide the criterion. Enable action annotations or chapter markers when
89
+ they make the recording easier for the human reviewer to follow.
90
+ - Measure duration, MIME type, size, and hash from the finalized media file
91
+ before upload. Never declare the interaction stopwatch as the video duration:
92
+ recorder startup/finalization can make those values differ. Reject the
93
+ receipt when a checkpoint falls outside the measured media duration or the
94
+ declared metadata does not match the finalized file.
95
+ - In QA2, inspect the QA1 recording as prior evidence, then record a new QA2
96
+ replay. Keep both attached to their exact gate and column-history dwell. Never
97
+ reuse, replace, or relabel the QA1 media as QA2 evidence.
98
+ - Give each concurrent QA agent an isolated synthetic account or an explicit
99
+ exclusive lease on the shared account. For stateful journeys, create and read
100
+ back a unique server resource (for example, a conversation id) and address it
101
+ directly; never rely on the newest active resource. An unexpected request,
102
+ turn, or mutation from outside the recorded browser makes the run ambiguous
103
+ and therefore a failure, not evidence.
104
+ - Inspect the rendered screenshots yourself at the target viewport. Check
105
+ alignment, clipping, wrapping, whitespace, stacking, focus, disabled/loading
106
+ behavior, and whether badges and controls line up with neighboring content.
107
+ - Capture the browser console, page errors, failed requests, and the relevant
108
+ network responses. Distinguish an expected simulated failure from an
109
+ unexpected product error.
110
+ - Cover normal, empty, loading, error, and recovery states when they exist. Test
111
+ both hosted Starfield and the packaged desktop app when both ship the changed
112
+ renderer.
113
+ - When governed QA evidence is available, attach the screenshot/video to the
114
+ card's exact open QA dwell with the environment and build SHA. Until that
115
+ surface is deployed, retain the files and record their paths or durable run
116
+ links without pretending they were attached.
117
+ - Reopen both uploaded gate recordings before handoff. Prove each fresh
118
+ short-lived URL loads and that each video can play, seek, and enter
119
+ fullscreen; an upload response alone is not a media pass.
120
+
121
+ ## Manage cards as outcomes, not bug counters
122
+
123
+ - A defect required to satisfy the current card stays on that card. Fix it and
124
+ retest there; do not create a new Up Next card merely because QA found it.
125
+ - Create a separate card only for an independently releasable outcome outside
126
+ the current acceptance scope. Search the whole board first. If a likely
127
+ duplicate already exists, identify the pair and let a human collapse it; do
128
+ not delete or merge cards on your own judgement.
129
+ - A new card needs a concrete title, reproduction/context, first-class
130
+ acceptance criteria, and no invented assignee. Move it through the ordinary
131
+ workflow instead of placing it directly in a protected QA or done column.
132
+ - Keep findings, fixes, and evidence on the canonical card. Do not rewrite the
133
+ original body to make the request match what was discovered.
134
+
135
+ ## Promotion and the human handoff
136
+
137
+ Local verification comes before CI. Keep incomplete pull requests draft, seek
138
+ an independent code review for consequential fixes, make the PR ready only
139
+ after local evidence is clean, and merge only after the applicable protected
140
+ checks pass. Verify the cumulative staging deployment rather than treating a
141
+ merge as deployment proof.
142
+
143
+ When QA2 is clean:
144
+
145
+ 1. Tick only criteria actually executed in the current dwell, with concise
146
+ evidence naming commands or run links, exact counts, environment, build SHA,
147
+ and any material caveat.
148
+ 2. Add one concise final card comment summarizing the fixes and the last clean
149
+ rerun. Comments preserve the audit trail; they never replace the fix.
150
+ 3. Confirm the derived `Ready for review` badge appears and aligns correctly in
151
+ both the card and detail view. Never edit an emoji into the title; a derived
152
+ badge disappears correctly after a bounce.
153
+ 4. Leave the card in Staging QA2. An agent must not move it to Ready to Ship or
154
+ Production. Ready to Ship is the human's acceptance of both AI receipts.
155
+ 5. Treat Production as a separate claim: the approved release is live, its exact
156
+ delivery evidence is known, and release notes may now include it. A board
157
+ column alone is not exact-SHA proof.
158
+
159
+ If the badge does not appear, identity is ambiguous, evidence belongs to an old
160
+ dwell, a criterion is open, CI is incomplete, or the deployed behavior differs,
161
+ the card is not ready. Fix the cause and rerun; never use an override to make the
162
+ handoff look complete.
163
+
164
+ ## Report while working
165
+
166
+ Keep the human informed with concrete state: current QA2 count, cards clean,
167
+ cards in fix/retest, newly found defects, and deployment/desktop readiness. Do
168
+ not announce that the app is ready to inspect until the required API migration,
169
+ hosted build, packaged desktop version, relaunch, and final Playwright video pass
170
+ are actually complete.
171
+
172
+ At handoff report:
173
+
174
+ - card and current column;
175
+ - criteria executed and the final evidence;
176
+ - defects found, fixes made, and independent review result;
177
+ - exact staging/production/desktop build state;
178
+ - whether the `Ready for review` badge is visible;
179
+ - any genuinely separate follow-up card.
@@ -9,6 +9,10 @@ This is the loop a coding agent actually runs: read a card, do the work, move
9
9
  the card. The part people get wrong is the last step — work that lands with the
10
10
  board untouched is work nobody can see.
11
11
 
12
+ If the card is already in Staging QA1 or Staging QA2, use `qa-the-card` instead.
13
+ QA is a fresh independent verification and fix-and-retest loop, not the ordinary
14
+ implementation-and-submit path below.
15
+
12
16
  ## Pick up
13
17
 
14
18
  1. `list_my_work_items` — **start here.** It answers "what is mine", across every
@@ -110,6 +114,28 @@ Two things to carry back to the card:
110
114
  session), so the next person at aligning can ask you what you meant; what it
111
115
  must not arrive with is a list of outcomes nobody can check.
112
116
 
117
+ ## Tick what you ran
118
+
119
+ Before you move the card on, tick the criteria you actually executed, with
120
+ `satisfy_work_item_acceptance_criterion` and the evidence in `note` — a build
121
+ number, a run link, the caveat that makes it honest. An untouched checkbox says
122
+ nothing about whether the check passed; it says nobody has been near it, which
123
+ is the same thing an abandoned card says.
124
+
125
+ Ticking from a build column records `claimed`, not `verified`. At a QA gate, an
126
+ authenticated human may verify even when they own the card or authored the
127
+ criterion: the human is the accountable exception when one person operates the
128
+ workspace. An agent verifies only when its credential differs from the
129
+ criterion author, and QA2 requires a different agent credential from the one
130
+ whose clean receipt opened QA1. One AI cannot certify both gates. Tick anyway
131
+ when the result is `claimed` — it is a real state that says the work is believed
132
+ done and tells QA what to rerun. Never tick a box you did not execute merely to
133
+ improve the count.
134
+
135
+ If a tick turns out to be wrong, `unsatisfy_work_item_acceptance_criterion`
136
+ takes it off. It clears the note with it, so if the evidence is worth keeping,
137
+ put it on the card with `comment_on_work_item` first.
138
+
113
139
  ## Submit it
114
140
 
115
141
  When the change is ready for review, `move_work_item` it onward — no `claim`
@@ -129,11 +155,11 @@ The tool refuses placeholder reasons — "moved", "update", "Moved to another
129
155
  column" — on purpose: a history full of those looks like an audit trail, so
130
156
  nobody goes looking for the real answer, which is worse than no history at all.
131
157
 
132
- **Do not move a card into the terminal column** `Production` on a default
133
- board, or whatever the last column is called on this one. That is a human's call:
134
- the person who reported it, or the reviewer. An agent marking its own work
135
- complete is the one move on this board that nobody can trust. Stop at the review
136
- or QA column and say it is ready.
158
+ **Do not move a card into `Ready to Ship` or `Production`.** Ready to Ship is the
159
+ human's final acceptance of both AI QA receipts. Production is a separate,
160
+ stronger claim that the release is actually live and eligible for release
161
+ notes. In QA1, an independent agent may advance a clean card to QA2; in QA2,
162
+ document the second pass and leave the `🏁 Ready for review` card for the human reviewer.
137
163
 
138
164
  ## Writes
139
165
 
@@ -239,9 +239,22 @@ const IDEMPOTENT_WRITES = new Set([
239
239
  // Every Starfield board write is governed by a required idempotency key.
240
240
  // Retrying the same key replays; it never appends a second transition,
241
241
  // comment, criterion, or card.
242
- 'move_work_item', 'set_work_board_column_wip_limit', 'set_work_item_tag', 'set_work_item_kind',
242
+ 'move_work_item', 'transfer_work_item_between_boards', 'set_work_board_column_wip_limit', 'set_work_item_tag', 'set_work_item_kind',
243
243
  'create_work_item', 'comment_on_work_item', 'flag_work_item',
244
244
  'add_work_item_acceptance_criterion',
245
+ // Ticking and un-ticking are both genuinely idempotent, and for different
246
+ // reasons worth keeping straight: a repeat tick is a no-op because the server
247
+ // only writes the ticker, column and note where they were empty, and a repeat
248
+ // un-tick clears columns that are already NULL. Neither can compound.
249
+ 'satisfy_work_item_acceptance_criterion', 'record_work_item_criterion_engineering_proof',
250
+ 'unsatisfy_work_item_acceptance_criterion',
251
+ 'claim_work_item_qa_pass',
252
+ 'claim_next_work_item_qa_pass',
253
+ 'heartbeat_work_item_qa_pass',
254
+ 'attach_work_item_qa_evidence',
255
+ 'verify_work_item_qa_evidence_playback',
256
+ 'record_work_item_qa_failure_and_release',
257
+ 'requeue_work_item_qa_after_fix',
245
258
  ]);
246
259
 
247
260
  // Non-read tools that create new state / have side effects each call.
@@ -255,6 +268,7 @@ const NON_IDEMPOTENT_WRITES = new Set([
255
268
  'warmup_email', 'schedule_demo', 'schedule_meeting', 'connect_workspace',
256
269
  'enable_toolset', 'track_conversion', 'log_interaction', 'test_webhook',
257
270
  'replay_webhook_delivery', 'upgrade_account',
271
+ 'release_work_item_qa_pass',
258
272
  ]);
259
273
 
260
274
  // Tools that reach beyond the workspace (external enrichment, web, providers).
@@ -0,0 +1,31 @@
1
+ /** Read-only, product-visible health for Starfield's source-control ingestion. */
2
+ export function registerSourceControlTools(server, { z, api, ok }) {
3
+ server.tool(
4
+ 'list_source_control_connections',
5
+ 'List source-control connections with repository binding count, last durably acknowledged delivery, rejection state, actionable health, and the exact webhook events that are safe to enable.',
6
+ {},
7
+ async () => {
8
+ const response = await api('GET', '/api/v1/scm/connections');
9
+ return ok({ connections: response?.data ?? response ?? [] });
10
+ }
11
+ );
12
+
13
+ server.tool(
14
+ 'get_source_control_connection_events',
15
+ 'Read the recent persisted delivery and attention ledger for one source-control connection. This is the evidence for whether GitHub reached Starfield; service logs are not a substitute.',
16
+ {
17
+ connectionId: z.string().describe('Source-control connection id.'),
18
+ limit: z.number().int().min(1).max(200).optional().describe('Newest events to return; defaults to 50, maximum 200.'),
19
+ },
20
+ async ({ connectionId, limit }) => {
21
+ const suffix = limit === undefined ? '' : `?limit=${limit}`;
22
+ const response = await api('GET', `/api/v1/scm/connections/${encodeURIComponent(connectionId)}/events${suffix}`);
23
+ return ok({ events: response?.data ?? response ?? [] });
24
+ }
25
+ );
26
+ }
27
+
28
+ export const SOURCE_CONTROL_TOOL_NAMES = [
29
+ 'list_source_control_connections',
30
+ 'get_source_control_connection_events',
31
+ ];