Repository navigation
docs(archdev-skill): spell out the risk-backed event sequence per family - #36
Merged
Merged
Conversation
Factory workers failed task.lifecycle posts because the skill never said to put the sealed result.json in the event value's "risk" field, never listed the allowed producer.role values, and used one <type> placeholder for both risk.<type> and log post --event <type>. - Report: one ordered sequence (brief, judgment, finalize, mitigate, extract context, event value with "risk", optional extract run, log post) and a table mapping each family to its risk definition, extractor ref, subject source, and events. - Risk assessments: reorder the steps to match the CLI's authoring steps, use <resource> and <event> placeholders, state that the definition is the resource type, list producer.role values, and keep the PR subject source in the archdev:pr: form, never a URL. - SKILL.md: the same points in the stopping-point summary. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nvelope
`extract run --sink file:<dir>/` writes a nested envelope
{key, provenance, schema, value}; `log post --payload-file` rejects it
with "Unrecognized keys". Say how to find the sink file and extract its
value with jq, and replace the <envelope> placeholder in the done
example with the event value file.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review on ArchCode
Problem
In a live Factory run on 2026-09-28 (archdev 0.46.12), workers failed risk-backed event posts 9+ times in the first hour. The skill text caused each failure:
task.lifecycle requires a risk assessment. In 6 of 7 cases the worker had already runextract briefandextract finalize, but left the sealed result out of the event value's"risk"field. Nothing in the skill said to put it there. The Report steps had workers author the value before sealing and never mentionedrisk./producer/roleenum error. The worker used"implementer". The allowed values areauthor,assessorandhuman, and the skill never listed them.Risk definition must be risk.<type>[@<version>], got "risk.task.started". The skill used one<type>placeholder for bothextract brief risk.<type>andlog post --event <type>, so the worker took the event name to be the definition.A coordinator also saw this on 0.46.12:
extract run --sink file:<dir>/writes a nested envelope{key, provenance, schema, value}. Passing that file tolog post --payload-file, as the<envelope>placeholder suggests, fails withUnrecognized keys: "schema", "key", "provenance", "value".This is the skill-side companion to https://archdev.ai/ArchAstro/firstlanding/pull/15749. That PR changes the CLI's contract text, the
extract guideoutput and the errors. It also addsrisk-event-steps.ts, soextract context <extractor> <ref>prints the filled-in sequence underauthoring.What changed
Docs only:
archdev/references/monitor.mdandarchdev/SKILL.md.extract brief risk.task→ author{input, assessment}(producer.roleisauthor/assessor/human) →extract finalize risk.task→ mitigate and recompute →extract context task.lifecycle <id>→ author the value with"risk"set to the whole sealedresult.json→ optionalextract run→log post --event task.started --assessment <dir>/sealed/result.json. A table maps each family (task, plan, pr) to its risk definition, extractor ref, subject source and event names.risk.task,risk.plan,risk.pr), never the event name.<resource>for the risk definition,<event>for--event, and<dir>for scratch output.<type>is no longer used for either.archdev:pr:<owner/repo>#<num>, never a pull request URL. This matches the #15749 review fix. Code-region seals still keep the collected URL subject, as before.producer.rolevalues are listed, and the text explains why a missingriskfailsextract runwhilelog posttakes the seal from--assessment. Cross-references from the Focus range seals section are renumbered.--payload-filetakes the value object, never the envelope. The text shows how to find the nested sink file (find <dir>/out -name '*.json') and pull out the envelope value file (jq .value <envelope.json> > <dir>/event.json)."risk"field.Unchanged: the text stays generic, with no repo-specific content. The mitigate-and-recompute rules and the PR annotation flow are the same.
Scope / risk / user impact
authoringblock inextract contextneeds the CLI release that includes #15749, so the text says "current CLIs" for that part.Testing
scripts/test-skill-bootstrap.sh: all cases pass. This is the repo's only local check, and it covers the bootstrap script rather than the docs.pwshwas not available locally, so CI runs the PowerShell variants.markdownlint-cli2on both files: no new errors besides the MD013/MD060 table and line-length style the existing files already have. Two<dir>-leading line wraps that broke code spans were fixed.src/ts/archdev/src/__tests__/e2e/archdev-risk-event-sequence.e2e.test.tsin #15749.Follow-ups
--payload-file <envelope>:repo/activity.ts,repo/monitor-nudges.tsand theloghelp inorg-log.ts. That belongs in firstlanding, not this repo.🤖 Generated with Claude Code