72 lines
2.5 KiB
Markdown
72 lines
2.5 KiB
Markdown
# Slack History Import
|
|
|
|
This directory contains helpers to ingest historical Slack exports as context sources for the workspace.
|
|
|
|
## Goal
|
|
|
|
Use old Slack history to recover durable project context, stakeholder relationships, Jira references, and past decisions without treating the raw archive as current truth.
|
|
|
|
## Recommended Use
|
|
|
|
- import selected channels, not the whole export blindly
|
|
- prefer recent or relevant historical windows
|
|
- promote only durable, project-relevant facts into workspace memory
|
|
- keep raw imported artifacts under `generated/`
|
|
- keep the raw Slack export under `archives/slack/export/` when you want the workspace to find it later
|
|
- for a first pass on a large export, let the importer auto-detect `fidelity*` channels and auto-tune message selection
|
|
|
|
## Supported Export Shape
|
|
|
|
The importer expects the standard Slack export structure:
|
|
|
|
- one folder per channel
|
|
- one JSON file per day inside the channel folder
|
|
- optional `users.json` at the export root
|
|
|
|
## Usage
|
|
|
|
Manual example:
|
|
|
|
```bash
|
|
python3 scripts/slack/import_slack_export.py \
|
|
--export-path /absolute/path/to/slack-export \
|
|
--channel-prefix fidelity \
|
|
--output-dir scripts/slack/generated
|
|
```
|
|
|
|
This generates:
|
|
|
|
- `scripts/slack/generated/slack_context.jsonl`
|
|
- `scripts/slack/generated/slack_summary.md`
|
|
|
|
Use the OpenCode command `/slack-import ...` for the guided workflow.
|
|
|
|
## Large Export Behavior
|
|
|
|
For very large multi-year exports, the importer is designed to be selective by default:
|
|
|
|
- auto-detects channels whose names start with `fidelity` when no channels are specified
|
|
- auto-tunes the message limit based on archive size
|
|
- when no date filters are provided, performs an initial full-history sweep across the detected `fidelity*` channels
|
|
- preserves coverage across channels and years, not only recent history
|
|
- prefers recent messages plus older high-signal messages
|
|
- preserves strong Jira-linked messages even when they are old
|
|
- prioritizes Jira IDs, approvals, scope changes, root-cause notes, points, and durable technical patterns
|
|
|
|
Override behavior if needed:
|
|
|
|
- `--channels fidelity-preguntas,fidelity-ios`
|
|
- `--all-channels`
|
|
- `--max-messages 8000`
|
|
- `--since 2025-01-01`
|
|
|
|
## Recommended Archive Location
|
|
|
|
If you want the workspace to find the export later without needing a custom path each time, place the extracted export here:
|
|
|
|
```text
|
|
archives/slack/export/
|
|
```
|
|
|
|
The `/slack-import` command will use that location automatically when no explicit path or environment variable is provided.
|