2.8 KiB
Scripts
This directory contains helpers that automate:
- AI Workspace local service lifecycle
- context aggregation
- canonical memory access
- standup generation
- manager update drafting
- Mattermost-ready message formatting
- historical Slack import
The project-agnostic memory interface lives in:
scripts/memory/
Recommended commands:
python3 scripts/aiw/services.py status --profile fidelity
python3 scripts/aiw/services.py doctor --profile fidelity
python3 scripts/aiw/services.py start --profile fidelity
The service manager reads profiles/<profile>/services.json and manages local
services such as the Mattermost proxy mirror and Photo Inbox. Runtime PID/state
and logs stay under .aiw/runtime/.
Recommended memory commands:
bash scripts/memory/memory.sh health
bash scripts/memory/memory.sh search "PDIAP-15765"
bash scripts/memory/memory.sh create work-item pdiap-15999 "Example title"
This interface defaults to Markdown files under project-knowledge/, uses Obsidian CLI when useful and available, and falls back to direct file operations.
The default workspace Mattermost extractor now lives in:
scripts/mattermost/
Recommended default command:
bash scripts/mattermost/sync.sh
Bootstrap command:
bash scripts/mattermost/bootstrap.sh
The current Mattermost extractor is stdlib-only and does not require installing requests.
It also supports readable channel names in .env, not only channel IDs.
If you still want to override it with another script, expose that to OpenCode with:
AIW_MATTERMOST_SYNC_CMDFIDELITY_MATTERMOST_SYNC_CMD
Example:
export AIW_MATTERMOST_SYNC_CMD="/absolute/path/to/your-mattermost-sync-script"
Expected behavior:
- print the latest relevant Mattermost context to stdout
- avoid interactive prompts
- return a non-zero exit code on failure
OpenCode can then use that output to refresh ai/inbox/mattermost-latest.md proactively. When the local Mattermost proxy mirror is running, commands should prefer ai/inbox/mattermost-mirror/ through scripts/mattermost-proxy/read-context.py and use legacy sync output as fallback evidence.
Historical Slack exports can also be imported through:
python3 scripts/slack/import_slack_export.py .../archive-import .../slack-import ...
Recommended raw archive location:
archives/slack/export/
The importer can auto-detect channels using AIW_CHANNEL_PREFIX and auto-tune message selection for very large exports. It defaults to fidelity for this project profile.
The Mattermost extractor can also fetch the latest prior day with channel activity for standups. It starts from the previous calendar day and expands backward automatically when there is no activity, which covers Mondays, weekends, holidays, and OOO gaps.
bash scripts/mattermost/sync.sh --previous-workday