feat: Implement Slack export importer and enhance README documentation for historical context recovery
This commit is contained in:
59
.opencode/commands/slack-import.md
Normal file
59
.opencode/commands/slack-import.md
Normal file
@@ -0,0 +1,59 @@
|
||||
---
|
||||
description: Import a historical Slack export and refine workspace memory from it
|
||||
---
|
||||
|
||||
Use a Slack export as a historical context source for the workspace.
|
||||
|
||||
Interpret this as historical recovery, not as current truth and not as model training.
|
||||
|
||||
Inputs:
|
||||
|
||||
- `$ARGUMENTS` may contain an export path, channel names, or date filters
|
||||
- if no explicit path is given in the arguments, use `FIDELITY_SLACK_EXPORT_PATH` when available
|
||||
- otherwise, if `archives/slack/export/` exists, use it as the default import source
|
||||
- if no channels are specified, auto-detect channels whose folder names start with `fidelity`
|
||||
- if no message limit is specified, auto-tune message selection based on archive size
|
||||
|
||||
First, run the importer:
|
||||
|
||||
!`if [ -n "$ARGUMENTS" ]; then python3 scripts/slack/import_slack_export.py $ARGUMENTS; elif [ -n "$FIDELITY_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$FIDELITY_SLACK_EXPORT_PATH" --channel-prefix fidelity; elif [ -d archives/slack/export ]; then python3 scripts/slack/import_slack_export.py --export-path archives/slack/export --channel-prefix fidelity; else echo "Provide Slack import arguments, set FIDELITY_SLACK_EXPORT_PATH, or place an extracted export in archives/slack/export."; fi`
|
||||
|
||||
Read:
|
||||
|
||||
@ai/AGENTS.md
|
||||
@ai/context/project.md
|
||||
@ai/context/people/index.md
|
||||
@ai/context/people/manager.md
|
||||
@ai/state/current.md
|
||||
@ai/state/work-items.md
|
||||
@knowledge/agent-memory-rules.md
|
||||
@knowledge/memory-promotion-rules.md
|
||||
|
||||
Imported summary, if present:
|
||||
|
||||
!`if [ -s scripts/slack/generated/slack_summary.md ]; then cat scripts/slack/generated/slack_summary.md; else echo "No Slack summary generated."; fi`
|
||||
|
||||
Imported Slack context, if present:
|
||||
|
||||
!`if [ -s scripts/slack/generated/slack_context.jsonl ]; then cat scripts/slack/generated/slack_context.jsonl; else echo "No Slack context generated."; fi`
|
||||
|
||||
Instructions:
|
||||
|
||||
- treat the Slack archive as historical evidence
|
||||
- assume this may be a large multi-year export
|
||||
- promote durable project-relevant context automatically when confidence is high
|
||||
- prefer promoting:
|
||||
- repeated Jira IDs and titles still relevant to current understanding
|
||||
- durable role/person associations
|
||||
- recurring architecture or debugging patterns
|
||||
- past approvals or decisions that still matter
|
||||
- prioritize high-signal messages such as Jira references, approvals, scope changes, root-cause notes, points, and persistent technical constraints
|
||||
- avoid promoting outdated daily status unless it changes current understanding
|
||||
- update existing memory when the archive clarifies or corrects it
|
||||
- if historical facts are ambiguous or likely outdated, summarize them as archived context instead of promoting them
|
||||
|
||||
Return:
|
||||
|
||||
1. What was imported
|
||||
2. Which files were updated
|
||||
3. Which historical facts were promoted or intentionally left as archive-only context
|
||||
Reference in New Issue
Block a user