docs: regenerate rules from documentation@0d151a2 - #84
docs: regenerate rules from documentation@0d151a2#84harper-skills-sync[bot] wants to merge 1 commit into
Conversation
de4ee3f to
27d4f49
Compare
27d4f49 to
15f7ccb
Compare
15f7ccb to
996d087
Compare
| When both tokens have expired, call `create_authentication_tokens` again with username and password. | ||
|
|
||
| 8. **Mint scoped tokens for limited access**: A super user can embed an inline role in `create_authentication_tokens` using the same `permission` structure as `add_role`. Include `expires_in` to control lifetime. Do not include a `password` field. The `username` is attribution only and must not match an existing user. | ||
| 8. **Mint scoped tokens with an inline role**: A `super_user` can embed permissions directly in a token using the `role` field and `expires_in`. The `username` is attribution only and must not name an existing user. No `refresh_token` is issued. Use `add_role`-style `permission` structure. |
There was a problem hiding this comment.
The previous generated rule retained the 12KB Authorization-header limit for scoped tokens, but this regeneration removes the only mention of it. A large inline role can therefore produce a token that the HTTP server rejects even though the recipe presents it as valid. Please restore the limit next to the scoped-token constraints and add a localized must_cover anchor so later regenerations cannot discard it again.
— KrAIs (GPT-5)
| ## How It Works | ||
|
|
||
| 1. **Import `tables` from `harper`**: Access all tables in the default `data` database via the `tables` object. Each table defined with `@table` in `schema.graphql` is a property. | ||
| 1. **Import `tables` (and other APIs) from `harper`**: Access every table defined in `schema.graphql` as a named property of `tables`. Each property is the table class implementing the Resource API. |
There was a problem hiding this comment.
tables contains only tables from the default data database; a schema type declared with @table(database: "analytics"), as this regeneration now demonstrates elsewhere, is available through databases.analytics, not tables. Following this statement makes tables.Event unexpectedly undefined. Please preserve the default-database qualifier and direct readers to databases.<name> for non-default tables, with generation coverage for that distinction.
— KrAIs (GPT-5)
| Product.search({ conditions: [{ attribute: ['brand', 'name'], value: 'Harper' }] }); | ||
| ``` | ||
|
|
||
| 6. **Apply `select` to shape results**: Pass an array of property names, a single string, or nested objects for relationships. |
There was a problem hiding this comment.
The declared Resource API source explains that a to-many relationship resolves to an array and, depending on the access pattern, its property may need to be awaited before iteration. This regenerated relationship-select recipe drops that caveat, so an agent can treat an unresolved relationship as the array itself. Please restore the to-many behavior and await warning, and anchor it in generation coverage.
— KrAIs (GPT-5)
| // NEW | ||
| const target = new RequestTarget(); // passed in automatically when overriding get() | ||
| target.id = id; | ||
| const record = await Table.get(target); |
There was a problem hiding this comment.
This const record redeclares the binding introduced earlier in the same JavaScript fence, so the example fails to parse. The next old/new example repeats the problem at harper-best-practices/rules/v5-upgrade.md:55-59, and the relationship example similarly redeclares book at harper-best-practices/rules/programmatic-table-requests.md:116-120. Please split each old/new or alternative example into separate fences, or use distinct bindings, then rebuild the aggregate mirror. A localized syntax check for generated JavaScript fences would prevent this class of regression.
— KrAIs (GPT-5)
| 5. **Apply `select` to shape results**: Return only the fields you need. Supports arrays, nested relationship selects, and special properties. | ||
| ```javascript | ||
| Product.search({ | ||
| conditions: [ |
There was a problem hiding this comment.
This generated line prefixes a tab with spaces. The same issue occurs throughout harper-best-practices/rules/programmatic-table-requests.md:90-99, harper-best-practices/rules/programmatic-table-requests.md:121-122, harper-best-practices/rules/programmatic-table-requests.md:151-152, harper-best-practices/rules/programmatic-table-requests.md:179-195, harper-best-practices/rules/programmatic-table-requests.md:227-228, three lines in harper-best-practices/rules/v5-upgrade.md, and their aggregate mirrors; git diff --check origin/main...HEAD reports 70 errors. Please normalize both source rules and rebuild the aggregate before merging.
— KrAIs (GPT-5)
| - The `headers` property on a returned REST response object is used as response headers. | ||
| - Under `lockdown: ses`, the constrained `fetch` applies only in `vm` mode. In `vm-current-context` and `native` modes, application code uses the standard global `fetch`. | ||
| - In production, `allowedDirectory: app` is the default; modules outside the application directory tree will throw. Set `allowedDirectory: any` only if legitimately required. | ||
| - Import all Harper functions and APIs from `from 'harper'`, not from global variables or `harperdb`. |
There was a problem hiding this comment.
This note says to import APIs from from 'harper', leaving a duplicated from in the generated instruction. Please change it to “from 'harper'” and rebuild the aggregate mirror.
— KrAIs (GPT-5)
Three fixes from Kris's review on #86. Git identity before the merge. actions/checkout configures no identity, and `git merge origin/main` writes a commit whenever it is not a fast-forward — which is the normal path, since semantic-release advances main routinely. Git then exits 128 with "Committer identity unknown" and the broad handler misreported it as a merge conflict, wedging sync. Reproduced locally: exit 128, and `git ls-files --unmerged` empty, so the old message was actively wrong. Configure the App identity before the merge (the commit step still sets it; git config is idempotent), and split the handler so a real conflict names its files via --diff-filter=U while any other failure says so instead of guessing. Reuse the branch only while an open PR owns it. Remote branch existence is not the same thing: closing a rejected sync PR leaves its head branch behind, so the documented "close the PR and re-run" recovery checked out the same stale branch and replayed the conflict, or carried abandoned generated content into the next PR. Gate on `gh pr view --json state` and start clean from origin/main otherwise; --force-with-lease still refuses to clobber a push that landed after checkout. The recovery hint now matches the behaviour. Fence-aware stripping. inlineCodeSpans stripped only triple-backtick fences while its comment promised fenced blocks were excluded, so a backtick expression inside a ~~~ fence would register as a fact and deleting that example later could falsely block generation. Add stripFencedBlocks to lib/sources.mjs, where fence knowledge already lives — sliceSection has handled `{3,}`/`~{3,}` all along, so the narrower regex was also inconsistent with the module it sits next to. It follows CommonMark on delimiter character, run length, indent and info strings, and stripCode now shares it. Covered by 13 focused tests under node --test (no new dependency), wired into `npm run validate` via a `test` script. Behaviour on the current corpus is provably unchanged: old and new stripping produce identical fact sets across all 33 rule bodies, so the losses this caught on #84 still get caught. The scanner only differs on inputs the corpus does not yet contain, which is the point. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Automated regeneration of docs-driven skill rules, now synced to
HarperFast/documentation@0d151a2.Why these rules changed
Each rule regenerated because its source content differs from the docs commit it was last synced from. The trigger commit is not necessarily what changed a given rule — drift accumulates across every docs commit since the rule’s recorded baseline (below).
automatic-apis— last synced from docs@677ad21checking-authentication— last synced from docs@677ad21programmatic-table-requests— last synced from docs@677ad21deploying-to-harper-fabric— last synced from docs@677ad21v5-upgrade— last synced from docs@677ad21enabling-mcp— last synced from docs@d7d2ddbcustom-mcp-tools— last synced from docs@d7d2ddbDocs commits since baseline (
d7d2ddb..0d151a2)Produced by
.github/workflows/generate.yaml. Review the diff as you would any rule change — the generator reads the docs build output and rewritesmode: generate/ importsmode: directrule bodies, then reassembles AGENTS.md. See docs/plans/docs-driven-skills.md.🤖 Generated with Claude Code