@joshski/dust 0.1.100 → 0.1.102
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.
- package/.dust/principles/actionable-errors.md +18 -0
- package/.dust/principles/agent-agnostic-design.md +21 -0
- package/.dust/principles/agent-autonomy.md +19 -0
- package/.dust/principles/agent-context-inference.md +19 -0
- package/.dust/principles/agent-specific-enhancement.md +23 -0
- package/.dust/principles/atomic-commits.md +15 -0
- package/.dust/principles/batteries-included.md +17 -0
- package/.dust/principles/boy-scout-rule.md +15 -0
- package/.dust/principles/broken-windows.md +17 -0
- package/.dust/principles/clarity-over-brevity.md +13 -0
- package/.dust/principles/co-located-tests.md +13 -0
- package/.dust/principles/comprehensive-assertions.md +50 -0
- package/.dust/principles/comprehensive-test-coverage.md +15 -0
- package/.dust/principles/consistent-naming.md +13 -0
- package/.dust/principles/context-optimised-code.md +15 -0
- package/.dust/principles/context-window-efficiency.md +15 -0
- package/.dust/principles/cross-platform-compatibility.md +19 -0
- package/.dust/principles/debugging-tooling.md +19 -0
- package/.dust/principles/decoupled-code.md +16 -0
- package/.dust/principles/dependency-injection.md +15 -0
- package/.dust/principles/design-for-testability.md +17 -0
- package/.dust/principles/development-traceability.md +19 -0
- package/.dust/principles/easy-adoption.md +17 -0
- package/.dust/principles/enable-flow-state.md +20 -0
- package/.dust/principles/environment-independent-tests.md +19 -0
- package/.dust/principles/exploratory-tooling.md +19 -0
- package/.dust/principles/fast-feedback-loops.md +15 -0
- package/.dust/principles/fast-feedback.md +13 -0
- package/.dust/principles/functional-core-imperative-shell.md +15 -0
- package/.dust/principles/human-ai-collaboration.md +18 -0
- package/.dust/principles/ideal-agent-developer-experience.md +24 -0
- package/.dust/principles/intuitive-directory-structure.md +13 -0
- package/.dust/principles/keep-unit-tests-pure.md +25 -0
- package/.dust/principles/lightweight-planning.md +16 -0
- package/.dust/principles/lint-everything.md +19 -0
- package/.dust/principles/maintainable-codebase.md +21 -0
- package/.dust/principles/make-changes-with-confidence.md +23 -0
- package/.dust/principles/make-the-change-easy.md +15 -0
- package/.dust/principles/minimal-dependencies.md +13 -0
- package/.dust/principles/naming-matters.md +14 -0
- package/.dust/principles/progressive-disclosure.md +15 -0
- package/.dust/principles/readable-test-data.md +48 -0
- package/.dust/principles/reasonably-dry.md +13 -0
- package/.dust/principles/repository-hygiene.md +14 -0
- package/.dust/principles/reproducible-checks.md +13 -0
- package/.dust/principles/runtime-agnostic-tests.md +13 -0
- package/.dust/principles/self-contained-repository.md +17 -0
- package/.dust/principles/self-diagnosing-tests.md +54 -0
- package/.dust/principles/slow-feedback-coping.md +15 -0
- package/.dust/principles/small-units.md +17 -0
- package/.dust/principles/some-big-design-up-front.md +34 -0
- package/.dust/principles/stop-the-line.md +13 -0
- package/.dust/principles/stubs-over-mocks.md +19 -0
- package/.dust/principles/task-first-workflow.md +13 -0
- package/.dust/principles/test-isolation.md +19 -0
- package/.dust/principles/traceable-decisions.md +13 -0
- package/.dust/principles/trunk-based-development.md +19 -0
- package/.dust/principles/unit-test-coverage.md +13 -0
- package/.dust/principles/unsurprising-ux.md +15 -0
- package/.dust/principles/vcs-independence.md +13 -0
- package/dist/audits.js +33 -1
- package/dist/bucket/repository.d.ts +28 -0
- package/dist/claude/spawn-claude-code.d.ts +12 -0
- package/dist/claude/types.d.ts +2 -0
- package/dist/cli/types.d.ts +1 -0
- package/dist/core-principles.js +184 -0
- package/dist/dust.js +775 -124
- package/dist/env-config.d.ts +2 -0
- package/dist/filesystem-emulator.js +1 -1
- package/dist/lint/validators/principle-hierarchy.d.ts +0 -1
- package/dist/logging/index.d.ts +10 -1
- package/dist/logging/match.d.ts +21 -1
- package/dist/logging.js +18 -3
- package/dist/patch/index.d.ts +8 -0
- package/dist/patch.js +54 -1
- package/dist/proxy/claude-api-proxy.d.ts +34 -1
- package/dist/proxy/git-credential-proxy.d.ts +2 -0
- package/dist/proxy/helper-token.d.ts +73 -0
- package/package.json +7 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Actionable Errors
|
|
2
|
+
|
|
3
|
+
Error messages should tell you what to do next, not just what went wrong.
|
|
4
|
+
|
|
5
|
+
When something fails, the message should provide:
|
|
6
|
+
- A clear description of the problem
|
|
7
|
+
- Specific guidance on how to fix it
|
|
8
|
+
- Context needed to take the next step
|
|
9
|
+
|
|
10
|
+
This is especially important for AI agents, who need concrete instructions to recover autonomously. A good error message turns a dead end into a signpost.
|
|
11
|
+
|
|
12
|
+
## Parent Principle
|
|
13
|
+
|
|
14
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
15
|
+
|
|
16
|
+
## Sub-Principles
|
|
17
|
+
|
|
18
|
+
- (none)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Agent-Agnostic Design
|
|
2
|
+
|
|
3
|
+
Dust should work with multiple agents without favoring one.
|
|
4
|
+
|
|
5
|
+
Rather than implementing agents, Dust generates prompts and context that can be passed to any capable agent. This keeps Dust lightweight and allows teams to use whatever agent tooling they prefer.
|
|
6
|
+
|
|
7
|
+
Dust may have built-in support for invoking popular agents (Claude, Aider, Codex, etc.), but the choice of agent should always be made by the user at runtime - never hard-coded into repository configuration.
|
|
8
|
+
|
|
9
|
+
Note: Supporting multiple agents directly contributes to [Easy Adoption](easy-adoption.md), since teams can use their preferred agent tools without being locked into a specific platform.
|
|
10
|
+
|
|
11
|
+
## Applicability
|
|
12
|
+
|
|
13
|
+
Internal
|
|
14
|
+
|
|
15
|
+
## Parent Principle
|
|
16
|
+
|
|
17
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
18
|
+
|
|
19
|
+
## Sub-Principles
|
|
20
|
+
|
|
21
|
+
- (none)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Agent Autonomy
|
|
2
|
+
|
|
3
|
+
Dust exists to enable AI agents to produce work autonomously.
|
|
4
|
+
|
|
5
|
+
With sufficient planning and small enough units, this works much better in practice.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Human-AI Collaboration](human-ai-collaboration.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- [Actionable Errors](actionable-errors.md)
|
|
14
|
+
- [Batteries Included](batteries-included.md)
|
|
15
|
+
- [Agent-Agnostic Design](agent-agnostic-design.md)
|
|
16
|
+
- [Agent Context Inference](agent-context-inference.md)
|
|
17
|
+
- [Agent-Specific Enhancement](agent-specific-enhancement.md)
|
|
18
|
+
- [Context Window Efficiency](context-window-efficiency.md)
|
|
19
|
+
- [Small Units](small-units.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Agent Context Inference
|
|
2
|
+
|
|
3
|
+
Terse human prompts should trigger the correct agent action.
|
|
4
|
+
|
|
5
|
+
When a human gives a brief instruction like "the button should be green", the agent should be able to infer what to do. The agent shouldn't require the human to specify file paths, component names, or implementation details that can be discovered from the repository.
|
|
6
|
+
|
|
7
|
+
This reduces friction for humans and makes agent interactions feel more natural. The burden of context discovery shifts to the agent, which can use dust's CLI and repository structure to find what it needs.
|
|
8
|
+
|
|
9
|
+
## Applicability
|
|
10
|
+
|
|
11
|
+
Internal
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- (none)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Agent-Specific Enhancement
|
|
2
|
+
|
|
3
|
+
Dust should detect and enhance the experience for specific agents while remaining agnostic at its core.
|
|
4
|
+
|
|
5
|
+
While Dust has [Agent-Agnostic Design](agent-agnostic-design.md) and works with any capable agent, it can still optimize the "agent DX" (developer experience) when it detects a specific agent is being used. This means:
|
|
6
|
+
|
|
7
|
+
- **Detection** - Dust may detect which agent is running (e.g., Claude Code, Aider, Cursor) through environment variables, configuration, or other signals
|
|
8
|
+
- **Enhancement** - Once detected, Dust can tailor its output format, prompts, or context to leverage that agent's specific strengths
|
|
9
|
+
- **Graceful fallback** - When no specific agent is detected, Dust provides a generic experience that works with any agent
|
|
10
|
+
|
|
11
|
+
This principle complements Agent-Agnostic Design: the core functionality never requires a specific agent, but the experience improves when one is recognized.
|
|
12
|
+
|
|
13
|
+
## Applicability
|
|
14
|
+
|
|
15
|
+
Internal
|
|
16
|
+
|
|
17
|
+
## Parent Principle
|
|
18
|
+
|
|
19
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
20
|
+
|
|
21
|
+
## Sub-Principles
|
|
22
|
+
|
|
23
|
+
- (none)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Atomic Commits
|
|
2
|
+
|
|
3
|
+
Each commit should tell a complete story, bundling implementation changes with their corresponding documentation updates.
|
|
4
|
+
|
|
5
|
+
When a task is completed, the commit deletes the task file, updates relevant facts to reflect the new reality, and removes any ideas that have been realized. This discipline ensures that any point in the commit history represents a coherent, self-documenting state of the project.
|
|
6
|
+
|
|
7
|
+
Clean commit history is essential because archaeology depends on it. Future humans and AI agents will traverse history to understand why decisions were made and how the system evolved.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Repository Hygiene](repository-hygiene.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- [Traceable Decisions](traceable-decisions.md)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Batteries Included
|
|
2
|
+
|
|
3
|
+
Dust should provide everything that is required (within reason) for an agent to be productive in an arbitrary codebase.
|
|
4
|
+
|
|
5
|
+
An agent working autonomously should not be blocked because a tool or configuration is missing. For example, dust should ship custom lint rules for different linters, even though those linters are not dependencies of dust itself. If an agent needs a capability to do its job well in a typical codebase, dust should provide it out of the box.
|
|
6
|
+
|
|
7
|
+
This means accepting some breadth of scope — bundling configs, rules, and utilities that target external tools — in exchange for agents that can start producing useful work immediately without manual setup.
|
|
8
|
+
|
|
9
|
+
## Applicability
|
|
10
|
+
|
|
11
|
+
Internal
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Boy Scout Rule
|
|
2
|
+
|
|
3
|
+
Always leave the code better than you found it.
|
|
4
|
+
|
|
5
|
+
When working in any area of the codebase, take the opportunity to make small improvements — clearer names, removed dead code, better structure — even if they're not directly related to the task at hand. These incremental improvements compound over time, preventing gradual decay and keeping the codebase healthy without requiring dedicated cleanup efforts.
|
|
6
|
+
|
|
7
|
+
The Boy Scout Rule is not a license for large-scale refactoring during unrelated work. Improvements should be small, obvious, and low-risk. If a cleanup is too large to include alongside the current task, capture it as a separate task instead.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Maintainable Codebase](maintainable-codebase.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Broken Windows
|
|
2
|
+
|
|
3
|
+
Don't leave broken windows unrepaired.
|
|
4
|
+
|
|
5
|
+
A broken window — a bad name, a hack, a TODO that lingers, a test that's been skipped — signals that nobody cares. That signal invites more neglect. One shortcut becomes two, then ten, and the codebase quietly rots from the inside.
|
|
6
|
+
|
|
7
|
+
When you spot a broken window, fix it immediately if the fix is small. If it's too large, capture it as a task so it doesn't get forgotten. The key is to never normalise the damage. Even a comment acknowledging the problem ("this needs fixing because...") is better than silent acceptance.
|
|
8
|
+
|
|
9
|
+
This principle complements the [Boy Scout Rule](boy-scout-rule.md): the Boy Scout Rule encourages proactive improvement, while Broken Windows warns against tolerating known problems. Together they keep entropy at bay.
|
|
10
|
+
|
|
11
|
+
## Parent Principle
|
|
12
|
+
|
|
13
|
+
- [Maintainable Codebase](maintainable-codebase.md)
|
|
14
|
+
|
|
15
|
+
## Sub-Principles
|
|
16
|
+
|
|
17
|
+
- (none)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Clarity Over Brevity
|
|
2
|
+
|
|
3
|
+
Names should be descriptive and self-documenting, even if longer.
|
|
4
|
+
|
|
5
|
+
Abbreviated names like `ctx`, `deps`, `fs`, or `args` save a few keystrokes but obscure meaning. Full names like `context`, `dependencies`, `fileSystem`, and `arguments` make code immediately understandable without requiring readers to decode conventions. This is especially valuable when AI agents or new contributors read the codebase for the first time.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Naming Matters](naming-matters.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- (none)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Co-located Tests
|
|
2
|
+
|
|
3
|
+
Test files should live next to the code they test.
|
|
4
|
+
|
|
5
|
+
When tests are co-located with their source files, developers can immediately see what's tested and what isn't. Finding the test for a module becomes trivial—it's right there in the same directory. This proximity encourages writing tests as part of the development flow rather than as an afterthought, and makes it natural to update tests when modifying code.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Intuitive Directory Structure](intuitive-directory-structure.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- (none)
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Comprehensive Assertions
|
|
2
|
+
|
|
3
|
+
Assert the whole, not the parts.
|
|
4
|
+
|
|
5
|
+
When you break a complex object into many small assertions, a failure tells you *one thing that's wrong*. When you assert against the whole expected value, the diff tells you *what actually happened versus what you expected* — the full picture, in one glance.
|
|
6
|
+
|
|
7
|
+
Small assertions are like yes/no questions to a witness. A whole-object assertion is like asking "tell me what you saw."
|
|
8
|
+
|
|
9
|
+
## In practice
|
|
10
|
+
|
|
11
|
+
Collapse multiple partial assertions into one comprehensive assertion:
|
|
12
|
+
|
|
13
|
+
```javascript
|
|
14
|
+
// Fragmented — each failure is a narrow keyhole
|
|
15
|
+
expect(result.name).toBe("Alice");
|
|
16
|
+
expect(result.age).toBe(30);
|
|
17
|
+
expect(result.role).toBe("admin");
|
|
18
|
+
|
|
19
|
+
// Whole — a failure diff tells the full story
|
|
20
|
+
expect(result).toEqual({
|
|
21
|
+
name: "Alice",
|
|
22
|
+
age: 30,
|
|
23
|
+
role: "admin",
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If `role` is `"user"` and `age` is `29`, the fragmented version stops at the first failure. The whole-object assertion shows both discrepancies at once, in context.
|
|
28
|
+
|
|
29
|
+
The same applies to arrays:
|
|
30
|
+
|
|
31
|
+
```javascript
|
|
32
|
+
// Avoid: partial assertions that hide the actual state
|
|
33
|
+
expect(array).toContain('apples')
|
|
34
|
+
expect(array).toContain('oranges')
|
|
35
|
+
|
|
36
|
+
// Prefer: one assertion that reveals the full picture on failure
|
|
37
|
+
expect(array).toEqual(['apples', 'oranges'])
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## How to evaluate
|
|
41
|
+
|
|
42
|
+
Work supports this principle when test failures tell a rich story — showing the complete actual value alongside the complete expected value, so the reader can understand what happened without re-running anything.
|
|
43
|
+
|
|
44
|
+
## Parent Principle
|
|
45
|
+
|
|
46
|
+
- [Make Changes with Confidence](make-changes-with-confidence.md)
|
|
47
|
+
|
|
48
|
+
## Sub-Principles
|
|
49
|
+
|
|
50
|
+
- (none)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Comprehensive Test Coverage
|
|
2
|
+
|
|
3
|
+
A project's test suite is its primary safety net, and agents depend on it even more than humans do.
|
|
4
|
+
|
|
5
|
+
Agents cannot manually verify that their changes work. They rely entirely on automated tests to confirm correctness. Gaps in test coverage become gaps in agent capability — areas where changes are risky and feedback is absent. Comprehensive coverage means every meaningful behaviour is tested, so agents can make changes anywhere in the codebase with confidence.
|
|
6
|
+
|
|
7
|
+
Dust should help projects measure and improve their test coverage, flag untested areas, and encourage a culture where new code comes with new tests.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Consistent Naming
|
|
2
|
+
|
|
3
|
+
Names should follow established conventions within each category to reduce cognitive load.
|
|
4
|
+
|
|
5
|
+
Principles use Title Case. File names use kebab-case. Commands use lowercase with hyphens. When naming conventions exist, follow them. When they don't, establish one and apply it consistently. Inconsistent naming creates friction for both humans and AI agents trying to predict or recall identifiers.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Naming Matters](naming-matters.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- (none)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Context-Optimised Code
|
|
2
|
+
|
|
3
|
+
Code should be structured so that agents can understand and modify it within their context window constraints.
|
|
4
|
+
|
|
5
|
+
Large files, deeply nested abstractions, and sprawling dependency chains all work against agents. A 3,000-line file cannot be fully loaded into context. A function that requires understanding six levels of indirection demands more context than one that is self-contained. Context-optimised code favours small files, shallow abstractions, explicit dependencies, and co-located related logic.
|
|
6
|
+
|
|
7
|
+
Dust should help projects identify files that are too large, modules that are too tangled, and patterns that make agent comprehension harder than it needs to be. This is not just about file size — it is about ensuring that the unit of code an agent needs to understand fits comfortably within the window available.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Context Window Efficiency
|
|
2
|
+
|
|
3
|
+
Dust should be designed with short attention spans in mind.
|
|
4
|
+
|
|
5
|
+
AI agents operate within limited context windows. Every token consumed by planning artifacts is a token unavailable for reasoning about code. Dust keeps artifacts concise and scannable so agents can quickly understand what needs to be done without wading through verbose documentation.
|
|
6
|
+
|
|
7
|
+
This means favoring brevity over completeness, using consistent structures that are fast to parse, and avoiding redundant information across files.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- [Progressive Disclosure](progressive-disclosure.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Cross-Platform Compatibility
|
|
2
|
+
|
|
3
|
+
Dust should work consistently across operating systems: Linux, macOS, and Windows.
|
|
4
|
+
|
|
5
|
+
This means:
|
|
6
|
+
- Avoiding platform-specific shell commands or syntax
|
|
7
|
+
- Using cross-platform path handling
|
|
8
|
+
- Testing on multiple platforms when possible
|
|
9
|
+
- Documenting any platform-specific limitations
|
|
10
|
+
|
|
11
|
+
Cross-platform support broadens adoption and ensures teams with mixed environments can collaborate effectively.
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Easy Adoption](easy-adoption.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- (none)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Debugging Tooling
|
|
2
|
+
|
|
3
|
+
Agents need effective tools for diagnosing and fixing issues without manual intervention.
|
|
4
|
+
|
|
5
|
+
Traditional debugging relies on breakpoints, stepping through code, and interactive inspection — techniques that work well for humans but poorly for agents. Agents need debugging tools that produce readable, structured output: stack traces with context, diff-friendly error messages, reproducible test cases, and diagnostic commands that can be run non-interactively.
|
|
6
|
+
|
|
7
|
+
Dust should help projects adopt agent-friendly debugging practices: structured error output, diagnostic scripts, snapshot testing for complex state, and tools that turn vague symptoms into specific, actionable information.
|
|
8
|
+
|
|
9
|
+
## Applicability
|
|
10
|
+
|
|
11
|
+
Internal
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- (none)
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Decoupled Code
|
|
2
|
+
|
|
3
|
+
Code should be organized into independent units with explicit dependencies.
|
|
4
|
+
|
|
5
|
+
Decoupled code is easier to test, understand, and modify. Dependencies are passed in rather than hard-coded, enabling units to be tested in isolation and composed flexibly. This reduces the blast radius of changes and makes the system more maintainable.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Make Changes with Confidence](make-changes-with-confidence.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- [Dependency Injection](dependency-injection.md)
|
|
14
|
+
- [Stubs Over Mocks](stubs-over-mocks.md)
|
|
15
|
+
- [Functional Core, Imperative Shell](functional-core-imperative-shell.md)
|
|
16
|
+
- [Design for Testability](design-for-testability.md)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Dependency Injection
|
|
2
|
+
|
|
3
|
+
Avoid global mocks. Dependency injection is almost always preferable to testing code that depends directly on globals.
|
|
4
|
+
|
|
5
|
+
When code depends on global state or singletons, testing requires mocking those globals—which introduces hidden coupling, complicates test setup, and risks interference between tests. Dependency injection makes dependencies explicit: they're passed in as arguments, making the code's requirements visible and enabling tests to supply controlled implementations.
|
|
6
|
+
|
|
7
|
+
This approach improves testability (each test controls its own dependencies), readability (dependencies are declared upfront), and flexibility (swapping implementations doesn't require changing the consuming code). It also makes refactoring safer since dependencies are explicit rather than implicit.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Decoupled Code](decoupled-code.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Design for Testability
|
|
2
|
+
|
|
3
|
+
Design code to be testable first; good structure follows naturally.
|
|
4
|
+
|
|
5
|
+
Testability should be a primary design driver, not a quality to be retrofitted. When code is designed to be testable from the start, it naturally becomes decoupled, explicit in its dependencies, and clear in its interfaces.
|
|
6
|
+
|
|
7
|
+
The discipline of testability forces good design: functions become pure, dependencies become explicit, side effects become isolated. Rather than viewing testability as a tax on production code, recognize it as a compass that points toward better architecture.
|
|
8
|
+
|
|
9
|
+
This is particularly important in agent-driven development. Agents cannot manually verify their changes—they rely entirely on tests. Code that resists testing resists autonomous modification.
|
|
10
|
+
|
|
11
|
+
## Parent Principle
|
|
12
|
+
|
|
13
|
+
- [Decoupled Code](decoupled-code.md)
|
|
14
|
+
|
|
15
|
+
## Sub-Principles
|
|
16
|
+
|
|
17
|
+
- (none)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Development Traceability
|
|
2
|
+
|
|
3
|
+
Structured logging and tracing help agents understand system behaviour without resorting to ad-hoc testing cycles.
|
|
4
|
+
|
|
5
|
+
When something goes wrong, agents often resort to adding temporary log statements, running the code, reading the output, and repeating — a slow and wasteful debugging loop. Good traceability means the system already records what happened and why, through structured logs, trace IDs, and observable state. This lets agents diagnose issues by reading existing output rather than generating new experiments.
|
|
6
|
+
|
|
7
|
+
Dust should encourage projects to adopt structured logging, promote traceability as a first-class concern, and provide tools that surface relevant trace information when agents need it.
|
|
8
|
+
|
|
9
|
+
## Applicability
|
|
10
|
+
|
|
11
|
+
Internal
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- (none)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Easy Adoption
|
|
2
|
+
|
|
3
|
+
Dust should be trivially easy to adopt in any repository.
|
|
4
|
+
|
|
5
|
+
Getting started with Dust should require minimal friction. A developer should be able to bootstrap Dust in their repository with a single command, without needing to install dependencies, configure build tools, or understand the internals.
|
|
6
|
+
|
|
7
|
+
This lowers the barrier to entry and encourages experimentation.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Human-AI Collaboration](human-ai-collaboration.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- [Cross-Platform Compatibility](cross-platform-compatibility.md)
|
|
16
|
+
- [Unsurprising UX](unsurprising-ux.md)
|
|
17
|
+
- [VCS Independence](vcs-independence.md)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Enable Flow State
|
|
2
|
+
|
|
3
|
+
Flow is the mental state where work becomes effortless - where you're fully immersed, losing track of time, operating at peak performance. Psychologist Mihaly Csikszentmihalyi identified three conditions that create flow: clear goals, immediate feedback, and challenge-skill balance.
|
|
4
|
+
|
|
5
|
+
Dust's design targets these conditions directly:
|
|
6
|
+
|
|
7
|
+
- **Clear goals**: Task files and lightweight planning give you a concrete target. You know exactly what you're building next.
|
|
8
|
+
- **Immediate feedback**: Fast feedback loops let you see results quickly. Each change confirms you're on track or shows you what to adjust.
|
|
9
|
+
- **Challenge-skill balance**: Small units of work and agent autonomy keep you in the zone - challenged enough to stay engaged, supported enough to succeed.
|
|
10
|
+
|
|
11
|
+
Everything dust does serves flow. When developers stay in flow, they produce better work, sustain their energy, and enjoy the process.
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- [Human-AI Collaboration](human-ai-collaboration.md)
|
|
20
|
+
- [Maintainable Codebase](maintainable-codebase.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Environment-Independent Tests
|
|
2
|
+
|
|
3
|
+
Tests must produce the same result regardless of where they run. A test that passes locally but fails in CI (or vice versa) is a broken test.
|
|
4
|
+
|
|
5
|
+
Concretely, tests should never depend on:
|
|
6
|
+
- Ambient environment variables (e.g. `CLAUDECODE`, `CI`, `HOME`)
|
|
7
|
+
- The current working directory or filesystem layout of the host machine
|
|
8
|
+
- Network availability or external services
|
|
9
|
+
- The identity of the user or agent running the tests
|
|
10
|
+
|
|
11
|
+
When a function's behavior depends on environment variables, the test must explicitly control those variables (via `stubEnv`, dependency injection, or passing an `env` parameter) rather than relying on whatever happens to be set in the current shell.
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Test Isolation](test-isolation.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- (none)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Exploratory Tooling
|
|
2
|
+
|
|
3
|
+
Agents need tools to efficiently explore and understand unfamiliar codebases.
|
|
4
|
+
|
|
5
|
+
When an agent encounters a new codebase — or an unfamiliar corner of a familiar one — it needs to quickly build a mental model: what exists, how it fits together, and where to make changes. Without good exploratory tools, agents waste context on trial-and-error searches, reading irrelevant files, and forming incorrect assumptions.
|
|
6
|
+
|
|
7
|
+
Dust should promote and integrate tools that help agents explore: dependency graphs, module overviews, search utilities tuned for code navigation, and summaries of project structure. The goal is to make the "orientation" phase of any task as short and reliable as possible.
|
|
8
|
+
|
|
9
|
+
## Applicability
|
|
10
|
+
|
|
11
|
+
Internal
|
|
12
|
+
|
|
13
|
+
## Parent Principle
|
|
14
|
+
|
|
15
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
16
|
+
|
|
17
|
+
## Sub-Principles
|
|
18
|
+
|
|
19
|
+
- (none)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Fast Feedback Loops
|
|
2
|
+
|
|
3
|
+
The primary feedback loop — write code, run checks, see results — should be as fast as possible.
|
|
4
|
+
|
|
5
|
+
Fast feedback is the foundation of productive development, for both humans and agents. When tests, linters, and type checks run in seconds rather than minutes, developers iterate more frequently and catch problems earlier. Agents especially benefit because they operate in tight loops of change-and-verify; slow feedback wastes tokens and context window space on waiting rather than working.
|
|
6
|
+
|
|
7
|
+
Dust should help projects measure the speed of their feedback loops, identify bottlenecks, and keep them fast as the codebase grows. This includes promoting practices like unit tests over integration tests for speed, incremental compilation, and check parallelisation.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Fast Feedback
|
|
2
|
+
|
|
3
|
+
Dust should provide fast feedback loops for developers.
|
|
4
|
+
|
|
5
|
+
Scripts and tooling should execute quickly so developers can iterate rapidly. Slow feedback discourages frequent validation and leads to larger, riskier changes. Fast feedback enables small, confident steps.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Make Changes with Confidence](make-changes-with-confidence.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- (none)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Functional Core, Imperative Shell
|
|
2
|
+
|
|
3
|
+
Separate code into a pure "functional core" and a thin "imperative shell." The core takes values in and returns values out, with no side effects. The shell handles I/O and wires things together.
|
|
4
|
+
|
|
5
|
+
Purely functional code makes some things easier to understand: because values don't change, you can call functions and know that only their return value matters—they don't change anything outside themselves.
|
|
6
|
+
|
|
7
|
+
The functional core contains business logic as pure functions that take values and return values. The imperative shell sits at the boundary, reading input, calling into the core, and performing side effects with the results. This keeps the majority of code easy to test (no mocks or stubs needed for pure functions) and makes the I/O surface area small and explicit.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Decoupled Code](decoupled-code.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- (none)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Human-AI Collaboration
|
|
2
|
+
|
|
3
|
+
Dust exists to enable effective collaboration between humans and AI agents on complex projects.
|
|
4
|
+
|
|
5
|
+
The human is the CEO — they set direction, make strategic decisions, and check in when it matters. Dust is the PM — it manages the work, prepares context, and brings fully-researched questions to the human rather than expecting them to drive every detail. Agents are the developers — they read code, write changes, and iterate autonomously.
|
|
6
|
+
|
|
7
|
+
Today's AI coding tools keep humans in a tight loop with agents. Dust is designed to loosen that loop, so humans spend less time directing and more time deciding.
|
|
8
|
+
|
|
9
|
+
## Parent Principle
|
|
10
|
+
|
|
11
|
+
- [Enable Flow State](enable-flow-state.md)
|
|
12
|
+
|
|
13
|
+
## Sub-Principles
|
|
14
|
+
|
|
15
|
+
- [Agent Autonomy](agent-autonomy.md)
|
|
16
|
+
- [Easy Adoption](easy-adoption.md)
|
|
17
|
+
- [Ideal Agent Developer Experience](ideal-agent-developer-experience.md)
|
|
18
|
+
- [Lightweight Planning](lightweight-planning.md)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Ideal Agent Developer Experience
|
|
2
|
+
|
|
3
|
+
The agent is the developer. The human is the CEO. Dust is the PM.
|
|
4
|
+
|
|
5
|
+
With today's AI coding assistants, the human is stuck in a tight loop with agents — constantly directing, reviewing, and course-correcting. Dust is designed to relieve humans from this tight loop. Like an assistant to a CEO, dust predominantly brings fully-researched questions and well-prepared work to the human, rather than expecting the human to drive every decision. The human checks in less frequently, and when they do, they make high-leverage strategic calls rather than micromanaging implementation.
|
|
6
|
+
|
|
7
|
+
For this to work, the agent's development environment must be excellent. The agent reads the code, writes changes, runs the checks, and iterates until the task is done. Everything about the codebase and its tooling either helps or hinders that process. Comprehensive tests are the agent's only way to verify correctness. Fast feedback loops are the agent's iteration speed. Structured logs are the agent's eyes into runtime behaviour. Small, well-organised files are what fit in the agent's context window. Exploratory and debugging tools are how the agent navigates and diagnoses without trial and error.
|
|
8
|
+
|
|
9
|
+
Each sub-principle represents a different aspect of the ideal agent developer setup. The better these are, the less the human needs to be in the loop.
|
|
10
|
+
|
|
11
|
+
## Parent Principle
|
|
12
|
+
|
|
13
|
+
- [Human-AI Collaboration](human-ai-collaboration.md)
|
|
14
|
+
|
|
15
|
+
## Sub-Principles
|
|
16
|
+
|
|
17
|
+
- [Comprehensive Test Coverage](comprehensive-test-coverage.md)
|
|
18
|
+
- [Fast Feedback Loops](fast-feedback-loops.md)
|
|
19
|
+
- [Slow Feedback Coping](slow-feedback-coping.md)
|
|
20
|
+
- [Development Traceability](development-traceability.md)
|
|
21
|
+
- [Context-Optimised Code](context-optimised-code.md)
|
|
22
|
+
- [Exploratory Tooling](exploratory-tooling.md)
|
|
23
|
+
- [Debugging Tooling](debugging-tooling.md)
|
|
24
|
+
- [Self-Contained Repository](self-contained-repository.md)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Intuitive Directory Structure
|
|
2
|
+
|
|
3
|
+
Code should be organized around related concerns in clearly named directories.
|
|
4
|
+
|
|
5
|
+
When files that serve similar purposes are grouped together, the codebase becomes easier to navigate and understand. A developer looking for "commands" should find them in a `commands` directory. Utilities should live with utilities. This organization reduces cognitive load and makes the project structure self-documenting.
|
|
6
|
+
|
|
7
|
+
## Parent Principle
|
|
8
|
+
|
|
9
|
+
- [Maintainable Codebase](maintainable-codebase.md)
|
|
10
|
+
|
|
11
|
+
## Sub-Principles
|
|
12
|
+
|
|
13
|
+
- [Co-located Tests](co-located-tests.md)
|