@mastra/factory 0.28.0-alpha.4 → 0.28.0-alpha.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.
- package/README.md +52 -28
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +12 -6
- package/dist/auth.js.map +1 -1
- package/dist/boards/board-writes.d.ts.map +1 -1
- package/dist/boards/board-writes.js +6 -7
- package/dist/boards/board-writes.js.map +1 -1
- package/dist/boards/index.d.ts +1 -1
- package/dist/boards/index.d.ts.map +1 -1
- package/dist/boards/index.js +2 -2
- package/dist/boards/project-boards.d.ts +30 -4
- package/dist/boards/project-boards.d.ts.map +1 -1
- package/dist/boards/project-boards.js +71 -19
- package/dist/boards/project-boards.js.map +1 -1
- package/dist/boards/registry.d.ts +7 -1
- package/dist/boards/registry.d.ts.map +1 -1
- package/dist/boards/registry.js +16 -3
- package/dist/boards/registry.js.map +1 -1
- package/dist/boards/semantics.d.ts +5 -4
- package/dist/boards/semantics.d.ts.map +1 -1
- package/dist/boards/semantics.js +5 -4
- package/dist/boards/semantics.js.map +1 -1
- package/dist/boards/work-migrations.d.ts +4 -3
- package/dist/boards/work-migrations.d.ts.map +1 -1
- package/dist/boards/work-migrations.js +6 -5
- package/dist/boards/work-migrations.js.map +1 -1
- package/dist/boards/work-seeds.d.ts +9 -0
- package/dist/boards/work-seeds.d.ts.map +1 -0
- package/dist/boards/work-seeds.js +56 -0
- package/dist/boards/work-seeds.js.map +1 -0
- package/dist/boards/work.d.ts +2 -2
- package/dist/boards/work.d.ts.map +1 -1
- package/dist/boards/work.js +0 -16
- package/dist/boards/work.js.map +1 -1
- package/dist/factory.d.ts +8 -4
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +33 -73
- package/dist/factory.js.map +1 -1
- package/dist/feed-events.d.ts +4 -4
- package/dist/feed-events.d.ts.map +1 -1
- package/dist/feed-events.js +6 -6
- package/dist/feed-events.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/integrations/base.d.ts +0 -11
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/linear/agent-tools.d.ts.map +1 -1
- package/dist/integrations/linear/agent-tools.js +1 -1
- package/dist/integrations/linear/agent-tools.js.map +1 -1
- package/dist/integrations/slack/integration.d.ts +0 -2
- package/dist/integrations/slack/integration.d.ts.map +1 -1
- package/dist/integrations/slack/integration.js +0 -5
- package/dist/integrations/slack/integration.js.map +1 -1
- package/dist/integrations/slack/run-error-card.js +1 -0
- package/dist/integrations/slack/run-error-card.js.map +1 -1
- package/dist/integrations/slack/slack.d.ts +3 -18
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/slack/slack.js +3 -74
- package/dist/integrations/slack/slack.js.map +1 -1
- package/dist/links.d.ts +1 -2
- package/dist/links.d.ts.map +1 -1
- package/dist/links.js +1 -2
- package/dist/links.js.map +1 -1
- package/dist/provider-display-name.d.ts.map +1 -1
- package/dist/provider-display-name.js +1 -0
- package/dist/provider-display-name.js.map +1 -1
- package/dist/routes/attention-providers.d.ts +0 -25
- package/dist/routes/attention-providers.d.ts.map +1 -1
- package/dist/routes/attention-providers.js +2 -150
- package/dist/routes/attention-providers.js.map +1 -1
- package/dist/routes/attention.d.ts +0 -2
- package/dist/routes/attention.d.ts.map +1 -1
- package/dist/routes/attention.js +2 -13
- package/dist/routes/attention.js.map +1 -1
- package/dist/routes/config.d.ts +7 -1
- package/dist/routes/config.d.ts.map +1 -1
- package/dist/routes/config.js +105 -22
- package/dist/routes/config.js.map +1 -1
- package/dist/routes/contracts.d.ts +6 -14
- package/dist/routes/contracts.d.ts.map +1 -1
- package/dist/routes/contracts.js +4 -2
- package/dist/routes/contracts.js.map +1 -1
- package/dist/routes/feed-events.d.ts +15 -0
- package/dist/routes/feed-events.d.ts.map +1 -0
- package/dist/routes/feed-events.js +68 -0
- package/dist/routes/feed-events.js.map +1 -0
- package/dist/routes/knowledge.js +1 -1
- package/dist/routes/mastra-gateway.d.ts +19 -0
- package/dist/routes/mastra-gateway.d.ts.map +1 -0
- package/dist/routes/mastra-gateway.js +120 -0
- package/dist/routes/mastra-gateway.js.map +1 -0
- package/dist/routes/projects.d.ts +1 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +1 -1
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/provider-credentials.d.ts +6 -1
- package/dist/routes/provider-credentials.d.ts.map +1 -1
- package/dist/routes/provider-credentials.js +32 -2
- package/dist/routes/provider-credentials.js.map +1 -1
- package/dist/routes/route.d.ts +6 -0
- package/dist/routes/route.d.ts.map +1 -1
- package/dist/routes/route.js.map +1 -1
- package/dist/routes/surface.d.ts +0 -7
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +1 -5
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/tenant-credentials.d.ts.map +1 -1
- package/dist/routes/tenant-credentials.js +5 -1
- package/dist/routes/tenant-credentials.js.map +1 -1
- package/dist/routes/work-items.d.ts +0 -3
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +0 -1
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/dispatcher.d.ts +0 -3
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +5 -7
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/run-error.d.ts +1 -1
- package/dist/run-error.d.ts.map +1 -1
- package/dist/run-error.js +38 -5
- package/dist/run-error.js.map +1 -1
- package/dist/session/live-sessions.d.ts +11 -4
- package/dist/session/live-sessions.d.ts.map +1 -1
- package/dist/session/live-sessions.js +31 -10
- package/dist/session/live-sessions.js.map +1 -1
- package/dist/storage/domains/audit/actions.d.ts +1 -1
- package/dist/storage/domains/audit/actions.d.ts.map +1 -1
- package/dist/storage/domains/audit/actions.js +0 -4
- package/dist/storage/domains/audit/actions.js.map +1 -1
- package/dist/storage/domains/boards/base.d.ts +15 -1
- package/dist/storage/domains/boards/base.d.ts.map +1 -1
- package/dist/storage/domains/boards/base.js +21 -5
- package/dist/storage/domains/boards/base.js.map +1 -1
- package/dist/storage/domains/channel-identity/base.d.ts +0 -4
- package/dist/storage/domains/channel-identity/base.d.ts.map +1 -1
- package/dist/storage/domains/channel-identity/base.js +0 -7
- package/dist/storage/domains/channel-identity/base.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +12 -17
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +42 -117
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/storage/domains/work-items/board-version.d.ts +6 -2
- package/dist/storage/domains/work-items/board-version.d.ts.map +1 -1
- package/dist/storage/domains/work-items/board-version.js +20 -9
- package/dist/storage/domains/work-items/board-version.js.map +1 -1
- package/dist/storage/domains/work-items/cards.d.ts +3 -3
- package/dist/storage/domains/work-items/cards.d.ts.map +1 -1
- package/dist/storage/domains/work-items/cards.js +10 -10
- package/dist/storage/domains/work-items/cards.js.map +1 -1
- package/dist/storage/domains/work-items/work-item-schema.d.ts +1 -2
- package/dist/storage/domains/work-items/work-item-schema.d.ts.map +1 -1
- package/dist/storage/domains/work-items/work-item-schema.js +8 -8
- package/dist/storage/domains/work-items/work-item-schema.js.map +1 -1
- package/dist/tools/read-tools.d.ts +0 -2
- package/dist/tools/read-tools.d.ts.map +1 -1
- package/dist/tools/read-tools.js +3 -14
- package/dist/tools/read-tools.js.map +1 -1
- package/dist/tools/work-item-tools.d.ts +0 -3
- package/dist/tools/work-item-tools.d.ts.map +1 -1
- package/dist/tools/work-item-tools.js +8 -18
- package/dist/tools/work-item-tools.js.map +1 -1
- package/dist/work-items/create-work-item.d.ts.map +1 -1
- package/dist/work-items/create-work-item.js +3 -2
- package/dist/work-items/create-work-item.js.map +1 -1
- package/dist/work-items/description-context.d.ts +5 -0
- package/dist/work-items/description-context.d.ts.map +1 -0
- package/dist/work-items/description-context.js +17 -0
- package/dist/work-items/description-context.js.map +1 -0
- package/dist/work-items/split-migration.d.ts.map +1 -1
- package/dist/work-items/split-migration.js +1 -6
- package/dist/work-items/split-migration.js.map +1 -1
- package/factory-skills/configure-factory-rules/SKILL.md +3 -3
- package/factory-skills/factory-gitlab-rereview/SKILL.md +4 -4
- package/factory-skills/factory-gitlab-review/SKILL.md +5 -5
- package/factory-skills/factory-rereview/SKILL.md +70 -24
- package/factory-skills/factory-review/SKILL.md +70 -24
- package/factory-skills/factory-self-review/SKILL.md +5 -6
- package/factory-skills/factory-triage/SKILL.md +11 -22
- package/package.json +8 -8
- package/dist/integrations/slack/emoji-shortcodes.generated.d.ts +0 -8
- package/dist/integrations/slack/emoji-shortcodes.generated.d.ts.map +0 -1
- package/dist/integrations/slack/emoji-shortcodes.generated.js +0 -1984
- package/dist/integrations/slack/emoji-shortcodes.generated.js.map +0 -1
- package/dist/integrations/slack/emoji.d.ts +0 -3
- package/dist/integrations/slack/emoji.d.ts.map +0 -1
- package/dist/integrations/slack/emoji.js +0 -11
- package/dist/integrations/slack/emoji.js.map +0 -1
- package/dist/integrations/slack/feed-publisher.d.ts +0 -26
- package/dist/integrations/slack/feed-publisher.d.ts.map +0 -1
- package/dist/integrations/slack/feed-publisher.js +0 -43
- package/dist/integrations/slack/feed-publisher.js.map +0 -1
- package/dist/routes/attention-activity.d.ts +0 -23
- package/dist/routes/attention-activity.d.ts.map +0 -1
- package/dist/routes/attention-activity.js +0 -154
- package/dist/routes/attention-activity.js.map +0 -1
- package/dist/storage/domains/comments/activity.d.ts +0 -40
- package/dist/storage/domains/comments/activity.d.ts.map +0 -1
- package/dist/storage/domains/comments/activity.js +0 -93
- package/dist/storage/domains/comments/activity.js.map +0 -1
- package/dist/storage/domains/comments/actor.d.ts +0 -51
- package/dist/storage/domains/comments/actor.d.ts.map +0 -1
- package/dist/storage/domains/comments/actor.js +0 -37
- package/dist/storage/domains/comments/actor.js.map +0 -1
- package/dist/storage/domains/comments/base.d.ts +0 -245
- package/dist/storage/domains/comments/base.d.ts.map +0 -1
- package/dist/storage/domains/comments/base.js +0 -539
- package/dist/storage/domains/comments/base.js.map +0 -1
- package/dist/storage/domains/comments/domain.d.ts +0 -135
- package/dist/storage/domains/comments/domain.d.ts.map +0 -1
- package/dist/storage/domains/comments/domain.js +0 -284
- package/dist/storage/domains/comments/domain.js.map +0 -1
- package/dist/storage/domains/comments/feed-context.d.ts +0 -22
- package/dist/storage/domains/comments/feed-context.d.ts.map +0 -1
- package/dist/storage/domains/comments/feed-context.js +0 -88
- package/dist/storage/domains/comments/feed-context.js.map +0 -1
- package/dist/storage/domains/comments/feed-sync.d.ts +0 -21
- package/dist/storage/domains/comments/feed-sync.d.ts.map +0 -1
- package/dist/storage/domains/comments/feed-sync.js +0 -1
- package/dist/storage/domains/comments/parse.d.ts +0 -23
- package/dist/storage/domains/comments/parse.d.ts.map +0 -1
- package/dist/storage/domains/comments/parse.js +0 -89
- package/dist/storage/domains/comments/parse.js.map +0 -1
- package/dist/storage/domains/comments/routes.d.ts +0 -24
- package/dist/storage/domains/comments/routes.d.ts.map +0 -1
- package/dist/storage/domains/comments/routes.js +0 -299
- package/dist/storage/domains/comments/routes.js.map +0 -1
- package/dist/storage/domains/comments/schema.d.ts +0 -5
- package/dist/storage/domains/comments/schema.d.ts.map +0 -1
- package/dist/storage/domains/comments/schema.js +0 -178
- package/dist/storage/domains/comments/schema.js.map +0 -1
- package/dist/storage/domains/comments/wire.d.ts +0 -40
- package/dist/storage/domains/comments/wire.d.ts.map +0 -1
- package/dist/storage/domains/comments/wire.js +0 -36
- package/dist/storage/domains/comments/wire.js.map +0 -1
|
@@ -21,7 +21,7 @@ Review the pull request behind this Factory work item — build its history and
|
|
|
21
21
|
|
|
22
22
|
You are working in a bound Factory session. Complete the full review in one pass, then make `factory_record_review_verdict` your terminal step — one call, repeated only if it is rejected and only with the rejection reason addressed. Never wait for or solicit human input mid-run; every judgment call is yours to resolve.
|
|
23
23
|
|
|
24
|
-
**Decision rule:** at every fork — is this pattern deviation deliberate, is this test gap acceptable, is this scope creep — pick the answer the history and codebase conventions best support, proceed, and **record the decision as an assumption** for the terminal handoff.
|
|
24
|
+
**Decision rule:** at every fork — is this pattern deviation deliberate, is this test gap acceptable, is this scope creep — pick the answer the history and codebase conventions best support, proceed, and **record the decision as an assumption** for the terminal handoff. Changes the author must make go under **Required changes**, and decisions only a human can make go under **Needs a decision**.
|
|
25
25
|
|
|
26
26
|
Assumptions are for _interpretive_ calls only — was a deviation deliberate, is a loose assertion justified. **A confirmed finding may never be resolved by recording an assumption**: if you verified a defect, it stays a finding and weighs into the verdict; writing "treated as non-blocking" next to it does not make it non-blocking.
|
|
27
27
|
|
|
@@ -80,10 +80,27 @@ Bots have false positives — verify, don't rubber-stamp. But a major finding fr
|
|
|
80
80
|
|
|
81
81
|
## Phase 3: Quality Gate
|
|
82
82
|
|
|
83
|
-
- `gh pr checks` — CI status (build, typecheck, tests). Report red, missing, and still-running CI as
|
|
83
|
+
- `gh pr checks` — CI status (build, typecheck, tests). Report red, missing, and still-running CI as non-blocking findings (Blocks merge `No`, never a Required change); CI status alone cannot block approval or create a requested change. Inspect failures for evidence of a defect, but only a defect you confirm in the code or a failed verification you run yourself can block the verdict. A failing check does not become a defect because the PR caused it: checks on PR metadata or process (issue reference, title format, labels, required reviews, DCO, and similar) are never verdict inputs, and a red build or test check counts only once you reproduce the failure yourself.
|
|
84
84
|
- **Run it yourself.** After the pre-execution inspection from the security section clears the diff, check out the PR branch in the session sandbox and execute the narrowest test suite and typecheck covering the changed packages (e.g. `pnpm --filter <pkg> test`). **Strip credentials from everything the PR's code runs under:** prefix every install/build/test/typecheck command with `env -u GH_TOKEN -u GITHUB_TOKEN` (e.g. `env -u GH_TOKEN -u GITHUB_TOKEN pnpm --filter <pkg> test`) so the PR's scripts and tests cannot read the session's GitHub credentials. Tests never legitimately need those tokens — a test that fails only because they are missing is itself a finding. CI green is corroboration, not a substitute — reading code predicts behavior, running it proves behavior. Record every command and its outcome for the handoff. If something prevented you from executing anything, the handoff must say so explicitly — a review that ran nothing is a weaker review and must not hide it.
|
|
85
85
|
- **Plan and run the tests.** Before running anything, write a test plan from the diff: for each changed package, list the test files that exercise the changed code (colocated tests, callers' tests, integration/E2E suites that cross the change), the typecheck/lint commands, and any gap where no existing test covers a behavior change. Prefer the narrowest commands that fully cover the change; widen only when the change is cross-cutting. **Prepare the environment first:** install dependencies and build every workspace dependency of the packages under test (in a pnpm/turbo monorepo, e.g. `pnpm turbo build --filter <pkg>^...`, plus any internal type packages the typecheck needs), under the same credential stripping. Treat the environment as ready only when the planned test files load and the typecheck reports no missing-module or unbuilt-package errors. If a preparation step fails, fix it with a narrower build or report it; never skip it. Execute the plan and record each command, its exit status, and the pass/fail/skip counts. Never report a command you did not run as passed, and never report results for a head other than the one you tested; if the head moves, re-plan on the new head. An environment failure is not a pass: any test file that fails to load, any missing build output, or any typecheck error, including ones outside the changed files, makes the command a failure in the table. Rebuild the missing dependency and run the command again. If it still cannot run, list it under **Not run** with the blocker named. Run `git status --porcelain` before the tests and again before posting the test report; if it prints anything, the tree is not the commit under review, so restore it to the head (or report `Verification incomplete` naming the drift) rather than reporting a result for that SHA.
|
|
86
|
-
- **Post the test report.** Before listing, updating, or posting any test report, run the Phase 6 `factory_review_source` cross-check; if the tool is unavailable, fails, returns an unexpected shape, or the target mismatches, post no test report on this PR and record why in the session handoff. After the tests finish, publish one PR comment, separate from the verdict. Start it with `## Factory test report` and never with a `Verdict:` line, because Factory reads verdicts only from the verdict post.
|
|
86
|
+
- **Post the test report.** Before listing, updating, or posting any test report, run the Phase 6 `factory_review_source` cross-check; if the tool is unavailable, fails, returns an unexpected shape, or the target mismatches, post no test report on this PR and record why in the session handoff. After the tests finish, publish one PR comment, separate from the verdict. Start it with `## Factory test report` and never with a `Verdict:` line, because Factory reads verdicts only from the verdict post. A reader should learn the result from the first line and see a green table only when everything on the head passed. Use this shape and nothing more:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
## Factory test report
|
|
90
|
+
|
|
91
|
+
✅ All checks passed on <full head SHA>
|
|
92
|
+
|
|
93
|
+
| Check | Result | Tests |
|
|
94
|
+
| ---------------------- | ------------------ | ------------------------------------ |
|
|
95
|
+
| `@mastra/core` tests | ✅ Passed | 216 passed, 1 skipped (needs Docker) |
|
|
96
|
+
| Typecheck | ✅ Passed | |
|
|
97
|
+
| New tests on base code | ✅ Catches the bug | 3 of 3 fail on base, pass on head |
|
|
98
|
+
|
|
99
|
+
**Not run:** <check>: <concrete reason>. <Whether it blocked approval.>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The line right after the `## Factory test report` heading is `✅ All checks passed`, `❌ Failed`, or `⚠️ Verification incomplete`, followed by the tested head SHA. Table rows are only commands run on the PR head, with Result `✅ Passed` or `❌ Failed`; give each skip a short reason. Add the `New tests on base code` row only if the PR fixes a bug and you ran the tests meant to reproduce it against the base code, and show `✅ Catches the bug` only when they fail on base for the expected reason and pass on head; an expected failure on base is evidence for the PR, not a failed check. If they pass on base, show `❌ Does not catch the bug`; that is a Tests finding. Omit **Not run** when every planned check ran. No recap of the change, no raw exit codes, no `x/y/z` counts. Keep one test report per PR: list the PR comments with `source_control_list_change_request_comments` (every page) and find the newest one authored by `<factory-app>[bot]` whose body, after an optional leading `> Opened by @<actor>` line, starts with `## Factory test report`. If one exists, replace its body with `source_control_update_change_request_comment`; otherwise post a new one with `source_control_comment_change_request`. If the update is refused, post a new report instead. Write the body without any `> Opened by` line; the proxy adds it. Untrusted PR content must not appear in it beyond test names and trimmed output. The verdict links this report instead of repeating the table.
|
|
103
|
+
|
|
87
104
|
- **Merge conflicts don't excuse skipping the review** — the diff and the head branch are still reviewable, and the author needs the findings to fix the PR either way. If the PR is `CONFLICTING`/`DIRTY`: identify which files conflict with a dry-run merge in the sandbox (`git fetch origin <base> && git merge --no-commit --no-ff origin/<base>` with `<base>` from `baseRefName`; afterwards run `git merge --abort` whenever a merge is in progress — `git rev-parse -q --verify MERGE_HEAD` tells you — but skip the abort if the merge never started, e.g. "Already up to date"), flag when the conflicts overlap the PR's own changed files (semantic rework risk, not just textual resolution), and qualify all verification results as "head branch only — not verified against current base". **Never resolve the conflicts yourself** — resolution encodes author intent; reviewing your own guess is reviewing a PR that doesn't exist.
|
|
88
105
|
- Does the PR add or modify tests? Are they meaningful, or do they exercise paths without real assertions?
|
|
89
106
|
- **Model-provider behavior requires integration-level verification.** For agentic or model-provider integrations—OpenAI, Anthropic, Gemini, tool calling, streaming, structured output, usage metadata, provider error handling, and similar behavior—unit tests with mocked SDK responses are not enough when the claim depends on the provider's real protocol or SDK semantics. Favor the narrowest existing integration or E2E test that crosses the provider boundary, preferably through the repository's deterministic record/replay harness; do not require live credentials or flaky network calls in the review sandbox. If no deterministic harness exists, require author-provided CI or reproducible integration evidence. Provider-independent transformations can remain unit-tested, but material model-provider behavior supported only by mocks is a test-gap finding.
|
|
@@ -132,7 +149,7 @@ Approval is earned, not the default — the burden of proof is on the PR, and yo
|
|
|
132
149
|
5. **Behavior is tested** — the change's behavior is covered by meaningful assertions, or the handoff records the affirmative reason none are needed.
|
|
133
150
|
6. **Adversarial check survived** — with its one-line record.
|
|
134
151
|
|
|
135
|
-
The related-issue context and external CI status must still be reported in the handoff, but neither is an approval gate or independently affects the verdict. Treat either as a lead to investigate; it can support request changes only when the review independently confirms a defect or local verification fails.
|
|
152
|
+
The related-issue context and external CI status must still be reported in the handoff, but neither is an approval gate or independently affects the verdict. Treat either as a lead to investigate; it can support request changes only when the review independently confirms a defect in the code or local verification fails. Never request changes to satisfy a CI check, merge policy, or PR-metadata requirement — if those are the only issues, approve and list them as non-blocking findings.
|
|
136
153
|
|
|
137
154
|
If any gate fails, the verdict is request changes. This is the concrete meaning of "the PR earns the approval": the reviewer never grants what the evidence didn't establish.
|
|
138
155
|
|
|
@@ -142,12 +159,12 @@ Do not hedge between the two — pick the verdict the evidence supports. When ge
|
|
|
142
159
|
|
|
143
160
|
Before composing the handoff, call `factory_review_source` (no arguments) once. It returns four fields, every one derived server-side from the bound work item:
|
|
144
161
|
|
|
145
|
-
- `sessionUrl` — the Factory session URL that produced this review. This is the **only** field published on the PR (see the
|
|
162
|
+
- `sessionUrl` — the Factory session URL that produced this review. This is the **only** field published on the PR (see the published body's footer below); it is the value the audience uses to trace a suspicious review back to its run.
|
|
146
163
|
- `triggeredBy` — the PR author recorded on the review card at intake. Do not publish this; it is an in-run cross-check input and a session-handoff entry only.
|
|
147
164
|
- `reviewTarget` — the review card's own `{ integrationId, type, externalId, url }`. Do not publish this; it is an in-run cross-check input and a session-handoff entry only.
|
|
148
165
|
- `boundRepository` — the repository identity stamped on the review card at intake (`{ provider: 'github', repositoryId }` here), or `null` when intake recorded none. Do not publish this; it is the binding-side input to the null-`url` fallback below.
|
|
149
166
|
|
|
150
|
-
If the tool call fails or returns an unexpected shape — **and identically if the tool is not offered on this session at all** (a review-role session with no configured browser-facing origin, no active binding, or no bound work item drops the tool from the toolset) — do **not** publish the review. The required
|
|
167
|
+
If the tool call fails or returns an unexpected shape — **and identically if the tool is not offered on this session at all** (a review-role session with no configured browser-facing origin, no active binding, or no bound work item drops the tool from the toolset) — do **not** publish the review. The required session link can't be filled in with values that don't exist, and a review body without provenance can't be traced back to its run. Stop after Phase 6, record the tool's absence or failure and its raw response in the handoff under **Verification**, and hand off to a human — the verdict step below is skipped in this failure mode.
|
|
151
168
|
|
|
152
169
|
Before drafting the handoff, run the in-run cross-check against the tool's output:
|
|
153
170
|
|
|
@@ -158,22 +175,51 @@ On any mismatch, stop and record it as a blocking security finding with both val
|
|
|
158
175
|
|
|
159
176
|
Compose two artifacts, in order — the **published body** goes on the PR, the **session handoff** goes back into the run's conversation. Don't send either to the conversation yet; both are drafted here, the published body is sent to the PR, the verdict is recorded, and only then is the session handoff posted.
|
|
160
177
|
|
|
161
|
-
The **published body** (what `gh pr review --body-file` receives)
|
|
178
|
+
The **published body** (what `gh pr review --body-file` receives) is what the author reads, often from a notification. Every line has to earn its place: plain words, no jargon, no restating the diff, no praise, nothing about the author. The verdict comes first and the findings come next; anything a reader does not need in order to act or to trust the verdict stays in the session handoff. Use this shape, dropping each optional part that would be empty:
|
|
179
|
+
|
|
180
|
+
```markdown
|
|
181
|
+
## Verdict: request changes
|
|
182
|
+
|
|
183
|
+
Reviewed head: <full 40-character SHA>
|
|
184
|
+
|
|
185
|
+
<One sentence: what blocks the merge, or why it is safe to merge.>
|
|
186
|
+
|
|
187
|
+
| # | Severity | Blocks merge | Type | Finding | Where |
|
|
188
|
+
| --- | --------- | ------------ | ----------- | ------------------------------------------ | ---------------------------------------------------------------------------------------------- |
|
|
189
|
+
| 1 | ●●●○ high | Yes | Correctness | <What breaks, for whom, and why.> | [`stream.ts:42`](https://github.com/<owner>/<repo>/blob/<headSha>/src/stream.ts#L42) |
|
|
190
|
+
| 2 | ●○○○ low | No | Tests | <What is missing and what it would catch.> | [`stream.test.ts:10`](https://github.com/<owner>/<repo>/blob/<headSha>/src/stream.test.ts#L10) |
|
|
191
|
+
|
|
192
|
+
### Required changes
|
|
193
|
+
|
|
194
|
+
1. [`stream.ts:42`](https://github.com/<owner>/<repo>/blob/<headSha>/src/stream.ts#L42): <Imperative change.>
|
|
195
|
+
|
|
196
|
+
### Needs a decision
|
|
197
|
+
|
|
198
|
+
- <Question only a person can answer, and the answer this review assumed.>
|
|
199
|
+
|
|
200
|
+
<details>
|
|
201
|
+
<summary>Review notes</summary>
|
|
202
|
+
|
|
203
|
+
- **Tests:** <The test report's result line (the line after its heading), linked to the report.>
|
|
204
|
+
- **Earlier reviews:** <Reviewer, subject, `file:line`: addressed or refuted, with the evidence in a few words.>
|
|
205
|
+
- **Why approve:** <The strongest case for request changes, and why it fails.>
|
|
206
|
+
|
|
207
|
+
</details>
|
|
162
208
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
- **Issue and intent** — the authorizing issue, PR classification, current approval-label state, and whether the implemented behavior and scope match the independently established contract and approved discussion.
|
|
166
|
-
- **Verification** — every command you executed (tests, typecheck, repros) with its outcome, including base-versus-head evidence for behavior-changing claims, or an explicit statement that something could not be executed and the substitute evidence used.
|
|
167
|
-
- **Existing review disposition** — every substantive finding from prior reviewers (bots included, your own earlier passes included) with its classification: confirmed, addressed, or refuted with evidence. A major bot comment must never be silently dropped. Name each by subject and `file:line`, and remember the body lands as GitHub markdown — `#1` publishes as a link to issue 1.
|
|
168
|
-
- **Adversarial check** (approve only) — the one-line record of why the strongest request-changes case fails.
|
|
169
|
-
- **Requested changes** — one entry per change (for a request-changes verdict), imperative and present tense: the file and line, the change, and the consequence or evidence in one or two sentences. Put the change that most affects correctness first; group changes that must land together or state their dependencies. No softened requests ("consider", "you might want to"), no optional or follow-up tiers, no pleasantries, nothing about the author. Preserve qualifications that express real limits of evidence — "the contract does not guarantee this field" must not become "servers never return this field".
|
|
170
|
-
- **Assumptions** — every recorded judgment call from the run.
|
|
171
|
-
- **Open questions** — any decision that genuinely needs a human.
|
|
172
|
-
- **Factory Session** — `sessionUrl` from `factory_review_source`, verbatim, as a link. **Nothing else in this block.** `triggeredBy` and `reviewTarget` are cross-check inputs for the run and go in the session handoff below; they are never published on the PR. This section is required for every verdict and every fallback (approve, request changes, comment fallback) so a suspicious review — one that lands on the wrong PR, or approves and requests changes at once — can always be traced back to the run that produced it.
|
|
209
|
+
<sub>[Factory session](sessionUrl) · Review runtime: <model>, reasoning setting: <reasoning>.</sub>
|
|
210
|
+
```
|
|
173
211
|
|
|
174
|
-
|
|
212
|
+
- **Verdict.** Line 1 is exactly `## Verdict: approve` or `## Verdict: request changes`, and line 2 is `Reviewed head: <full 40-character SHA>` naming the exact head you verified. Factory parses both lines, so add nothing else to them.
|
|
213
|
+
- **Summary.** One sentence of at most 25 words. On request changes, name what blocks the merge; on approve, say why it is safe to merge. Never "LGTM" or a description of the PR.
|
|
214
|
+
- **Findings table.** One row per finding, ranked: blocking rows first, then by severity. Severity uses the triage dot scale, dots then the word: `●○○○ low`, `●●○○ medium`, `●●●○ high`, `●●●● critical`. Blocks merge is `Yes` or `No`; severity and blocking are separate calls (a missing regression test can be medium and still block). Type is one of Correctness, Security, Tests, Design, Scope, Compatibility, Docs, Merge conflict, or Verification (the review could not complete verification; name the blocker and do not present it as a defect in the author's code). Finding states the problem and its consequence in at most 25 words; keep the evidence for the session handoff unless one clause of it is needed to believe the row. Where is a linked `file:line` (see **Link every code reference**), or `—` when the finding has no single location. A confirmed finding from another reviewer is a row too, crediting them: "(raised by coderabbitai)". A non-blocking row fixed by the follow-up PR ends with "Fixed in the follow-up PR." A design or scope disagreement with your Phase 1 record is a Design or Scope row, not a separate section. With no findings, write `No findings.` instead of the table.
|
|
215
|
+
- **Required changes** (request changes only). One numbered entry per change, in table order: the linked `file:line`, then one sentence, imperative and present tense. The table already carries the consequence, so don't repeat it. Put changes that must land together in one entry. For a conflicting PR, one entry is "Resolve merge conflicts against `<base>`.", noting when the conflicts overlap the PR's own files. No softened requests ("consider", "you might want to"), no optional or follow-up tiers, no pleasantries. Preserve qualifications that express real limits of evidence: "the contract does not guarantee this field" must not become "servers never return this field".
|
|
216
|
+
- **Needs a decision.** Only questions that genuinely need a person. Omit the section otherwise.
|
|
217
|
+
- **Review notes.** Collapsed, and only what a reader may need to trust the verdict. **Tests** is always present. **Earlier reviews** lists only prior findings (bots included) that are addressed or refuted; confirmed ones are table rows. Omit it when there are none. **Why approve** is the one-line adversarial check record, approve only. Nothing else goes here.
|
|
218
|
+
- **Link every code reference.** Each `file:line` in the published body is a link to that line at the reviewed head: `[`stream.ts:42`](https://github.com/<owner>/<repo>/blob/<headSha>/src/stream.ts#L42)`, with `#L40-L44` for a range. Use the full head SHA in the URL, never a branch name, so the link still shows what you reviewed after more pushes. Show the shortest path that is unambiguous in the PR (usually the file name) as the link text; the link carries the full path. A reference to a removed line links to the base SHA instead. A change with no code location (an unpushed branch, a failed check, a verification gap) gets no link: state the change in one sentence. A reference to another reviewer's comment links to that comment.
|
|
219
|
+
- **GitHub markdown.** `#1` publishes as a link to issue 1, so name findings by subject and `file:line`, never by `#n`.
|
|
220
|
+
- **Footer.** `sessionUrl` from `factory_review_source`, verbatim, as the Factory session link. It is the only routing fact published: `triggeredBy`, `reviewTarget`, and `boundRepository` are cross-check inputs for the run and are never published on the PR. The footer is required on every verdict and every fallback (approve, request changes, comment fallback), so a suspicious review — one that lands on the wrong PR, or approves and requests changes at once — can always be traced back to the run that produced it. Copy both runtime values verbatim from the current `factory-phase` signal.
|
|
175
221
|
|
|
176
|
-
The **session handoff** (posted as the final conversation message after the verdict is recorded)
|
|
222
|
+
The **session handoff** (posted as the final conversation message after the verdict is recorded) is the full record. It is the published body followed by a **Run record** with: **Approach** (the required outcome and simplest sufficient design from your Phase 1 record, and whether the PR's approach and scope are justified against it), **Issue and intent** (the authorizing issue, PR classification, current approval-label state, and whether the implemented behavior and scope match the independently established contract and approved discussion), **Findings evidence** (the mechanism and evidence behind each table row, grounded in the history you traced), **Verification** (every command you executed (tests, typecheck, repros) with its outcome, including base-versus-head evidence for behavior-changing claims, or what could not be executed and the substitute evidence used; plus how the verdict was published: new review, edit, or comment fallback), **Existing review disposition** (every substantive prior finding, bots and your own earlier passes included, classified confirmed, addressed, or refuted with evidence), and **Assumptions** (every recorded judgment call from the run). Then append a **Factory routing** block with `triggeredBy` verbatim, `reviewTarget` verbatim (`integrationId`, `type`, `externalId`, `url`), `boundRepository` verbatim, and the cross-check outcome — "matched" with the compared value from Phase 1, or "mismatch: <blocking-finding-ref>" if the check produced the blocking security finding above.
|
|
177
223
|
|
|
178
224
|
**The head must not have moved.** Immediately before publishing, run `gh pr view <number> --json headRefOid --jq .headRefOid` and compare it with the SHA your verification ran on (`git rev-parse HEAD`). A push can land while you verify or wait on bots, and a verdict on a superseded head misleads the author. If the head moved, do not publish: refresh the checkout to the new head, review the new commits and re-run the verification they affect, revise the handoff, then check again. Name the reviewed head SHA in the handoff.
|
|
179
225
|
|
|
@@ -181,10 +227,10 @@ Next, publish the review on the PR itself — this is part of every pass, not so
|
|
|
181
227
|
|
|
182
228
|
**Gate the file immediately before posting.** Run these checks against the exact file you are about to pass to `--body-file`, and post nothing if any fails — regenerate the body from this pass's findings instead:
|
|
183
229
|
|
|
184
|
-
1. `head -n1 <file>` is exactly
|
|
230
|
+
1. `head -n1 <file>` is exactly `## Verdict: approve` when you will use `--approve`, or exactly `## Verdict: request changes` when you will use `--request-changes`.
|
|
185
231
|
2. The `Reviewed head:` SHA in the file equals `gh pr view <number> --json headRefOid --jq .headRefOid` and the `reviewedHeadSha` you will pass to `factory_record_review_verdict`.
|
|
186
232
|
|
|
187
|
-
**Update your earlier verdict instead of stacking a new one.** Before posting, find your latest verdict post on this PR. List `gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate` and `gh api repos/<owner>/<repo>/issues/<number>/comments --paginate`, keep entries whose `.user.login` is `<factory-app>[bot]` and whose body (after an optional leading `> Opened by @<actor>` line) starts with `Verdict:`, drop reviews in state `DISMISSED`, and take the newest. Then:
|
|
233
|
+
**Update your earlier verdict instead of stacking a new one.** Before posting, find your latest verdict post on this PR. List `gh api repos/<owner>/<repo>/pulls/<number>/reviews --paginate` and `gh api repos/<owner>/<repo>/issues/<number>/comments --paginate`, keep entries whose `.user.login` is `<factory-app>[bot]` and whose body (after an optional leading `> Opened by @<actor>` line) starts with `Verdict:` or `## Verdict:`, drop reviews in state `DISMISSED`, and take the newest. Then:
|
|
188
234
|
|
|
189
235
|
- Your verdict is request changes and the PR author (REST `.user.login`) is not `<factory-app>[bot]`: post a new verdict. Edits send no notification and do not complete a pending re-review request, so a human author would never learn the pass finished.
|
|
190
236
|
- The latest is a PR comment and you are publishing as a comment (misconfiguration or fallback below): edit it with `gh api -X PATCH repos/<owner>/<repo>/issues/comments/<id> -F body=@<file>`.
|
|
@@ -201,7 +247,7 @@ When you are not editing, submit a PR review matching the verdict:
|
|
|
201
247
|
|
|
202
248
|
**Author-identity misconfiguration must be visible, never silent.** GitHub refuses both approve and request changes from the PR's author, so a review token that authored the PR can never record a verdict in `reviewDecision` or satisfy branch protection. Before submitting, compare the reviewing identity (`gh api user --jq .login`; for an App installation token that call may fail — then treat a submission rejected with GitHub's "Can not approve/request changes on your own pull request" error as the same signal) with the PR author login from the REST lookup in the in-run cross-check (`.user.login`, never `gh pr view`'s `.author.login`, which formats App authors as `app/<slug>` and would hide a match). When they match:
|
|
203
249
|
|
|
204
|
-
1. Add this line to the published body immediately after the `Reviewed head:` line (the verdict line stays first and `Reviewed head:` stays second): `> ⚠️ **Factory misconfiguration:** the review token is the PR author, so GitHub cannot record this verdict as
|
|
250
|
+
1. Add this line to the published body immediately after the `Reviewed head:` line (the verdict line stays first and `Reviewed head:` stays second): `> ⚠️ **Factory misconfiguration:** the review token is the PR author, so GitHub cannot record this verdict as a review or count it toward branch protection. Configure a separate reviewer token for Factory reviews.`
|
|
205
251
|
2. Publish with `gh pr comment <number> --body-file <file>`. Keep the verdict line first, as above: Factory wakes the author on a request-changes verdict only from a comment, or from a `COMMENTED` review Factory posted on its own PR, whose first line (after the proxy's `> Opened by` line) is the verdict.
|
|
206
252
|
3. Report the misconfiguration and the publish method under **Verification** and in the **Factory routing** block of the handoff.
|
|
207
253
|
|
|
@@ -216,13 +262,13 @@ After publishing, reconcile the verdict label: approve adds `status:auto-approve
|
|
|
216
262
|
1. Branch from the reviewed PR's head: `git fetch origin pull/<number>/head && git checkout -b factory/review-followups-pr-<number> FETCH_HEAD`.
|
|
217
263
|
2. Apply the fixes, run the narrowest tests covering them, and commit. **Credit the human whose work these commits build on.** The reviewed PR's `author` (from the Phase 1 `gh pr view --json` call) tells you who: when `is_bot` is false, add a `Co-Authored-By: <login> <ID+<login>@users.noreply.github.com>` trailer to every commit, resolving `ID` with `gh api users/<login> --jq .id`. When the author is a bot — the Factory's own pull requests are — credit the reporter of the issue the PR closes instead, if it links one. Credit nobody rather than guess at an identity: a trailer naming the wrong account is worse than no trailer.
|
|
218
264
|
3. Push the branch and open a follow-up PR with `gh pr create`: target the reviewed PR's head branch when it lives in this repository, so the author can merge the follow-ups into their PR with one click; when the reviewed PR comes from a fork, target its base branch instead and state in the body that it lands after PR <number>.
|
|
219
|
-
4. Write the follow-up body to `.artifacts/factory-review/follow-up-pr-<number>.md`; it links the review and lists each finding it addresses, and the handoff links the follow-up PR.
|
|
265
|
+
4. Write the follow-up body to `.artifacts/factory-review/follow-up-pr-<number>.md`; it links the review and lists each finding it addresses in one line each, with no other sections, and the handoff links the follow-up PR.
|
|
220
266
|
|
|
221
267
|
Keep it strictly non-blocking and low-risk. A fix that demands design judgment, changes behavior, or grows beyond the mechanical stays a recorded finding — don't ship your own guess. **Never mix blocking findings into a follow-up PR**: those are requested changes on the reviewed PR, and implementing them yourself would review your own code. If tests fail on a follow-up fix, drop that fix and keep it a finding. If there are no such findings, skip this step entirely.
|
|
222
268
|
|
|
223
269
|
Then make your terminal `factory_record_review_verdict` call with the published `verdict` (`approve` or `request changes`) and `reviewedHeadSha`, the head SHA you verified. The card stays in its review phase with the verdict shown on it; the merge moves it to a terminal phase, so never request a stage transition to end the review. The next push re-reviews it automatically.
|
|
224
270
|
|
|
225
|
-
If the call is rejected, read the stated reason, address it (re-examine contested findings, re-review if the PR changed), and retry once corrected. Once the verdict is recorded, post the **session handoff** (the published body
|
|
271
|
+
If the call is rejected, read the stated reason, address it (re-examine contested findings, re-review if the PR changed), and retry once corrected. Once the verdict is recorded, post the **session handoff** (the published body, the Run record, and the `Factory routing` block) as your final conversation message — including how the verdict was published — and stop.
|
|
226
272
|
|
|
227
273
|
## Behavior Rules
|
|
228
274
|
|
|
@@ -40,14 +40,13 @@ Push for the smallest change that fixes the reported problem, with proportionate
|
|
|
40
40
|
|
|
41
41
|
## Report
|
|
42
42
|
|
|
43
|
-
Write the findings argument of the verdict call as Markdown the builder (on request changes) or the change request body (on approve) can use directly:
|
|
43
|
+
Write the findings argument of the verdict call as Markdown the builder (on request changes) or the change request body (on approve) can use directly. Keep it short: every line has to earn its place, with plain words and no jargon, no recap of the diff, and no praise. Drop each part that would be empty:
|
|
44
44
|
|
|
45
45
|
1. **Result** line: `Approved`, `Changes requested`, or `Verification incomplete`, followed by the full head SHA.
|
|
46
|
-
2.
|
|
47
|
-
3. **
|
|
48
|
-
4.
|
|
49
|
-
5.
|
|
50
|
-
6. On approve: the one-line adversarial check record.
|
|
46
|
+
2. **Checks on this head**: the same table format as the Factory test report in `factory-review` (Check / Result / Tests, ✅ Passed or ❌ Failed, no raw exit codes), with a `New tests on base code` row when you proved the tests catch the bug, and a one-line **Not run:** note when a planned check could not run.
|
|
47
|
+
3. On request changes: a numbered list of discrete **Required changes**, each a blocking finding with a `file:line` pointer (linked to that line at the reviewed head when the repository is on GitHub or GitLab, since the report can end up in the change request body) and the reason in one sentence. Workflow and verification failures with no code location, such as an unpushed branch or a failed check, get no pointer. Each must be something the builder can act on in the next round.
|
|
48
|
+
4. **Follow-ups**: a separate list of non-blocking findings, one line each; omit it when there are none. They are never required work; on approve they carry into the change request body.
|
|
49
|
+
5. On approve: the one-line adversarial check record.
|
|
51
50
|
|
|
52
51
|
## Verdict
|
|
53
52
|
|
|
@@ -33,7 +33,7 @@ Gauge the people involved: the author's merged-PR/issue counts (`gh pr list --au
|
|
|
33
33
|
|
|
34
34
|
If the issue is vague, do not stop to ask for clarification. Investigate the most plausible reading of it, record that reading as an assumption, and note what extra information from the reporter would firm it up as an open question.
|
|
35
35
|
|
|
36
|
-
At the end of this phase, publish a small summary to the source issue as stated below. For GitHub issues, call `github_upsert_factory_triage_comment` with the issue number and the marker-prefixed pending summary; it updates Factory’s canonical marked comment or creates it when absent. For Linear issues,
|
|
36
|
+
At the end of this phase, publish a small summary to the source issue as stated below. For GitHub issues, call `github_upsert_factory_triage_comment` with the issue number and the marker-prefixed pending summary; it updates Factory’s canonical marked comment or creates it when absent. For Linear issues, post the pending summary with `linear_create_comment`, leaving out the `<!-- mastra-factory-triage -->` marker line: Linear does not render HTML and would show it as text. For Jira issues, post a plain-text `Triage in progress: <one or two sentences>` with `jira_create_comment`; Jira renders comments as plain text, so omit the HTML marker. incident.io has no writeback tool and GitLab has no issue-comment tool, so skip the pending summary for those sources; the handoff lives in this conversation.
|
|
37
37
|
|
|
38
38
|
```markdown
|
|
39
39
|
<!-- mastra-factory-triage -->
|
|
@@ -123,32 +123,19 @@ Write one concise **handoff** for whoever plans the fix. It must begin with the
|
|
|
123
123
|
**Next step:** <one action>
|
|
124
124
|
|
|
125
125
|
<details>
|
|
126
|
-
<summary><strong>
|
|
126
|
+
<summary><strong>Details</strong></summary>
|
|
127
|
+
|
|
128
|
+
**Why these ratings**
|
|
127
129
|
|
|
128
130
|
- **Confidence** — <evidence>
|
|
129
131
|
- **Effort** — <scope>
|
|
130
132
|
- **Impact** — <who is affected and how>
|
|
131
133
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
<details>
|
|
135
|
-
<summary><strong>Root cause</strong></summary>
|
|
136
|
-
|
|
137
|
-
<root cause with evidence, contributing areas with file paths and relevant history, affected surface, suggested direction, related issues/PRs. Distill — this is a handoff artifact, not a transcript.>
|
|
138
|
-
|
|
139
|
-
</details>
|
|
134
|
+
**Root cause** — <root cause with evidence, contributing areas with file paths and relevant history, affected surface, suggested direction, related issues/PRs. Distill — this is a handoff artifact, not a transcript.>
|
|
140
135
|
|
|
141
|
-
<
|
|
142
|
-
<summary><strong>Reproduction</strong></summary>
|
|
143
|
-
|
|
144
|
-
<for reproduced bugs: exact successful steps. Otherwise: attempted steps, environment, and result, or `Not applicable` / `Not reproduced` with a reason.>
|
|
145
|
-
|
|
146
|
-
</details>
|
|
147
|
-
|
|
148
|
-
<details>
|
|
149
|
-
<summary><strong>Assumptions</strong></summary>
|
|
136
|
+
**Reproduction** — <for reproduced bugs: exact successful steps. Otherwise: attempted steps, environment, and result, or `Not applicable` / `Not reproduced` with a reason.>
|
|
150
137
|
|
|
151
|
-
<every recorded decision from the run
|
|
138
|
+
**Assumptions** — <every recorded decision from the run, or `None`>
|
|
152
139
|
|
|
153
140
|
</details>
|
|
154
141
|
|
|
@@ -163,8 +150,10 @@ Fill the placeholders as follows:
|
|
|
163
150
|
- `<Type>` is one of: bug, feature request, docs, question/support, maintenance, duplicate, resolved, invalid, spam, out-of-scope, other, capitalized for display. `<Severity>` and `<level>` are the lowercase ratings from the guides below. `<Route>` is one of: Plan fix, Await approval, Ask author for info, Close as duplicate/resolved/invalid/spam/out-of-scope, Answer provided / close, No transition / refresh, Other.
|
|
164
151
|
- `<dots>` shows the rating at a glance. Severity uses four dots: `●○○○` low, `●●○○` medium, `●●●○` high, `●●●●` critical. Confidence, effort, and impact use three: `●○○` low, `●●○` medium, `●●●` high. Always follow the dots with the word.
|
|
165
152
|
- Each rating reason is at most 12 words.
|
|
166
|
-
- Keep the collapsed
|
|
153
|
+
- Keep everything else in the one collapsed **Details** block. Only the ratings table, the summary, the next step, and open questions stay visible. Every line in Details has to earn its place: cut anything a planner would not act on.
|
|
154
|
+
- On GitHub, link every file or `file:line` reference to the code at the commit you investigated: `[`stream.ts:42`](https://github.com/<owner>/<repo>/blob/<full SHA>/src/stream.ts#L42)`. Use the full SHA, not a branch name, so the link keeps pointing at the code you read. Link issues, PRs, and commits you mention too.
|
|
167
155
|
- Use no alerts or emoji, and no tables other than the ratings table.
|
|
156
|
+
- On Linear, which renders Markdown but no HTML, adapt the template: leave out the `<!-- mastra-factory-triage -->` marker line, and write the collapsed block in Linear's own syntax — a `+++ Details` line opens it and a lone `+++` line closes it, each with a blank line around it — in place of the `<details>`, `<summary>` and `</details>` lines. Everything else stays the same.
|
|
168
157
|
|
|
169
158
|
Severity guide:
|
|
170
159
|
|
|
@@ -219,7 +208,7 @@ Apply only these label mutations. Do not remove `status: needs approval` merely
|
|
|
219
208
|
|
|
220
209
|
For non-GitHub sources, use the same structured handoff without attempting GitHub publication or label mutations:
|
|
221
210
|
|
|
222
|
-
- Linear issues →
|
|
211
|
+
- Linear issues → post the handoff as a new comment with `linear_create_comment`, in the Linear form the output contract describes (no marker line, `+++ Details` … `+++` instead of `<details>`).
|
|
223
212
|
- Jira issues → post a new plain-text comment with `jira_create_comment` (Jira has no marked-comment upsert and shows Markdown tables and HTML literally). The Jira audience may not have access to the target repository, so post only a reporter-safe summary: type, severity, route, and a few sentences on the conclusion and next step. Keep file paths, code, reproduction steps, and repository history out of it; the full handoff stays in this conversation.
|
|
224
213
|
- incident.io follow-ups and GitLab issues → no external publication; the final conversation message is the handoff.
|
|
225
214
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/factory",
|
|
3
|
-
"version": "0.28.0-alpha.
|
|
3
|
+
"version": "0.28.0-alpha.6",
|
|
4
4
|
"description": "Mastra Software Factory module: the server core behind the Mastra Software Factory — storage domains, integrations, and surfaces for agent-powered software delivery",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"hono": "^4.13.13",
|
|
59
59
|
"posthog-node": "^5.57.1",
|
|
60
60
|
"zod": "^4.6.7",
|
|
61
|
-
"@mastra/auth-studio": "1.
|
|
61
|
+
"@mastra/auth-studio": "1.4.0-alpha.1",
|
|
62
62
|
"@mastra/auth-workos": "1.6.8",
|
|
63
|
-
"@mastra/code-sdk": "1.19.0-alpha.
|
|
63
|
+
"@mastra/code-sdk": "1.19.0-alpha.6",
|
|
64
64
|
"@mastra/connect": "1.3.2-alpha.2",
|
|
65
|
-
"@mastra/core": "1.83.0-alpha.
|
|
66
|
-
"@mastra/mcp": "2.9.0-alpha.
|
|
65
|
+
"@mastra/core": "1.83.0-alpha.6",
|
|
66
|
+
"@mastra/mcp": "2.9.0-alpha.3",
|
|
67
67
|
"@mastra/platform-workspace": "1.13.0-alpha.0",
|
|
68
68
|
"@mastra/slack": "1.9.0-alpha.0"
|
|
69
69
|
},
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"@internal/lint": "0.0.148",
|
|
77
77
|
"@internal/types-builder": "0.0.123",
|
|
78
78
|
"@internal/workspace": "0.0.20",
|
|
79
|
-
"@mastra/deployer": "1.83.0-alpha.
|
|
80
|
-
"@mastra/libsql": "1.30.0-alpha.
|
|
79
|
+
"@mastra/deployer": "1.83.0-alpha.6",
|
|
80
|
+
"@mastra/libsql": "1.30.0-alpha.2",
|
|
81
81
|
"@mastra/pg": "1.36.0-alpha.2",
|
|
82
|
-
"@mastra/server": "1.83.0-alpha.
|
|
82
|
+
"@mastra/server": "1.83.0-alpha.6"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=22.19.0"
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* AUTO-GENERATED FILE - DO NOT EDIT DIRECTLY
|
|
3
|
-
*
|
|
4
|
-
* Source: https://raw.githubusercontent.com/iamcal/emoji-data/097705020bcf82331c9ef10df3425aad15f5043c/emoji.json
|
|
5
|
-
* Regenerate: node scripts/generate-slack-emoji.mjs (from mastracode/factory)
|
|
6
|
-
*/
|
|
7
|
-
export declare const emojiByShortcode: Record<string, string>;
|
|
8
|
-
//# sourceMappingURL=emoji-shortcodes.generated.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emoji-shortcodes.generated.d.ts","sourceRoot":"","sources":["../../../src/integrations/slack/emoji-shortcodes.generated.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAq7DnD,CAAC"}
|