Skip to content

Commit c2cf2a9

Browse files
committed
refactor(workflows): keep template examples generic
1 parent 7dfd342 commit c2cf2a9

26 files changed

Lines changed: 64 additions & 287 deletions

readme.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ dotnet add package LowlandTech.TinyTools
130130

131131
## Agent workflow generation
132132

133-
TinyTools also includes a CLI and an agent skill for repeatable workspace generation. The bundled GraphStrip pack creates project shells, host entry points, plugin contracts, intent registrations, plugin/test boilerplate, and workitems from a YAML workflow and JSON model:
133+
TinyTools also includes a CLI and an agent skill for repeatable workspace generation. The bundled generic pack demonstrates README and source-file generation from a YAML workflow and JSON model:
134134

135135
```sh
136136
dotnet run --project src/cli -- generate \
137-
skills/tinytools-workflows/assets/graphstrip/workflow.yml \
138-
--model skills/tinytools-workflows/assets/graphstrip/model.json \
139-
--root D:/graphstrip \
140-
--templates skills/tinytools-workflows/assets/graphstrip
137+
skills/tinytools-workflows/assets/basic/workflow.yml \
138+
--model skills/tinytools-workflows/assets/basic/model.json \
139+
--root ./generated-workspace \
140+
--templates skills/tinytools-workflows/assets/basic
141141
```
142142

143143
Template steps are idempotent: unchanged files are not rewritten. `forEach` steps can generate one file per model item, while command steps support allow-listed `dotnet`, `git`, and `gh` operations. See [docs/Workflow-CLI.md](docs/Workflow-CLI.md) and [skills/tinytools-workflows](skills/tinytools-workflows) for the workflow contract and agent instructions.
@@ -147,8 +147,8 @@ Template steps are idempotent: unchanged files are not rewritten. `forEach` step
147147
### Basic String Interpolation
148148

149149
```csharp
150-
// Simple property interpolation with {PropertyName} syntax
151-
var template = "Hello {FirstName} {LastName}!";
150+
// Simple property interpolation with ${PropertyName} syntax
151+
var template = "Hello ${FirstName} ${LastName}!";
152152
var model = new { FirstName = "John", LastName = "Smith" };
153153

154154
var result = template.Interpolate(model);
@@ -158,7 +158,7 @@ var result = template.Interpolate(model);
158158
### Dictionary Interpolation
159159

160160
```csharp
161-
var template = "Welcome to {City}, {Country}!";
161+
var template = "Welcome to ${City}, ${Country}!";
162162
var data = new Dictionary<string, string>
163163
{
164164
{ "City", "Amsterdam" },

roadmap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This document outlines the planned features, improvements, and direction for Low
1212
**Released**: January 2026
1313

1414
### Core Features
15-
- ? Simple string interpolation (`{PropertyName}`)
15+
- ? Simple string interpolation (`${PropertyName}`)
1616
- ? Template engine with control flow (`@if`, `@foreach`)
1717
- ? Variable interpolation (`${Context.xxx}`)
1818
- ? Null coalescing (`${expr ?? "default"}`)

site/src/pages/code-generation.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ export function CodeGenerationPage() {
2222
<CardContent className="space-y-4">
2323
<CodeBlock
2424
code={`dotnet run --project src/cli -- generate \\
25-
skills/tinytools-workflows/assets/graphstrip/workflow.yml \\
26-
--model skills/tinytools-workflows/assets/graphstrip/model.json \\
27-
--root D:/graphstrip \\
28-
--templates skills/tinytools-workflows/assets/graphstrip`}
25+
skills/tinytools-workflows/assets/basic/workflow.yml \\
26+
--model skills/tinytools-workflows/assets/basic/model.json \\
27+
--root ./generated-workspace \\
28+
--templates skills/tinytools-workflows/assets/basic`}
2929
language="bash"
3030
/>
3131
<CodeBlock
32-
code={`name: graphstrip-bootstrap
32+
code={`name: basic-workspace
3333
steps:
34-
- id: plugins
34+
- id: source-files
3535
type: template
36-
forEach: Context.Model.Plugins
37-
item: Plugin
38-
template: plugins/intent.plugin.cs.tt
39-
output: src/plugins/\${Context.Plugin.Group}/\${Context.Plugin.Action}.plugin.cs`}
36+
forEach: Context.Model.Files
37+
item: File
38+
template: templates/source.cs.tt
39+
output: src/\${Context.File.Name}.cs`}
4040
language="yaml"
4141
/>
4242
</CardContent>

site/src/pages/examples.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ export function ExamplesPage() {
1616
<CardHeader>
1717
<CardTitle>Agent-Driven Workspace Bootstrap</CardTitle>
1818
<CardDescription>
19-
Use the TinyTools CLI and TT skill to generate repeatable application boilerplate and plugins.
19+
Use the TinyTools CLI and TT skill to generate repeatable workspace boilerplate from model data.
2020
</CardDescription>
2121
</CardHeader>
2222
<CardContent className="space-y-4">
2323
<CodeBlock
2424
code={`dotnet run --project src/cli -- generate \\
25-
skills/tinytools-workflows/assets/graphstrip/workflow.yml \\
26-
--model skills/tinytools-workflows/assets/graphstrip/model.json \\
27-
--root D:/graphstrip \\
28-
--templates skills/tinytools-workflows/assets/graphstrip`}
25+
skills/tinytools-workflows/assets/basic/workflow.yml \\
26+
--model skills/tinytools-workflows/assets/basic/model.json \\
27+
--root ./generated-workspace \\
28+
--templates skills/tinytools-workflows/assets/basic`}
2929
language="bash"
3030
/>
3131
<p className="text-sm text-muted-foreground">

site/src/pages/getting-started.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,16 @@ var result = template.Interpolate(model);
5151
<CardHeader>
5252
<CardTitle>Agent Workflow Generation</CardTitle>
5353
<CardDescription>
54-
Generate an entire workspace from YAML, JSON model data, and reusable .tt templates.
54+
Generate a small workspace from YAML, JSON model data, and reusable .tt templates.
5555
</CardDescription>
5656
</CardHeader>
5757
<CardContent className="space-y-4">
5858
<CodeBlock
5959
code={`dotnet run --project src/cli -- generate \\
60-
skills/tinytools-workflows/assets/graphstrip/workflow.yml \\
61-
--model skills/tinytools-workflows/assets/graphstrip/model.json \\
62-
--root D:/graphstrip \\
63-
--templates skills/tinytools-workflows/assets/graphstrip`}
60+
skills/tinytools-workflows/assets/basic/workflow.yml \\
61+
--model skills/tinytools-workflows/assets/basic/model.json \\
62+
--root ./generated-workspace \\
63+
--templates skills/tinytools-workflows/assets/basic`}
6464
language="bash"
6565
/>
6666
<p className="text-sm text-muted-foreground">

skills/tinytools-workflows/SKILL.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: tinytools-workflows
3-
description: Generate and update workspaces with the TinyTools YAML workflow CLI and .tt templates. Use when an agent needs repeatable, idempotent file generation, workspace bootstrapping, or a workflow combining templates with dotnet, git, or gh steps.
3+
description: Generate and update workspaces with the TinyTools YAML workflow CLI and .tt templates. Use when an agent needs repeatable, idempotent file generation, workspace bootstrapping, model-driven file expansion, or a workflow combining templates with dotnet, git, or gh steps.
44
---
55

66
# TinyTools Workflows
@@ -52,12 +52,12 @@ Inside `.tt` files, use TinyTools expressions such as `${Context.Product}` and `
5252

5353
Read [workflow-schema.md](references/workflow-schema.md) when adding or reviewing workflow fields.
5454

55-
## GraphStrip bootstrap
55+
## Generic example pack
5656

57-
Use the bundled GraphStrip pack when bootstrapping the migration-reset repository:
57+
Use the bundled generic pack to prove a workflow before adapting it to a target repository:
5858

5959
```bash
60-
dotnet run --project src/cli -- generate skills/tinytools-workflows/assets/graphstrip/workflow.yml --model skills/tinytools-workflows/assets/graphstrip/model.json --root D:/graphstrip --templates skills/tinytools-workflows/assets/graphstrip
60+
dotnet run --project src/cli -- generate skills/tinytools-workflows/assets/basic/workflow.yml --model skills/tinytools-workflows/assets/basic/model.json --root ./generated-workspace --templates skills/tinytools-workflows/assets/basic
6161
```
6262

63-
The pack creates the `src/core`, `src/domain`, `src/plugins`, `src/shell`, `src/api`, `src/client`, `src/app`, and `src/test` project shells, shared plugin contracts and registry, plugin registration, host entry points, one generated plugin/test/workitem per model entry, and a solution file. Treat generated plugins and tests as refinement starting points; replace their TODOs before implementation and register concrete behavior through the typed intent boundary.
63+
The pack creates a README and one C# source file per model entry. Use it to verify template syntax, model expansion, path handling, and idempotency. Repository-specific project layouts, plugins, registries, and conventions should live with the target repository rather than in this generic skill.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"Files": [
3+
{ "Name": "Customer", "Namespace": "Example.Domain", "Description": "A generated customer record." },
4+
{ "Name": "Order", "Namespace": "Example.Domain", "Description": "A generated order record." }
5+
]
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# ${Context.Product}
2+
3+
This workspace was generated from a reusable TinyTools workflow.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
namespace ${Context.File.Namespace};
2+
3+
/// <summary>${Context.File.Description}</summary>
4+
public sealed record ${Context.File.Name}(Guid Id);
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: basic-workspace
2+
variables:
3+
Product: TinyTools Example
4+
steps:
5+
- id: readme
6+
type: template
7+
template: templates/README.md.tt
8+
output: README.md
9+
- id: source-files
10+
type: template
11+
forEach: Context.Model.Files
12+
item: File
13+
template: templates/source.cs.tt
14+
output: src/${Context.File.Name}.cs

0 commit comments

Comments
 (0)