Skip to content

Answer questions and record decisions

At the end of this guide, the onboarding guide's questions are answered by decisions and folder rules, each sent to its owner, and ashlar onboard --check keeps the guide current.

The examples come from a repository with a Tauri desktop app in apps/desktop and an API in apps/api.

  1. Name the project's default owner in ashlar.config.ts. Every question nobody else owns goes to them:

    import { defineConfig } from '@kurvball/ashlar';
    export default defineConfig({
    include: ['apps', 'packages'],
    apps: [
    { root: 'apps/desktop', stack: 'tauri' },
    { root: 'apps/api', stack: 'web', main: ['src'], renderer: [], shared: [], areas: ['src/*'] },
    ],
    onboard: { owner: '@sam' },
    });

    Without it, ashlar onboard stops and says what to add:

    Terminal window
    $ pnpm exec ashlar onboard
    Name the project’s default owner, who gets every question nobody else owns: `onboard: { owner: "@handle" }` in ashlar.config.ts.
  2. Write the guide:

    Terminal window
    $ pnpm exec ashlar onboard
    Wrote the guide in docs/onboarding: 7 written, 0 removed.
    5 areas, 0 decisions, 0 rules, 8 open questions: @sam 8.

    The guide is a README.md that says what the system is, a page per area in areas/, and questions.md, every unknown as a question for its owner. Four of its eight:

    ## @sam
    - [ ] TODO(@sam) What must an agent know before changing Db (`apps/api/src/db`)? Answered by a line in DECISIONS.md: `- <date> @you [apps/api/src/db] rule: what to know`, or a rule in `.claude/rules/` whose paths cover it. `know:apps/api/src/db`
    - [ ] TODO(@sam) Who owns what? No area names its owner yet, so every question goes to @sam. Answered by a line in DECISIONS.md: `- <date> @you [<area>] owner: @handle` for each area, or one for `*`. `owner:*`
    - [ ] TODO(@sam) How do you run `apps/api` locally? Answered by a `dev` or `start` script, or a line in DECISIONS.md: `- <date> @you [apps/api] setup: how`. `setup:apps/api`
    - [ ] TODO(@sam) Is `README.md` current, and who keeps it? Answered by a line in DECISIONS.md: `- <date> @you [README.md] trust: what holds`. `trust:README.md`

    Each question says the line that answers it, and ends with its id, made of its kind and its area. The guide is generated: don't edit it, change its sources and run ashlar onboard again.

  3. Answer with lines in DECISIONS.md, at the root. One line is one decision a person made:

    # Decisions
    - 2026-12-01 @sam [*] owner: @sam
    - 2026-12-01 @sam [apps/api] owner: @lee
    - 2026-12-01 @sam [apps/api] setup: `pnpm --filter api dev` starts it on port 3000, on the seeded database.
    - 2026-12-02 @lee [apps/api/src/db] rule: Every query goes through `rows`, so a test can swap the database.
    - 2026-12-02 @lee [apps/api/src/db] access: @lee grants access to the staging database.
    - 2026-12-02 @sam [README.md] trust: Current, and @sam keeps it.

    A line holds the date, the handle of the person who decided, the areas in brackets, the kind, and what was decided. An area is a folder or a file from the root, several separated by commas, or * for the whole project. Every line that starts with - is a decision, except inside a code fence. Headings and other text are left alone. To change a decision, edit or delete its line: Git keeps the history.

    Kind The line says
    decision A plain decision. A line with no kind is one.
    rule What an agent must do there.
    trust A document is current, and who keeps it.
    access Who grants access to what: a person and a system, never a credential. No brief carries it.
    owner Who owns the area. The text is the owner's handle.
    setup How to run something.

    A word before a colon that isn't one of these kinds stays part of the text of a plain decision.

  4. Name the owners. An area's owner comes from the first of these that names one:

    • onboard.owners in the config, folder to handle, such as { 'apps/api': '@lee' }, where the longest folder that holds the area wins;
    • an owner line, where the line for the deepest folder that holds the area wins, a * line counts last, and the later date wins between two lines for the same folder;
    • onboard.owner, the default owner.

    No owner is ever guessed from Git. Each question goes to its area's owner.

  5. Write a folder rule for what an agent must know in a folder. It is a Markdown file in .claude/rules/, named after the folder, slashes as dashes:

    ---
    paths:
    - 'apps/desktop/src/features/**'
    owner: '@sam'
    date: 2026-12-02
    gotcha: SHOP-142
    ---
    # Prices are cents
    Every price in a feature is a whole number of cents. Show it with `formatPrice` from `packages/money`, never by
    dividing by 100 in the feature.

    Ashlar reads five frontmatter keys: paths (a list of globs, as Claude Code reads them), gotcha, owner, date and description. Any other key is an error. Without paths, or with paths that start with a glob such as **/*.ts, the rule is for every folder, and answers no one area's question. The first heading is its title. gotcha marks a rule that guards against a mistake made before, with its ticket or a short name, and the guide lists it under the area's gotchas.

  6. Write the guide again:

    Terminal window
    $ pnpm exec ashlar onboard
    Wrote the guide in docs/onboarding: 6 written, 0 removed.
    5 areas, 5 decisions, 1 rule, 1 open question: @sam 1.

    Seven questions are gone. The cart's page now shows its owner, its reach and its gotcha:

    # Cart
    > Generated by `ashlar onboard` from the code, its decisions and its rules. Don’t edit it: change those, then run `ashlar onboard` again.
    - Folder: `apps/desktop/src/features/cart`
    - Kind: feature
    - Owner: @sam
    - Reach: Open cart › Cart
    ## Proofs
    None yet.
    ## Gotchas
    ### Prices are cents (SHOP-142)
    From `.claude/rules/apps-desktop-src-features.md`.
    Every price in a feature is a whole number of cents. Show it with `formatPrice` from `packages/money`, never by
    dividing by 100 in the feature.

    Its count of five decisions leaves out the access line. The area's page shows that line to people, and no brief carries it. Commit DECISIONS.md, the rule and the guide together.

  7. Keep the guide current. --check writes nothing, and fails when a file is stale or was edited by hand:

    Terminal window
    $ pnpm exec ashlar onboard --check
    The guide in docs/onboarding is current: 1 open question.
    Terminal window
    $ pnpm exec ashlar onboard --check
    The guide in docs/onboarding is out of date:
    docs/onboarding/areas/apps--api--src--db.md is stale or was edited by hand.
    Run `ashlar onboard` to write it again.

    It exits with 1 then. Run it next to ashlar check in your lint script or in CI.

Id Asks Asked when Answered by
owner:* Who owns what? No area has an owner but the default owner. An owner line for each area, one for *, or onboard.owners.
owner:<area> Who owns this area? Some areas name an owner, and this one doesn't. An owner line for the area, or onboard.owners.
reach:<folder> How does a person reach this feature from the app's home? A feature folder has no reach.ts. Its reach script. See Write a reach script.
know:<area> What must an agent know before changing this area? No line names the area, a folder that holds it or a folder inside it, and no folder rule's paths cover it. owner lines and * lines don't count. A rule line, or any other line for the area, or a folder rule whose paths cover it.
setup:tests How are the tests run? The root package.json has no test script. A test script, or a setup line for *.
setup:<app> How do you run this app locally? The app's package.json has no dev or start script, or the root's, when the app has none. A dev or start script, or a setup line for the app.
trust:<document> Is this document current, and who keeps it? A document in onboard.documents has no trust line. A trust line for the document, or for a folder that holds it.

ashlar onboard, ashlar brief and ashlar snapshot read the same files, and each stops with exit code 2 on one of these.

A line that doesn't parse, so a typo never hides a decision:

Terminal window
$ pnpm exec ashlar onboard
DECISIONS.md:9 isn't a decision line: - 2026-12-03 @owner [area, another/area] kind: what was decided

That line had no @ before its handle. A line whose brackets name no area is refused too.

A value shaped like a secret, in DECISIONS.md or a folder rule:

Terminal window
$ pnpm exec ashlar onboard
Secrets never enter knowledge files, and these lines look like one:
DECISIONS.md:9:57 holds what looks like a password or token.
Take the value out. Say who grants access instead, as an `access` line, never the credential.

A folder rule with a frontmatter key Ashlar doesn't read, or frontmatter that opens with --- and never closes, names its file and line.