mirror of
https://github.com/R0m1k3/FlowReader.git
synced 2026-10-13 18:29:15 +02:00
feat(ux): fix focus swipe animation, button visibility and mobile scroll
This commit is contained in:
1 parent
22e002f47f
commit
9d41a74b36
466 files changed
+6111
-42082
No files matched your search
@@ -1,93 +1,72 @@
|
||||
# Agent Menu Patterns
|
||||
|
||||
Technical reference for creating agent menu items in YAML.
|
||||
|
||||
---
|
||||
|
||||
## Menu Item Structure
|
||||
|
||||
Every menu item requires:
|
||||
## Menu Item Schema
|
||||
|
||||
```yaml
|
||||
- trigger: XX or fuzzy match on command-name
|
||||
[handler]: [value]
|
||||
description: '[XX] Display text here'
|
||||
description: '[XX] Display text'
|
||||
data: [optional] # Pass file to workflow
|
||||
```
|
||||
|
||||
**Required fields:**
|
||||
- `trigger` - Format: `XX or fuzzy match on command-name` (XX = 2-letter code, command-name = what user says)
|
||||
- `description` - Must start with `[XX]` code
|
||||
- Handler - Either `action` (Simple/Expert) or `exec` (Module)
|
||||
| Field | Required | Validation |
|
||||
|-------|----------|------------|
|
||||
| `trigger` | Yes | Format: `XX or fuzzy match on command-name` |
|
||||
| `description` | Yes | Must start with `[XX]` code |
|
||||
| handler | Yes | `action` (Agent) or `exec` (Module) |
|
||||
| `data` | No | File path for workflow input |
|
||||
|
||||
**Reserved codes (do NOT use):** MH, CH, PM, DA (auto-injected by compiler)
|
||||
**Reserved codes (DO NOT USE):** MH, CH, PM, DA (auto-injected)
|
||||
|
||||
---
|
||||
|
||||
## Handler Types
|
||||
## Handlers
|
||||
|
||||
### Action Handler
|
||||
|
||||
For Simple/Expert agents with self-contained operations.
|
||||
| Handler | Use Case | Syntax |
|
||||
|---------|----------|--------|
|
||||
| `action` | Agent self-contained operations | `action: '#prompt-id'` or `action: 'inline text'` |
|
||||
| `exec` | Module external workflows | `exec: '{project-root}/path/to/workflow.md'` |
|
||||
|
||||
```yaml
|
||||
# Reference prompt by ID
|
||||
# Action - reference prompt
|
||||
- trigger: WC or fuzzy match on write-commit
|
||||
action: '#write-commit'
|
||||
description: '[WC] Write commit message'
|
||||
|
||||
# Direct inline instruction
|
||||
# Action - inline
|
||||
- trigger: QC or fuzzy match on quick-commit
|
||||
action: 'Generate commit message from diff'
|
||||
description: '[QC] Quick commit from diff'
|
||||
```
|
||||
|
||||
**When to use:** Simple/Expert agents. Use `#id` for complex multi-step prompts, inline text for simple operations.
|
||||
|
||||
### Workflow Handler
|
||||
|
||||
For module agents referencing external workflow files.
|
||||
|
||||
```yaml
|
||||
# Exec - workflow
|
||||
- trigger: CP or fuzzy match on create-prd
|
||||
exec: '{project-root}/_bmad/bmm/workflows/create-prd/workflow.md'
|
||||
description: '[CP] Create Product Requirements Document'
|
||||
description: '[CP] Create PRD'
|
||||
|
||||
- trigger: GB or fuzzy match on brainstorm
|
||||
exec: '{project-root}/_bmad/core/workflows/brainstorming/workflow.md'
|
||||
description: '[GB] Guided brainstorming session'
|
||||
|
||||
# Planned but unimplemented
|
||||
# Exec - unimplemented
|
||||
- trigger: FF or fuzzy match on future-feature
|
||||
exec: 'todo'
|
||||
description: '[FF] Coming soon'
|
||||
```
|
||||
|
||||
**When to use:** Module agents, multi-step workflows, complex processes. Use `exec: 'todo'` for unimplemented features.
|
||||
---
|
||||
|
||||
### Data Parameter (Optional)
|
||||
## Data Parameter
|
||||
|
||||
Add to ANY handler to pass files to the workflow/action.
|
||||
Attach to ANY handler to pass input files.
|
||||
|
||||
```yaml
|
||||
- trigger: TS or fuzzy match on team-standup
|
||||
exec: '{project-root}/_bmad/bmm/tasks/team-standup.md'
|
||||
data: '{project-root}/_bmad/_config/agent-manifest.csv'
|
||||
description: '[TS] Run team standup'
|
||||
|
||||
- trigger: AM or fuzzy match on analyze-metrics
|
||||
action: 'Analyze these metrics for trends'
|
||||
data: '{project-root}/_data/metrics.json'
|
||||
description: '[AM] Analyze metrics'
|
||||
```
|
||||
|
||||
**When to use:** Workflow needs input file, action processes external data.
|
||||
|
||||
---
|
||||
|
||||
## Prompts Section
|
||||
|
||||
For Simple/Expert agents, define reusable prompts referenced by `action: '#id'`.
|
||||
For `action: '#id'` references in Agent menus.
|
||||
|
||||
```yaml
|
||||
prompts:
|
||||
@@ -108,81 +87,65 @@ menu:
|
||||
|
||||
## Path Variables
|
||||
|
||||
**Always use variables, never hardcoded paths:**
|
||||
| Variable | Expands To |
|
||||
|----------|------------|
|
||||
| `{project-root}` | Project root directory |
|
||||
| `{output_folder}` | Document output location |
|
||||
| `{user_name}` | User's name from config |
|
||||
| `{communication_language}` | Language preference |
|
||||
|
||||
```yaml
|
||||
# ✅ CORRECT
|
||||
exec: '{project-root}/_bmad/core/workflows/brainstorming/workflow.md'
|
||||
data: '{project-root}/_data/metrics.csv'
|
||||
|
||||
# ❌ WRONG
|
||||
exec: '../../../core/workflows/brainstorming/workflow.md'
|
||||
```
|
||||
|
||||
**Available variables:**
|
||||
- `{project-root}` - Project root directory
|
||||
- `{output_folder}` - Document output location
|
||||
- `{user_name}` - User's name from config
|
||||
- `{communication_language}` - Language preference
|
||||
|
||||
**Expert Agent sidecar paths:**
|
||||
```yaml
|
||||
# Agent YAML referencing sidecar files
|
||||
action: 'Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with insights'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Creation Thought Process
|
||||
## Agent Types
|
||||
|
||||
When creating menu items, follow this sequence:
|
||||
| Type | hasSidecar | Additional Fields |
|
||||
|------|------------|-------------------|
|
||||
| Simple | false | `prompts`, `menu` |
|
||||
| Expert | true | `prompts`, `menu`, `critical_actions` |
|
||||
| Module | true | `menu` only (external workflows) |
|
||||
|
||||
1. **User capability** → "Check code for issues"
|
||||
2. **Choose code** → `LC` (Lint Code)
|
||||
3. **Write trigger** → `LC or fuzzy match on lint-code`
|
||||
4. **Choose handler** → `action` (inline is simple enough)
|
||||
5. **Write description** → `[LC] Lint code for issues`
|
||||
|
||||
Result:
|
||||
**Expert Agent sidecar path pattern:**
|
||||
```yaml
|
||||
- trigger: LC or fuzzy match on lint-code
|
||||
action: 'Check code for common issues and anti-patterns'
|
||||
description: '[LC] Lint code for issues'
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/{sidecar-folder}/memories.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/{sidecar-folder}/'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Complete Examples
|
||||
|
||||
### Simple Agent Menu
|
||||
### Simple Agent (hasSidecar: false)
|
||||
|
||||
```yaml
|
||||
prompts:
|
||||
- id: format-code
|
||||
content: |
|
||||
<instructions>Format code to style guidelines</instructions>
|
||||
<process>1. Indentation 2. Spacing 3. Naming</process>
|
||||
|
||||
menu:
|
||||
- trigger: FC or fuzzy match on format-code
|
||||
action: '#format-code'
|
||||
description: '[FC] Format code to style guidelines'
|
||||
description: '[FC] Format code'
|
||||
|
||||
- trigger: LC or fuzzy match on lint-code
|
||||
action: 'Check code for common issues and anti-patterns'
|
||||
description: '[LC] Lint code for issues'
|
||||
|
||||
- trigger: SI or fuzzy match on suggest-improvements
|
||||
action: 'Suggest improvements following project-context.md guidelines'
|
||||
description: '[SI] Suggest improvements'
|
||||
action: 'Check code for issues'
|
||||
description: '[LC] Lint code'
|
||||
```
|
||||
|
||||
### Expert Agent Menu
|
||||
### Expert Agent (hasSidecar: true)
|
||||
|
||||
```yaml
|
||||
critical_actions:
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
- 'Load COMPLETE file {project-root}/_bmad/_memory/journal-keeper-sidecar/instructions.md'
|
||||
- 'ONLY read/write files in {project-root}/_bmad/_memory/journal-keeper-sidecar/'
|
||||
|
||||
prompts:
|
||||
@@ -195,39 +158,32 @@ menu:
|
||||
action: '#guided-entry'
|
||||
description: '[WE] Write journal entry'
|
||||
|
||||
- trigger: QC or fuzzy match on quick-capture
|
||||
action: 'Save entry to {project-root}/_bmad/_memory/journal-keeper-sidecar/entries/entry-{date}.md'
|
||||
description: '[QC] Quick capture'
|
||||
|
||||
- trigger: SM or fuzzy match on save-memory
|
||||
action: 'Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md with insights'
|
||||
action: 'Update {project-root}/_bmad/_memory/journal-keeper-sidecar/memories.md'
|
||||
description: '[SM] Save session'
|
||||
```
|
||||
|
||||
### Module Agent Menu
|
||||
### Module Agent (hasSidecar: true)
|
||||
|
||||
```yaml
|
||||
menu:
|
||||
- trigger: WI or fuzzy match on workflow-init
|
||||
exec: '{project-root}/_bmad/bmm/workflows/workflow-status/workflow.md'
|
||||
description: '[WI] Initialize workflow path'
|
||||
description: '[WI] Initialize workflow'
|
||||
|
||||
- trigger: BS or fuzzy match on brainstorm
|
||||
exec: '{project-root}/_bmad/core/workflows/brainstorming/workflow.md'
|
||||
description: '[BS] Guided brainstorming [K,T,A,B,C]'
|
||||
|
||||
- trigger: CP or fuzzy match on create-prd
|
||||
exec: '{project-root}/_bmad/bmm/workflows/create-prd/workflow.md'
|
||||
description: '[CP] Create PRD'
|
||||
description: '[BS] Guided brainstorming'
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Key Patterns to Remember
|
||||
## Validation Rules
|
||||
|
||||
1. **Triggers always:** `XX or fuzzy match on command-name`
|
||||
2. **Descriptions always:** `[XX] Display text`
|
||||
3. **Reserved codes:** MH, CH, PM, DA (never use)
|
||||
4. **Codes must be:** Unique within each agent
|
||||
5. **Paths always:** `{project-root}` variable, never relative
|
||||
6. **Expert sidecars:** `{project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
1. **Triggers:** `XX or fuzzy match on command-name` format required
|
||||
2. **Descriptions:** Must start with `[XX]` code matching trigger
|
||||
3. **Reserved codes:** MH, CH, PM, DA never valid in user menus
|
||||
4. **Code uniqueness:** Required within each agent
|
||||
5. **Paths:** Always use `{project-root}`, never relative paths
|
||||
6. **Handler choice:** `action` for Agents, `exec` for Modules
|
||||
7. **Sidecar paths:** `{project-root}/_bmad/_memory/{sidecar-folder}/`
|
||||
Reference in new issue
Block a user