On Unix, craft-ai-native creates its private files with mode 0600. On Windows they took their folder's access list, which is not private in a folder that CRAFT_AI_DIR names outside %LOCALAPPDATA%. - Private files and the folders this crate creates get an owner-only access list (the user's SID and SYSTEM) in the call that creates them, so no other account can open them in between. - Creation does not follow a link planted at the name, and handles paths past 260 characters. - A leftover temp file is removed and created again, never reused. This also fixes the Unix case. - The Win32 calls live in crates/ai-native/src/owner_only/win_acl.rs, the workspace's one named unsafe exception. The workspace lint moves from forbid to deny, and tests/unsafe_exception.rs fails if unsafe is allowed anywhere else. - Volumes without access lists (FAT, exFAT) still save, without one, as documented.
7.1 KiB
House rules
These apply in every Craft repository. A later rule may be stricter, not weaker. The source is standards/house-rules-core.md in storytold/craft-contrib. Propose changes there, not in a copy.
- A person is accountable. Whoever runs an agent answers for what it opens and for its review comments.
- Check, then claim. Before writing code, read the issue comments, search pull requests for
#Nand the keywords, and check recent commits onmain. Comment on the issue first. Release a claim you will not finish. - Verify, don't guess. Open a definition before using it. Confirm the cause in the code, even when someone names a location.
- Keep fixes narrow and tested. Fix what the issue describes, where the bug is. Add a test that fails without the fix.
- Review the diff before opening a pull request. Identifiers exist as used, the test fails without the fix, nothing unrelated changed, and the description is true.
- Look for a better pull request. If another fixes the same thing, close yours when it is better or equal, and say why.
- Report only what ran. Say what you tested and what you could not run. Without a local build or test, say so and rely on CI before marking ready.
mainchanges through a pull request. Do not push to it. Branch protection enforces this. There is no exception.- Stop and ask only about licensing outside the allowlist, publishing, releases, a new remote, secrets, spending money, destructive git, and anything else hard to undo. Otherwise keep working.
plan/is a gitignored notebook, not rules. Without it, do not ask for it and do not stop. - Keep secrets and personal details out of the repository, logs and requests.
- CI stays shared. Workflows call
storytold/craft-common-actions. Do not change CI in a feature or fix pull request. If CI cannot cover a change, open an issue there. - Guards say why. A check that looks removable says what it prevents. Read that before changing it.
- Instructions must be readable by everyone. No notes about one machine, and no links to files a reader cannot open.
craftrulesis retired. Do not link to it. - Keep pull requests moving. Concurrent pull requests are fine; unanswered actionable feedback is not. Respond in 7 days, a reminder at 14, closure eligible at 30, from when an actionable request waits on the author. Suggestions and unconfirmed bot findings do not start the clock. A fix, explanation or agreed plan resets it; unrelated activity does not. Waiting on a reviewer or maintainer pauses it and does not count against the author. A maintainer decides closure; it is never automatic. Reuse search results, do not poll, and stop at a rate limit.
- No agent attribution. A pull request does not say an agent wrote it. A repository rule may not require that.
Rust Craft repositories
These apply to native Craft apps and to shared Rust libraries. Select them by repository type. A repository that merely contains some Rust does not take this block. Rules later in a repository's file may be stricter, but not weaker. The source is standards/house-rules-rust.md in storytold/craft-contrib.
- Never crash. Non-test code does not panic and has no
unsafe, except where the repository file names an exception. Return errors, treat input as hostile, and bound recursion and allocations. New production crate roots copy thedenyattribute from an existing crate:clippy::unwrap_used,clippy::expect_used,clippy::panic,clippy::unimplemented,clippy::todo,clippy::unreachable. Every crash fix comes with a test that panicked before the fix. - Clean room. Learn from observed behaviour and public specifications. Do not copy another product's code, assets, strings or artwork. Check a dependency's licence before adding it.
- Assets and fonts. Every asset is original or suitably licensed, and is recorded in
ATTRIBUTION.mdin the same change. Font files live in storytold/craft-fonts, not in the app repository. - Rust only for native Craft apps. No handwritten JavaScript or TypeScript, and no Tauri, Electron or webview shell, in those apps. Shared tooling follows its documented technical scope and maintainer-approved exceptions. Craft PR Review's existing Tauri and TypeScript UI is one such exception. It does not relax this rule for native apps. Preserve any existing web build.
- Time goes through
chrono. Do not hand-roll calendar conversion. For dates beyond whatchronocan represent, follow standards/time.md. - Contributor credits. Add or edit only your own person's entry in
contributors/people.toml, and only after asking them. Never guess a name or hand-editcontributors.json.
Licence allowlist
Dependencies and assets use SPDX identifiers. An expression is allowed when every identifier is in this list. A repository may name a shorter list. It may not add an identifier here by editing its own copy of these rules.
ISCMITBSD-2-ClauseBSD-3-ClauseApache-2.0OFL-1.1Ubuntu-font-1.0Bitstream-VeraCC0-1.0CC-BY-4.0CC-BY-SA-4.0LicenseRef-Public-Domain
LicenseRef-Storyteller-Trademark is not in this list. It covers Storyteller brand marks only, where a repository already says so.
Craft AI integrations: agent entry point
Read CONTRIBUTING.md, README.md, docs/LAYOUT.md and the relevant adopting guide before
editing. For a developer suggestion about a model, connection, engine or workflow, start at
docs/PROPOSE-AN-INTEGRATION.md and use tools/intake/propose.py. A suggestion is not a built-in
recommendation, a working integration or a user account. Keep credentials and user bindings out
of proposals and version control.
Every new workspace crate's Cargo.toml must explicitly include [lints] workspace = true, and
production crate roots must retain their required crate-level lint attribute.
Named unsafe exception (house rule "Never crash"): crates/ai-native/src/owner_only/win_acl.rs
only, for the Win32 calls that give private files an owner-only access list. Do not add unsafe
anywhere else; crates/ai-native/tests/unsafe_exception.rs enforces it.
The repository's shared crates own the contracts, adapters, catalogue, consent and client. Each Craft app owns its own interface, document conversion and result storage. Check the live catalogue, route implementation and app adoption before claiming a provider or model is missing or works. Never replace the selected model silently. Use targeted tests and scripted services; live or paid calls, downloads, publication and merges need separate authorisation.