@techierathore/techieflow 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/TechieFlow/agents/analyst.md +5 -13
- package/.claude/commands/TechieFlow/agents/architect.md +1 -16
- package/.claude/commands/TechieFlow/agents/flow-master.md +42 -215
- package/.claude/commands/TechieFlow/agents/verifier.md +24 -64
- package/.claude/commands/TechieFlow/tasks/_metrics-emit-gate.md +24 -117
- package/.claude/commands/TechieFlow/tasks/_owner-language.md +26 -0
- package/.claude/commands/TechieFlow/tasks/_smoke-test-policy.md +20 -84
- package/.claude/commands/TechieFlow/tasks/_status-update-gate.md +10 -74
- package/.claude/commands/TechieFlow/tasks/_yolo-mode.md +20 -58
- package/.claude/commands/TechieFlow/tasks/amend-docs.md +21 -143
- package/.claude/commands/TechieFlow/tasks/build-phase.md +14 -224
- package/.claude/commands/TechieFlow/tasks/create-deep-research-prompt.md +4 -0
- package/.claude/commands/TechieFlow/tasks/create-doc.md +4 -0
- package/.claude/commands/TechieFlow/tasks/create-project-brief.md +22 -0
- package/.claude/commands/TechieFlow/tasks/day1-brownfield.md +31 -505
- package/.claude/commands/TechieFlow/tasks/day1-greenfield.md +28 -213
- package/.claude/commands/TechieFlow/tasks/deploy-checklist.md +19 -0
- package/.claude/commands/TechieFlow/tasks/devguide.md +10 -219
- package/.claude/commands/TechieFlow/tasks/facilitate-brainstorming-session.md +4 -0
- package/.claude/commands/TechieFlow/tasks/fix-issues.md +10 -129
- package/.claude/commands/TechieFlow/tasks/generate-html.md +5 -1
- package/.claude/commands/TechieFlow/tasks/handoff-phase.md +18 -16
- package/.claude/commands/TechieFlow/tasks/log-miss.md +19 -158
- package/.claude/commands/TechieFlow/tasks/metrics-report.md +3 -1
- package/.claude/commands/TechieFlow/tasks/mockups.md +12 -117
- package/.claude/commands/TechieFlow/tasks/refresh-status.md +9 -130
- package/.claude/commands/TechieFlow/tasks/split-brd.md +10 -126
- package/.claude/commands/TechieFlow/tasks/triage-and-fix.md +14 -0
- package/.claude/commands/TechieFlow/tasks/triage-issues.md +11 -152
- package/.claude/commands/TechieFlow/tasks/verify-phase.md +36 -572
- package/.opencode/plugin/techieflow.js +40 -13
- package/.tfcore/agents/analyst.md +5 -13
- package/.tfcore/agents/architect.md +1 -16
- package/.tfcore/agents/flow-master.md +42 -215
- package/.tfcore/agents/verifier.md +24 -64
- package/.tfcore/core-config.yaml +10 -0
- package/.tfcore/hooks/block-git.sh +4 -4
- package/.tfcore/hooks/guard-artifacts.sh +2 -2
- package/.tfcore/hooks/guard-build.sh +76 -0
- package/.tfcore/hooks/guard-db.sh +90 -0
- package/.tfcore/hooks/guard-metrics.sh +68 -0
- package/.tfcore/hooks/guard-status-html.sh +116 -71
- package/.tfcore/hooks/guard-status.sh +43 -16
- package/.tfcore/hooks/guard-verify-deps.sh +124 -0
- package/.tfcore/hooks/guard-verify.sh +70 -48
- package/.tfcore/hooks/sweep-artifacts.sh +2 -2
- package/.tfcore/install-manifest.yaml +0 -18
- package/.tfcore/routing.yaml +86 -14
- package/.tfcore/standards/coding-standards-core.md +61 -0
- package/.tfcore/standards/coding-standards-dotnet.md +93 -0
- package/.tfcore/tasks/_metrics-emit-gate.md +24 -117
- package/.tfcore/tasks/_owner-language.md +26 -0
- package/.tfcore/tasks/_smoke-test-policy.md +20 -84
- package/.tfcore/tasks/_status-update-gate.md +10 -74
- package/.tfcore/tasks/_yolo-mode.md +20 -58
- package/.tfcore/tasks/amend-docs.md +21 -143
- package/.tfcore/tasks/build-phase.md +14 -224
- package/.tfcore/tasks/create-deep-research-prompt.md +4 -0
- package/.tfcore/tasks/create-doc.md +4 -0
- package/.tfcore/tasks/create-project-brief.md +22 -0
- package/.tfcore/tasks/day1-brownfield.md +31 -505
- package/.tfcore/tasks/day1-greenfield.md +28 -213
- package/.tfcore/tasks/deploy-checklist.md +19 -0
- package/.tfcore/tasks/devguide.md +10 -219
- package/.tfcore/tasks/facilitate-brainstorming-session.md +4 -0
- package/.tfcore/tasks/fix-issues.md +10 -129
- package/.tfcore/tasks/generate-html.md +5 -1
- package/.tfcore/tasks/handoff-phase.md +18 -16
- package/.tfcore/tasks/log-miss.md +19 -158
- package/.tfcore/tasks/metrics-report.md +3 -1
- package/.tfcore/tasks/mockups.md +12 -117
- package/.tfcore/tasks/refresh-status.md +9 -130
- package/.tfcore/tasks/split-brd.md +10 -126
- package/.tfcore/tasks/triage-and-fix.md +14 -0
- package/.tfcore/tasks/triage-issues.md +11 -152
- package/.tfcore/tasks/verify-phase.md +36 -572
- package/.tfcore/telemetry/SCHEMA.md +100 -8
- package/.tfcore/telemetry/tf-metrics.sh +564 -32
- package/.tfcore/templates/stack-defaults/dotnet.md +35 -0
- package/.tfcore/templates/stack-questions.md +77 -0
- package/.tfcore/templates/v4custom/app-agents-md-tmpl.md +3 -4
- package/.tfcore/templates/v4custom/app-architecture-tmpl.md +107 -115
- package/.tfcore/templates/v4custom/app-brd-tmpl.md +108 -184
- package/.tfcore/templates/v4custom/app-brief-tmpl.md +65 -0
- package/.tfcore/templates/v4custom/app-checklist-tmpl.md +48 -73
- package/.tfcore/templates/v4custom/app-claude-md-tmpl.md +1 -1
- package/.tfcore/templates/v4custom/app-coding-standards-tmpl.md +52 -0
- package/.tfcore/templates/v4custom/app-decision-request-tmpl.md +85 -0
- package/.tfcore/templates/v4custom/app-deployment-checklist-tmpl.md +86 -0
- package/.tfcore/templates/v4custom/app-devguide-tmpl.md +69 -146
- package/.tfcore/templates/v4custom/app-library-feedback-tmpl.md +86 -31
- package/.tfcore/templates/v4custom/app-phases-tmpl.md +35 -0
- package/.tfcore/templates/v4custom/app-productguide-tmpl.md +38 -35
- package/.tfcore/templates/v4custom/app-project-status-tmpl.md +63 -73
- package/.tfcore/templates/v4custom/app-uidesign-tmpl.md +62 -37
- package/.tfcore/templates/v4custom/app-usageguide-tmpl.md +69 -54
- package/.tfcore/templates/v4custom/build-invocation-ladder.md +17 -180
- package/.tfcore/templates/v4custom/build-subagent-prompt.md +17 -0
- package/.tfcore/templates/v4custom/html-render-shell.md +1 -1
- package/.tfcore/templates/v4custom/metrics-report-template.md +2 -2
- package/.tfcore/user-guide.md +0 -23
- package/.tfcore/utils/__pycache__/tf-brd-status.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-checklist-edit.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-codex-bind.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-codex-telemetry.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-day1-files.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-devguide-list.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-doc-check.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-log-miss.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-misses-md.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-mockups-locate.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-opencode-audit.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-perf-grade.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-render-html.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-split-brd.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-status-facts.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-triage.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-verify-list.cpython-312.pyc +0 -0
- package/.tfcore/utils/__pycache__/tf-verify-verdict.cpython-312.pyc +0 -0
- package/.tfcore/utils/tf-brd-status.py +176 -0
- package/.tfcore/utils/tf-brd-status.sh +19 -0
- package/.tfcore/utils/tf-build-list.py +211 -0
- package/.tfcore/utils/tf-build-list.sh +21 -0
- package/.tfcore/utils/tf-build.sh +143 -0
- package/.tfcore/utils/tf-cdp-relay.ps1 +64 -0
- package/.tfcore/utils/tf-checklist-edit.py +133 -0
- package/.tfcore/utils/tf-day1-files.py +208 -0
- package/.tfcore/utils/tf-day1-files.sh +20 -0
- package/.tfcore/utils/tf-devguide-list.py +249 -0
- package/.tfcore/utils/tf-devguide-list.sh +18 -0
- package/.tfcore/utils/tf-doc-check.py +1369 -0
- package/.tfcore/utils/tf-doc-check.sh +29 -0
- package/.tfcore/utils/tf-emit.sh +545 -18
- package/.tfcore/utils/tf-fix-close.sh +115 -0
- package/.tfcore/utils/tf-gitignore-audit.sh +50 -3
- package/.tfcore/utils/tf-goal.sh +284 -66
- package/.tfcore/utils/tf-harness.sh +4 -9
- package/.tfcore/utils/tf-log-miss.py +197 -0
- package/.tfcore/utils/tf-log-miss.sh +14 -0
- package/.tfcore/utils/tf-misses-md.py +208 -0
- package/.tfcore/utils/tf-misses-md.sh +14 -0
- package/.tfcore/utils/tf-mockups-locate.py +66 -0
- package/.tfcore/utils/tf-mockups-locate.sh +18 -0
- package/.tfcore/utils/tf-model-pick.sh +475 -0
- package/.tfcore/utils/tf-opencode-audit.py +23 -7
- package/.tfcore/utils/tf-perf-grade.py +97 -0
- package/.tfcore/utils/tf-perf-grade.sh +12 -0
- package/.tfcore/utils/tf-phase.sh +92 -0
- package/.tfcore/utils/tf-render-html.py +20 -0
- package/.tfcore/utils/tf-routing-bind.sh +97 -6
- package/.tfcore/utils/tf-routing.sh +13 -7
- package/.tfcore/utils/tf-selfcheck.sh +323 -0
- package/.tfcore/utils/tf-split-brd.py +309 -0
- package/.tfcore/utils/tf-split-brd.sh +22 -0
- package/.tfcore/utils/tf-status-evidence.sh +68 -0
- package/.tfcore/utils/tf-status-facts.py +358 -0
- package/.tfcore/utils/tf-status-facts.sh +20 -0
- package/.tfcore/utils/tf-triage.py +243 -0
- package/.tfcore/utils/tf-triage.sh +16 -0
- package/.tfcore/utils/tf-verify-boot.sh +250 -0
- package/.tfcore/utils/tf-verify-emit.sh +110 -0
- package/.tfcore/utils/tf-verify-env.sh +88 -0
- package/.tfcore/utils/tf-verify-list.py +270 -0
- package/.tfcore/utils/tf-verify-list.sh +13 -0
- package/.tfcore/utils/tf-verify-screens.mjs +355 -0
- package/.tfcore/utils/tf-verify-screens.sh +31 -0
- package/.tfcore/utils/tf-verify-tests.sh +166 -0
- package/.tfcore/utils/tf-verify-verdict.py +292 -0
- package/.tfcore/utils/tf-verify-verdict.sh +15 -0
- package/.tfcore/utils/tf-yolo.sh +59 -0
- package/README.md +120 -1145
- package/docs/TechieFlow-Installation.md +1 -5
- package/opencode.jsonc +37 -33
- package/package.json +1 -5
- package/scripts/install.mjs +56 -46
- package/.claude/commands/TechieFlow/tasks/advanced-elicitation.md +0 -117
- package/.claude/commands/TechieFlow/tasks/author-brd.md +0 -79
- package/.claude/commands/TechieFlow/tasks/document-project.md +0 -343
- package/.claude/commands/TechieFlow/tasks/execute-checklist.md +0 -86
- package/.claude/commands/TechieFlow/tasks/index-docs.md +0 -173
- package/.claude/commands/TechieFlow/tasks/kb-mode-interaction.md +0 -75
- package/.claude/commands/TechieFlow/tasks/shard-doc.md +0 -185
- package/.codex/config.toml +0 -46
- package/.codex/hooks.json +0 -63
- package/.codex/rules/techieflow.rules +0 -8
- package/.tfcore/hooks/codex-adapter.py +0 -248
- package/.tfcore/tasks/advanced-elicitation.md +0 -117
- package/.tfcore/tasks/author-brd.md +0 -79
- package/.tfcore/tasks/document-project.md +0 -343
- package/.tfcore/tasks/execute-checklist.md +0 -86
- package/.tfcore/tasks/index-docs.md +0 -173
- package/.tfcore/tasks/kb-mode-interaction.md +0 -75
- package/.tfcore/tasks/shard-doc.md +0 -185
- package/.tfcore/templates/architecture-tmpl.yaml +0 -650
- package/.tfcore/templates/brownfield-architecture-tmpl.yaml +0 -476
- package/.tfcore/templates/competitor-analysis-tmpl.yaml +0 -306
- package/.tfcore/templates/front-end-architecture-tmpl.yaml +0 -218
- package/.tfcore/templates/fullstack-architecture-tmpl.yaml +0 -823
- package/.tfcore/templates/market-research-tmpl.yaml +0 -252
- package/.tfcore/templates/project-brief-tmpl.yaml +0 -221
- package/.tfcore/utils/techieflow-doc-template.md +0 -325
- package/.tfcore/utils/tf-codex-bind.py +0 -196
- package/.tfcore/utils/tf-codex-telemetry.py +0 -60
- package/WORKFLOW.html +0 -1986
|
@@ -1,325 +0,0 @@
|
|
|
1
|
-
# TechieFlow Document Template Specification
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
TechieFlow document templates are defined in YAML format to drive interactive document generation and agent interaction. Templates separate structure definition from content generation, making them both human and LLM-agent-friendly.
|
|
6
|
-
|
|
7
|
-
## Template Structure
|
|
8
|
-
|
|
9
|
-
```yaml
|
|
10
|
-
template:
|
|
11
|
-
id: template-identifier
|
|
12
|
-
name: Human Readable Template Name
|
|
13
|
-
version: 1.0
|
|
14
|
-
output:
|
|
15
|
-
format: markdown
|
|
16
|
-
filename: default-path/to/{{filename}}.md
|
|
17
|
-
title: '{{variable}} Document Title'
|
|
18
|
-
|
|
19
|
-
workflow:
|
|
20
|
-
mode: interactive
|
|
21
|
-
elicitation: advanced-elicitation
|
|
22
|
-
|
|
23
|
-
sections:
|
|
24
|
-
- id: section-id
|
|
25
|
-
title: Section Title
|
|
26
|
-
instruction: |
|
|
27
|
-
Detailed instructions for the LLM on how to handle this section
|
|
28
|
-
# ... additional section properties
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Core Fields
|
|
32
|
-
|
|
33
|
-
### Template Metadata
|
|
34
|
-
|
|
35
|
-
- **id**: Unique identifier for the template
|
|
36
|
-
- **name**: Human-readable name displayed in UI
|
|
37
|
-
- **version**: Template version for tracking changes
|
|
38
|
-
- **output.format**: Default "markdown" for document templates
|
|
39
|
-
- **output.filename**: Default output file path (can include variables)
|
|
40
|
-
- **output.title**: Document title (becomes H1 in markdown)
|
|
41
|
-
|
|
42
|
-
### Workflow Configuration
|
|
43
|
-
|
|
44
|
-
- **workflow.mode**: Default interaction mode ("interactive" or "yolo")
|
|
45
|
-
- **workflow.elicitation**: Elicitation task to use ("advanced-elicitation")
|
|
46
|
-
|
|
47
|
-
## Section Properties
|
|
48
|
-
|
|
49
|
-
### Required Fields
|
|
50
|
-
|
|
51
|
-
- **id**: Unique section identifier
|
|
52
|
-
- **title**: Section heading text
|
|
53
|
-
- **instruction**: Detailed guidance for LLM on handling this section
|
|
54
|
-
|
|
55
|
-
### Optional Fields
|
|
56
|
-
|
|
57
|
-
#### Content Control
|
|
58
|
-
|
|
59
|
-
- **type**: Content type hint for structured sections
|
|
60
|
-
- **template**: Fixed template text for section content
|
|
61
|
-
- **item_template**: Template for repeatable items within section
|
|
62
|
-
- **prefix**: Prefix for numbered items (e.g., "FR", "NFR")
|
|
63
|
-
|
|
64
|
-
#### Behavior Flags
|
|
65
|
-
|
|
66
|
-
- **elicit**: Boolean - Apply elicitation after section rendered
|
|
67
|
-
- **repeatable**: Boolean - Section can be repeated multiple times
|
|
68
|
-
- **condition**: String - Condition for including section (e.g., "has ui requirements")
|
|
69
|
-
|
|
70
|
-
#### Agent Permissions
|
|
71
|
-
|
|
72
|
-
- **owner**: String - Agent role that initially creates/populates this section
|
|
73
|
-
- **editors**: Array - List of agent roles allowed to modify this section
|
|
74
|
-
- **readonly**: Boolean - Section cannot be modified after initial creation
|
|
75
|
-
|
|
76
|
-
#### Content Guidance
|
|
77
|
-
|
|
78
|
-
- **examples**: Array of example content (not included in output)
|
|
79
|
-
- **choices**: Object with choice options for common decisions
|
|
80
|
-
- **placeholder**: Default placeholder text
|
|
81
|
-
|
|
82
|
-
#### Structure
|
|
83
|
-
|
|
84
|
-
- **sections**: Array of nested child sections
|
|
85
|
-
|
|
86
|
-
## Supported Types
|
|
87
|
-
|
|
88
|
-
### Content Types
|
|
89
|
-
|
|
90
|
-
- **bullet-list**: Unordered list items
|
|
91
|
-
- **numbered-list**: Ordered list with optional prefix
|
|
92
|
-
- **paragraphs**: Free-form paragraph text
|
|
93
|
-
- **table**: Structured table data
|
|
94
|
-
- **code-block**: Code or configuration blocks
|
|
95
|
-
- **template-text**: Fixed template with variable substitution
|
|
96
|
-
- **mermaid**: Mermaid diagram with specified type and details
|
|
97
|
-
|
|
98
|
-
### Special Types
|
|
99
|
-
|
|
100
|
-
- **repeatable-container**: Container for multiple instances
|
|
101
|
-
- **conditional-block**: Content shown based on conditions
|
|
102
|
-
- **choice-selector**: Present choices to user
|
|
103
|
-
|
|
104
|
-
## Advanced Features
|
|
105
|
-
|
|
106
|
-
### Variable Substitution
|
|
107
|
-
|
|
108
|
-
Use `{{variable_name}}` in titles, templates, and content:
|
|
109
|
-
|
|
110
|
-
```yaml
|
|
111
|
-
title: 'Epic {{epic_number}} {{epic_title}}'
|
|
112
|
-
template: 'As a {{user_type}}, I want {{action}}, so that {{benefit}}.'
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### Conditional Sections
|
|
116
|
-
|
|
117
|
-
```yaml
|
|
118
|
-
- id: ui-section
|
|
119
|
-
title: User Interface Design
|
|
120
|
-
condition: Project has UX/UI Requirements
|
|
121
|
-
instruction: Only include if project has UI components
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
### Choice Integration
|
|
125
|
-
|
|
126
|
-
```yaml
|
|
127
|
-
choices:
|
|
128
|
-
architecture: [Monolith, Microservices, Serverless]
|
|
129
|
-
testing: [Unit Only, Unit + Integration, Full Pyramid]
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Mermaid Diagrams
|
|
133
|
-
|
|
134
|
-
```yaml
|
|
135
|
-
- id: system-architecture
|
|
136
|
-
title: System Architecture Diagram
|
|
137
|
-
type: mermaid
|
|
138
|
-
instruction: Create a system architecture diagram showing key components and data flow
|
|
139
|
-
mermaid_type: flowchart
|
|
140
|
-
details: |
|
|
141
|
-
Show the following components:
|
|
142
|
-
- User interface layer
|
|
143
|
-
- API gateway
|
|
144
|
-
- Core services
|
|
145
|
-
- Database layer
|
|
146
|
-
- External integrations
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
**Supported mermaid_type values:**
|
|
150
|
-
|
|
151
|
-
**Core Diagram Types:**
|
|
152
|
-
|
|
153
|
-
- `flowchart` - Flow charts and process diagrams
|
|
154
|
-
- `sequenceDiagram` - Sequence diagrams for interactions
|
|
155
|
-
- `classDiagram` - Class relationship diagrams (UML)
|
|
156
|
-
- `stateDiagram` - State transition diagrams
|
|
157
|
-
- `erDiagram` - Entity relationship diagrams
|
|
158
|
-
- `gantt` - Gantt charts for timelines
|
|
159
|
-
- `pie` - Pie charts for data visualization
|
|
160
|
-
|
|
161
|
-
**Advanced Diagram Types:**
|
|
162
|
-
|
|
163
|
-
- `journey` - User journey maps
|
|
164
|
-
- `mindmap` - Mindmaps for brainstorming
|
|
165
|
-
- `timeline` - Timeline diagrams for chronological events
|
|
166
|
-
- `quadrantChart` - Quadrant charts for data categorization
|
|
167
|
-
- `xyChart` - XY charts (bar charts, line charts)
|
|
168
|
-
- `sankey` - Sankey diagrams for flow visualization
|
|
169
|
-
|
|
170
|
-
**Specialized Types:**
|
|
171
|
-
|
|
172
|
-
- `c4Context` - C4 context diagrams (experimental)
|
|
173
|
-
- `requirement` - Requirement diagrams
|
|
174
|
-
- `packet` - Network packet diagrams
|
|
175
|
-
- `block` - Block diagrams
|
|
176
|
-
- `kanban` - Kanban boards
|
|
177
|
-
|
|
178
|
-
### Agent Permissions Example
|
|
179
|
-
|
|
180
|
-
```yaml
|
|
181
|
-
- id: story-details
|
|
182
|
-
title: Story
|
|
183
|
-
owner: scrum-master
|
|
184
|
-
editors: [scrum-master]
|
|
185
|
-
readonly: false
|
|
186
|
-
sections:
|
|
187
|
-
- id: dev-notes
|
|
188
|
-
title: Dev Notes
|
|
189
|
-
owner: dev-agent
|
|
190
|
-
editors: [dev-agent]
|
|
191
|
-
readonly: false
|
|
192
|
-
instruction: Implementation notes and technical details
|
|
193
|
-
- id: qa-results
|
|
194
|
-
title: QA Results
|
|
195
|
-
owner: qa-agent
|
|
196
|
-
editors: [qa-agent]
|
|
197
|
-
readonly: true
|
|
198
|
-
instruction: Quality assurance test results
|
|
199
|
-
```
|
|
200
|
-
|
|
201
|
-
### Repeatable Sections
|
|
202
|
-
|
|
203
|
-
```yaml
|
|
204
|
-
- id: epic-details
|
|
205
|
-
title: Epic {{epic_number}} {{epic_title}}
|
|
206
|
-
repeatable: true
|
|
207
|
-
sections:
|
|
208
|
-
- id: story
|
|
209
|
-
title: Story {{epic_number}}.{{story_number}} {{story_title}}
|
|
210
|
-
repeatable: true
|
|
211
|
-
sections:
|
|
212
|
-
- id: criteria
|
|
213
|
-
title: Acceptance Criteria
|
|
214
|
-
type: numbered-list
|
|
215
|
-
item_template: '{{criterion_number}}: {{criteria}}'
|
|
216
|
-
repeatable: true
|
|
217
|
-
```
|
|
218
|
-
|
|
219
|
-
### Examples with Code Blocks
|
|
220
|
-
|
|
221
|
-
````yaml
|
|
222
|
-
examples:
|
|
223
|
-
- 'FR6: The system must authenticate users within 2 seconds'
|
|
224
|
-
- |
|
|
225
|
-
```mermaid
|
|
226
|
-
sequenceDiagram
|
|
227
|
-
participant User
|
|
228
|
-
participant API
|
|
229
|
-
participant DB
|
|
230
|
-
User->>API: POST /login
|
|
231
|
-
API->>DB: Validate credentials
|
|
232
|
-
DB-->>API: User data
|
|
233
|
-
API-->>User: JWT token
|
|
234
|
-
```
|
|
235
|
-
- |
|
|
236
|
-
**Architecture Decision Record**
|
|
237
|
-
|
|
238
|
-
**Decision**: Use PostgreSQL for primary database
|
|
239
|
-
**Rationale**: ACID compliance and JSON support needed
|
|
240
|
-
**Consequences**: Requires database management expertise
|
|
241
|
-
````
|
|
242
|
-
|
|
243
|
-
## Section Hierarchy
|
|
244
|
-
|
|
245
|
-
Templates define the complete document structure starting with the first H2 - each level in is the next H#:
|
|
246
|
-
|
|
247
|
-
```yaml
|
|
248
|
-
sections:
|
|
249
|
-
- id: overview
|
|
250
|
-
title: Project Overview
|
|
251
|
-
sections:
|
|
252
|
-
- id: goals
|
|
253
|
-
title: Goals
|
|
254
|
-
- id: scope
|
|
255
|
-
title: Scope
|
|
256
|
-
sections:
|
|
257
|
-
- id: in-scope
|
|
258
|
-
title: In Scope
|
|
259
|
-
- id: out-scope
|
|
260
|
-
title: Out of Scope
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## Processing Flow
|
|
264
|
-
|
|
265
|
-
1. **Parse Template**: Load and validate YAML structure
|
|
266
|
-
2. **Initialize Workflow**: Set interaction mode and elicitation
|
|
267
|
-
3. **Process Sections**: Handle each section in order:
|
|
268
|
-
- Check conditions
|
|
269
|
-
- Apply instructions
|
|
270
|
-
- Generate content
|
|
271
|
-
- Handle choices and variables
|
|
272
|
-
- Apply elicitation if specified
|
|
273
|
-
- Process nested sections
|
|
274
|
-
4. **Generate Output**: Create clean markdown document
|
|
275
|
-
|
|
276
|
-
## Best Practices
|
|
277
|
-
|
|
278
|
-
### Template Design
|
|
279
|
-
|
|
280
|
-
- Keep instructions clear and specific
|
|
281
|
-
- Use examples for complex content
|
|
282
|
-
- Structure sections logically
|
|
283
|
-
- Include all necessary guidance for LLM
|
|
284
|
-
|
|
285
|
-
### Content Instructions
|
|
286
|
-
|
|
287
|
-
- Be explicit about expected format
|
|
288
|
-
- Include reasoning for decisions
|
|
289
|
-
- Specify interaction patterns
|
|
290
|
-
- Reference other documents when needed
|
|
291
|
-
|
|
292
|
-
### Variable Naming
|
|
293
|
-
|
|
294
|
-
- Use descriptive variable names
|
|
295
|
-
- Follow consistent naming conventions
|
|
296
|
-
- Document expected variable values
|
|
297
|
-
|
|
298
|
-
### Examples Usage
|
|
299
|
-
|
|
300
|
-
- Provide concrete examples for complex sections
|
|
301
|
-
- Include both simple and complex cases
|
|
302
|
-
- Use realistic project scenarios
|
|
303
|
-
- Include code blocks and diagrams when helpful
|
|
304
|
-
|
|
305
|
-
## Validation
|
|
306
|
-
|
|
307
|
-
Templates should be validated for:
|
|
308
|
-
|
|
309
|
-
- Valid YAML syntax
|
|
310
|
-
- Required fields present
|
|
311
|
-
- Consistent section IDs
|
|
312
|
-
- Proper nesting structure
|
|
313
|
-
- Valid variable references
|
|
314
|
-
|
|
315
|
-
## Migration from Legacy
|
|
316
|
-
|
|
317
|
-
When converting from markdown+frontmatter templates:
|
|
318
|
-
|
|
319
|
-
1. Extract embedded `[[LLM:]]` instructions to `instruction` fields
|
|
320
|
-
2. Convert `<<REPEAT>>` blocks to `repeatable: true` sections
|
|
321
|
-
3. Extract `^^CONDITIONS^^` to `condition` fields
|
|
322
|
-
4. Move `@{examples}` to `examples` arrays
|
|
323
|
-
5. Convert `{{placeholders}}` to proper variable syntax
|
|
324
|
-
|
|
325
|
-
This specification ensures templates are both human-readable and machine-processable while maintaining the flexibility needed for complex document generation.
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Generate TechieFlow's Codex agents and thin workflow skills."""
|
|
3
|
-
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
import argparse
|
|
7
|
-
import pathlib
|
|
8
|
-
import re
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
PHASES = {
|
|
12
|
-
"day1-brownfield": ("analyst", "Reverse-document and initialize an existing application."),
|
|
13
|
-
"day1-greenfield": ("analyst", "Initialize planning artifacts and mockups for a new application."),
|
|
14
|
-
"amend-docs": ("analyst", "Amend existing requirements and design artifacts in place."),
|
|
15
|
-
"author-brd": ("analyst", "Interactively author or extend numbered business requirements."),
|
|
16
|
-
"mockups": ("analyst", "Create or update the greenfield UI design and HTML mockups."),
|
|
17
|
-
"split-brd": ("analyst", "Convert a BRD into the single implementation checklist."),
|
|
18
|
-
"build-phase": ("flow_master", "Implement the open checklist and chain smoke and verification."),
|
|
19
|
-
"verify-phase": ("verifier", "Independently verify requirements against runtime evidence."),
|
|
20
|
-
"fix-issues": ("flow_master", "Fix reported or verifier-discovered application defects."),
|
|
21
|
-
"triage-issues": ("flow_master", "Analyze and document human-found bugs without fixing source."),
|
|
22
|
-
"log-miss": ("flow_master", "Record one missed requirement as telemetry and a checklist line."),
|
|
23
|
-
"devguide": ("flow_master", "Create the developer-facing screen and component guide."),
|
|
24
|
-
"productguide": ("flow_master", "Create the user-facing guide from the running application."),
|
|
25
|
-
"handoff-phase": ("flow_master", "Complete handoff documents, status, and rendered artifacts."),
|
|
26
|
-
"refresh-status": ("flow_master", "Recover truthful project status after an interrupted run."),
|
|
27
|
-
"generate-html": ("flow_master", "Render an arbitrary human-readable Markdown document to HTML."),
|
|
28
|
-
"render-workflow-docs": ("flow_master", "Render the canonical BRD, Architecture, and status HTML files."),
|
|
29
|
-
"metrics-report": ("flow_master", "Report TechieFlow development telemetry without changing code."),
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
PERSONAS = {
|
|
33
|
-
"flow-master": "flow-master.md",
|
|
34
|
-
"analyst": "analyst.md",
|
|
35
|
-
"architect": "architect.md",
|
|
36
|
-
"verifier": "verifier.md",
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
WORKERS = {
|
|
40
|
-
"tf-builder": """Implement one assigned FN/NFR requirement cluster. Read `.tfcore/tasks/_smoke-test-policy.md`. Never run git or gh. Follow project coding standards, smoke the changed behavior, update only the assigned checklist rows, and return structured evidence to the parent.""",
|
|
41
|
-
"tf-test-writer": """Write black-box verification tests for one assigned requirement cluster. Never edit application source and never run git or gh. Follow `.tfcore/tasks/verify-phase.md` and return tests added, tests refreshed, and anything unobservable.""",
|
|
42
|
-
"tf-explorer": """Perform a focused read-only codebase scan. Never edit files and never run git or gh. Return concise evidence with file paths and symbols.""",
|
|
43
|
-
"trblazeui": """Read the NuGet-deployed TrBlazeUI persona and adopt its implementation rules. Resolve it in this order and use the FIRST that exists: `.claude/commands/trblazeui.md` (current deploy target), `.claude/trblazeui.md` (legacy deploy target), `.opencode/command/trblazeui.md`, `.trblazeui/TrBlazeUI-AI-Reference.md` (packaged component reference). Only if NONE exists, report that the TrBlazeUI persona is not deployed (`dotnet build` the app to unpack the package) and stop. Never run git or gh.""",
|
|
44
|
-
"techierag": """Read the NuGet-deployed TechieRag persona and adopt its implementation rules. Resolve it in this order and use the FIRST that exists: `.claude/commands/techierag.md` (current deploy target), `.claude/techierag.md` (legacy deploy target), `.opencode/command/techierag.md`, `.techierag/TechieRag-AI-Reference.md` (packaged service reference). Only if NONE exists, report that the TechieRag persona is not deployed (`dotnet build` the app to unpack the package) and stop. Never run git or gh.""",
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
# Library-persona workers are COMPATIBILITY wrappers: the library NuGet packages own
|
|
48
|
-
# the native `.codex/agents/<lib>.toml` (TrBlazeUI.Components >= 2.0.3 deploys it on
|
|
49
|
-
# `dotnet build`; TechieRag is expected to follow the same contract). The package's
|
|
50
|
-
# MSBuild target deploys only when the file is absent OR the ownership marker
|
|
51
|
-
# `.<lib>/.codex-agent-package-owned` exists; otherwise it preserves what it finds as
|
|
52
|
-
# consumer-owned. So the framework must (a) never overwrite a file that is not its own
|
|
53
|
-
# wrapper, and (b) write the marker alongside its wrapper so the package is allowed to
|
|
54
|
-
# replace it. The wrapper then self-retires per repo on the first post-2.0.3 build.
|
|
55
|
-
COMPAT = {
|
|
56
|
-
"trblazeui": ("TrBlazeUI.Components", ".trblazeui"),
|
|
57
|
-
"techierag": ("TechieRag", ".techierag"),
|
|
58
|
-
}
|
|
59
|
-
MARKER = ".codex-agent-package-owned"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
def own_wrapper(path: pathlib.Path, name: str) -> bool:
|
|
63
|
-
"""True when `path` is absent or holds the framework's own compat wrapper."""
|
|
64
|
-
if not path.exists():
|
|
65
|
-
return True
|
|
66
|
-
return f'description = "TechieFlow {name} role."' in path.read_text(encoding="utf-8")
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
def routing(path: pathlib.Path) -> dict:
|
|
70
|
-
cfg = {"enabled": False, "tiers": {}, "phases": {}, "subagents": {}, "effort": {}}
|
|
71
|
-
section = tier = None
|
|
72
|
-
if not path.exists():
|
|
73
|
-
return cfg
|
|
74
|
-
for line in path.read_text(encoding="utf-8").splitlines():
|
|
75
|
-
if not line.strip() or line.lstrip().startswith("#"):
|
|
76
|
-
continue
|
|
77
|
-
if not line.startswith(" "):
|
|
78
|
-
key, _, value = line.partition(":")
|
|
79
|
-
section, tier = key.strip(), None
|
|
80
|
-
if section == "enabled":
|
|
81
|
-
cfg["enabled"] = value.strip() == "true"
|
|
82
|
-
elif section == "tiers":
|
|
83
|
-
if re.match(r"^ [a-z-]+:\s*$", line):
|
|
84
|
-
tier = line.strip()[:-1]
|
|
85
|
-
cfg["tiers"][tier] = {}
|
|
86
|
-
elif tier and line.startswith(" "):
|
|
87
|
-
key, _, value = line.strip().partition(":")
|
|
88
|
-
cfg["tiers"][tier][key] = value.strip()
|
|
89
|
-
elif section in ("phases", "subagents", "effort"):
|
|
90
|
-
key, _, value = line.strip().partition(":")
|
|
91
|
-
cfg[section][key] = value.strip()
|
|
92
|
-
return cfg
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
def quoted(value: str) -> str:
|
|
96
|
-
return '"' + value.replace("\\", "\\\\").replace('"', '\\"').replace("\n", "\\n") + '"'
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
def write(path: pathlib.Path, content: str) -> None:
|
|
100
|
-
path.parent.mkdir(parents=True, exist_ok=True)
|
|
101
|
-
path.write_text(content.rstrip() + "\n", encoding="utf-8", newline="\n")
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
def persona_instructions(root: pathlib.Path, source_name: str) -> str:
|
|
105
|
-
source = root / ".tfcore" / "agents" / source_name
|
|
106
|
-
return f"""Read `{source.relative_to(root)}` completely before acting and follow its persona, core principles, command routing, and dependency rules. Skip only its activation greeting/help/halt ritual because this is a spawned Codex role. Treat `.tfcore/tasks/*.md` as executable workflows. Never run git or gh. Preserve TechieFlow's smoke, verifier, artifact-location, local-only runtime, checklist, and PROJECT-STATUS invariants. Load only dependencies needed for the assigned task."""
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
def agent_file(name: str, description: str, instructions: str, model: str | None,
|
|
110
|
-
effort: str | None, read_only: bool = False) -> str:
|
|
111
|
-
lines = [f"name = {quoted(name)}", f"description = {quoted(description)}",
|
|
112
|
-
f"developer_instructions = {quoted(instructions)}"]
|
|
113
|
-
if model:
|
|
114
|
-
lines.append(f"model = {quoted(model)}")
|
|
115
|
-
if effort:
|
|
116
|
-
lines.append(f"model_reasoning_effort = {quoted(effort)}")
|
|
117
|
-
if read_only:
|
|
118
|
-
lines.append('sandbox_mode = "read-only"')
|
|
119
|
-
return "\n".join(lines)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
def main() -> int:
|
|
123
|
-
parser = argparse.ArgumentParser()
|
|
124
|
-
parser.add_argument("root", nargs="?", default=".")
|
|
125
|
-
args = parser.parse_args()
|
|
126
|
-
root = pathlib.Path(args.root).resolve()
|
|
127
|
-
if not (root / ".tfcore").is_dir():
|
|
128
|
-
parser.error(f"not a TechieFlow repository: {root}")
|
|
129
|
-
cfg = routing(root / ".tfcore" / "routing.yaml")
|
|
130
|
-
|
|
131
|
-
persona_tier = {"flow-master": "build-phase", "analyst": "day1-greenfield",
|
|
132
|
-
"architect": "day1-greenfield", "verifier": "verify-phase"}
|
|
133
|
-
for name, source in PERSONAS.items():
|
|
134
|
-
tier = cfg["phases"].get(persona_tier[name], "inherit")
|
|
135
|
-
model = cfg["tiers"].get(tier, {}).get("codex") if cfg["enabled"] and tier != "inherit" else None
|
|
136
|
-
effort = cfg["effort"].get(tier) if model else None
|
|
137
|
-
write(root / ".codex" / "agents" / f"{name}.toml", agent_file(
|
|
138
|
-
name.replace("-", "_"), f"TechieFlow {name} specialist.",
|
|
139
|
-
persona_instructions(root, source), model, effort))
|
|
140
|
-
|
|
141
|
-
kept = []
|
|
142
|
-
for name, instructions in WORKERS.items():
|
|
143
|
-
tier = cfg["subagents"].get(name, "inherit")
|
|
144
|
-
model = cfg["tiers"].get(tier, {}).get("codex") if cfg["enabled"] and tier != "inherit" else None
|
|
145
|
-
effort = cfg["effort"].get(tier) if model else None
|
|
146
|
-
target = root / ".codex" / "agents" / f"{name}.toml"
|
|
147
|
-
if name in COMPAT:
|
|
148
|
-
package, lib_dir = COMPAT[name]
|
|
149
|
-
if not own_wrapper(target, name):
|
|
150
|
-
kept.append(name) # package- or consumer-owned agent: never overwrite
|
|
151
|
-
continue
|
|
152
|
-
marker = root / lib_dir / MARKER
|
|
153
|
-
if not marker.exists():
|
|
154
|
-
write(marker, package)
|
|
155
|
-
ignore = root / lib_dir / ".gitignore" # same `*` the package writes on build
|
|
156
|
-
if not ignore.exists():
|
|
157
|
-
write(ignore, "*")
|
|
158
|
-
write(target, agent_file(
|
|
159
|
-
name.replace("-", "_"), f"TechieFlow {name} role.", instructions,
|
|
160
|
-
model, effort, read_only=name == "tf-explorer"))
|
|
161
|
-
|
|
162
|
-
for phase, (owner, description) in PHASES.items():
|
|
163
|
-
skill_name = f"techieflow-{phase.removesuffix('-phase')}"
|
|
164
|
-
task = f".tfcore/tasks/{phase}.md"
|
|
165
|
-
body = f"""---
|
|
166
|
-
name: {skill_name}
|
|
167
|
-
description: {description} Use when a TechieFlow project needs its `{phase}` workflow.
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
# {skill_name}
|
|
171
|
-
|
|
172
|
-
1. Read `{task}` completely and follow it as the canonical executable workflow.
|
|
173
|
-
2. Read `.tfcore/core-config.yaml` and only the task dependencies required for this run.
|
|
174
|
-
3. Operate as the `{owner}` role. Delegate only where the task explicitly calls for independent subagents, using the registered Codex roles and waiting for their results.
|
|
175
|
-
4. Preserve interactive elicitation unless `.tfcore/.session/yolo.json` exists or the user explicitly requested YOLO/goal mode.
|
|
176
|
-
5. Never run `git` or `gh`. Run required builds, smoke tests, runtime observations, verifier gates, document updates, and telemetry yourself.
|
|
177
|
-
6. Treat old `*...` and harness slash-command text in the canonical task as vocabulary aliases; execute the named task or delegate to the named Codex role directly.
|
|
178
|
-
"""
|
|
179
|
-
write(root / ".agents" / "skills" / skill_name / "SKILL.md", body)
|
|
180
|
-
|
|
181
|
-
yolo = """---
|
|
182
|
-
name: techieflow-yolo
|
|
183
|
-
description: Enable, disable, or inspect TechieFlow YOLO mode for an explicitly requested unattended workflow.
|
|
184
|
-
---
|
|
185
|
-
|
|
186
|
-
Read `.tfcore/tasks/_yolo-mode.md` completely. Run `bash .tfcore/utils/tf-yolo.sh on|off` as requested. YOLO removes elicitation pauses but does not broaden the user's task, allow git/gh, bypass the Codex workspace sandbox, or waive genuine external blockers. For a supervised long-running goal, use `.tfcore/utils/tf-goal.sh --harness codex`.
|
|
187
|
-
"""
|
|
188
|
-
write(root / ".agents" / "skills" / "techieflow-yolo" / "SKILL.md", yolo)
|
|
189
|
-
print(f"tf-codex-bind: generated {len(PERSONAS) + len(WORKERS) - len(kept)} agents and {len(PHASES) + 1} skills")
|
|
190
|
-
for name in kept:
|
|
191
|
-
print(f"tf-codex-bind: kept library-owned .codex/agents/{name}.toml (compat wrapper retired)")
|
|
192
|
-
return 0
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
if __name__ == "__main__":
|
|
196
|
-
raise SystemExit(main())
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""Emit authoritative Codex exec JSONL usage into TechieFlow sessions telemetry."""
|
|
3
|
-
|
|
4
|
-
from __future__ import annotations
|
|
5
|
-
|
|
6
|
-
import json
|
|
7
|
-
import os
|
|
8
|
-
import pathlib
|
|
9
|
-
import subprocess
|
|
10
|
-
import sys
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def main() -> int:
|
|
14
|
-
if len(sys.argv) != 3:
|
|
15
|
-
print("usage: tf-codex-telemetry.py <project-root> <codex-jsonl>", file=sys.stderr)
|
|
16
|
-
return 2
|
|
17
|
-
root = pathlib.Path(sys.argv[1]).resolve()
|
|
18
|
-
source = pathlib.Path(sys.argv[2])
|
|
19
|
-
thread_id = None
|
|
20
|
-
model = None
|
|
21
|
-
totals = {"input_tokens": 0, "output_tokens": 0, "cache_read_tokens": 0,
|
|
22
|
-
"reasoning_output_tokens": 0}
|
|
23
|
-
try:
|
|
24
|
-
for line in source.read_text(encoding="utf-8", errors="replace").splitlines():
|
|
25
|
-
try:
|
|
26
|
-
event = json.loads(line)
|
|
27
|
-
except Exception:
|
|
28
|
-
continue
|
|
29
|
-
if event.get("type") == "thread.started":
|
|
30
|
-
thread_id = event.get("thread_id") or thread_id
|
|
31
|
-
if event.get("model"):
|
|
32
|
-
model = event.get("model")
|
|
33
|
-
if event.get("type") == "turn.completed" and isinstance(event.get("usage"), dict):
|
|
34
|
-
usage = event["usage"]
|
|
35
|
-
totals["input_tokens"] += int(usage.get("input_tokens") or 0)
|
|
36
|
-
totals["output_tokens"] += int(usage.get("output_tokens") or 0)
|
|
37
|
-
totals["cache_read_tokens"] += int(usage.get("cached_input_tokens") or 0)
|
|
38
|
-
totals["reasoning_output_tokens"] += int(usage.get("reasoning_output_tokens") or 0)
|
|
39
|
-
except Exception:
|
|
40
|
-
return 0
|
|
41
|
-
if not thread_id or not any(totals.values()):
|
|
42
|
-
return 0
|
|
43
|
-
record = {
|
|
44
|
-
"kind": "session", "session_id": thread_id, "model": model,
|
|
45
|
-
"duration_s": None, **totals, "cache_creation_tokens": None,
|
|
46
|
-
"cost_usd": None, "children_sessions": None,
|
|
47
|
-
}
|
|
48
|
-
emit = root / ".tfcore" / "utils" / "tf-emit.sh"
|
|
49
|
-
env = os.environ.copy()
|
|
50
|
-
env.update(TF_HARNESS="codex", TF_PROJECT_DIR=str(root), CLAUDE_PROJECT_DIR=str(root))
|
|
51
|
-
try:
|
|
52
|
-
subprocess.run(["bash", str(emit), "sessions"], input=json.dumps(record), text=True,
|
|
53
|
-
timeout=10, env=env, check=False)
|
|
54
|
-
except Exception:
|
|
55
|
-
pass
|
|
56
|
-
return 0
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if __name__ == "__main__":
|
|
60
|
-
raise SystemExit(main())
|