Skip to content

Commit 2492bd6

Browse files
perf: replace synchronous I/O with async I/O and fix documentation linting
Co-authored-by: AbstergoSweden <249910473+AbstergoSweden@users.noreply.github.com>
1 parent 6b175db commit 2492bd6

5 files changed

Lines changed: 95 additions & 21 deletions

File tree

docs/ABOUT.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
## What is VY Prompt Master?
88

9-
**VY Prompt Master** is a prompt engineering framework designed for [Vy (Vercept)](https://vercept.com/) – an AI-powered macOS automation agent. It transforms high-level user task descriptions into detailed, executable YAML specifications that Vy can safely and predictably carry out.
9+
**VY Prompt Master** is a prompt engineering framework designed for [Vy (Vercept)](https://vercept.com/)
10+
– an AI-powered macOS automation agent. It transforms high-level user task descriptions into detailed,
11+
executable YAML specifications that Vy can safely and predictably carry out.
1012

1113
---
1214

@@ -19,7 +21,8 @@ Modern AI agents can perform complex computer tasks, but without proper structur
1921
- **Debugging difficulties** – Hard to trace what went wrong
2022
- **Hallucination** – Claiming completion without verification
2123

22-
VY Prompt Master solves these problems by enforcing a rigorous specification format where every action is:
24+
VY Prompt Master solves these problems by enforcing a rigorous specification format where every
25+
action is:
2326

2427
- **Grounded in UI** – Tied to visible elements, not abstract concepts
2528
- **Verified** – Every action has observable success criteria

docs/AGENTS.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,47 @@
11
# Repository Guidelines
22

33
## Project Structure & Module Organization
4+
45
- The repository is flat (no nested directories) and is primarily YAML and Markdown content.
5-
- Core personas/frameworks: `VY-Prompt-Engineering-Persona*.yaml`, `VY-Meta-Prompt.yaml`, `VY-Unified-Framework-v3.yaml`.
6-
- Task specs and examples: `vy_task*.yaml` for task definitions, `test_prompt*.yaml` for sample prompts.
7-
- Schema and docs: `vy-prompt-schema.json` and `Schema Overview.md` describe required fields and validation rules.
8-
- Supporting references: `knowledge *.txt`, `Response*.yml`, and `backup*.md` preserve research notes and prior outputs.
6+
- Core personas/frameworks: `VY-Prompt-Engineering-Persona*.yaml`, `VY-Meta-Prompt.yaml`,
7+
`VY-Unified-Framework-v3.yaml`.
8+
- Task specs and examples: `vy_task*.yaml` for task definitions, `test_prompt*.yaml` for
9+
sample prompts.
10+
- Schema and docs: `vy-prompt-schema.json` and `Schema Overview.md` describe required fields
11+
and validation rules.
12+
- Supporting references: `knowledge *.txt`, `Response*.yml`, and `backup*.md` preserve research
13+
notes and prior outputs.
914

1015
## Build, Test, and Development Commands
16+
1117
- There is no build or runtime step; this is a content repository.
1218
- Schema validation (convert YAML to JSON first) can be done with:
1319
`npx ajv validate -s vy-prompt-schema.json -d my-prompt.json`
1420
- For editor validation, add: `# yaml-language-server: $schema=./vy-prompt-schema.json`.
1521

1622
## Coding Style & Naming Conventions
23+
1724
- Use 2-space indentation in YAML; avoid tabs and trailing whitespace.
1825
- Prefer `snake_case` keys and ids (e.g., `fallback_paths`, `inputs_missing`).
1926
- `step_id` naming pattern: `step_001_short_name`; input/assumption ids match `[a-z][a-z0-9_]*`.
20-
- For action steps, follow the `locate``confirm_target``act``verify_outcome` pattern and include `fallback_paths` and `safety_gate`.
27+
- For action steps, follow the `locate``confirm_target``act``verify_outcome` pattern and
28+
include `fallback_paths` and `safety_gate`.
2129

2230
## Testing Guidelines
31+
2332
- No automated tests are present; schema validation is the primary check.
2433
- Verify required top-level keys and that every step includes all required fields.
2534
- Use `test_prompt*.yaml` as regression references when adding or refactoring patterns.
2635

2736
## Commit & Pull Request Guidelines
37+
2838
- This folder is not a Git repo, so there is no established commit history to mirror.
2939
- If you initialize Git, use short imperative commit messages (e.g., "Add schema validation note").
30-
- In PRs, include a brief description, list of changed prompt files, and validation evidence or manual review notes.
40+
- In PRs, include a brief description, list of changed prompt files, and validation evidence or
41+
manual review notes.
3142

3243
## Security & Configuration Tips
44+
3345
- Treat `.env` as local-only; do not paste secrets into docs or examples.
34-
- Avoid adding operational instructions that violate the safety boundaries documented in the persona files.
46+
- Avoid adding operational instructions that violate the safety boundaries documented in the
47+
persona files.

docs/QUICK-REFERENCE.md

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# VY Meta Prompt - Quick Reference Guide
22

33
## Overview
4+
45
The **VY Meta Prompt** is a unified framework that consolidates all VY (Vercept) automation best practices into a single, streamlined specification for generating safe, deterministic, and robust UI automation prompts.
56

67
**Version:** 2.0
@@ -12,7 +13,8 @@ The **VY Meta Prompt** is a unified framework that consolidates all VY (Vercept)
1213
## Quick Start: 5-Phase Workflow
1314

1415
### Phase 1: Intake & Classification
15-
```
16+
17+
```text
1618
1. Receive user task description
1719
2. Classify via policy_router: allowed / disallowed / ambiguous / high_risk_irreversible
1820
3. Route appropriately:
@@ -23,7 +25,8 @@ The **VY Meta Prompt** is a unified framework that consolidates all VY (Vercept)
2325
```
2426

2527
### Phase 2: Planning
26-
```
28+
29+
```text
2730
1. Draft 2-3 internal approaches
2831
2. Evaluate: safety, reliability, reversibility, efficiency
2932
3. Decompose into UI action primitives (8-field steps)
@@ -32,7 +35,8 @@ The **VY Meta Prompt** is a unified framework that consolidates all VY (Vercept)
3235
```
3336

3437
### Phase 3: Specification Generation
35-
```
38+
39+
```text
3640
1. Use the standardized template structure
3741
2. Include all required keys (identity, purpose, context, inputs, task, constraints, output_format, self_check)
3842
3. Add assumption_ledger for non-blocking unknowns
@@ -42,7 +46,8 @@ The **VY Meta Prompt** is a unified framework that consolidates all VY (Vercept)
4246
```
4347

4448
### Phase 4: Validation
45-
```
49+
50+
```text
4651
Run all four validation categories:
4752
4853
✓ Schema Tests: All required keys present, correct types
@@ -54,7 +59,8 @@ Execute self_check questions (all 10 must pass)
5459
```
5560

5661
### Phase 5: Output
57-
```
62+
63+
```text
5864
If inputs_missing → output ONLY inputs_missing YAML list
5965
If validation fails → return to planning with issues
6066
If validation passes → emit pure YAML only (no preamble, commentary, code fences)
@@ -93,7 +99,8 @@ Every step **MUST** include these fields:
9399

94100
## Critical Rules
95101

96-
### ✅ DO:
102+
### ✅ DO
103+
97104
- **ALWAYS** use locate→confirm→act→verify pattern
98105
- **ALWAYS** provide fallback paths for critical steps
99106
- **ALWAYS** document assumptions in assumption_ledger
@@ -103,7 +110,8 @@ Every step **MUST** include these fields:
103110
- **ALWAYS** use unique UI identifiers (button text, field labels)
104111
- **ALWAYS** capture observable evidence for verification
105112

106-
### ❌ NEVER:
113+
### ❌ NEVER
114+
107115
- **NEVER** claim tool access ("I clicked X") - only instruct ("VY should click X")
108116
- **NEVER** use vague references ("the button", "the field")
109117
- **NEVER** skip verify_outcome steps
@@ -119,13 +127,15 @@ Every step **MUST** include these fields:
119127
## Platform-Specific Conventions
120128

121129
### macOS
130+
122131
- **Keyboard:** Use Command (cmd) key, NOT Control (ctrl)
123132
- **Launch Apps:** Use `open_application` tool, NOT clicking Dock
124133
- **File Operations:** Use Finder integration tools
125134
- **Sliders:** Use percentage positioning (e.g., "slider at 45%")
126135
- **Paths:** Use tilde (~) for home directory
127136

128137
### Web Automation
138+
129139
- **Navigation:** Use `open_url` tool, NOT typing in address bar
130140
- **Google:** Use `google_search` tool directly
131141
- **Forms:** ALWAYS erase pre-existing text before typing
@@ -139,30 +149,38 @@ Every step **MUST** include these fields:
139149
## Failure Playbooks
140150

141151
### 1. ui_not_found
152+
142153
**Detection:** Element not found after 2 attempts
143154
**Response:**
155+
144156
1. Execute fallback_paths in priority order
145157
2. Attempt search within app/menu
146158
3. Reposition mouse and retry
147159
4. Capture screenshot → request user clarification
148160

149161
### 2. unexpected_modal
162+
150163
**Detection:** Modal interrupts workflow
151164
**Response:**
165+
152166
1. Identify title and button labels
153167
2. Prefer cancel/close unless required
154168
3. If destructive wording → require user confirmation
155169

156170
### 3. auth_blocked
171+
157172
**Detection:** Login prompt or session expiration
158173
**Response:**
174+
159175
1. Halt automation immediately
160176
2. Request manual login: "Authentication required. Please log in manually to proceed."
161177
3. Resume from last checkpoint after confirmation
162178

163179
### 4. verification_failed
180+
164181
**Detection:** verify_outcome not met
165182
**Response:**
183+
166184
1. Wait 250ms and retry
167185
2. Check for modals/notifications
168186
3. Re-locate element
@@ -173,24 +191,29 @@ Every step **MUST** include these fields:
173191
## Validation Tests Checklist
174192

175193
### Schema Tests
176-
- [ ] All 8 required keys present (identity, purpose, context, inputs, task, constraints, output_format, self_check)
194+
195+
- [ ] All 8 required keys present (identity, purpose, context, inputs, task, constraints,
196+
output_format, self_check)
177197
- [ ] No unknown top-level keys
178198
- [ ] Correct data types (lists for steps, strings for identity, etc.)
179199

180200
### UI Tests
201+
181202
- [ ] Every action step has locate + confirm_target + verify_outcome
182203
- [ ] locate uses unique identifiers (button text, field label, etc.)
183204
- [ ] All irreversible steps have safety_gate == irreversible_requires_confirmation
184205
- [ ] Platform conventions followed (macOS shortcuts)
185206
- [ ] Critical steps have fallback paths
186207

187208
### Safety Tests
209+
188210
- [ ] No bypass/jailbreak/evasion content
189211
- [ ] No credential harvesting or secret collection
190212
- [ ] Manual authentication specified if needed
191213
- [ ] User confirmation required for destructive actions
192214

193215
### Determinism Tests
216+
194217
- [ ] No claims of completed actions (only instructions)
195218
- [ ] No vague verbs ('handle it', 'process it')
196219
- [ ] Concrete actions with exact parameters
@@ -211,6 +234,7 @@ assumptions:
211234
```
212235
213236
**Mandatory Assumptions:**
237+
214238
- vy_local_agent_presence
215239
- vy_ui_grounding_capability
216240
- macOS_environment_conventions
@@ -230,6 +254,7 @@ evidence_ledger:
230254
```
231255
232256
**Capture Timing:**
257+
233258
- Before critical UI state changes
234259
- After every verify_outcome step
235260
- Before user confirmation prompts
@@ -256,6 +281,7 @@ evidence_ledger:
256281
**Determinism:** Avoid ambiguous language, use enumerated steps and observable evidence
257282
258283
### ✅ Valid Output
284+
259285
```yaml
260286
---
261287
identity: "VY Task Executor"
@@ -264,6 +290,7 @@ purpose: "Extract data from website"
264290
```
265291

266292
### ❌ Invalid Output
293+
267294
```yaml
268295
# DON'T: Include preamble
269296
Here is the prompt specification:
@@ -280,6 +307,7 @@ identity: "VY Task Executor"
280307
## Common Patterns
281308

282309
### Multi-Phase Workflow
310+
283311
```yaml
284312
task:
285313
goal: "Complete complex data entry task"
@@ -297,6 +325,7 @@ task:
297325
```
298326
299327
### Conditional Branching
328+
300329
```yaml
301330
- step_id: "decision_001"
302331
intent: "Check if user is logged in"

0 commit comments

Comments
 (0)