Skip to content

Commit 4ac9b50

Browse files
committed
Remove co-work-specific gstack path assumptions
1 parent 325da52 commit 4ac9b50

5 files changed

Lines changed: 18 additions & 11 deletions

File tree

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@ That creates symlinks from this repo's `skills/` directory into `~/.codex/skills
5252

5353
## Keep up with upstream gstack
5454

55-
If you have a local `gstack` checkout, refresh the sync report and scaffold any newly discovered upstream skills:
55+
If you have a local clone of upstream `gstack`, refresh the sync report and scaffold any newly discovered upstream skills:
5656

5757
```bash
58-
./scripts/update-from-local-gstack.sh ../knowledge-base/gstack
58+
./scripts/update-from-local-gstack.sh /path/to/gstack
5959
```
6060

6161
Or run the steps explicitly:
6262

6363
```bash
64-
python3 scripts/sync_from_gstack.py status --source ../knowledge-base/gstack
65-
python3 scripts/sync_from_gstack.py scaffold-new --source ../knowledge-base/gstack
64+
python3 scripts/sync_from_gstack.py status --source /path/to/gstack
65+
python3 scripts/sync_from_gstack.py scaffold-new --source /path/to/gstack
6666
```
6767

6868
This will:
@@ -72,7 +72,7 @@ This will:
7272

7373
## Current upstream coverage
7474

75-
The local upstream source used for the current mapping is `../knowledge-base/gstack`.
75+
The current mapping was validated against an external local clone of upstream `gstack`.
7676

7777
- Local `gstack` HEAD: `52f1607`
7878
- Local `gstack` `origin/main`: `50a7cf8`

catalog/gstack-sync-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# gstack sync status
22

3-
Source: `../knowledge-base/gstack`
3+
Source: external gstack checkout `gstack`
44

55
| gstack skill | codex skill | category | status |
66
|---|---|---|---|

docs/porting-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Turn strong upstream `gstack` workflows into concise Codex-native skills.
3131

3232
## Fast path for new upstream skills
3333
When a new upstream skill appears:
34-
1. run `sync_from_gstack.py scaffold-new`
34+
1. run `sync_from_gstack.py scaffold-new --source /path/to/gstack`
3535
2. inspect the generated scaffold under `scaffolds/`
3636
3. decide whether it belongs in the curated pack
3737
4. if yes, create a polished version under `skills/`

scripts/sync_from_gstack.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import re
77
from pathlib import Path
88

9-
DEFAULT_SOURCE = Path(__file__).resolve().parents[2] / 'knowledge-base' / 'gstack'
109
REPO_ROOT = Path(__file__).resolve().parents[1]
1110
MAPPINGS_PATH = REPO_ROOT / 'mappings' / 'skills.json'
1211
SKILLS_DIR = REPO_ROOT / 'skills'
@@ -61,7 +60,7 @@ def write_status(source_root: Path) -> Path:
6160
lines = [
6261
'# gstack sync status',
6362
'',
64-
f'Source: `{source_root}`',
63+
f'Source: external gstack checkout `{source_root.name}`',
6564
'',
6665
'| gstack skill | codex skill | category | status |',
6766
'|---|---|---|---|'
@@ -129,14 +128,18 @@ def install_links(target_dir: Path) -> list[str]:
129128
def main() -> None:
130129
parser = argparse.ArgumentParser(description='Sync and scaffold Codex skills from gstack.')
131130
parser.add_argument('command', choices=['status', 'scaffold-new', 'install'])
132-
parser.add_argument('--source', type=Path, default=DEFAULT_SOURCE)
131+
parser.add_argument('--source', type=Path)
133132
parser.add_argument('--target', type=Path, default=Path.home() / '.codex' / 'skills')
134133
args = parser.parse_args()
135134

136135
if args.command == 'status':
136+
if args.source is None:
137+
parser.error('--source is required for status')
137138
out = write_status(args.source)
138139
print(out)
139140
elif args.command == 'scaffold-new':
141+
if args.source is None:
142+
parser.error('--source is required for scaffold-new')
140143
created = scaffold_new(args.source)
141144
write_status(args.source)
142145
for path in created:
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/usr/bin/env bash
22
set -euo pipefail
33
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
4-
SOURCE="${1:-$ROOT/../knowledge-base/gstack}"
4+
if [ "$#" -lt 1 ]; then
5+
echo "Usage: $0 /path/to/gstack" >&2
6+
exit 1
7+
fi
8+
SOURCE="$1"
59
python3 "$ROOT/scripts/sync_from_gstack.py" status --source "$SOURCE"
610
python3 "$ROOT/scripts/sync_from_gstack.py" scaffold-new --source "$SOURCE"

0 commit comments

Comments
 (0)