@joshski/dust 0.1.106 → 0.1.108

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/README.md +2 -3
  2. package/dist/artifacts.js +2 -2
  3. package/dist/audits.js +296 -0
  4. package/dist/bucket/server-messages.d.ts +3 -2
  5. package/dist/core-principles.js +1401 -87
  6. package/dist/dust.js +1955 -260
  7. package/package.json +2 -3
  8. package/.dust/principles/actionable-errors.md +0 -18
  9. package/.dust/principles/agent-agnostic-design.md +0 -21
  10. package/.dust/principles/agent-autonomy.md +0 -19
  11. package/.dust/principles/agent-context-inference.md +0 -19
  12. package/.dust/principles/agent-specific-enhancement.md +0 -23
  13. package/.dust/principles/agentic-flow-state.md +0 -24
  14. package/.dust/principles/atomic-commits.md +0 -15
  15. package/.dust/principles/batteries-included.md +0 -17
  16. package/.dust/principles/boy-scout-rule.md +0 -15
  17. package/.dust/principles/broken-windows.md +0 -17
  18. package/.dust/principles/clarity-over-brevity.md +0 -13
  19. package/.dust/principles/co-located-tests.md +0 -13
  20. package/.dust/principles/comprehensive-assertions.md +0 -50
  21. package/.dust/principles/comprehensive-test-coverage.md +0 -15
  22. package/.dust/principles/consistent-naming.md +0 -13
  23. package/.dust/principles/context-optimised-code.md +0 -15
  24. package/.dust/principles/context-window-efficiency.md +0 -15
  25. package/.dust/principles/cross-platform-compatibility.md +0 -19
  26. package/.dust/principles/debugging-tooling.md +0 -19
  27. package/.dust/principles/decoupled-code.md +0 -16
  28. package/.dust/principles/dependency-injection.md +0 -15
  29. package/.dust/principles/design-for-testability.md +0 -17
  30. package/.dust/principles/development-traceability.md +0 -19
  31. package/.dust/principles/easy-adoption.md +0 -17
  32. package/.dust/principles/environment-independent-tests.md +0 -19
  33. package/.dust/principles/exploratory-tooling.md +0 -19
  34. package/.dust/principles/fast-feedback-loops.md +0 -15
  35. package/.dust/principles/fast-feedback.md +0 -13
  36. package/.dust/principles/functional-core-imperative-shell.md +0 -15
  37. package/.dust/principles/human-ai-collaboration.md +0 -18
  38. package/.dust/principles/ideal-agent-developer-experience.md +0 -24
  39. package/.dust/principles/intuitive-directory-structure.md +0 -13
  40. package/.dust/principles/keep-unit-tests-pure.md +0 -25
  41. package/.dust/principles/lightweight-planning.md +0 -16
  42. package/.dust/principles/lint-everything.md +0 -19
  43. package/.dust/principles/maintainable-codebase.md +0 -21
  44. package/.dust/principles/make-changes-with-confidence.md +0 -23
  45. package/.dust/principles/make-the-change-easy.md +0 -15
  46. package/.dust/principles/minimal-dependencies.md +0 -13
  47. package/.dust/principles/naming-matters.md +0 -14
  48. package/.dust/principles/progressive-disclosure.md +0 -15
  49. package/.dust/principles/readable-test-data.md +0 -48
  50. package/.dust/principles/reasonably-dry.md +0 -13
  51. package/.dust/principles/repository-hygiene.md +0 -14
  52. package/.dust/principles/reproducible-checks.md +0 -13
  53. package/.dust/principles/runtime-agnostic-tests.md +0 -13
  54. package/.dust/principles/self-contained-repository.md +0 -17
  55. package/.dust/principles/self-diagnosing-tests.md +0 -54
  56. package/.dust/principles/slow-feedback-coping.md +0 -15
  57. package/.dust/principles/small-units.md +0 -17
  58. package/.dust/principles/some-big-design-up-front.md +0 -34
  59. package/.dust/principles/stop-the-line.md +0 -13
  60. package/.dust/principles/stubs-over-mocks.md +0 -19
  61. package/.dust/principles/task-first-workflow.md +0 -13
  62. package/.dust/principles/test-isolation.md +0 -19
  63. package/.dust/principles/traceable-decisions.md +0 -13
  64. package/.dust/principles/trunk-based-development.md +0 -19
  65. package/.dust/principles/unit-test-coverage.md +0 -13
  66. package/.dust/principles/unsurprising-ux.md +0 -15
  67. package/.dust/principles/vcs-independence.md +0 -13
@@ -1,25 +0,0 @@
1
- # Keep Unit Tests Pure
2
-
3
- Unit tests (those run very frequently as part of a tight feedback loop) should be pure and side-effect free. A test is **not** a unit test if it:
4
-
5
- - Accesses a database
6
- - Communicates over a network
7
- - Touches the file system
8
- - Cannot run concurrently with other tests
9
- - Requires special environment setup
10
-
11
- "Unit tests" here means tests run frequently during development — not system tests, which intentionally exercise the full stack including I/O. Pure unit tests exercise only business logic, not infrastructure.
12
-
13
- The value of pure unit tests is that they are fast, deterministic, and isolate business logic from infrastructure concerns. When unit tests pass but integration or system tests fail, developers can immediately narrow the problem to the boundary layer — a diagnostic "binary chop" that accelerates debugging.
14
-
15
- ## Migration Guidance
16
-
17
- Where existing tests are impure (e.g. they spawn processes, write temporary files, or make network calls), prefer converting them to use in-memory alternatives — stubs, fakes, or dependency-injected doubles — rather than leaving them as-is. Opportunistic migration is fine; a big-bang rewrite is not required.
18
-
19
- ## Parent Principle
20
-
21
- - [Make Changes with Confidence](make-changes-with-confidence.md)
22
-
23
- ## Sub-Principles
24
-
25
- - (none)
@@ -1,16 +0,0 @@
1
- # Lightweight Planning
2
-
3
- Dust aims to be a minimal, low-overhead planning system that stays relevant over time.
4
-
5
- Planning artifacts are simple markdown files that live alongside code. Ideas are intentionally vague until implementation is imminent. Tasks are small and completable in single commits. Facts document current reality rather than aspirational states.
6
-
7
- The system avoids the staleness problem by deferring detail until the last responsible moment and deleting completed work rather than archiving it.
8
-
9
- ## Parent Principle
10
-
11
- - [Human-AI Collaboration](human-ai-collaboration.md)
12
-
13
- ## Sub-Principles
14
-
15
- - [Task-First Workflow](task-first-workflow.md)
16
- - [Some Big Design Up Front](some-big-design-up-front.md)
@@ -1,19 +0,0 @@
1
- # Lint Everything
2
-
3
- Prefer static analysis over runtime checks. Every error caught by a linter is an error that never reaches tests, and every error caught by tests is an error that never reaches production.
4
-
5
- Lint markdown, lint types, lint formatting. If it can be checked statically, check it. Linters are fast, deterministic, and catch entire categories of bugs before code even runs.
6
-
7
- This project lints:
8
- - TypeScript (type checking and style)
9
- - Markdown (broken links, required sections)
10
- - Task files (structure validation)
11
- - Principle hierarchy (parent/child consistency)
12
-
13
- ## Parent Principle
14
-
15
- - [Make Changes with Confidence](make-changes-with-confidence.md)
16
-
17
- ## Sub-Principles
18
-
19
- (none)
@@ -1,21 +0,0 @@
1
- # Maintainable Codebase
2
-
3
- The dust codebase should be easy to understand, modify, and extend.
4
-
5
- This principle governs how we develop and maintain dust itself, separate from the principles that describe what dust offers its users. A well-maintained codebase enables rapid iteration, reduces bugs, and makes contributions easier.
6
-
7
- ## Parent Principle
8
-
9
- - [Agentic Flow State](agentic-flow-state.md)
10
-
11
- ## Sub-Principles
12
-
13
- - [Make Changes with Confidence](make-changes-with-confidence.md)
14
- - [Minimal Dependencies](minimal-dependencies.md)
15
- - [Intuitive Directory Structure](intuitive-directory-structure.md)
16
- - [Repository Hygiene](repository-hygiene.md)
17
- - [Naming Matters](naming-matters.md)
18
- - [Reasonably DRY](reasonably-dry.md)
19
- - [Make the Change Easy](make-the-change-easy.md)
20
- - [Boy Scout Rule](boy-scout-rule.md)
21
- - [Broken Windows](broken-windows.md)
@@ -1,23 +0,0 @@
1
- # Make Changes with Confidence
2
-
3
- Developers should be able to modify code without fear of breaking existing behavior.
4
-
5
- Tests, type checking, and other automated verification enable safe refactoring and evolution of the codebase. When changes break something, fast feedback identifies the problem before it spreads. This confidence encourages continuous improvement rather than fragile, stagnant code.
6
-
7
- ## Parent Principle
8
-
9
- - [Maintainable Codebase](maintainable-codebase.md)
10
-
11
- ## Sub-Principles
12
-
13
- - [Comprehensive Assertions](comprehensive-assertions.md)
14
- - [Decoupled Code](decoupled-code.md)
15
- - [Fast Feedback](fast-feedback.md)
16
- - [Lint Everything](lint-everything.md)
17
- - [Readable Test Data](readable-test-data.md)
18
- - [Reproducible Checks](reproducible-checks.md)
19
- - [Stop the Line](stop-the-line.md)
20
- - [Keep Unit Tests Pure](keep-unit-tests-pure.md)
21
- - [Test Isolation](test-isolation.md)
22
- - [Self-Diagnosing Tests](self-diagnosing-tests.md)
23
- - [Unit Test Coverage](unit-test-coverage.md)
@@ -1,15 +0,0 @@
1
- # Make the Change Easy
2
-
3
- For each desired change, make the change easy, then make the easy change.
4
-
5
- This principle, articulated by Kent Beck, recognizes that the hardest part of a change is often not the change itself but the state of the code receiving it. When code resists a change, the right response is to first refactor until the change becomes straightforward, and only then make it. The warning - "this may be hard" - acknowledges that preparing the ground takes real effort, but the result is a change that fits naturally rather than one forced in against the grain.
6
-
7
- Work that supports this principle includes refactoring before feature work, improving abstractions that make a category of changes simpler, and resisting the urge to bolt changes onto code that isn't ready for them.
8
-
9
- ## Parent Principle
10
-
11
- - [Maintainable Codebase](maintainable-codebase.md)
12
-
13
- ## Sub-Principles
14
-
15
- - (none)
@@ -1,13 +0,0 @@
1
- # Minimal Dependencies
2
-
3
- Dust should avoid coupling to specific tools so we can switch to better alternatives as they emerge.
4
-
5
- By keeping dependencies minimal and using standard APIs where possible, we maintain the freedom to adopt new tools without major rewrites. This applies to runtimes, test frameworks, build tools, and other infrastructure choices.
6
-
7
- ## Parent Principle
8
-
9
- - [Maintainable Codebase](maintainable-codebase.md)
10
-
11
- ## Sub-Principles
12
-
13
- - [Runtime Agnostic Tests](runtime-agnostic-tests.md)
@@ -1,14 +0,0 @@
1
- # Naming Matters
2
-
3
- Good naming reduces waste by eliminating confusion and making code self-documenting.
4
-
5
- Poor names cause rework, bugs, and communication overhead. When names don't clearly convey meaning, developers waste time deciphering code, misunderstand intentions, and introduce defects. Well-chosen names serve as documentation that never goes stale, reducing the need for explanatory comments and enabling both humans and AI agents to navigate the codebase efficiently.
6
-
7
- ## Parent Principle
8
-
9
- - [Maintainable Codebase](maintainable-codebase.md)
10
-
11
- ## Sub-Principles
12
-
13
- - [Consistent Naming](consistent-naming.md)
14
- - [Clarity Over Brevity](clarity-over-brevity.md)
@@ -1,15 +0,0 @@
1
- # Progressive Disclosure
2
-
3
- Dust should reveal details progressively as a way of achieving context window efficiency.
4
-
5
- Not all information is needed at once. A task list showing just titles is sufficient for choosing what to work on. Full task details are only needed when actively implementing. Linked principles and facts can be followed when deeper context is required.
6
-
7
- This layered approach keeps initial reads lightweight while preserving access to complete information when needed.
8
-
9
- ## Parent Principle
10
-
11
- - [Context Window Efficiency](context-window-efficiency.md)
12
-
13
- ## Sub-Principles
14
-
15
- - (none)
@@ -1,48 +0,0 @@
1
- # Readable Test Data
2
-
3
- Test data setup should use natural structures that mirror what they represent.
4
-
5
- ## Why it matters
6
-
7
- When test data is easy to read, tests become self-documenting. A file system hierarchy expressed as a nested object immediately conveys structure, while a flat Map with path strings requires mental parsing to understand the relationships.
8
-
9
- ## In practice
10
-
11
- Prefer literal structures that visually match the domain:
12
-
13
- ```javascript
14
- // Avoid: flat paths that obscure hierarchy
15
- const fs = createFileSystemEmulator({
16
- files: new Map([['/project/.dust/principles/my-goal.md', '# My Goal']]),
17
- existingPaths: new Set(['/project/.dust/ideas']),
18
- })
19
-
20
- // Prefer: nested object that mirrors file system structure
21
- const fs = createFileSystemEmulator({
22
- project: {
23
- '.dust': {
24
- principles: {
25
- 'my-goal.md': '# My Goal'
26
- },
27
- ideas: {}
28
- }
29
- }
30
- })
31
- ```
32
-
33
- The nested form:
34
- - Shows parent-child relationships through indentation
35
- - Makes empty directories explicit with empty objects
36
- - Requires no mental path concatenation to understand structure
37
-
38
- ## How to evaluate
39
-
40
- Work supports this principle when test setup data uses structures that visually resemble what they represent, reducing cognitive load for readers.
41
-
42
- ## Parent Principle
43
-
44
- - [Make Changes with Confidence](make-changes-with-confidence.md)
45
-
46
- ## Sub-Principles
47
-
48
- - (none)
@@ -1,13 +0,0 @@
1
- # Reasonably DRY
2
-
3
- Don't repeat yourself is a good principle, but don't overdo it.
4
-
5
- Extracting shared code too eagerly can create tight coupling, obscure intent, and make changes harder. When two pieces of code look similar but serve different purposes or are likely to evolve independently, duplication is the better choice. The cost of a wrong abstraction is higher than the cost of a little repetition. Extract shared code when the duplication is truly about the same concept and has proven stable, not just because two things happen to look alike right now.
6
-
7
- ## Parent Principle
8
-
9
- - [Maintainable Codebase](maintainable-codebase.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,14 +0,0 @@
1
- # Repository Hygiene
2
-
3
- Dust repositories should maintain a clean, organized state with minimal noise.
4
-
5
- This includes proper gitignore configuration to exclude build artifacts, dependencies, editor files, and other generated content from version control. A well-maintained repository makes it easier for both humans and AI to navigate and understand the codebase.
6
-
7
- ## Parent Principle
8
-
9
- - [Maintainable Codebase](maintainable-codebase.md)
10
-
11
- ## Sub-Principles
12
-
13
- - [Atomic Commits](atomic-commits.md)
14
- - [Trunk-Based Development](trunk-based-development.md)
@@ -1,13 +0,0 @@
1
- # Reproducible Checks
2
-
3
- Every check must produce the same result regardless of who runs it, when, or on what machine. If a check passes for one developer but fails for another, the check is broken.
4
-
5
- Concretely, checks should pin their tool versions via the project's dependency manager (e.g. `devDependencies`) rather than relying on `npx`/`bunx` to fetch the latest version at runtime. Unpinned versions introduce non-determinism — a check that passed yesterday may fail today due to a tool upgrade that nobody chose to adopt.
6
-
7
- ## Parent Principle
8
-
9
- - [Make Changes with Confidence](make-changes-with-confidence.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,13 +0,0 @@
1
- # Runtime Agnostic Tests
2
-
3
- Dust's test suite should work across JavaScript runtimes.
4
-
5
- Tests should use standard JavaScript testing patterns that work across Node.js, Bun, and other runtimes. Avoiding runtime-specific test APIs ensures the project can leverage different runtimes' advantages while maintaining broad compatibility.
6
-
7
- ## Parent Principle
8
-
9
- - [Minimal Dependencies](minimal-dependencies.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,17 +0,0 @@
1
- # Self-Contained Repository
2
-
3
- Where possible, developers and agents should have everything they need to be productive, within the repository.
4
-
5
- No third-party tools should be required beyond those that can be installed with a single command defined in the repository. Setup instructions, scripts, configuration, and dependencies should all live in version control so that cloning the repo and running a single install command is sufficient to start working. This eliminates onboarding friction, reduces "works on my machine" issues, and is especially important for agents — who cannot browse the web to find missing tools or ask colleagues how to set things up.
6
-
7
- ## Applicability
8
-
9
- Internal
10
-
11
- ## Parent Principle
12
-
13
- - [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
14
-
15
- ## Sub-Principles
16
-
17
- - (none)
@@ -1,54 +0,0 @@
1
- # Self-Diagnosing Tests
2
-
3
- When a big test fails, it should be self-evident how to diagnose and fix the failure.
4
-
5
- The more moving parts a test has — end-to-end, system, integration — the more critical this becomes. A test that fails with `expected true, received false` forces the developer (or agent) to re-run, add logging, and guess. A test that fails with a rich diff showing the actual state versus the expected state turns diagnosis into reading.
6
-
7
- ## Anti-patterns
8
-
9
- **Boolean flattening** — collapsing a rich value into true/false before asserting:
10
- ```javascript
11
- // Bad: "expected true, received false" — what events arrived?
12
- expect(events.some(e => e.type === 'check-passed')).toBe(true)
13
-
14
- // Good: shows the actual event types on failure
15
- expect(events.map(e => e.type)).toContain('check-passed')
16
- ```
17
-
18
- **Length-only assertions** — checking count without showing contents:
19
- ```javascript
20
- // Bad: "expected 2, received 0" — what requests were captured?
21
- expect(requests.length).toBe(2)
22
-
23
- // Good: shows the actual requests on failure
24
- expect(requests).toHaveLength(2) // vitest shows the array
25
- ```
26
-
27
- **Silent guards** — using `if` where an assertion belongs:
28
- ```javascript
29
- // Bad: silently passes when settings is undefined
30
- if (settings) {
31
- expect(JSON.parse(settings).key).toBeDefined()
32
- }
33
-
34
- // Good: fails explicitly if settings is missing
35
- expect(settings).toBeDefined()
36
- const parsed = JSON.parse(settings!)
37
- expect(parsed.key).toBeDefined()
38
- ```
39
-
40
- ## The test
41
-
42
- If a test fails, can a developer who has never seen the code identify the problem from the failure output alone — without re-running, adding console.logs, or reading the test source? The closer to "yes", the better.
43
-
44
- ## How to evaluate
45
-
46
- Work supports this principle when every assertion in a system or integration test would, on failure, reveal the actual state richly enough to guide a fix. Bare boolean checks, length-only assertions, and silent conditional guards are violations.
47
-
48
- ## Parent Principle
49
-
50
- - [Make Changes with Confidence](make-changes-with-confidence.md)
51
-
52
- ## Sub-Principles
53
-
54
- - (none)
@@ -1,15 +0,0 @@
1
- # Slow Feedback Coping
2
-
3
- Some feedback is unavoidably slow — dust should offer coping strategies rather than pretending it can be eliminated.
4
-
5
- Integration tests, end-to-end tests, deployment pipelines, and external API calls all take time. Pretending they can be made instant is unrealistic. Instead, dust should help developers and agents cope with slow feedback effectively: by structuring work so that fast checks catch most problems early, by batching slow checks intelligently, by providing clear progress indicators, and by ensuring that when slow feedback does arrive, it is actionable and specific.
6
-
7
- Strategies include separating fast and slow test suites, running slow checks asynchronously or in CI, caching expensive operations, and designing workflows that minimise how often slow feedback is needed.
8
-
9
- ## Parent Principle
10
-
11
- - [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
12
-
13
- ## Sub-Principles
14
-
15
- - (none)
@@ -1,17 +0,0 @@
1
- # Small Units
2
-
3
- Ideas, principles, facts, and tasks should each be as discrete and fine-grained as possible.
4
-
5
- Small, focused documents enable precise relationships between them. A task can link to exactly the principles it serves. A fact can describe one specific aspect of the system. This granularity reduces ambiguity.
6
-
7
- Tasks especially benefit from being small. A narrowly scoped task gives agents or humans the best chance of delivering exactly what was intended, in a single atomic commit.
8
-
9
- Note: This principle directly supports [Lightweight Planning](lightweight-planning.md), which explicitly mentions that "Tasks are small and completable in single commits."
10
-
11
- ## Parent Principle
12
-
13
- - [Agent Autonomy](agent-autonomy.md)
14
-
15
- ## Sub-Principles
16
-
17
- - (none)
@@ -1,34 +0,0 @@
1
- # Some Big Design Up Front
2
-
3
- AI agents lower the cost of architectural exploration, making heavier upfront investment rational during the idea phase.
4
-
5
- Agile's rejection of "big design up front" (BDUF) was largely economic: detailed architecture was expensive to produce and often wrong. AI agents change that equation — they can explore multiple variants, prototype them, and measure trade-offs cheaply. When evaluating alternatives costs less, the expected value of avoiding large structural mistakes increases.
6
-
7
- This doesn't mean returning to traditional BDUF. Uncertainty about future requirements still limits what prediction can achieve. The insight is that the optimal amount of upfront work has shifted, not that prediction became reliable.
8
-
9
- The model is hybrid: thorough AI-assisted exploration during ideas, followed by straightforward execution during tasks. "Lightweight" refers to task-level planning, not idea-level exploration. Invest heavily in understanding alternatives during the idea phase, then decompose into atomic tasks once the direction is clear.
10
-
11
- ## Convergence Criteria
12
-
13
- Exploration should continue until clear trade-offs are identified and the chosen approach can be articulated against alternatives. This is convergence-based, not time-boxed — simple ideas converge quickly, complex architectural decisions require more exploration.
14
-
15
- When exploration feels "done":
16
-
17
- - Multiple approaches have been considered
18
- - Trade-offs between approaches are understood
19
- - The chosen direction has clear justification
20
- - Remaining uncertainty is about requirements, not design
21
-
22
- If a task requires significant design decisions during execution, it wasn't ready to be a task.
23
-
24
- ## Documenting Alternatives
25
-
26
- Ideas should document the alternatives considered and why they were ruled out. This creates a decision log that helps future agents and humans understand context. Include alternatives in the idea body or Open Questions sections.
27
-
28
- ## Parent Principle
29
-
30
- - [Lightweight Planning](lightweight-planning.md)
31
-
32
- ## Sub-Principles
33
-
34
- - (none)
@@ -1,13 +0,0 @@
1
- # Stop the Line
2
-
3
- Any worker — human or agent — should halt and fix a problem the moment they detect it, rather than letting defects propagate downstream.
4
-
5
- Originating from the Toyota production system, "Stop the Line" empowers every participant to pause work immediately upon identifying a defect, failing check, or safety hazard. Problems are cheaper to fix at their source than after they've compounded through later stages. In the context of dust, this means agents and humans alike should treat broken checks, test failures, and lint errors as blockers that demand immediate attention — not warnings to be deferred.
6
-
7
- ## Parent Principle
8
-
9
- - [Make Changes with Confidence](make-changes-with-confidence.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,19 +0,0 @@
1
- # Stubs Over Mocks
2
-
3
- Prefer hand-rolled stubs over mocks, in unit tests. Stubs keep tests focused on observable behavior instead of implementation details.
4
-
5
- Mocks tend to encode a script of “expected calls” (what was invoked, in what order, with what arguments). That makes tests brittle: harmless refactors (changing internal decomposition, adding caching, batching calls, reordering operations) can break tests even when the externally visible behavior is unchanged. You end up maintaining tests that police how the code works rather than what it does.
6
-
7
- Stubs (and especially in-memory emulators) push tests toward the contract: provide inputs, run the code, assert outputs and side effects. When a test fails, it’s usually because a behavior changed, not because the internal call choreography shifted. That improves signal-to-noise, reduces rewrites during refactors, and makes it easier to evolve the implementation.
8
-
9
- For external dependencies (databases, queues, object stores, HTTP services), the default choice should be an in-memory emulator: a drop-in replacement that is faithful enough to the real interface/semantics but runs entirely in-process. It gives most of the benefits of integration testing—realistic state transitions, error modes, concurrency behavior where relevant—without the cost, flakiness, and setup burden of booting real infrastructure. It also keeps the test environment hermetic (no network, no shared state), which improves determinism and makes tests fast.
10
-
11
- Still use mocks selectively—mainly to assert something is called (e.g., telemetry emission, "at most once" notifications, payment capture guarded by a feature flag) or when a dependency is impossible to emulate. But for most cases, stubs and in-memory emulators produce tests that are clearer, more resilient to refactoring, and better aligned with the system's actual contracts.
12
-
13
- ## Parent Principle
14
-
15
- - [Decoupled Code](decoupled-code.md)
16
-
17
- ## Sub-Principles
18
-
19
- - (none)
@@ -1,13 +0,0 @@
1
- # Task-First Workflow
2
-
3
- Work should be captured as a task before implementation begins, creating traceability between intent and outcome.
4
-
5
- This discipline ensures that every change has a documented purpose. The commit history shows pairs of "Add task" followed by implementation, making it easy to understand why each change was made. It also prevents scope creep by defining boundaries before work starts.
6
-
7
- ## Parent Principle
8
-
9
- - [Lightweight Planning](lightweight-planning.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,19 +0,0 @@
1
- # Test Isolation
2
-
3
- Tests should not interfere with one another. Each test must be independently runnable and produce the same result regardless of execution order or which other tests run alongside it.
4
-
5
- This means:
6
- - No shared mutable state between tests
7
- - No reliance on test execution order
8
- - No file system or environment pollution
9
- - Each test sets up its own dependencies
10
-
11
- Test isolation enables parallel execution, makes failures easier to diagnose, and prevents cascading false failures when one test breaks.
12
-
13
- ## Parent Principle
14
-
15
- - [Make Changes with Confidence](make-changes-with-confidence.md)
16
-
17
- ## Sub-Principles
18
-
19
- - [Environment-Independent Tests](environment-independent-tests.md)
@@ -1,13 +0,0 @@
1
- # Traceable Decisions
2
-
3
- The commit history should explain why changes were made, not just what changed.
4
-
5
- Commit messages should capture intent and context that would otherwise be lost. Future maintainers (human or AI) will traverse history to understand the reasoning behind decisions. A commit that says "Fix bug" is less valuable than one that explains what was broken and why the fix is correct.
6
-
7
- ## Parent Principle
8
-
9
- - [Atomic Commits](atomic-commits.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,19 +0,0 @@
1
- # Trunk-Based Development
2
-
3
- Dust is designed to support a non-branching workflow where developers commit directly to a single main branch.
4
-
5
- In trunk-based development, teams collaborate on code in one primary branch rather than maintaining multiple long-lived feature branches. This eliminates merge conflicts, enables continuous integration, and keeps the codebase continuously releasable.
6
-
7
- The `dust loop claude` command embodies this philosophy: agents pull from main, implement a task, and push directly back to main. There are no feature branches, no pull requests, no merge queues. Each commit is atomic and complete.
8
-
9
- This approach scales through discipline rather than isolation. Feature flags and incremental changes replace long-running branches. The repository history becomes a linear sequence of working states.
10
-
11
- See: https://trunkbaseddevelopment.com/
12
-
13
- ## Parent Principle
14
-
15
- - [Repository Hygiene](repository-hygiene.md)
16
-
17
- ## Sub-Principles
18
-
19
- (none)
@@ -1,13 +0,0 @@
1
- # Unit Test Coverage
2
-
3
- Complete unit test coverage ensures low-level tests give users direct feedback as they change the code.
4
-
5
- Excluding system tests from coverage reporting focuses attention on unit tests - the tests that provide the fastest, most specific feedback. When coverage tools only measure unit tests, developers can quickly identify which parts of the codebase lack fine-grained test protection.
6
-
7
- ## Parent Principle
8
-
9
- - [Make Changes with Confidence](make-changes-with-confidence.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)
@@ -1,15 +0,0 @@
1
- # Unsurprising UX
2
-
3
- The user interface should be as "guessable" as possible.
4
-
5
- Following the [Principle of Least Astonishment](https://en.wikipedia.org/wiki/Principle_of_least_astonishment), users form expectations about how a tool will behave based on conventions, prior experience, and intuition. Dust's interface (including the CLI) should match those expectations wherever possible. If users are observed trying to use the interface in ways we didn't anticipate, the interface should be adjusted to meet their expectations — even if that means supporting many ways of achieving the same result.
6
-
7
- Surprising behavior erodes trust and slows people down. Unsurprising behavior lets users stay in flow.
8
-
9
- ## Parent Principle
10
-
11
- - [Easy Adoption](easy-adoption.md)
12
-
13
- ## Sub-Principles
14
-
15
- - (none)
@@ -1,13 +0,0 @@
1
- # VCS Independence
2
-
3
- Dust should work independently of any specific version control system.
4
-
5
- While git is common, dust's core functionality should not require git. This enables use in repositories using other VCS (Mercurial, SVN, Perforce) or in non-VCS workflows.
6
-
7
- ## Parent Principle
8
-
9
- - [Easy Adoption](easy-adoption.md)
10
-
11
- ## Sub-Principles
12
-
13
- - (none)