docs(instructions): plan the architect brief against the single-package tree - #1677
Draft
claude[bot] wants to merge 2 commits into
Draft
docs(instructions): plan the architect brief against the single-package tree#1677claude[bot] wants to merge 2 commits into
claude[bot] wants to merge 2 commits into
Conversation
…ge tree `architect.md` told every future architect agent to plan into a workspace this repo does not have, and it did so in three places of increasing force. The worked "Recruiting System" example routed nine files under `packages/hr/src/`. The standing "Dependency Management Rules" named a `crm` / `products` / `finance` layering as fact. And the MANDATORY Output Format — "Always start your response with the Architecture Plan" — headed EVERY plan the architect emits with a package heading. The file also contradicted itself, which is worse than either consistent answer: the same output template whose heading demanded a package filled its table rows with the single-package form. An agent reading it had to pick one and had nothing to pick with. Ruled scope: this brief describes THIS workspace. So the dependency rules section is deleted outright (its layering names three directories that do not exist, and its third item is wrong on its own terms — `@objectstack/spec` is a plain `dependency` here, not a dev/peer one), the package heading is deleted from the output template, and the example is re-mapped onto the real tree: objects to `src/objects/`, automation to `src/flows/`, the pipeline board to `src/views/`, the actor to `src/profiles/` and row-level access to `src/sharing/`. Artifact kinds with no home here are dropped rather than re-prefixed — `find src -name '*.mask.ts' -o -name '*.workflow.ts' -o -name '*.rls.ts' -o -name '*.role.ts' -o -name '*.permission.ts'` returns nothing, so a faithful "strip the prefix" rewrite would only have traded one absent path for another. The auto-number row is deleted, not re-pointed: auto-numbering is a FIELD in this repo (`Field.autonumber`, 35 occurrences across `src/objects/*.object.ts`) and has no plan destination of its own. The approval row keeps its text and moves from the UI step to the automation step, because a `.flow.ts` is not a screen. No row was invented to replace a deleted one. The output template's rows move with it: `src/foo.object.ts` is not a real path either — nothing lives directly under `src/`, every artefact sits one directory down — so they now read `src/objects/foo.object.ts`, `src/objects/foo.hook.ts` (`src/hooks/` is a re-export barrel, not their home) and `src/pages/foo.page.ts`. Leaving them would have re-created inside the fixed file the very inconsistency this change exists to remove. The guard's `PENDING_PACKAGES_REFS` entry goes in the same commit because it must: the assertion is an equality, so fixing the file without deleting the entry is red, and deleting the entry without fixing the file is red. The list is now empty, which is the finished state and not a disabled one — the equality still fails the day any brief picks the retired layout back up. Only the comment above the constant changed with it; no assertion and no test name was touched. Co-authored-by: Claude <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This was referenced Sep 6, 2026
Two reasons, neither of which changes this PR's own scope. 1. The head commit carries a permanently-failed `Check Changeset` run. That run started 6s after the PR was opened; the `skip-changeset` label landed 2s after it had already failed, so the workflow's `if: !contains(labels, 'skip-changeset')` guard evaluated a payload that did not yet carry the label. The `labeled` re-run seconds later skipped correctly, but the failed run stays attached to that head for ever and no event re-evaluates it. A new head is the only way to clear it without a rebase or a force-push. 2. The base had moved 23 commits since the PR was opened, so the last green `Build and Test` measured a base that no longer exists. The diff against main is unchanged: `.github/instructions/architect.md` plus the `PENDING_PACKAGES_REFS` constant in `test/docs-src-tree-paths.test.ts`. Co-authored-by: Claude
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.
Description
.github/instructions/architect.mdtold every future architect agent to plan into a workspace this repo does not have, and it did so in three places of increasing force:packages/hr/src/## Dependency Management Rulescrm/products/financelayering, stated as fact## Output FormatThe file also contradicted itself, which is worse than either consistent answer: the same output template whose heading demanded a package filled its table rows with the single-package form. An agent reading it had to pick one and had nothing to pick with.
Maintainer ruling on #1518 (decision batch 21, 2026-09-03, ledger objectstack#12708): Option A — this brief describes THIS workspace. No option was chosen here; this is execution only.
Type of Change
Related Issues
Fixes #1518
Related to #1233 (the guard this change retires an entry from), #855 (the same class of defect, fixed once in
AGENTS.md)Changes Made
## Dependency Management Rulesin full.## Output Formattemplate.architect.mdentry fromPENDING_PACKAGES_REFSintest/docs-src-tree-paths.test.ts— required in this same PR, see below.The re-map, row by row
Every surviving row keeps its original text. No row was invented to replace a deleted one.
packages/hr/src/candidate.object.ts(+2 more)src/objects/candidate.object.ts(+2 more)*.object.tslive there…/application.mask.ts(Auto-number)…/application.workflow.tssrc/flows/application-rejected.flow.ts*.flow.tslive there…/recruiting.view.ts(Kanban)src/views/application.view.ts(Kanban)*.view.tslive there…/approval.flow.tssrc/flows/offer-approval.flow.ts.flow.tsis not a screen; Step 3 is headed "Identify the screens"…/roles.tssrc/profiles/hiring-manager.profile.ts*.profile.tslive there…/candidate.rls.tssrc/sharing/candidate.sharing.ts*.sharing.tslive thereThe auto-number row is deleted, not re-pointed. Auto-numbering is a field in this repo, not a file kind:
It lives inside the Step 1 object file (
src/objects/case.object.ts:62,contract.object.ts:49, …), so it has no plan destination of its own. Re-pointing it atsrc/masks/would only have traded one absent path for another — which is the defect, not the fix.The five homeless kinds are gone from the file:
One judgement call, called out for review
The ruling notes that "the file's own table rows already use the single-package form". They do — but
src/foo.object.tsis not a real path either: nothing lives directly undersrc/(find src -maxdepth 1 -type freturns 0), every artefact sits one directory down. Leaving those rows would have re-created, inside the fixed file, the exact inconsistency this change exists to remove — the example above them now sayssrc/objects/….So the output template's rows moved with the example:
src/objects/foo.object.ts,src/objects/foo.hook.ts(src/hooks/is a re-export barrel, not their home — all 17 real*.hook.tsare insrc/objects/) andsrc/pages/foo.page.ts. This is the one edit not literally enumerated in the ruling; it is a three-line revert if you disagree.The guard entry — why it had to be in this PR, and proof it bites both ways
test/docs-src-tree-paths.test.tspins the brief set under an equality, so it goes red in both directions. That was tested, not reasoned about — each leg mutated on disk, run, then restored and the restore proved by blob hash againstHEAD.Leg A — file fixed,
PENDING_PACKAGES_REFSentry left in place:Leg B — entry deleted,
architect.mdreverted to its state onorigin/main:Restores verified:
git diff HEADempty and blob hash identical to theHEADblob on both legs (brief3506a350, guarde7ccc70e).The list is now empty, which is the finished state and not a disabled one — the equality still fails the day any brief picks the retired layout back up. Only the comment above the constant changed with it; no assertion and no test name was touched.
The other five briefs were checked and are clean, so nothing else was owed here:
Testing
pnpm verifyexit 0, the full chainRun on
df41dbba. The token ratchet is unmoved, as expected — it measuressrc/**and nothing here is undersrc/.Checklist
skip-changesetlabel applied — nothing published moves. Nosrc/metadata changed: no object, field, view, label, flow or hook. Per the ruling on .github/instructions/architect.md prescribes apackages/layout hotcrm does not have — in its standing rules and its mandatory Output Format, not only in its worked example #1518.Merge posture
.github/instructions/**is treated asAGENTS.md-class (2026-08-25 grading on #1233). This PR is therefore a draft, with no auto-merge and no merge queue, and it has not been approved. It is for the maintainer to merge by hand.CI triage, 2026-09-06 — what was red, why, and what fixed it
Red:
Check Changeset, and nothing else. Read from the check-runs API for headdf41dbba(the combined-status endpoint on this repo only ever returns Vercel, which is why this needed the other endpoint):Build and Test (22.x),Quality Checks,Playwright,link-check,CodeQL,Analyze Code (javascript)andLabel Pull Requestwere allsuccess;Check Changesetappears twice — run34025202120failure, run34025210461skipped.The failing job's log, verbatim:
Cause — a label race at PR-open, not a stale base.
changeset-check.ymlgates the job onif: !contains(github.event.pull_request.labels.*.name, 'skip-changeset'), and that is evaluated against the payload of the event that started the run:Check Changesetstarts from theopenedpayload — no labels on it yetskip-changesetappliedlabeledre-run fires and skips, correctlySo this PR has carried that red since 11 seconds after it was opened — nothing turned red later. A workflow run is never re-evaluated, so the failed run stays bound to
df41dbbafor ever, and re-running it would only replay the same label-less payload.Two hypotheses tested and killed before acting on either.
mainhad moved 23 commits past this PR's basef4f7dfe7— but not the red. Merged in and re-measured:pnpm verifyexit 0, andpnpm test:coverage(the form CI actually runs) exit 0 as well.PENDING_PACKAGES_REFSis an equality assertion, so apackages/…mention re-introduced into any brief would fail it against the now-empty expected set. Measured:mainhas touched neither.github/instructions/**nortest/docs-src-tree-paths.test.tssince this branch was cut, and on today'smainarchitect.mdis still the only brief namingpackages/…— the one this PR removes. The pin passes in both trees. No entry was added back, and no assertion was relaxed.Fix: merge
maininto the branch (commitfa238330). That refreshes the base and gives the PR a head whoseCheck Changesetrun is evaluated withskip-changesetalready applied. No rebase, no amend, no force-push; the PR's own diff is unchanged — still.github/instructions/architect.mdplus the one constant intest/docs-src-tree-paths.test.ts.Gate re-run on
fa238330, exit code captured before any pipe:pnpm test:coveragealso exit 0 —All files 95.93 | 84.77 | 95.87 | 99.36. The E2E (Playwright) andlink-checkworkflows are not part ofpnpm verify; they re-run in CI on this head.Posture unchanged: still a draft, no auto-merge, no merge queue, no approval. The maintainer merges it by hand.
Generated by Claude Code