registrystack / registrystack/registry-stack

Task grant notes: say that a BReg task bound collection is the entity route

Open
#1,099 0 comments 0 reactions 0 assignees View on GitHub
area:breg area:casework documentation
Dominant language
Rust
Stars
2
Forks
0
Avg merge
2h 57m
Merged PRs (30d)
128

Description

## What

Both task-grant notes describe a BReg task bound as a list of collections and operations, and neither says what a collection is. `products/casework/TASK_GRANTS.md` line 19 gives the shape `{type: breg, permissions: [{collection: ..., operations: [...]}]}` with an ellipsis where the value goes; `products/breg/TASK_GRANTS.md` lines 13 and 20 talk about "the compiled collection and operation bounds" and about wider, narrower and partial bounds. An author writing `bounds.permissions[].collection` has no way to know the value must be the entity's `route`, not its `id`. Getting it wrong produces a bound that never matches, and the failure shows up as a refused task rather than as an authoring error.

## Evidence

- `crates/registry-breg/src/compiler.rs` around line 1669 builds the compiled task-grant permission source with `collection: entity.route.clone()`, so the matcher compares against the route.
- `products/casework/TASK_GRANTS.md` line 19 and `products/breg/TASK_GRANTS.md` lines 13 and 20 are the only places the word appears, and neither defines it.

## Proposed fix

State in both notes that a BReg task bound collection is the entity's `route`, with one worked example showing an entity whose `id` and `route` differ. Separately, print the compiled task-grant collections in `bregctl explain` (`crates/registry-bregctl/src/lib.rs`, the `explain` command at line 4769), so an author can read the accepted values off a compiled project instead of guessing them.

## Found while

Extracting reusable App Kit skills against Registry Stack v0.32.0.

Contributor guide

Open the contributing guide

Research direction

Read products/casework/TASK_GRANTS.md and products/breg/TASK_GRANTS.md at the cited lines, then inspect crates/registry-breg/src/compiler.rs around line 1669 to confirm how collection values are matched. Review the explain command in crates/registry-bregctl/src/lib.rs around line 4769. Done means both notes define collection as the entity route with a differing id/route example, and bregctl explain prints compiled task-grant collections.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, documentation
Issue type
Documentation
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.