Skip to content

Commit cc5ede0

Browse files
authored
README.md and spelling (#48)
1 parent 2a548b1 commit cc5ede0

27 files changed

Lines changed: 579 additions & 168 deletions

File tree

.donna/project/core/error_handling.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class InternalError(core_errors.InternalError):
4141
pass
4242

4343
class SomethingGoneWrong(InternalError):
44-
"""Indicates that something went wrong in donna.xxx submodule in a single specifc case."""
44+
"""Indicates that something went wrong in donna.xxx submodule in a single specific case."""
4545
pass
4646

4747
class DomainOrEntityError(InternalError):
@@ -151,15 +151,15 @@ def validate_artifact(self) -> Result[None, ErrorsList]:
151151

152152
## Naming error classes
153153

154-
Follow this guidelines when naming error classes:
154+
Follow these guidelines when naming error classes:
155155

156156
- Try to keep names short but descriptive.
157-
- Prefere not to use `Error`, `Exception`, `Failure` suffixes if possible.
158-
- Prefere not to use `Internal` or `Environment` in the class names.
157+
- Prefer not to use `Error`, `Exception`, `Failure` suffixes if possible.
158+
- Prefer not to use `Internal` or `Environment` in the class names.
159159

160160
## Exceptions besides `InternalError`
161161

162-
- **Use only `InternalError` for all Donna's internal exceptions, untill the developer or the specification explicitly requires otherwise.**
162+
- **Use only `InternalError` for all Donna's internal exceptions, until the developer or the specification explicitly requires otherwise.**
163163
- You MAY use other exception types if the third-party library you are working with requires it. For example, Pydantic models require `ValidationError` exceptions.
164164
- You MAY use `NotImplementedError` as temporary code when:
165165
- You need a temporary placeholder for the code that is not implemented yet, but will be in the scope of the current task.
@@ -185,7 +185,7 @@ Don't use `assert` statements for any other purpose, replace them with proper er
185185

186186
### Update all calls up the call stack
187187

188-
If you modify funtion to return environment errors, you **MUST** update all functions up the call stack that call this function to handle the returned errors properly: process, propagate or output (accoring to the context).
188+
If you modify function to return environment errors, you **MUST** update all functions up the call stack that call this function to handle the returned errors properly: process, propagate or output (according to the context).
189189

190190
### Long error definitions — short construction
191191

.donna/project/core/top_level_architecture.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The code is separated by layers/subsystems into subpackages:
1919

2020
- `donna.core` — code that not in the Donna's domain, but required to its functioning: domain-independent utils, basic classes for errors, exceptions and other entities, etc.
2121
- `donna.domain` — code that is required by all Donna'specific logic: ID classes, common types, etc.
22-
- `donna.machine` — code that implements the core Donna's logic — how Donna works regardles of external environments, i.e. pure domain behavior.
22+
- `donna.machine` — code that implements the core Donna's logic — how Donna works regardless of external environments, i.e. pure domain behavior.
2323
- `donna.world` — code that implements various worlds where Donna can find and manage artifacts: from artifacts discovery to their loading, parsing, updating. Also contains code related to configuration of Donna.
2424
- `donna.protocol` — code that implements protocol via which Donna's core domain logic interacts with external environments: CLI, API, etc. Includes basic classes for information representing (for the external environments) and its formatting.
2525
- `donna.cli` — code that implements the `donna` CLI tool, its commands, arguments parsing, etc.

.donna/project/intro.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# Intoduction to the Donna development
2+
# Introduction to the Donna development
33

44
```toml donna
55
kind = "donna.lib.specification"
@@ -10,17 +10,17 @@ This document provides an introduction to the Donna project for agents and devel
1010

1111
`Donna` is a CLI tool that helps manage the work of AI agents like Codex.
1212

13-
It is designed to to invert control flow: instead of agents deciding what to do next, the `donna` tells agents what to do next by following predefined workflows.
13+
It is designed to invert control flow: instead of agents deciding what to do next, the `donna` tells agents what to do next by following predefined workflows.
1414

15-
The core idea is that most of high-level workflows are more algorithmic than it may seem at first glance. For example, it may be difficult to fix a particular type issue in the codebase, but the overall process of polishing the codebase is quite linear:
15+
The core idea is that most high-level workflows are more algorithmic than it may seem at first glance. For example, it may be difficult to fix a particular type issue in the codebase, but the overall process of polishing the codebase is quite linear:
1616

1717
1. Ensure all tests pass.
1818
2. Ensure the code is formatted correctly.
1919
3. Ensure there are no linting errors.
2020
4. Go to the step 1 if you changed something in the process.
2121
5. Finish.
2222

23-
We may need coding agents on the each step of the process, but there no reason for agents to manage the whole grooming loop by themselves — it take longer time, spends tokens and may lead to confusion of agents.
23+
We may need coding agents on each step of the process, but there is no reason for agents to manage the whole grooming loop by themselves — it takes longer time, spends tokens and may lead to confusion of agents.
2424

2525
## Primary rules
2626

.donna/project/work/polish.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ kind = "donna.lib.request_action"
7676
id = "run_black_script"
7777
kind = "donna.lib.run_script"
7878
save_stdout_to = "black_output"
79-
goto_on_success = "run_flake8_script"
79+
goto_on_success = "run_codespell_script"
8080
goto_on_failure = "fix_black"
8181
```
8282

@@ -101,6 +101,37 @@ kind = "donna.lib.request_action"
101101
2. Ensure your changes are saved.
102102
3. `{{ donna.lib.goto("run_autoflake_script") }}`
103103

104+
## Run Codespell
105+
106+
```toml donna
107+
id = "run_codespell_script"
108+
kind = "donna.lib.run_script"
109+
save_stdout_to = "codespell_output"
110+
goto_on_success = "run_flake8_script"
111+
goto_on_failure = "fix_codespell"
112+
```
113+
114+
```bash donna script
115+
#!/usr/bin/env bash
116+
117+
codespell ./donna 2>&1
118+
```
119+
120+
## Fix Codespell Issues
121+
122+
```toml donna
123+
id = "fix_codespell"
124+
kind = "donna.lib.request_action"
125+
```
126+
127+
```
128+
{{ donna.lib.task_variable("codespell_output") }}
129+
```
130+
131+
1. Fix the codespell issues based on the output above.
132+
2. Ensure your changes are saved.
133+
3. `{{ donna.lib.goto("run_autoflake_script") }}`
134+
104135
## Run Flake8
105136

106137
```toml donna

AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ Every agent MUST follow the rules and guidelines outlined in this document when
66

77
## First actions
88

9-
**You need the Donna tool to work on this project.**
9+
**You need Donna tool to work on this project.**
1010

1111
Since this is the repository that contains the Donna project itself, you have direct access to the Donna CLI tool via `./bin/donna.sh` script.
1212

1313
I.e. you develop Donna using Donna.
1414

15-
**ALWAYS** perform `./bin/donna.sh -p llm artifacts view "*:intro"` when you start working. It **MUST** be a one time operation. Do not repeat it unless you forget how to use the tool.
15+
**ALWAYS** run `./bin/donna.sh -p llm artifacts view '*:intro'` when you start working. It **MUST** be a one time operation. Do not repeat it unless you forget how to use the tool.

0 commit comments

Comments
 (0)