You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: agent/u.working-agreement.md
+67-21Lines changed: 67 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,33 +6,55 @@ The folder `./agent/docs-vendoring` contains reference material for some librari
6
6
7
7
# Conventions
8
8
9
+
## Organization
10
+
9
11
Working sessions will usually be focused on a session-directory. Either a numbered directory (referring to a gh issue) or a directory named for the task at hand. New working documents should be created in this directory, and named according to the conventions below. For GH issues, please *do* use the `gh` command to *read* existing issues, PRs, and workflow runs.
10
12
13
+
## File namespacing
14
+
11
15
files prefixed with `u.` are user-authored.
12
16
files prefixed with `a.` are assistant-authored.
13
17
14
18
assistant-authored files should be sequenced, so that the progression of thoughts (and plan revisions) remains legible. - eg, create `a.1.assessment.md``a.2.plan.md``a.3.todo.md`, or whatever working documents are required.
15
19
20
+
## Precedence
21
+
16
22
When performing actions, planning or instructions from *later* documents take precidence over earlier ones.
17
23
18
24
Other files in the directory are sourced as general context or informtion relevant to the current mission.
19
25
26
+
## User Annotations
27
+
20
28
The user will annotate / edit assistant files in order to specifically direct feedback to the assistant's work.
21
29
22
-
Where there are numbered directories in this folder, these correspond to github issues. Feel free also to use `gh` to reference the issue itself if need be.
30
+
User annotations will either be prefixed lines like this:
31
+
>>> this is a user inserted comment
32
+
33
+
or block multiline comments like this:
34
+
35
+
>>>
36
+
This is also a user comment.
37
+
38
+
It's closed by reverse chevrons.
39
+
<<<
40
+
41
+
42
+
Where there are numbered directories in this folder, these correspond to github issues. Feel free also to use `gh` cli to reference the issue itself if need be.
23
43
24
44
# General Expected Workflow
25
45
26
-
We are a document-centric team, you and I.
46
+
We are a document-centric team, you and I. We create working documents in stages assess-plan-do
47
+
48
+
## Assess
27
49
28
50
Turn 0 (user):
29
51
- user will include a file like `issue.md`, `failure.log`, or something different.
30
52
- user will supply it to an assistant, along with supporting context in the prompt if necessary.
31
53
32
54
Turn 1 (assistant):
33
-
- assistant will read the file, *look around*, and write `a.assessment.md`
55
+
- assistant will read the prompt and supplied files, *look around*, and write `a.assessment.md`
34
56
35
-
a.assessment.md should detail the some options, and end with a `# Recommendation` section.
57
+
a.assessment.md should detail some options, and end with a `# Recommendation` section.
36
58
37
59
Turn 2 (user):
38
60
- User will read assessment and either:
@@ -42,22 +64,41 @@ Turn 2 (user):
42
64
43
65
If the user provides or asks for more info, assistant will discuss and together they will refine the assessment.
44
66
67
+
## Plan
45
68
46
69
If the user makes a selection:
47
70
48
71
turn 3 (assistant):
49
-
- assistant will create `a.plan.md` and `a.todo.md`. The first outlines the plan, the second itemizes and chunks it into phases.
50
-
51
-
<todo-guidelines>
52
-
Items in the todo document should be itemized so that they can be referred to by number. Eg, Phase 1 with sections 1.1, 1.2, etc.
53
-
54
-
A `Phase` should usually represent a unit of work achievable by yourself, with legible success markers, in a single prompt from the user.
55
-
56
-
Todos should use checkbox style notation as in
57
-
-[ ] 2.1 add some required dependency
58
-
-[ ] 2.2 use it to solve problem
59
-
-[ ] 2.3 run the build process
60
-
</todo-guidelines>
72
+
- creates `a.plan.md`
73
+
- the plan file should
74
+
- 'narrow in' on the selected approach
75
+
- optionally, include some rationale for the specific selected approach surfaced from the back-and-forth during assessment
76
+
- make specific reference to existing source code to be modified (eg, filenames, method names), or new files to be created
77
+
- define success criteria
78
+
- enumerate known risks
79
+
- separate implementation tasks, testing tasks, and administrative tasks (eg, documentation updates)
80
+
- the plan file should not
81
+
- contain large amounts of implementation (tokens don't grow on trees.)
82
+
- contain large amounts of redunany information from the
83
+
84
+
turn 4 (user):
85
+
- assesses the plan
86
+
- provides feedback or seeks clarification either in chat or via inlined comments
87
+
- either: approves and requests a todo document, or, loops back to assessment phase to consider other options
88
+
89
+
turn 5 (assistant):
90
+
- creates `a.todo.md`
91
+
- the todo doc should
92
+
- itemize and chunk the plan into phases
93
+
- be 'addressable' as in p1.2 (phase one, task 2)
94
+
- optionally, be nested down as far as, eg, p1.3.2, but not further
95
+
-[ ] be written checkbox style
96
+
- the todo doc should not
97
+
- contain large amounts of repeated information from prior docs
98
+
99
+
As a very rough guide, assistant should attempt to size 'phases' as chunks of work that it expects it can complete independently in a single 'turn'
100
+
101
+
## Do
61
102
62
103
At this point we are into the main loop of the session.
63
104
@@ -66,16 +107,21 @@ Main Loop:
66
107
67
108
- User will assign chunks of tasks from the todo list to the assistant
68
109
- Agent will attempt to complete the tasks.
69
-
- Agent will update the todo list w/ completed tasks, and add any *important* commentary inline w/ the todo doc. EG, workarounds required, assumptions invalidated during the work, issues discovered during the work that require future investigation, etc. Agent does not add superfluous comments like "done" or "fixed" - the checkmark does that!
110
+
- after the attempt, agent updates the todo doc in-place.
111
+
- completed items should be checked off
112
+
- where relevant, blockers or new information surfaced during the attempt can
113
+
- larger headings (eg, for phases) can be annotated with status markers (eg, COMPLETED, NEXT, IN-PROGRESS, BLOCKED)
70
114
71
115
- User will review the assistant changes, and:
72
-
- if satisfied
73
-
-(usually) checkpoint w/ a commit
74
-
-repeat the main loop with new range of tasks
116
+
- if satisfied, indicate so and either:
117
+
-ask the assistant to carry on with their `a.next.md` suggestion
118
+
-redirect to a different set of tasks
75
119
- if unsatisfied, main loop breaks and we debug / rethink together
76
120
77
121
78
-
NB: agent is not generally concerned with making commits.
122
+
Where a user approves the changes, before moving on, the assistant will update the `a.todo.md` file to reflect completed and potentiall *in flight* tasks.
123
+
124
+
At the end of each agentic turn, assistant can rewrite `a.next.md` from scratch.
0 commit comments