@techierathore/techieflow 1.0.2 → 1.0.3
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 +0 -5
- package/.claude/commands/TechieFlow/agents/architect.md +0 -6
- package/.claude/commands/TechieFlow/agents/flow-master.md +41 -215
- package/.claude/commands/TechieFlow/agents/verifier.md +23 -64
- package/.claude/commands/TechieFlow/tasks/_metrics-emit-gate.md +24 -117
- 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 +20 -143
- package/.claude/commands/TechieFlow/tasks/build-phase.md +14 -224
- 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/fix-issues.md +10 -129
- package/.claude/commands/TechieFlow/tasks/log-miss.md +19 -158
- package/.claude/commands/TechieFlow/tasks/metrics-report.md +1 -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 +39 -12
- package/.tfcore/agents/analyst.md +0 -5
- package/.tfcore/agents/architect.md +0 -6
- package/.tfcore/agents/flow-master.md +41 -215
- package/.tfcore/agents/verifier.md +23 -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 +56 -0
- package/.tfcore/hooks/guard-status-html.sh +116 -71
- package/.tfcore/hooks/guard-status.sh +43 -16
- 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 +25 -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/_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 +20 -143
- package/.tfcore/tasks/build-phase.md +14 -224
- 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/fix-issues.md +10 -129
- package/.tfcore/tasks/log-miss.md +19 -158
- package/.tfcore/tasks/metrics-report.md +1 -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 +43 -7
- package/.tfcore/telemetry/tf-metrics.sh +152 -17
- package/.tfcore/templates/project-brief-tmpl.yaml +1 -1
- 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-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-deployment-checklist-tmpl.md +86 -0
- package/.tfcore/templates/v4custom/app-devguide-tmpl.md +69 -146
- 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/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 +191 -0
- package/.tfcore/utils/tf-build-list.sh +20 -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 +1267 -0
- package/.tfcore/utils/tf-doc-check.sh +29 -0
- package/.tfcore/utils/tf-emit.sh +203 -13
- package/.tfcore/utils/tf-fix-close.sh +83 -0
- package/.tfcore/utils/tf-goal.sh +193 -62
- 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 +211 -0
- package/.tfcore/utils/tf-misses-md.sh +13 -0
- package/.tfcore/utils/tf-mockups-locate.py +66 -0
- package/.tfcore/utils/tf-mockups-locate.sh +18 -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 +74 -0
- package/.tfcore/utils/tf-routing-bind.sh +10 -5
- package/.tfcore/utils/tf-routing.sh +6 -7
- package/.tfcore/utils/tf-split-brd.py +304 -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 +309 -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 +283 -0
- package/.tfcore/utils/tf-verify-screens.sh +22 -0
- package/.tfcore/utils/tf-verify-tests.sh +123 -0
- package/.tfcore/utils/tf-verify-verdict.py +283 -0
- package/.tfcore/utils/tf-verify-verdict.sh +15 -0
- package/.tfcore/utils/tf-yolo.sh +59 -0
- package/README.md +114 -1149
- package/docs/TechieFlow-Installation.md +1 -5
- package/opencode.jsonc +13 -33
- package/package.json +1 -5
- package/scripts/install.mjs +52 -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/utils/tf-codex-bind.py +0 -196
- package/.tfcore/utils/tf-codex-telemetry.py +0 -60
- package/WORKFLOW.html +0 -1986
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
# KB Mode Interaction Task
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
Provide a user-friendly interface to the TechieFlow knowledge base without overwhelming users with information upfront.
|
|
6
|
-
|
|
7
|
-
## Instructions
|
|
8
|
-
|
|
9
|
-
When entering KB mode (\*kb-mode), follow these steps:
|
|
10
|
-
|
|
11
|
-
### 1. Welcome and Guide
|
|
12
|
-
|
|
13
|
-
Announce entering KB mode with a brief, friendly introduction.
|
|
14
|
-
|
|
15
|
-
### 2. Present Topic Areas
|
|
16
|
-
|
|
17
|
-
Offer a concise list of main topic areas the user might want to explore:
|
|
18
|
-
|
|
19
|
-
**What would you like to know more about?**
|
|
20
|
-
|
|
21
|
-
1. **Setup & Installation** - Getting started with TechieFlow
|
|
22
|
-
2. **Workflows** - Choosing the right workflow for your project
|
|
23
|
-
3. **Web vs IDE** - When to use each environment
|
|
24
|
-
4. **Agents** - Understanding specialized agents and their roles
|
|
25
|
-
5. **Documents** - PRDs, Architecture, Stories, and more
|
|
26
|
-
6. **Agile Process** - How TechieFlow implements Agile methodologies
|
|
27
|
-
7. **Configuration** - Customizing TechieFlow for your needs
|
|
28
|
-
8. **Best Practices** - Tips for effective TechieFlow usage
|
|
29
|
-
|
|
30
|
-
Or ask me about anything else related to TechieFlow!
|
|
31
|
-
|
|
32
|
-
### 3. Respond Contextually
|
|
33
|
-
|
|
34
|
-
- Wait for user's specific question or topic selection
|
|
35
|
-
- Provide focused, relevant information from the knowledge base
|
|
36
|
-
- Offer to dive deeper or explore related topics
|
|
37
|
-
- Keep responses concise unless user asks for detailed explanations
|
|
38
|
-
|
|
39
|
-
### 4. Interactive Exploration
|
|
40
|
-
|
|
41
|
-
- After answering, suggest related topics they might find helpful
|
|
42
|
-
- Maintain conversational flow rather than data dumping
|
|
43
|
-
- Use examples when appropriate
|
|
44
|
-
- Reference specific documentation sections when relevant
|
|
45
|
-
|
|
46
|
-
### 5. Exit Gracefully
|
|
47
|
-
|
|
48
|
-
When user is done or wants to exit KB mode:
|
|
49
|
-
|
|
50
|
-
- Summarize key points discussed if helpful
|
|
51
|
-
- Remind them they can return to KB mode anytime with \*kb-mode
|
|
52
|
-
- Suggest next steps based on what was discussed
|
|
53
|
-
|
|
54
|
-
## Example Interaction
|
|
55
|
-
|
|
56
|
-
**User**: \*kb-mode
|
|
57
|
-
|
|
58
|
-
**Assistant**: I've entered KB mode and have access to the full TechieFlow knowledge base. I can help you with detailed information about any aspect of TechieFlow.
|
|
59
|
-
|
|
60
|
-
**What would you like to know more about?**
|
|
61
|
-
|
|
62
|
-
1. **Setup & Installation** - Getting started with TechieFlow
|
|
63
|
-
2. **Workflows** - Choosing the right workflow for your project
|
|
64
|
-
3. **Web vs IDE** - When to use each environment
|
|
65
|
-
4. **Agents** - Understanding specialized agents and their roles
|
|
66
|
-
5. **Documents** - PRDs, Architecture, Stories, and more
|
|
67
|
-
6. **Agile Process** - How TechieFlow implements Agile methodologies
|
|
68
|
-
7. **Configuration** - Customizing TechieFlow for your needs
|
|
69
|
-
8. **Best Practices** - Tips for effective TechieFlow usage
|
|
70
|
-
|
|
71
|
-
Or ask me about anything else related to TechieFlow!
|
|
72
|
-
|
|
73
|
-
**User**: Tell me about workflows
|
|
74
|
-
|
|
75
|
-
**Assistant**: [Provides focused information about workflows from the KB, then offers to explore specific workflow types or related topics]
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
# Document Sharding Task
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
- Split a large document into multiple smaller documents based on level 2 sections
|
|
6
|
-
- Create a folder structure to organize the sharded documents
|
|
7
|
-
- Maintain all content integrity including code blocks, diagrams, and markdown formatting
|
|
8
|
-
|
|
9
|
-
## Primary Method: Automatic with markdown-tree
|
|
10
|
-
|
|
11
|
-
[[LLM: First, check if markdownExploder is set to true in .tfcore/core-config.yaml. If it is, attempt to run the command: `md-tree explode {input file} {output path}`.
|
|
12
|
-
|
|
13
|
-
If the command succeeds, inform the user that the document has been sharded successfully and STOP - do not proceed further.
|
|
14
|
-
|
|
15
|
-
If the command fails (especially with an error indicating the command is not found or not available), inform the user: "The markdownExploder setting is enabled but the md-tree command is not available. Please either:
|
|
16
|
-
|
|
17
|
-
1. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
|
|
18
|
-
2. Or set markdownExploder to false in .tfcore/core-config.yaml
|
|
19
|
-
|
|
20
|
-
**IMPORTANT: STOP HERE - do not proceed with manual sharding until one of the above actions is taken.**"
|
|
21
|
-
|
|
22
|
-
If markdownExploder is set to false, inform the user: "The markdownExploder setting is currently false. For better performance and reliability, you should:
|
|
23
|
-
|
|
24
|
-
1. Set markdownExploder to true in .tfcore/core-config.yaml
|
|
25
|
-
2. Install @kayvan/markdown-tree-parser globally with: `npm install -g @kayvan/markdown-tree-parser`
|
|
26
|
-
|
|
27
|
-
I will now proceed with the manual sharding process."
|
|
28
|
-
|
|
29
|
-
Then proceed with the manual method below ONLY if markdownExploder is false.]]
|
|
30
|
-
|
|
31
|
-
### Installation and Usage
|
|
32
|
-
|
|
33
|
-
1. **Install globally**:
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npm install -g @kayvan/markdown-tree-parser
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
2. **Use the explode command**:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
# For PRD
|
|
43
|
-
md-tree explode docs/prd.md docs/prd
|
|
44
|
-
|
|
45
|
-
# For Architecture
|
|
46
|
-
md-tree explode docs/architecture.md docs/architecture
|
|
47
|
-
|
|
48
|
-
# For any document
|
|
49
|
-
md-tree explode [source-document] [destination-folder]
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
3. **What it does**:
|
|
53
|
-
- Automatically splits the document by level 2 sections
|
|
54
|
-
- Creates properly named files
|
|
55
|
-
- Adjusts heading levels appropriately
|
|
56
|
-
- Handles all edge cases with code blocks and special markdown
|
|
57
|
-
|
|
58
|
-
If the user has @kayvan/markdown-tree-parser installed, use it and skip the manual process below.
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Manual Method (if @kayvan/markdown-tree-parser is not available or user indicated manual method)
|
|
63
|
-
|
|
64
|
-
### Task Instructions
|
|
65
|
-
|
|
66
|
-
1. Identify Document and Target Location
|
|
67
|
-
|
|
68
|
-
- Determine which document to shard (user-provided path)
|
|
69
|
-
- Create a new folder under `docs/` with the same name as the document (without extension)
|
|
70
|
-
- Example: `docs/prd.md` → create folder `docs/prd/`
|
|
71
|
-
|
|
72
|
-
2. Parse and Extract Sections
|
|
73
|
-
|
|
74
|
-
CRITICAL AEGNT SHARDING RULES:
|
|
75
|
-
|
|
76
|
-
1. Read the entire document content
|
|
77
|
-
2. Identify all level 2 sections (## headings)
|
|
78
|
-
3. For each level 2 section:
|
|
79
|
-
- Extract the section heading and ALL content until the next level 2 section
|
|
80
|
-
- Include all subsections, code blocks, diagrams, lists, tables, etc.
|
|
81
|
-
- Be extremely careful with:
|
|
82
|
-
- Fenced code blocks (```) - ensure you capture the full block including closing backticks and account for potential misleading level 2's that are actually part of a fenced section example
|
|
83
|
-
- Mermaid diagrams - preserve the complete diagram syntax
|
|
84
|
-
- Nested markdown elements
|
|
85
|
-
- Multi-line content that might contain ## inside code blocks
|
|
86
|
-
|
|
87
|
-
CRITICAL: Use proper parsing that understands markdown context. A ## inside a code block is NOT a section header.]]
|
|
88
|
-
|
|
89
|
-
### 3. Create Individual Files
|
|
90
|
-
|
|
91
|
-
For each extracted section:
|
|
92
|
-
|
|
93
|
-
1. **Generate filename**: Convert the section heading to lowercase-dash-case
|
|
94
|
-
- Remove special characters
|
|
95
|
-
- Replace spaces with dashes
|
|
96
|
-
- Example: "## Tech Stack" → `tech-stack.md`
|
|
97
|
-
|
|
98
|
-
2. **Adjust heading levels**:
|
|
99
|
-
- The level 2 heading becomes level 1 (# instead of ##) in the sharded new document
|
|
100
|
-
- All subsection levels decrease by 1:
|
|
101
|
-
|
|
102
|
-
```txt
|
|
103
|
-
- ### → ##
|
|
104
|
-
- #### → ###
|
|
105
|
-
- ##### → ####
|
|
106
|
-
- etc.
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
3. **Write content**: Save the adjusted content to the new file
|
|
110
|
-
|
|
111
|
-
### 4. Create Index File
|
|
112
|
-
|
|
113
|
-
Create an `index.md` file in the sharded folder that:
|
|
114
|
-
|
|
115
|
-
1. Contains the original level 1 heading and any content before the first level 2 section
|
|
116
|
-
2. Lists all the sharded files with links:
|
|
117
|
-
|
|
118
|
-
```markdown
|
|
119
|
-
# Original Document Title
|
|
120
|
-
|
|
121
|
-
[Original introduction content if any]
|
|
122
|
-
|
|
123
|
-
## Sections
|
|
124
|
-
|
|
125
|
-
- [Section Name 1](./section-name-1.md)
|
|
126
|
-
- [Section Name 2](./section-name-2.md)
|
|
127
|
-
- [Section Name 3](./section-name-3.md)
|
|
128
|
-
...
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
### 5. Preserve Special Content
|
|
132
|
-
|
|
133
|
-
1. **Code blocks**: Must capture complete blocks including:
|
|
134
|
-
|
|
135
|
-
```language
|
|
136
|
-
content
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
2. **Mermaid diagrams**: Preserve complete syntax:
|
|
140
|
-
|
|
141
|
-
```mermaid
|
|
142
|
-
graph TD
|
|
143
|
-
...
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
3. **Tables**: Maintain proper markdown table formatting
|
|
147
|
-
|
|
148
|
-
4. **Lists**: Preserve indentation and nesting
|
|
149
|
-
|
|
150
|
-
5. **Inline code**: Preserve backticks
|
|
151
|
-
|
|
152
|
-
6. **Links and references**: Keep all markdown links intact
|
|
153
|
-
|
|
154
|
-
7. **Template markup**: If documents contain {{placeholders}} ,preserve exactly
|
|
155
|
-
|
|
156
|
-
### 6. Validation
|
|
157
|
-
|
|
158
|
-
After sharding:
|
|
159
|
-
|
|
160
|
-
1. Verify all sections were extracted
|
|
161
|
-
2. Check that no content was lost
|
|
162
|
-
3. Ensure heading levels were properly adjusted
|
|
163
|
-
4. Confirm all files were created successfully
|
|
164
|
-
|
|
165
|
-
### 7. Report Results
|
|
166
|
-
|
|
167
|
-
Provide a summary:
|
|
168
|
-
|
|
169
|
-
```text
|
|
170
|
-
Document sharded successfully:
|
|
171
|
-
- Source: [original document path]
|
|
172
|
-
- Destination: docs/[folder-name]/
|
|
173
|
-
- Files created: [count]
|
|
174
|
-
- Sections:
|
|
175
|
-
- section-name-1.md: "Section Title 1"
|
|
176
|
-
- section-name-2.md: "Section Title 2"
|
|
177
|
-
...
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
## Important Notes
|
|
181
|
-
|
|
182
|
-
- Never modify the actual content, only adjust heading levels
|
|
183
|
-
- Preserve ALL formatting, including whitespace where significant
|
|
184
|
-
- Handle edge cases like sections with code blocks containing ## symbols
|
|
185
|
-
- Ensure the sharding is reversible (could reconstruct the original from shards)
|
|
@@ -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())
|