stashbase
AGENTS.md906 starsChanged 3 months agoApache-2.0View on GitHub
StashBase is an IDE for writing in ordinary local projects. The main flow is: enter a project → brainstorm with an Agent → draft and revise → refine. An empty project is valid; references, search, and wiki building are optional. - Documents mode is a VSCode-like files/editor workspace. - Chat mode is a Claude/ChatGPT-like conversation workspace. - Both share the project and preserve unfinished work. A folder is a project scope and search namespace; the product has no global Library.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository3 other files it gives its agents.
- design-docs/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- design-docs/CLAUDE.mdCLAUDE.md
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
22 rules. About 0 are common, 18 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
Search UI says By keyword / By meaning.
- Distinctive: line 23
Use this map to find an answer, then the task routes below to choose what to read.
- Distinctive: line 44
Read only the affected sections, then inspect the implementation and tests.
- Distinctive: line 57
Vertical — follow a user task: Start with its Jxx journey and follow the entry through success, failure, cancellation, and recovery.
- Distinctive: line 60
Horizontal — compare the callers of a capability: Start with its design and engineering owner.
- Distinctive: line 68
Do not infer a unified implementation from a unified design.
- Distinctive: line 79
Simplicity: prefer one owner for each rule, state, and operation.
- Distinctive: line 86
When they differ, record the mismatch.
- Distinctive: line 88
Compatibility: remove historical-data-only migration/repair code under the previous-version data policy.
- Distinctive: line 90
Keep current validation, persistence, rollback, and crash recovery.
- Distinctive: line 100
Before writing code, read the affected journey, shared capability, and engineering boundary.
- Distinctive: line 101
Update them in the same change when behavior or constraints change.
- Distinctive: line 104
Keep each topic with its owner: product behavior in Design Docs, cross-module rules in Engineering Boundaries, local rationale beside code, …
- Distinctive: line 147
When the user reports a bug or asks for a feature, run the full loop:
- Very specific: line 157
Update affected docs in the same change.
- Distinctive: line 160
Leave work uncommitted until the user asks to commit.
- Distinctive: line 164
Test an observable result or a consequential failure: source preservation, project isolation, permissions, concurrency, cancellation, and …
- Distinctive: line 166
Do not add tests solely to repeat constants, file lists, trivial forwarding, or assertions already exercised by a Story.
- Very specific: line 171
Use focused commands while editing.
- Distinctive: line 179
Before creating commits, run the complete validation matrix for the pending change:
- Very specific: line 197
When the user asks to commit, group the dirty tree into focused commits by theme—feature, fix, refactor, docs—without unrelated work.
- Very specific: line 206
When the user asks to release or package a build, read and follow code-review/release-pipeline.md in full.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Working on StashBase
Product Context
StashBase is an IDE for writing in ordinary local projects. The main flow is: enter a project → brainstorm with an Agent → draft and revise → refine. An empty project is valid; references, search, and wiki building are optional.
- Documents mode is a VSCode-like files/editor workspace.
- Chat mode is a Claude/ChatGPT-like conversation workspace.
- Both share the project and preserve unfinished work. A folder is a project scope and search namespace; the product has no global Library.
Local file handling, preparation, indexing, retrieval, and Agent-assisted writing are implemented, including inline prose revision. Existing file diffs and save-conflict comparisons are separate. Defects and missing evidence are not additional planned features.
Search UI says By keyword / By meaning; grep/hybrid are implementation strategies.
Documentation Map
Use this map to find an answer, then the task routes below to choose what to read. These documents are references, not a checklist to read in full for every task.
| Document | Question it answers |
| README.md | What is StashBase, and how do I get started? The short external introduction. |
| Design Docs | What should the product do? Routes to product identity, terminology, vertical journeys, horizontal capabilities, and visual intent. Planned behavior stays in its owning design. |
| Review Guide | How should I scope a review, inspect a change, and report findings? |
| Engineering Boundaries | Which module or process owns a responsibility, and what rules must changes preserve? |
| Journey Coverage | Which code implements a user journey, what evidence exists, and what remains unproven or broken? |
| Release Runbook | How are source CI, packaging, signing, release verification, and publication performed? |
| MAINTENANCE.md | Who maintains each kind of document, when should it change, and how are status and compatibility decisions recorded? |
| CONTRIBUTING.md | How do I set up development and run focused or complete checks? |
| User/operator guides | How does a user or operator use and troubleshoot the product? |
| Release checklists | What still needs checking in the packaged application? |
CLAUDE.md points to this file; CONTEXT.md points to the
Glossary. They do not define separate policies.
Choose the Review Route
Read only the affected sections, then inspect the implementation and tests. Respect the requested scope, including whether frontend UI is excluded.
| Task | Starting point and route |
| Discuss a design or feature | Product overview → user journey → shared capability → engineering boundary → current code. Separate an agreed requirement from a proposed change. |
| Review a user journey | Select its Jxx section in Journey Coverage. Follow its renderer and host/service entries through the operation, failure, cancellation, and recovery paths. Read the linked product intent and boundaries. |
| Review a branch, commit, PR, or working tree | Pin the comparison point; include relevant uncommitted/new files. Follow the diff-first route, expanding through callers and crossed boundaries. |
| Diagnose or fix a bug | Find the affected journey/boundary, reproduce the failure, and trace its state owner. Verify the fix at the lowest useful layer and through the affected runtime flow when needed. |
| Simplify code or audit shared infrastructure | Start from Engineering Boundaries. Trace real callers and the purpose they serve; absence from a journey map alone is not proof of dead code. |
Vertical and Horizontal Review
- Vertical — follow a user task. Start with its Jxx journey and follow the entry through success, failure, cancellation, and recovery. Use Journey Coverage to find code and evidence, then identify the shared capabilities it uses.
- Horizontal — compare the callers of a capability. Start with its design and engineering owner. Trace real UI, Agent, MCP, and background callers as applicable; compare identity, state, permissions, errors, and recovery. Look for duplicate rules and bypasses, while preserving intentional differences.
- Use both when a change affects shared state or multiple entries. Check the shared rule once at its owner, then the distinct risks at each affected entry. A local change does not require an audit of every journey.
Do not infer a unified implementation from a unified design. Identify current owners in code; report consolidation opportunities separately from defects. See the review method for tracing details.
Review Principles
- Necessity: connect code to a current user task or required infrastructure. For whole-product audits, follow the necessity review: a caller, test, or old design paragraph alone does not justify retaining a feature. Question assumptions inherited from the former knowledge-base/global-Library model; optional wiki work must not become a prerequisite for writing.
- Simplicity: prefer one owner for each rule, state, and operation. Remove unused paths, duplicate logic, and unnecessary abstractions after checking callers. Do not preserve complexity merely because it already exists.
- Correctness: trace project scope, permissions, source versions, concurrent work, cancellation, disposal, and recovery. Failures must not broaden access, overwrite newer work, or silently report success.
- Evidence: code establishes current behavior; product docs establish intent. When they differ, record the mismatch. Tests prove only exercised paths; controlled fixtures do not establish real-provider quality or packaged behavior.
- Compatibility: remove historical-data-only migration/repair code under the previous-version data policy. Keep current validation, persistence, rollback, and crash recovery. User files and active external protocols are separate concerns.
Report findings with a code location, consequence, and supporting or missing evidence. Distinguish defects from product proposals and maintenance judgments. State what was reviewed, validated, and left unproven; do not equate a green command or a complete map with a complete review.
Documentation and Implementation
Before writing code, read the affected journey, shared capability, and engineering boundary. Update them in the same change when behavior or constraints change; update the Jxx entry when code ownership, evidence, or gaps change. Preserve stable journey IDs.
Keep each topic with its owner: product behavior in Design Docs, cross-module rules in Engineering Boundaries, local rationale beside code, exact checks in configuration, and assertions in tests. Keep the four-document review structure; do not create a document for every module or retain completed research as a second specification. All committed docs are English-only.
The renderer under renderer/ is the frontend. Read
the renderer boundary before
changing anything under renderer/src, and run pnpm check:web, the single
renderer gate used by CI. Exact rules live in the gate's configurations.
GitHub access for this repository
For GitHub write operations on liliu-z/stashbase (including PR/issue
comments, reviews, merges, and workflow dispatches), use the locally
authenticated gh CLI directly. The GitHub Connector is authenticated as a
different account and does not have write access to this repository, so do not
probe a Connector write first. Connector reads remain available when useful.
Temporary worktrees
Secondary Git worktrees do not inherit ignored local dependencies. Before
running Electron journeys that exercise indexing or sync, make sure the
worktree has python/.venv.nosync: reuse a working primary checkout's venv via
an explicit symlink when appropriate, or run pnpm setup:python. Without it,
/api/index-status and /api/sync return misleading 500 responses with
ModuleNotFoundError: No module named 'mfs'; treat that as worktree setup, not
as a product regression. Never commit the venv or its symlink.
Electron launch environment
The agent host may inherit ELECTRON_RUN_AS_NODE=1. Remove it from the child
environment before any command that must launch Electron as a desktop runtime,
including Electron smoke tests and temporary visual harnesses.
On POSIX, run commands as
env -u ELECTRON_RUN_AS_NODE pnpm test:electron:smoke (and apply the same
prefix to the other Electron launch command). If require('electron').app is
undefined or a smoke fails at app.setPath, treat the inherited variable as
environment setup, not a product regression. Do not remove the variable from
flows that intentionally run Electron's embedded Node runtime.
Development loop
When the user reports a bug or asks for a feature, run the full loop:
- Locate and diagnose after reading the relevant design and engineering boundary sections.
- Implement while preserving these cross-cutting constraints: sync and conversion are folder-explicit; hidden derived notes never surface; one daemon owns the local index; credentials live only in Settings, never env.
- During implementation, run the smallest focused tests that exercise the changed behavior. Do not run the full validation matrix after every edit; reserve broad contract and build verification for the pre-commit gate unless a broader command is needed to diagnose the change.
- Update affected docs in the same change. Run
pnpm test:docsfor changes to the documentation structure, links, contracts, or journey mapping as part of the pre-commit gate. - Leave work uncommitted until the user asks to commit.
Test Selection
Test an observable result or a consequential failure: source preservation, project isolation, permissions, concurrency, cancellation, and recovery. Do not add tests solely to repeat constants, file lists, trivial forwarding, or assertions already exercised by a Story. Keep one primary test owner per rule; multiple layers need tests only when they introduce distinct risks. Mocks prove local decisions, not a complete journey or real-provider quality.
Use focused commands while editing. Run the complete
affected gate once after implementation, not after every edit. A completed
pnpm check satisfies its constituent gates; do not run them again without
new changes or a failed check. Build once and reuse those exact outputs within
the same validation run. Keep genuine evidence gaps in Journey Coverage.
Pre-commit verification
Before creating commits, run the complete validation matrix for the pending change:
pnpm typecheckfor host and renderer types; ifcheck:webhas already checked renderer types for this change, run onlypnpm typecheck:host;pnpm check:webfor renderer changes; it includes lint, coverage, Story accessibility, typecheck, architecture checks, and builds;- focused commands for every affected engineering boundary;
pnpm test:docsfor documentation structure, links, contracts, or journey mapping changes;pnpm test:electronandpnpm test:electron:smokefor release-blocking renderer and cross-process paths;- a driven runtime pass through the built application for a changed journey, recorded in the change itself. Journey automation and pixel baselines retired with the Playwright suites, so composition is reviewed by eye.
Commit protocol
When the user asks to commit, group the dirty tree into focused commits by
theme—feature, fix, refactor, docs—without unrelated work. Match existing
subjects: fix(scope): …, feat(scope): …, refactor(scope): …,
docs(scope): …, chore: …. Split mixed-file hunks when needed so each
commit stands on its own. Do not push unless the user says push or asks for a
release.
Release trigger
When the user asks to release or package a build, read and follow
code-review/release-pipeline.md in full.
The only question is the patch/minor/major version choice; everything after it
runs unattended. Tidy and push focused commits first, gate the tag on source CI
for the exact version-bump commit, then hand off GitHub Release publication and
verify all platform assets plus residual packaged UI sanity.
Packaging is release-only. pnpm dist:brew is a local macOS fallback, not the
default. Never commit packaged artifacts; outputs belong in release.nosync/.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

