2.2 KiB
Scripts
This directory contains helpers that automate:
- 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:
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 vault/, 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.
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