Skip to content

Commit a2bb589

Browse files
committed
AUT-116 Implement Workflow Orchestrator
Verified the existing workflow orchestration implementation in this workspace. - Confirmed `src/services/SessionMindWorkflow.ts` orchestrates extract -> generate -> spawn -> validate using `WorkflowSessionExtractor`, `PromptComposer`, `SubprocessSpawner`, `ArtifactValidator`, and `WorkflowStateManager`. - Confirmed failure handling, recovery, and concurrent execution behavior through unit and integration coverage, including the validation-retry path that re-runs generation instead of re-validating a stale artifact. - Ran focused workflow checks plus full project validation with `bun run check` and `bun run build`. References AUT-116
1 parent 5a9504e commit a2bb589

54 files changed

Lines changed: 5585 additions & 1085 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Changesets
2+
3+
This repository uses Changesets to manage versioning and npm releases for a single package.

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.3/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/template-refresh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@effect-x/session-mind": patch
3+
---
4+
5+
Align the package with the shared Bun, tsdown, oxlint, oxfmt, lefthook, and Changesets repository template.

.github/workflows/release.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches: [main]
7+
push:
8+
branches: [main]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
id-token: write
21+
packages: write
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v5
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v5
30+
with:
31+
node-version: "24.x"
32+
registry-url: "https://registry.npmjs.org"
33+
34+
- name: Setup Bun
35+
uses: oven-sh/setup-bun@v2
36+
37+
- name: Install dependencies
38+
run: bun install --frozen-lockfile
39+
40+
- name: Check and build
41+
run: bun run check
42+
43+
- name: Create release pull request or publish
44+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
45+
uses: changesets/action@v1
46+
with:
47+
version: bun run version-packages
48+
publish: bun run release
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+
NPM_CONFIG_PROVENANCE: "true"

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.env
2+
.env.*
23
data/
34
logs/
45
*.log
@@ -7,13 +8,16 @@ logs/
78

89
.direnv
910
dist
11+
node_modules
1012

1113
.repo/*
1214
!.repo/
1315
!.repo/clone-reference-repos.sh
1416

15-
node_modules
1617
.lalph
1718
.specs
18-
1919
.codemogger
20+
.output
21+
22+
__pycache__/
23+
*.pyc

.husky/_/pre-commit

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/sh
2+
3+
if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
4+
set -x
5+
fi
6+
7+
if [ "$LEFTHOOK" = "0" ]; then
8+
exit 0
9+
fi
10+
11+
call_lefthook()
12+
{
13+
if test -n "$LEFTHOOK_BIN"
14+
then
15+
"$LEFTHOOK_BIN" "$@"
16+
elif lefthook -h >/dev/null 2>&1
17+
then
18+
lefthook "$@"
19+
elif /Users/kee/Workspace/github.com/effect-anything/session-mind/node_modules/lefthook-darwin-arm64/bin/lefthook -h >/dev/null 2>&1
20+
then
21+
/Users/kee/Workspace/github.com/effect-anything/session-mind/node_modules/lefthook-darwin-arm64/bin/lefthook "$@"
22+
else
23+
dir="$(git rev-parse --show-toplevel)"
24+
osArch=$(uname | tr '[:upper:]' '[:lower:]')
25+
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
26+
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
27+
then
28+
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
29+
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
30+
then
31+
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
32+
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
33+
then
34+
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
35+
elif test -f "$dir/node_modules/lefthook/bin/index.js"
36+
then
37+
"$dir/node_modules/lefthook/bin/index.js" "$@"
38+
elif go tool lefthook -h >/dev/null 2>&1
39+
then
40+
go tool lefthook "$@"
41+
elif bundle exec lefthook -h >/dev/null 2>&1
42+
then
43+
bundle exec lefthook "$@"
44+
elif yarn lefthook -h >/dev/null 2>&1
45+
then
46+
yarn lefthook "$@"
47+
elif pnpm lefthook -h >/dev/null 2>&1
48+
then
49+
pnpm lefthook "$@"
50+
elif swift package lefthook >/dev/null 2>&1
51+
then
52+
swift package --build-path .build/lefthook --disable-sandbox lefthook "$@"
53+
elif command -v mint >/dev/null 2>&1
54+
then
55+
mint run csjones/lefthook-plugin "$@"
56+
elif uv run lefthook -h >/dev/null 2>&1
57+
then
58+
uv run lefthook "$@"
59+
elif mise exec -- lefthook -h >/dev/null 2>&1
60+
then
61+
mise exec -- lefthook "$@"
62+
elif devbox run lefthook -h >/dev/null 2>&1
63+
then
64+
devbox run lefthook "$@"
65+
else
66+
echo "Can't find lefthook in PATH"
67+
fi
68+
fi
69+
}
70+
71+
call_lefthook run "pre-commit" "$@"

.husky/_/pre-push

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/sh
2+
3+
if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
4+
set -x
5+
fi
6+
7+
if [ "$LEFTHOOK" = "0" ]; then
8+
exit 0
9+
fi
10+
11+
call_lefthook()
12+
{
13+
if test -n "$LEFTHOOK_BIN"
14+
then
15+
"$LEFTHOOK_BIN" "$@"
16+
elif lefthook -h >/dev/null 2>&1
17+
then
18+
lefthook "$@"
19+
elif /Users/kee/Workspace/github.com/effect-anything/session-mind/node_modules/lefthook-darwin-arm64/bin/lefthook -h >/dev/null 2>&1
20+
then
21+
/Users/kee/Workspace/github.com/effect-anything/session-mind/node_modules/lefthook-darwin-arm64/bin/lefthook "$@"
22+
else
23+
dir="$(git rev-parse --show-toplevel)"
24+
osArch=$(uname | tr '[:upper:]' '[:lower:]')
25+
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
26+
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
27+
then
28+
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
29+
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
30+
then
31+
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
32+
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
33+
then
34+
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
35+
elif test -f "$dir/node_modules/lefthook/bin/index.js"
36+
then
37+
"$dir/node_modules/lefthook/bin/index.js" "$@"
38+
elif go tool lefthook -h >/dev/null 2>&1
39+
then
40+
go tool lefthook "$@"
41+
elif bundle exec lefthook -h >/dev/null 2>&1
42+
then
43+
bundle exec lefthook "$@"
44+
elif yarn lefthook -h >/dev/null 2>&1
45+
then
46+
yarn lefthook "$@"
47+
elif pnpm lefthook -h >/dev/null 2>&1
48+
then
49+
pnpm lefthook "$@"
50+
elif swift package lefthook >/dev/null 2>&1
51+
then
52+
swift package --build-path .build/lefthook --disable-sandbox lefthook "$@"
53+
elif command -v mint >/dev/null 2>&1
54+
then
55+
mint run csjones/lefthook-plugin "$@"
56+
elif uv run lefthook -h >/dev/null 2>&1
57+
then
58+
uv run lefthook "$@"
59+
elif mise exec -- lefthook -h >/dev/null 2>&1
60+
then
61+
mise exec -- lefthook "$@"
62+
elif devbox run lefthook -h >/dev/null 2>&1
63+
then
64+
devbox run lefthook "$@"
65+
else
66+
echo "Can't find lefthook in PATH"
67+
fi
68+
fi
69+
}
70+
71+
call_lefthook run "pre-push" "$@"

.oxfmtrc.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
{
22
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3-
"ignorePatterns": [".repo", ".direnv/**"]
3+
"ignorePatterns": [
4+
".git",
5+
".repo",
6+
".direnv",
7+
".lalph",
8+
".codemogger",
9+
".specs",
10+
".jj",
11+
"dist",
12+
"node_modules",
13+
"bun.lock",
14+
"flake.lock"
15+
]
416
}

.oxlintrc.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "./node_modules/oxlint/configuration_schema.json",
3-
"plugins": null,
3+
"plugins": [],
44
"categories": {},
55
"overrides": [
66
{
@@ -21,14 +21,13 @@
2121
},
2222
"settings": {
2323
"jsx-a11y": {
24-
"polymorphicPropName": null,
2524
"components": {},
2625
"attributes": {}
2726
},
2827
"react": {
2928
"formComponents": [],
3029
"linkComponents": [],
31-
"version": null,
30+
"version": "19",
3231
"componentWrapperFunctions": []
3332
},
3433
"jsdoc": {
@@ -50,13 +49,16 @@
5049
},
5150
"globals": {},
5251
"ignorePatterns": [
53-
".repo/**",
54-
".direnv/**",
55-
".lalph/**",
56-
".codemogger/**",
57-
".specs/**",
58-
".jj/**",
59-
"dist/**",
60-
"node_modules/**"
52+
".git",
53+
".repo",
54+
".direnv",
55+
".lalph",
56+
".codemogger",
57+
".specs",
58+
".jj",
59+
"dist",
60+
"node_modules",
61+
"bun.lock",
62+
"flake.lock"
6163
]
6264
}

.zed/settings.json

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
]
3030
},
3131
"JavaScript": {
32-
"language_servers": ["vtsls", "oxlint", "oxfmt", "cspell"],
32+
"language_servers": ["tsgo", "oxlint", "oxfmt", "cspell"],
3333

3434
"formatter": [
3535
{
@@ -43,7 +43,7 @@
4343
]
4444
},
4545
"TypeScript": {
46-
"language_servers": ["vtsls", "oxlint", "oxfmt", "cspell"],
46+
"language_servers": ["tsgo", "oxlint", "oxfmt", "cspell"],
4747
"formatter": [
4848
{
4949
"language_server": {
@@ -56,7 +56,7 @@
5656
]
5757
},
5858
"TSX": {
59-
"language_servers": ["vtsls", "oxlint", "oxfmt", "cspell"],
59+
"language_servers": ["tsgo", "oxlint", "oxfmt", "cspell"],
6060
"formatter": [
6161
{
6262
"language_server": {
@@ -94,27 +94,11 @@
9494
}
9595
}
9696
},
97-
"vtsls": {
97+
"tsgo": {
9898
"settings": {
99-
"tsserver": {
100-
"maxTsServerMemory": 8092,
101-
"enableRegionDiagnostics": true
102-
},
103-
"experimental": {
104-
"completion": {
105-
"entriesLimit": 10,
106-
"enableServerSideFuzzyMatch": true
107-
}
108-
},
109-
"autoUseWorkspaceTsdk": true,
11099
"typescript": {
111-
"tsserver": { "maxTsServerMemory": 8092, "enableRegionDiagnostics": true },
112-
"workspaceSymbols": { "scope": "currentProject" },
113-
"preferGoToSourceDefinition": true,
114-
"preferences": {
115-
"importModuleSpecifier": "non-relative",
116-
"autoImportSpecifierExcludeRegexes": ["^node:.*$", "effect/.*", "@effect/.*"]
117-
}
100+
"importModuleSpecifier": "non-relative",
101+
"autoImportSpecifierExcludeRegexes": ["^node:.*$", "effect/.*", "@effect/.*"]
118102
}
119103
}
120104
},

0 commit comments

Comments
 (0)