Skip to content

Commit e6f09aa

Browse files
committed
In single-agent mode, added verification prompt generation to the implementation phase.
1 parent 4e2a99e commit e6f09aa

File tree

3 files changed

+159
-0
lines changed

3 files changed

+159
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99

1010
- Fixed multi-agent-mode not installing the roles/ files in the project agent-os folder.
1111
- Clarified spec-research instructions.
12+
- In single-agent mode, added verification prompt generation to the implementation phase.
1213

1314
## [2.0.3] - 2025-10-10
1415

profiles/default/commands/implement-spec/single-agent/implement-spec.md renamed to profiles/default/commands/implement-spec/single-agent/1-implement-spec.md

File renamed without changes.
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
Now that the implementation of this spec is complete, we must generate an ordered series of verification prompt texts, which will be used to verify the implementation of this spec's tasks.
2+
3+
Follow these steps to generate this spec's ordered series of verification prompt texts, each in its own .md file located in `agent-os/specs/[this-spec]/implementation/prompts/`.
4+
5+
## Verification Prompt Generation Workflow
6+
7+
### Step 1: Determine which verifier roles are needed
8+
9+
1. Read `agent-os/specs/[this-spec]/tasks.md` to identify all implementer roles that were assigned to task groups.
10+
11+
2. Read `agent-os/roles/implementers.yml` and for each implementer role that was used:
12+
- Find that implementer by ID
13+
- Note the verifier role(s) listed in its `verified_by` field
14+
15+
3. Collect all unique verifier roles from this process (e.g., backend-verifier, frontend-verifier).
16+
17+
4. Read `agent-os/roles/verifiers.yml` to confirm these verifier roles exist and understand their responsibilities.
18+
19+
### Step 2: Generate verification prompt files for each verifier
20+
21+
For EACH unique verifier role identified in Step 1, create a verification prompt file.
22+
23+
#### Step 2a. Create the verifier prompt markdown file
24+
25+
Create the prompt markdown file using this naming convention:
26+
`agent-os/specs/[this-spec]/implementation/prompts/[next-number]-verify-[verifier-name].md`
27+
28+
For example, if the last implementation prompt was `4-comment-system.md` and you need to verify backend and frontend:
29+
- Create `5-verify-backend.md`
30+
- Create `6-verify-frontend.md`
31+
32+
#### Step 2b. Populate the verifier prompt file
33+
34+
Populate the verifier prompt markdown file using the following Prompt file content template.
35+
36+
##### Bracket content replacements
37+
38+
In the content template below, replace "[spec-title]" and "[this-spec]" with the current spec's title.
39+
40+
Replace "[verifier-role-name]" with the verifier role's ID (e.g., "backend-verifier").
41+
42+
Replace "[task-groups-list]" with a bulleted list of the task group titles (parent tasks only) that fall under this verifier's purview. To determine which task groups:
43+
1. Look at all task groups in `tasks.md`
44+
2. For each task group, check its assigned implementer
45+
3. If that implementer's `verified_by` field includes this verifier role, include this task group in the list
46+
47+
Replace "[verifier-standards]" using the following logic:
48+
1. Find the verifier role in `agent-os/roles/verifiers.yml`
49+
2. Check the list of `standards` for that verifier
50+
3. Compile the list of file references to those standards and display the list in place of "[verifier-standards]", one file reference per line. Use this logic for determining the list of files to include:
51+
a. If the value for `standards` is simply `all`, then include every single file, folder, sub-folder and files within sub-folders in your list of files.
52+
b. If the item under standards ends with "*" then it means that all files within this folder or sub-folder should be included. For example, `frontend/*` means include all files and sub-folders and their files located inside of `agent-os/standards/frontend/`.
53+
c. If a file ends in `.md` then it means this is one specific file you must include in your list of files. For example `backend/api.md` means you must include the file located at `agent-os/standards/backend/api.md`.
54+
d. De-duplicate files in your list of file references.
55+
56+
The compiled list of standards should look like this, where each file reference is on its own line and begins with `@`. The exact list of files will vary:
57+
58+
```
59+
@agent-os/standards/global/coding-style.md
60+
@agent-os/standards/global/conventions.md
61+
@agent-os/standards/global/tech-stack.md
62+
@agent-os/standards/backend/api.md
63+
@agent-os/standards/backend/migrations.md
64+
@agent-os/standards/testing/test-writing.md
65+
```
66+
67+
##### Verifier prompt file content template:
68+
69+
```markdown
70+
We're verifying the implementation of [spec-title] by running verification for tasks under the [verifier-role-name] role's purview.
71+
72+
## Task groups under your verification purview
73+
74+
The following task groups have been implemented and need your verification:
75+
76+
[task-groups-list]
77+
78+
## Understand the context
79+
80+
Read @agent-os/specs/[this-spec]/spec.md to understand the context for this spec and where these tasks fit into it.
81+
82+
## Your verification responsibilities
83+
84+
{{workflows/implementation/verifier-responsibilities}}
85+
86+
## User Standards & Preferences Compliance
87+
88+
IMPORTANT: Ensure that your verification work validates ALIGNMENT and IDENTIFIES CONFLICTS with the user's preferences and standards as detailed in the following files:
89+
90+
[verifier-standards]
91+
92+
```
93+
94+
### Step 3: Generate the final verification prompt
95+
96+
After all verifier-specific prompts have been created, create ONE final verification prompt that will perform the end-to-end verification.
97+
98+
#### Step 3a. Create the final verification prompt markdown file
99+
100+
Create the prompt markdown file using this naming convention:
101+
`agent-os/specs/[this-spec]/implementation/prompts/[next-number]-verify-implementation.md`
102+
103+
For example, if the last verifier prompt was `6-verify-frontend.md`, create `7-verify-implementation.md`.
104+
105+
#### Step 3b. Populate the final verification prompt file
106+
107+
Use the following content template for the final verification prompt:
108+
109+
```markdown
110+
We're completing the verification process for [spec-title] by performing the final end-to-end verification and producing the final verification report.
111+
112+
## Understand the context
113+
114+
Read @agent-os/specs/[this-spec]/spec.md to understand the full context of this spec.
115+
116+
## Your role
117+
118+
You are performing the final implementation verification using the **implementation-verifier** role.
119+
120+
## Perform final verification
121+
122+
Follow the implementation-verifier workflow to complete your verification:
123+
124+
### Step 1: Ensure tasks.md has been updated
125+
126+
{{workflows/implementation/verification/verify-tasks}}
127+
128+
### Step 2: Verify that implementations and verifications have been documented
129+
130+
{{workflows/implementation/verification/verify-documentation}}
131+
132+
### Step 3: Update roadmap (if applicable)
133+
134+
{{workflows/implementation/verification/update-roadmap}}
135+
136+
### Step 4: Run entire tests suite
137+
138+
{{workflows/implementation/verification/run-all-tests}}
139+
140+
### Step 5: Create final verification report
141+
142+
{{workflows/implementation/verification/create-verification-report}}
143+
144+
```
145+
146+
### Step 4: Output the list of created verification prompt files
147+
148+
Output to user the following:
149+
150+
"Ready to begin verification of [spec-title]!
151+
152+
Use the following list of verification prompts to direct the verification process:
153+
154+
[list all verification prompt files in order]
155+
156+
Input those prompts into this chat one-by-one or queue them to run in order.
157+
158+
Verification results will be documented in `agent-os/specs/[this-spec]/verification/`"

0 commit comments

Comments
 (0)