Skip to content

Commit 894f49d

Browse files
authored
Merge pull request #5 from shobman/feature/aidos-versioning
feat(versioning): introduce AIDOS framework versioning and migrations
2 parents 7fc3ebe + ef4eebd commit 894f49d

17 files changed

Lines changed: 174 additions & 2 deletions

File tree

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VERSION text eol=lf

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,7 @@ Thumbs.db
99
*.swo
1010
*~
1111
skills/dist/
12+
13+
# Internal planning artifacts — not shipped in the public repo
14+
.claude/
15+
docs/superpowers/

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,17 @@ separate session.
3535
```
3636

3737
The `.aidos/manifest.json` in your project configures both the GitHub MCP Connector's `write` strategy and the Confluence publish target (if used). See each connector's README for the manifest fields.
38+
39+
## Migrations
40+
41+
When modifying templates, rubrics, naming conventions, or artifact structure in `src/prompts/`, `src/templates/`, `src/rubrics/`, `src/framework.md`, or `skills/`:
42+
43+
1. Determine if the change affects the structure or naming of generated artifacts, or the metadata block. If yes, this is a **minor** version bump.
44+
2. Increment the middle segment in the repo-root `VERSION` file (e.g. `1.0.0``1.1.0`).
45+
3. Create a migration file at `src/migrations/vX.Y.Z-to-vX.Y+1.0.md` (e.g. `v1.0.0-to-v1.1.0.md`) following the format in `src/migrations/README.md`. Write the instructions so an AI agent can apply them to a single artifact file at a time.
46+
4. Update the `**AIDOS Version:** X.Y.Z` placeholder in any affected template to keep it in sync with `VERSION`.
47+
5. If the change is wording-only with no structural impact (rubric clarifications, prompt tweaks), it's a **patch** bump — increment the last segment of `VERSION`. No migration file needed.
48+
49+
Major version bumps (e.g. `1.x.x``2.0.0`) are reserved for fundamental redesigns where automated migration may not be feasible. If you think you're looking at a major bump, stop and discuss it before proceeding — major bumps are not in scope for the current framework generation.
50+
51+
After a version bump, tag the repo: `git tag vX.Y.Z`.

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
1.0.0

skills/auditor/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ When the user presents an artifact for review, you:
3131
| `rubrics/definition.md` | Definition rubric (F1–F8). Maintenance lens criteria for post-delivery Definitions. |
3232
| `templates/retrospective.md` | Retrospective template for rubric evolution. |
3333
| `CONTRIBUTING.md` | How to propose rubric changes — the contribution model for evolving the framework. |
34+
| `VERSION` | **Framework version.** Plain-text file containing the current AIDOS framework semver (e.g. `1.0.0`). Read on session start — used to compare against the audited file's `AIDOS Version` metadata. |
3435

3536
## Environment
3637

skills/build.ps1

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ function Fix-PromptPaths {
2121
$content = Get-Content $File -Raw
2222
$content = $content -replace '`src/rubrics/', '`rubrics/'
2323
$content = $content -replace '`src/templates/', '`templates/'
24+
$content = $content -replace '`src/migrations/', '`migrations/'
2425
$content = $content -replace '`src/framework\.md`', '`framework.md`'
2526
Set-Content $File $content -NoNewline
2627
}
@@ -67,6 +68,15 @@ try {
6768
Copy-To (Join-Path $root "src\templates\retrospective.md") (Join-Path $b "templates\retrospective.md")
6869
Copy-To (Join-Path $root "CONTRIBUTING.md") (Join-Path $b "CONTRIBUTING.md")
6970

71+
Copy-To (Join-Path $root "VERSION") (Join-Path $b "VERSION")
72+
73+
$migSrc = Join-Path $root "src\migrations"
74+
if (Test-Path $migSrc) {
75+
Get-ChildItem $migSrc -File | ForEach-Object {
76+
Copy-To $_.FullName (Join-Path $b "migrations\$($_.Name)")
77+
}
78+
}
79+
7080
Fix-PromptPaths (Join-Path $b "builder-prompt.md")
7181

7282
New-SkillZip -Name "aidos-builder" -StagingDir $b -OutPath (Join-Path $dist "aidos-builder.zip")
@@ -86,6 +96,8 @@ try {
8696
Copy-To (Join-Path $root "src\templates\retrospective.md") (Join-Path $a "templates\retrospective.md")
8797
Copy-To (Join-Path $root "CONTRIBUTING.md") (Join-Path $a "CONTRIBUTING.md")
8898

99+
Copy-To (Join-Path $root "VERSION") (Join-Path $a "VERSION")
100+
89101
Fix-PromptPaths (Join-Path $a "auditor-prompt.md")
90102

91103
New-SkillZip -Name "aidos-auditor" -StagingDir $a -OutPath (Join-Path $dist "aidos-auditor.zip")

skills/builder/SKILL.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ When the user describes work they want to deliver, you:
3434
| `templates/definition.md` | Definition artifact template with section-to-rubric mapping. |
3535
| `templates/retrospective.md` | Retrospective template for rubric evolution. |
3636
| `CONTRIBUTING.md` | How to propose rubric changes — the contribution model for evolving the framework. |
37+
| `VERSION` | **Framework version.** Plain-text file containing the current AIDOS framework semver (e.g. `1.0.0`). Read on session start and before opening each existing artifact — used to stamp new artifacts and compare against existing files' `AIDOS Version` metadata. |
38+
| `migrations/` | Directory of `vX.Y.Z-to-vX.Y+1.0.md` files (e.g. `v1.0.0-to-v1.1.0.md`) describing how to upgrade artifacts across minor framework bumps. Read only when a file is behind and the user accepts an upgrade. |
3739

3840
## Environment
3941

src/connectors/confluence/README.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ on:
3232

3333
jobs:
3434
publish:
35-
uses: shobman/aidos/.github/workflows/confluence-publish.yml@main
35+
uses: shobman/aidos/.github/workflows/confluence-publish.yml@v1.0.0
3636
with:
3737
manifest-path: .aidos/manifest.json
3838
dry-run: ${{ github.event_name == 'pull_request' }}
@@ -41,6 +41,8 @@ jobs:
4141
confluence_token: ${{ secrets.CONFLUENCE_TOKEN }}
4242
```
4343
44+
> **Pin a tag, not `@main` or `@sha`.** AIDOS releases are tagged using semver (`vX.Y.Z`). Pinning to a tag means your workflow stays on a known-good version and only moves when you bump the pin. The tag to use is the current AIDOS framework version — see the `VERSION` file at the root of the AIDOS repo.
45+
4446
PRs dry-run (preview in the Actions log), merges to main publish for real.
4547

4648
If your repo has multiple `.aidos/` folders (e.g. a monorepo), omit `manifest-path` and the workflow will auto-discover all `manifest.json` files.
@@ -186,6 +188,30 @@ Each connector reads only its own key and ignores the rest.
186188

187189
Validate your manifest against `manifest.schema.json` in this directory.
188190

191+
## Org-Restricted Environments
192+
193+
Some organisations block all public GitHub Actions by policy. If your org's workflow policy rejects `uses: shobman/aidos/...@v1.0.0`, you have two options:
194+
195+
### Option 1 — Vendor the workflow
196+
197+
Fork the AIDOS repo into your org, or copy `.github/workflows/confluence-publish.yml` and `src/connectors/confluence/` into an internal repo. Reference it by internal path instead:
198+
199+
```yaml
200+
uses: your-org/internal-aidos/.github/workflows/confluence-publish.yml@v1.0.0
201+
```
202+
203+
Tag your internal fork with the same version as the upstream AIDOS release it's based on. When upstream cuts a new release, pull the changes in and re-tag.
204+
205+
### Option 2 — Inline the workflow
206+
207+
If forking isn't practical, write a workflow in your consuming repo that runs the publish script directly. You'll need to vendor `src/connectors/confluence/publish.js` (and its dependencies) into your repo as well. Track which upstream version you're based on in the workflow file's comments — the AIDOS version in your artifact files tells you which release's publish script to align with.
208+
209+
### Tracking alignment
210+
211+
In either option, the `**AIDOS Version:**` field in your artifact files is the source of truth for "what AIDOS version should this workflow be running". If artifacts are on v1.1.0, the workflow should be on the v1.1.0 release. Minor-version mismatches between artifacts and the workflow are not guaranteed compatible — migrate artifacts first, then bump the workflow pin. Patch-version drift is safe.
212+
213+
---
214+
189215
## Develop
190216

191217
### Get the code
@@ -241,4 +267,4 @@ The script is ~700 lines, self-contained, ESM, uses Node 20+ built-in fetch. Fol
241267
242268
### Versioning
243269
244-
No semver. The connector is versioned alongside the aidos repo. The GitHub Actions workflow pulls from `shobman/aidos@main` (or a pinned tag if you want stability). Bump the `CONNECTOR_VERSION` constant in `publish.js` to force republish of all pages — useful after output format changes.
270+
The connector is versioned alongside the aidos repo using semver (`vX.Y.Z`). Consumers pin the GitHub Actions workflow to a tag — see the Install section above for the tag-pinning requirement. Bump the `CONNECTOR_VERSION` constant in `publish.js` to force republish of all pages — useful after output format changes.

src/migrations/.gitkeep

Whitespace-only changes.

src/migrations/README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# AIDOS Migrations
2+
3+
Migration files describe how to upgrade an AIDOS artifact from one framework version to the next. One file per minor version bump.
4+
5+
## File naming
6+
7+
`vX.Y.Z-to-vX.Y+1.0.md` — e.g. `v1.0.0-to-v1.1.0.md`, `v1.1.0-to-v1.2.0.md`.
8+
9+
Patch bumps (v1.0.0 → v1.0.1) never have migrations. Patches are wording-only.
10+
11+
## File format
12+
13+
Each migration is a markdown file with a title and up to four sections. Sections are present only when they apply. Example:
14+
15+
```
16+
# Migration v1.0.0 → v1.1.0
17+
18+
## Summary
19+
Brief human-readable description of what changed and why.
20+
21+
## File renames
22+
- `Problem.md` → `1. Problem.md`
23+
- `Solution.md` → `2. Solution.md`
24+
- `Tech Design.md` → `3. Tech Design.md`
25+
- `Test Strategy.md` → `4. Test Strategy.md`
26+
27+
## Content changes
28+
- In `1. Problem.md`, rename the heading "## Business Context" to "## Context"
29+
30+
## Metadata changes
31+
None.
32+
```
33+
34+
## Who reads these files
35+
36+
The AIDOS builder skill, when it opens an artifact file whose `AIDOS Version` is behind the current framework version. It reads the relevant migration files, applies them to the file in question (only the parts that affect that file), presents a diff for user signoff, then updates the file's `AIDOS Version` metadata.
37+
38+
The AIDOS auditor skill does not read these files. It reads only the `AIDOS Version` metadata field from artifact files and compares it against `VERSION` to warn users about version gaps.
39+
40+
## Who writes these files
41+
42+
Any developer (human or AI) who changes the structure, naming, or shape of AIDOS artifacts. The developer guardrail in the repo's `CLAUDE.md` reminds contributors to create a migration file for any minor-version change.
43+
44+
## Scope rule
45+
46+
Instructions should be written so an AI agent can apply them to a single file at a time. A workspace can have files at mixed versions — each file migrates independently as the user opens it.

0 commit comments

Comments
 (0)