Refactor AI workspace for improved context management and communication integration
- Introduced new commands and skills for workspace memory curation, professional communication, and status reporting. - Updated existing commands to utilize new skills and improve clarity in instructions. - Created a new workspace context command to load reusable core and active project profile. - Enhanced Mattermost inbox integration with support for generic environment variables. - Established a clear separation between project-independent core logic and project-specific profiles. - Improved documentation across various files to reflect changes in workflow and command usage. - Added operational memory management rules to ensure accurate context promotion and correction. - Updated README and workflow documents to guide users in utilizing the new structure effectively.
This commit is contained in:
@@ -10,6 +10,8 @@ Your job is not only to answer prompts, but to keep the workspace context accura
|
||||
|
||||
Behavior rules:
|
||||
|
||||
- Treat `core/` as the reusable project-independent operating model.
|
||||
- Treat `profiles/fidelity/profile.md` as the active Fidelity project profile.
|
||||
- Treat `README.md`, `ai/context/`, `ai/state/`, `knowledge/`, and `ai/logs/` as the persistent memory of the project.
|
||||
- Before answering a prompt that depends on current state, verify the latest relevant files instead of relying only on conversation history.
|
||||
- If the prompt asks for the latest Mattermost message, the last message from Jeff/current manager, or what someone just said, force a Mattermost refresh before answering and do not rely on stale inbox context.
|
||||
@@ -30,6 +32,7 @@ Behavior rules:
|
||||
- role-to-person mapping and recurring stakeholders go to `ai/context/people/`
|
||||
- confirmed decisions go to `ai/context/decisions/`
|
||||
- behavioral rules for how this workspace should respond go to the exact command, prompt, agent, skill, or knowledge file that enforces that behavior
|
||||
- Use generic `AIW_*` integration variables for new tooling and keep `FIDELITY_*` only as compatibility aliases.
|
||||
- Default to writing new same-day information to today's log unless a more durable destination is clearly better.
|
||||
- Update preexisting memory when a new prompt clarifies or corrects something already stored.
|
||||
- Do not wait for a dedicated sync command if the correct memory update is already obvious.
|
||||
|
||||
36
.opencode/agents/workspace.md
Normal file
36
.opencode/agents/workspace.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
description: Generic AI workspace agent for project-independent operational memory
|
||||
mode: primary
|
||||
temperature: 0.1
|
||||
---
|
||||
|
||||
You are the generic AI workspace agent.
|
||||
|
||||
Your job is to answer prompts and maintain the workspace as living operational memory.
|
||||
|
||||
Behavior rules:
|
||||
|
||||
- Load `core/` first for project-independent operating rules.
|
||||
- Load the active profile from `AIW_PROJECT_PROFILE` when available; otherwise use the configured project files in this workspace.
|
||||
- Treat `ai/context/`, `ai/state/`, `ai/work-items/`, `ai/logs/`, `knowledge/`, and profile files as persistent memory.
|
||||
- Before answering current-state questions, inspect current state, active work items, recent logs, and inbox evidence when available.
|
||||
- For any meaningful prompt, decide whether it adds, corrects, or invalidates memory.
|
||||
- Update the smallest correct canonical file when memory should change.
|
||||
- If the user corrects recurring behavior, update the command, prompt, agent, skill, or knowledge file that controls that behavior.
|
||||
- Keep imported evidence separate from promoted memory.
|
||||
- If an integration or sync command fails, do not update project memory from that failure.
|
||||
- Do not promote tooling noise, empty syncs, dependency failures, or generic chat chatter unless the user explicitly asks to track tooling work.
|
||||
- Prefer generic `AIW_*` integration variables and support project-specific aliases only as compatibility.
|
||||
- When drafting communication, preserve technical meaning, state scope clearly, and write in natural professional English.
|
||||
|
||||
Memory destinations:
|
||||
|
||||
- daily facts -> `ai/logs/YYYY-MM-DD.md`
|
||||
- current priorities -> `ai/state/current.md`
|
||||
- active work items -> `ai/work-items/*.md`
|
||||
- active-work summary -> `ai/state/work-items.md`
|
||||
- durable project knowledge -> `ai/context/`
|
||||
- people and roles -> `ai/context/people/`
|
||||
- confirmed decisions -> `ai/context/decisions/`
|
||||
- reusable behavior -> `.opencode/commands/`, `prompts/`, `.opencode/agents/`, `.opencode/skills/`, `knowledge/`, or `ai/context/process/`
|
||||
|
||||
43
.opencode/commands/ai-prompt.md
Normal file
43
.opencode/commands/ai-prompt.md
Normal file
@@ -0,0 +1,43 @@
|
||||
---
|
||||
description: Generate a self-contained prompt for another AI assistant
|
||||
---
|
||||
|
||||
Generate a high-quality prompt for another AI assistant that may not have access to this workspace memory.
|
||||
|
||||
Read:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@ai/context/process/ai-to-ai-prompting.md
|
||||
@ai/work-items/index.md
|
||||
@ai/state/current.md
|
||||
@ai/state/work-items.md
|
||||
@knowledge/communication-rules.md
|
||||
|
||||
Read active profile, if present:
|
||||
|
||||
!`profile="${AIW_PROJECT_PROFILE:-fidelity}"; if [ -f "profiles/$profile/profile.md" ]; then cat "profiles/$profile/profile.md"; elif [ -f profiles/fidelity/profile.md ]; then cat profiles/fidelity/profile.md; else echo "No profile file found."; fi`
|
||||
|
||||
Relevant active work item files, if available:
|
||||
|
||||
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
|
||||
|
||||
User request:
|
||||
|
||||
$ARGUMENTS
|
||||
|
||||
Instructions:
|
||||
|
||||
- use `ai-prompt-engineering` when available
|
||||
- make the prompt self-contained
|
||||
- include only relevant project context
|
||||
- tell the target AI what to inspect before changing code or producing conclusions
|
||||
- include constraints, non-goals, expected output, and validation expectations
|
||||
- include work-item IDs and approved titles when relevant
|
||||
- do not assume the target AI can read this workspace
|
||||
- do not invent file paths if the implementation repository is not available here
|
||||
|
||||
Return only the prompt unless the user asks for explanation.
|
||||
62
.opencode/commands/archive-import.md
Normal file
62
.opencode/commands/archive-import.md
Normal file
@@ -0,0 +1,62 @@
|
||||
---
|
||||
description: Import a historical communication archive and refine workspace memory
|
||||
---
|
||||
|
||||
Use a historical communication export as archive evidence 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, use `AIW_SLACK_EXPORT_PATH` when available
|
||||
- compatibility fallback: `FIDELITY_SLACK_EXPORT_PATH`
|
||||
- otherwise, if `archives/slack/export/` exists, use it as the default import source
|
||||
- if no channels are specified, auto-detect channels using `AIW_CHANNEL_PREFIX`
|
||||
- compatibility/default prefix: `fidelity`
|
||||
|
||||
Run the importer:
|
||||
|
||||
!`prefix="${AIW_CHANNEL_PREFIX:-fidelity}"; if [ -n "$ARGUMENTS" ]; then python3 scripts/slack/import_slack_export.py $ARGUMENTS; elif [ -n "$AIW_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$AIW_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -n "$FIDELITY_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$FIDELITY_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -d archives/slack/export ]; then python3 scripts/slack/import_slack_export.py --export-path archives/slack/export --channel-prefix "$prefix"; else echo "Provide archive import arguments, set AIW_SLACK_EXPORT_PATH, set FIDELITY_SLACK_EXPORT_PATH, or place an extracted export in archives/slack/export."; fi`
|
||||
|
||||
Read:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@core/integrations/communication-model.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@ai/context/process/context-maintenance.md
|
||||
@ai/context/people/index.md
|
||||
@ai/context/people/manager.md
|
||||
@ai/work-items/index.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 archive summary generated."; fi`
|
||||
|
||||
Imported archive context, if present:
|
||||
|
||||
!`if [ -s scripts/slack/generated/slack_context.jsonl ]; then cat scripts/slack/generated/slack_context.jsonl; else echo "No archive context generated."; fi`
|
||||
|
||||
Instructions:
|
||||
|
||||
- treat the archive as historical evidence
|
||||
- promote durable project-relevant context automatically when confidence is high
|
||||
- prefer durable role/person associations, recurring architecture patterns, repeated work-item references, approval/scope history, and process lessons
|
||||
- create or update person files when a human repeatedly affects project flow
|
||||
- avoid promoting outdated daily status unless it changes current understanding
|
||||
- update existing memory when the archive clarifies or corrects it
|
||||
- keep ambiguous or likely outdated facts as archive-only context
|
||||
|
||||
Return:
|
||||
|
||||
1. What was imported
|
||||
2. Which files were updated
|
||||
3. Which historical facts were promoted or intentionally left as archive-only context
|
||||
|
||||
52
.opencode/commands/communication-sync.md
Normal file
52
.opencode/commands/communication-sync.md
Normal file
@@ -0,0 +1,52 @@
|
||||
---
|
||||
description: Sync live communication context and promote high-confidence memory
|
||||
---
|
||||
|
||||
Use the configured live communication connector to fetch fresh evidence and maintain workspace memory automatically.
|
||||
|
||||
Preferred command sources:
|
||||
|
||||
- `AIW_MATTERMOST_SYNC_CMD`
|
||||
- compatibility fallback: `FIDELITY_MATTERMOST_SYNC_CMD`
|
||||
- workspace fallback: `bash scripts/mattermost/sync.sh`
|
||||
|
||||
Run the connector:
|
||||
|
||||
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No live communication sync command is configured."; fi`
|
||||
|
||||
Read:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@core/integrations/communication-model.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@ai/context/process/context-maintenance.md
|
||||
@ai/work-items/index.md
|
||||
@ai/state/current.md
|
||||
@ai/state/work-items.md
|
||||
@knowledge/memory-promotion-rules.md
|
||||
|
||||
Fresh communication evidence:
|
||||
|
||||
!`if [ -s ai/inbox/mattermost-latest.md ]; then cat ai/inbox/mattermost-latest.md; elif [ -s scripts/mattermost/generated/mattermost_context.jsonl ]; then cat scripts/mattermost/generated/mattermost_context.jsonl; else echo "No communication evidence available."; fi`
|
||||
|
||||
Instructions:
|
||||
|
||||
- if the sync command failed, stop and do not edit workspace memory
|
||||
- treat connector output as evidence, not automatically as project truth
|
||||
- promote only explicit, project-relevant, high-confidence facts
|
||||
- default destination is `ai/logs/$(date +%F).md`
|
||||
- update `ai/state/current.md` only for facts that materially change the active work window
|
||||
- update `ai/work-items/*.md` for explicit work-item IDs, approved titles, points, scope, and status notes
|
||||
- keep `ai/state/work-items.md` aligned as the compact summary of active work items
|
||||
- do not write tooling noise, sync status, or generic chat chatter into project memory
|
||||
- if a fact is ambiguous, skip it rather than asking what to do
|
||||
|
||||
Return:
|
||||
|
||||
1. What was synchronized
|
||||
2. Which files were updated
|
||||
3. Which facts were promoted or intentionally skipped
|
||||
|
||||
@@ -6,6 +6,8 @@ Generate a prompt that the user can send to GitHub Copilot or another AI assista
|
||||
|
||||
Read:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@prompts/copilot-prompt.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/process/ai-to-ai-prompting.md
|
||||
@@ -19,6 +21,10 @@ Read:
|
||||
@ai/state/current.md
|
||||
@ai/state/work-items.md
|
||||
|
||||
Active profile, if present:
|
||||
|
||||
!`profile="${AIW_PROJECT_PROFILE:-fidelity}"; if [ -f "profiles/$profile/profile.md" ]; then cat "profiles/$profile/profile.md"; elif [ -f profiles/fidelity/profile.md ]; then cat profiles/fidelity/profile.md; else echo "No profile file found."; fi`
|
||||
|
||||
Detailed active work item files, if available:
|
||||
|
||||
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
|
||||
@@ -29,7 +35,7 @@ $ARGUMENTS
|
||||
|
||||
Instructions:
|
||||
|
||||
- Use the `copilot-prompt-engineering` skill if available.
|
||||
- Use `ai-prompt-engineering` and `copilot-prompt-engineering` if available.
|
||||
- Generate a self-contained prompt for the target AI.
|
||||
- Include only context relevant to the request.
|
||||
- Include Jira ID/title when the task maps to an active work item.
|
||||
|
||||
@@ -7,6 +7,10 @@ Load and internalize the active context for this Fidelity workspace before answe
|
||||
Use these files as the baseline context:
|
||||
|
||||
@README.md
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@core/integrations/communication-model.md
|
||||
@profiles/fidelity/profile.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
|
||||
@@ -13,7 +13,7 @@ Use this when the user asks for:
|
||||
|
||||
Run sync:
|
||||
|
||||
!`if [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
|
||||
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
|
||||
|
||||
Read refreshed Mattermost context:
|
||||
|
||||
@@ -27,7 +27,7 @@ Instructions:
|
||||
|
||||
- Do not answer from old conversation memory.
|
||||
- Use only the refreshed Mattermost output above.
|
||||
- If the user asks for Jeff/current manager, filter messages by `jeff`, `jeff.dewitte`, or the current manager profile when visible.
|
||||
- If the user asks for the current manager/stakeholder, filter messages by the profile mapping when visible; for the Fidelity profile, also match `jeff` and `jeff.dewitte`.
|
||||
- If multiple messages match, return the newest matching message first.
|
||||
- Include timestamp, channel, sender, and concise summary.
|
||||
- If the message changes project context, update the appropriate workspace memory after answering.
|
||||
|
||||
@@ -7,6 +7,8 @@ Use this command for quick same-day note capture.
|
||||
Read:
|
||||
|
||||
@README.md
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@@ -28,6 +30,7 @@ $ARGUMENTS
|
||||
|
||||
Instructions:
|
||||
|
||||
- use `workspace-memory-curation` when available
|
||||
- Update or create `ai/logs/$(date +%F).md`
|
||||
- Preserve concrete technical meaning
|
||||
- Capture both technical findings and communication context when relevant
|
||||
|
||||
@@ -4,6 +4,8 @@ description: Draft or polish a Mattermost update for the current manager or stak
|
||||
|
||||
Draft a concise Mattermost message for the current manager or stakeholder in natural, manager-ready US English.
|
||||
|
||||
Use `professional-communication` when available.
|
||||
|
||||
Read:
|
||||
|
||||
@prompts/manager-update.md
|
||||
|
||||
@@ -6,12 +6,13 @@ Use the configured Mattermost sync command to fetch fresh communication context
|
||||
|
||||
Preferred command sources:
|
||||
|
||||
- `FIDELITY_MATTERMOST_SYNC_CMD`
|
||||
- `AIW_MATTERMOST_SYNC_CMD`
|
||||
- compatibility fallback: `FIDELITY_MATTERMOST_SYNC_CMD`
|
||||
- fallback: `bash scripts/mattermost/sync.sh`
|
||||
|
||||
Run the command and use its output as fresh communication context:
|
||||
|
||||
!`if [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
|
||||
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
|
||||
|
||||
Use this command implicitly when the user asks for the latest or last Mattermost message, especially messages from Jeff or the current manager.
|
||||
|
||||
@@ -21,6 +22,7 @@ Then:
|
||||
- use `ai/inbox/mattermost-latest.md` if it exists and is non-empty
|
||||
- otherwise use `scripts/mattermost/generated/mattermost_context.jsonl` if it exists and is non-empty
|
||||
- apply the memory promotion rules from `knowledge/memory-promotion-rules.md`
|
||||
- treat Mattermost output as live communication evidence; the agent decides what becomes promoted memory
|
||||
- automatically promote explicit, project-relevant, high-confidence facts
|
||||
- default destination is `ai/logs/$(date +%F).md`
|
||||
- update `ai/state/current.md` only for facts that materially change the current work window
|
||||
|
||||
@@ -6,6 +6,8 @@ Use this only when you want an explicit manual promotion pass.
|
||||
|
||||
Read:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
|
||||
@@ -9,20 +9,25 @@ Interpret this as historical recovery, not as current truth and not as model tra
|
||||
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
|
||||
- if no explicit path is given in the arguments, use `AIW_SLACK_EXPORT_PATH` when available
|
||||
- compatibility fallback: `FIDELITY_SLACK_EXPORT_PATH`
|
||||
- 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 channels are specified, auto-detect channels using `AIW_CHANNEL_PREFIX`
|
||||
- compatibility/default prefix: `fidelity`
|
||||
- if no message limit is specified, auto-tune message selection based on archive size
|
||||
- if no date range is specified, do an initial full-history sweep across the detected `fidelity*` channels
|
||||
- preserve broad coverage across years and channels while still prioritizing high-signal messages
|
||||
|
||||
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`
|
||||
!`prefix="${AIW_CHANNEL_PREFIX:-fidelity}"; if [ -n "$ARGUMENTS" ]; then python3 scripts/slack/import_slack_export.py $ARGUMENTS; elif [ -n "$AIW_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$AIW_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -n "$FIDELITY_SLACK_EXPORT_PATH" ]; then python3 scripts/slack/import_slack_export.py --export-path "$FIDELITY_SLACK_EXPORT_PATH" --channel-prefix "$prefix"; elif [ -d archives/slack/export ]; then python3 scripts/slack/import_slack_export.py --export-path archives/slack/export --channel-prefix "$prefix"; else echo "Provide Slack import arguments, set AIW_SLACK_EXPORT_PATH, set FIDELITY_SLACK_EXPORT_PATH, or place an extracted export in archives/slack/export."; fi`
|
||||
|
||||
Read:
|
||||
|
||||
@ai/AGENTS.md
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@core/integrations/communication-model.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@ai/context/systems/index.md
|
||||
@@ -46,7 +51,7 @@ Imported Slack context, if present:
|
||||
|
||||
Instructions:
|
||||
|
||||
- treat the Slack archive as historical evidence
|
||||
- treat the Slack archive as historical evidence, not promoted memory by itself
|
||||
- assume this may be a large multi-year export
|
||||
- assume the first import should preserve evidence from the beginning of the project, not just recent history
|
||||
- promote durable project-relevant context automatically when confidence is high
|
||||
|
||||
@@ -43,6 +43,7 @@ Detailed active work item files, if available:
|
||||
|
||||
Before drafting:
|
||||
|
||||
- use `status-reporting` when available
|
||||
- update workspace memory if the refreshed context introduced clear high-confidence project facts
|
||||
- prefer existing memory when the latest context is ambiguous
|
||||
- treat the previous workday Mattermost context as the source for the `Yesterday` section, even when the previous calendar day was a weekend, holiday, or OOO day
|
||||
|
||||
@@ -18,6 +18,8 @@ $ARGUMENTS
|
||||
|
||||
Read:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@prompts/story-draft.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@@ -47,6 +49,7 @@ Detailed active work item files, if available:
|
||||
|
||||
Requirements:
|
||||
|
||||
- Use `professional-communication` when available.
|
||||
- Preserve the exact technical meaning of the input
|
||||
- Rewrite fully when needed so the output sounds like a fluent senior engineer wrote it
|
||||
- Choose the most appropriate story framing: bug, enhancement, spike, task, or follow-up
|
||||
|
||||
@@ -34,6 +34,7 @@ $ARGUMENTS
|
||||
|
||||
Instructions:
|
||||
|
||||
- use `workspace-memory-curation` when available
|
||||
- Decide whether the new information belongs in:
|
||||
- today's log
|
||||
- `ai/state/current.md`
|
||||
|
||||
@@ -4,6 +4,8 @@ description: Rewrite rough engineering notes into natural Mattermost-ready US En
|
||||
|
||||
Rewrite and tighten the following rough notes into concise, natural, Mattermost-ready US English.
|
||||
|
||||
Use `professional-communication` when available.
|
||||
|
||||
Do not translate literally.
|
||||
Rewrite fully when needed so the result sounds like a fluent senior engineer wrote it.
|
||||
|
||||
|
||||
63
.opencode/commands/workspace-context.md
Normal file
63
.opencode/commands/workspace-context.md
Normal file
@@ -0,0 +1,63 @@
|
||||
---
|
||||
description: Load reusable AI workspace core plus the active project profile
|
||||
---
|
||||
|
||||
Load and internalize the reusable workspace core and the active project context before answering follow-up questions.
|
||||
|
||||
Read core:
|
||||
|
||||
@core/README.md
|
||||
@core/memory/operational-memory.md
|
||||
@core/integrations/communication-model.md
|
||||
@core/profiles/create-project-profile.md
|
||||
|
||||
Read active workspace memory:
|
||||
|
||||
@README.md
|
||||
@ai/AGENTS.md
|
||||
@ai/context/index.md
|
||||
@ai/context/project.md
|
||||
@ai/context/process/communication.md
|
||||
@ai/context/process/context-maintenance.md
|
||||
@ai/context/people/manager.md
|
||||
@ai/context/people/index.md
|
||||
@ai/work-items/index.md
|
||||
@ai/state/current.md
|
||||
@ai/state/work-items.md
|
||||
@knowledge/workspace-model.md
|
||||
@knowledge/communication-rules.md
|
||||
@knowledge/agent-memory-rules.md
|
||||
@knowledge/memory-promotion-rules.md
|
||||
|
||||
Read active profile, preferring the configured profile and falling back to Fidelity:
|
||||
|
||||
!`profile="${AIW_PROJECT_PROFILE:-fidelity}"; if [ -f "profiles/$profile/profile.md" ]; then cat "profiles/$profile/profile.md"; elif [ -f profiles/fidelity/profile.md ]; then cat profiles/fidelity/profile.md; else echo "No profile file found."; fi`
|
||||
|
||||
Today's date:
|
||||
|
||||
!`date +%F`
|
||||
|
||||
Today's log, if present:
|
||||
|
||||
!`if [ -f ai/logs/$(date +%F).md ]; then cat ai/logs/$(date +%F).md; else echo "No log exists for today yet."; fi`
|
||||
|
||||
Recent logs available:
|
||||
|
||||
!`ls -1 ai/logs 2>/dev/null | sort | tail -n 5`
|
||||
|
||||
Detailed active work item files, if available:
|
||||
|
||||
!`if [ -d ai/work-items ]; then for f in ai/work-items/*.md; do case "$f" in *README.md|*index.md) continue;; esac; echo "\n### $f"; cat "$f"; done; else echo "No work item files available."; fi`
|
||||
|
||||
Latest communication inbox, if available:
|
||||
|
||||
!`if [ -s ai/inbox/mattermost-latest.md ]; then cat ai/inbox/mattermost-latest.md; elif [ -s scripts/mattermost/generated/mattermost_context.jsonl ]; then cat scripts/mattermost/generated/mattermost_context.jsonl; else echo "No live communication context available."; fi`
|
||||
|
||||
Respond with:
|
||||
|
||||
1. Current context
|
||||
2. Communication risks
|
||||
3. Missing context to capture today
|
||||
|
||||
Keep the response concise, then wait for the next request.
|
||||
|
||||
@@ -14,6 +14,10 @@ export const FidelityCompaction = async ({ directory }) => {
|
||||
"experimental.session.compacting": async (_input, output) => {
|
||||
const baseFiles = [
|
||||
"README.md",
|
||||
"core/README.md",
|
||||
"core/memory/operational-memory.md",
|
||||
"core/integrations/communication-model.md",
|
||||
"profiles/fidelity/profile.md",
|
||||
"ai/context/index.md",
|
||||
"ai/context/project.md",
|
||||
"ai/context/ios/index.md",
|
||||
@@ -63,7 +67,7 @@ export const FidelityCompaction = async ({ directory }) => {
|
||||
if (sections.length > 0) {
|
||||
output.context.push(
|
||||
[
|
||||
"## Fidelity Workspace Persistent Context",
|
||||
"## AI Workspace Persistent Context",
|
||||
"Preserve this operational memory across compaction.",
|
||||
"If later messages introduced corrections or durable facts, prefer the corrected view over stale summaries.",
|
||||
"",
|
||||
|
||||
@@ -14,7 +14,9 @@ function nowIso() {
|
||||
}
|
||||
|
||||
async function resolveSyncCommand(directory) {
|
||||
const configured = process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
|
||||
const configured =
|
||||
process.env.AIW_MATTERMOST_SYNC_CMD?.trim() ||
|
||||
process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
|
||||
if (configured) return configured
|
||||
|
||||
const fallbackScript = path.join(directory, "scripts/mattermost/sync.sh")
|
||||
@@ -96,14 +98,34 @@ function requiresFreshMattermost(promptText) {
|
||||
"mensajes",
|
||||
"message",
|
||||
"messages",
|
||||
"jeff",
|
||||
"manager",
|
||||
"stakeholder",
|
||||
"supervisor",
|
||||
"lead",
|
||||
"inbox",
|
||||
]
|
||||
|
||||
const configuredTerms = [
|
||||
process.env.AIW_COMMUNICATION_FRESH_TERMS,
|
||||
process.env.AIW_MANAGER_NAME,
|
||||
process.env.AIW_PRIMARY_STAKEHOLDER,
|
||||
process.env.FIDELITY_MANAGER_NAME,
|
||||
"jeff",
|
||||
"fidelity-preguntas",
|
||||
]
|
||||
.filter(Boolean)
|
||||
.flatMap((value) => String(value).split(","))
|
||||
.map((value) => value.trim().toLowerCase())
|
||||
.filter(Boolean)
|
||||
|
||||
const sourceTerms = [
|
||||
...mattermostTerms,
|
||||
...configuredTerms,
|
||||
]
|
||||
|
||||
return (
|
||||
freshnessTerms.some((term) => text.includes(term)) &&
|
||||
mattermostTerms.some((term) => text.includes(term))
|
||||
sourceTerms.some((term) => text.includes(term))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -120,7 +142,9 @@ export const MattermostInbox = async ({ $, directory, client }) => {
|
||||
if (!command) return
|
||||
|
||||
const intervalMinutes = Number.parseInt(
|
||||
process.env.FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES || "15",
|
||||
process.env.AIW_MATTERMOST_SYNC_INTERVAL_MINUTES ||
|
||||
process.env.FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES ||
|
||||
"15",
|
||||
10,
|
||||
)
|
||||
const minIntervalMs = Math.max(1, Number.isNaN(intervalMinutes) ? 15 : intervalMinutes) * 60 * 1000
|
||||
@@ -133,6 +157,12 @@ export const MattermostInbox = async ({ $, directory, client }) => {
|
||||
const latestPath = path.join(inboxDir, "mattermost-latest.md")
|
||||
const statusPath = path.join(inboxDir, "mattermost-status.json")
|
||||
|
||||
const commandSource = process.env.AIW_MATTERMOST_SYNC_CMD?.trim()
|
||||
? "aiw-env"
|
||||
: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
|
||||
? "fidelity-env"
|
||||
: "workspace-default"
|
||||
|
||||
try {
|
||||
await mkdir(inboxDir, { recursive: true })
|
||||
const stdoutText = await $`bash -lc ${command}`.text()
|
||||
@@ -153,7 +183,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
|
||||
forced: Boolean(options.force),
|
||||
changed: previous !== `${output}\n` && previous !== output,
|
||||
commandConfigured: true,
|
||||
commandSource: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim() ? "env" : "workspace-default",
|
||||
commandSource,
|
||||
})
|
||||
} else {
|
||||
await writeStatus(statusPath, {
|
||||
@@ -162,7 +192,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
|
||||
forced: Boolean(options.force),
|
||||
changed: false,
|
||||
commandConfigured: true,
|
||||
commandSource: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim() ? "env" : "workspace-default",
|
||||
commandSource,
|
||||
note: "Sync command returned no output.",
|
||||
})
|
||||
}
|
||||
@@ -173,7 +203,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
|
||||
forced: Boolean(options.force),
|
||||
changed: false,
|
||||
commandConfigured: true,
|
||||
commandSource: process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim() ? "env" : "workspace-default",
|
||||
commandSource,
|
||||
error: error instanceof Error ? error.message : String(error),
|
||||
})
|
||||
|
||||
|
||||
26
.opencode/skills/ai-prompt-engineering/SKILL.md
Normal file
26
.opencode/skills/ai-prompt-engineering/SKILL.md
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: ai-prompt-engineering
|
||||
description: Create self-contained prompts for another AI assistant that lacks access to this workspace memory.
|
||||
compatibility: opencode
|
||||
---
|
||||
|
||||
## When To Use
|
||||
|
||||
Use this skill when the user wants a prompt for another AI assistant, coding agent, review tool, or implementation environment.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Identify target task type: investigation, implementation, review, testing, debugging, or documentation.
|
||||
2. Pull only relevant workspace context.
|
||||
3. Make the prompt self-contained.
|
||||
4. Tell the target AI what to inspect before acting.
|
||||
5. State constraints, non-goals, expected output, and validation expectations.
|
||||
6. Avoid invented file paths when the implementation repository is not available.
|
||||
|
||||
## Output Rules
|
||||
|
||||
- Return only the prompt unless the user asks for commentary.
|
||||
- Prefer clear sections over long prose.
|
||||
- Include work-item ID and title when relevant.
|
||||
- Make assumptions explicit.
|
||||
|
||||
24
.opencode/skills/professional-communication/SKILL.md
Normal file
24
.opencode/skills/professional-communication/SKILL.md
Normal file
@@ -0,0 +1,24 @@
|
||||
---
|
||||
name: professional-communication
|
||||
description: Rewrite rough technical notes into clear, concise, stakeholder-ready professional English while preserving scope and technical meaning.
|
||||
compatibility: opencode
|
||||
---
|
||||
|
||||
## When To Use
|
||||
|
||||
Use this skill for manager updates, stakeholder messages, translations, issue clarification, Jira comments, and communication polishing.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Identify audience, purpose, scope, and requested action.
|
||||
2. Preserve technical meaning and uncertainty.
|
||||
3. Make ownership, reproducibility, environment, and next action explicit when relevant.
|
||||
4. Use Context, Observation, Action when it improves readability.
|
||||
5. Avoid vague comparisons and generic progress language.
|
||||
|
||||
## Output Rules
|
||||
|
||||
- Write natural professional US English.
|
||||
- Keep messages concise enough for workplace chat unless the user asks for a longer document.
|
||||
- Do not invent facts, evidence, or commitments.
|
||||
|
||||
25
.opencode/skills/status-reporting/SKILL.md
Normal file
25
.opencode/skills/status-reporting/SKILL.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
name: status-reporting
|
||||
description: Generate work-item-aware standups and status summaries from current workspace memory, recent logs, and communication evidence.
|
||||
compatibility: opencode
|
||||
---
|
||||
|
||||
## When To Use
|
||||
|
||||
Use this skill for standups, daily scrum updates, end-of-day summaries, and short progress reports.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Read current state, active work items, recent logs, and latest communication evidence.
|
||||
2. Use the previous workday as the default source for "Yesterday" style updates.
|
||||
3. Group updates by work item when possible.
|
||||
4. If one work item has multiple concrete updates, use one top-level work-item bullet with indented markdown sub-bullets.
|
||||
5. Exclude side chatter unless it changed work scope, priority, risk, or blockers.
|
||||
|
||||
## Output Rules
|
||||
|
||||
- Use explicit work-item ID and title when available.
|
||||
- Keep the report concise and ready to send.
|
||||
- Do not mention internal evidence sources unless the user asks.
|
||||
- Use `Blockers: None` only when no blocker is visible in current memory.
|
||||
|
||||
25
.opencode/skills/workspace-memory-curation/SKILL.md
Normal file
25
.opencode/skills/workspace-memory-curation/SKILL.md
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
name: workspace-memory-curation
|
||||
description: Maintain file-based operational memory by deciding what to log, promote, correct, or route into tool behavior across reusable AI workspaces.
|
||||
compatibility: opencode
|
||||
---
|
||||
|
||||
## When To Use
|
||||
|
||||
Use this skill when new information may change workspace memory, project state, work-item context, people context, decisions, or reusable agent/tool behavior.
|
||||
|
||||
## Workflow
|
||||
|
||||
1. Read `core/memory/operational-memory.md`.
|
||||
2. Classify the information as daily, state, work-item, stable-context, people, decision, or tooling-behavior.
|
||||
3. Update the smallest correct canonical file.
|
||||
4. If new information corrects older memory, replace or refine the stale statement instead of appending a contradiction.
|
||||
5. If a correction affects future output, update the command, prompt, agent, skill, or knowledge file that controls that behavior.
|
||||
6. Keep imported evidence separate from promoted memory.
|
||||
|
||||
## Output Rules
|
||||
|
||||
- Report updated files and the memory change.
|
||||
- Preserve uncertainty when confidence is mixed.
|
||||
- Do not promote tool failures, sync noise, or generic chat chatter as project facts.
|
||||
|
||||
99
README.md
99
README.md
@@ -1,13 +1,16 @@
|
||||
# Fidelity AI Workspace
|
||||
# AI Workspace - Fidelity Profile
|
||||
|
||||
AI-native companion workspace for daily iOS engineering on Fidelity.
|
||||
Reusable AI-native companion workspace with Fidelity configured as the first real project profile.
|
||||
|
||||
This repository is not the product codebase. It is the operational context layer used from this machine to keep project state current, capture communication from Mattermost, prepare standups, and draft clear updates for a manager or stakeholder in polished professional English.
|
||||
This repository is not the product codebase. It is an operational context layer used to keep project state current, capture communication evidence, prepare standups, draft clear stakeholder updates, and generate self-contained prompts for another AI that has access to the implementation codebase.
|
||||
|
||||
The reusable logic lives in `core/`. Fidelity-specific context lives in the active profile and existing `ai/context/` memory.
|
||||
|
||||
---
|
||||
|
||||
## Purpose
|
||||
|
||||
- Provide a reusable file-based AI workspace pattern
|
||||
- Keep Fidelity context current outside the main development machine
|
||||
- Turn fragmented daily work into reusable AI-ready context
|
||||
- Support standups, manager updates, Jira notes, and debugging summaries
|
||||
@@ -33,6 +36,32 @@ Core principle:
|
||||
|
||||
Context must be updated before asking AI to write.
|
||||
|
||||
Reusable principle:
|
||||
|
||||
Integrations extract evidence. The agent promotes memory.
|
||||
|
||||
---
|
||||
|
||||
## Reusable Architecture
|
||||
|
||||
### /core
|
||||
|
||||
Project-independent workspace logic.
|
||||
|
||||
- `README.md` -> reusable operating model
|
||||
- `memory/operational-memory.md` -> memory classes, promotion rules, correction rules, self-maintenance rules
|
||||
- `integrations/communication-model.md` -> live communication and historical archive connector contract
|
||||
- `profiles/create-project-profile.md` -> checklist for adapting the workspace to another project
|
||||
|
||||
### /profiles
|
||||
|
||||
Project-specific configuration.
|
||||
|
||||
- `profiles/fidelity/` -> active Fidelity implementation profile
|
||||
- `profiles/example/` -> non-sensitive example profile for new projects
|
||||
|
||||
Profiles declare project assumptions, communication sources, work-item system, stakeholders, enabled commands, and enabled skills.
|
||||
|
||||
---
|
||||
|
||||
## Project Scope
|
||||
@@ -81,6 +110,8 @@ Repeatable working guides for:
|
||||
|
||||
Reference material for:
|
||||
|
||||
- reusable memory rules
|
||||
- workspace model
|
||||
- XFlow behavior
|
||||
- communication rules
|
||||
- Fidelity-specific debugging heuristics
|
||||
@@ -158,32 +189,76 @@ Recommended usage:
|
||||
|
||||
1. Open this repository as its own VS Code workspace.
|
||||
2. Start OpenCode from the integrated terminal at the repository root.
|
||||
3. Begin each session with `/fidelity-context`.
|
||||
3. Begin each session with `/workspace-context` or the Fidelity alias `/fidelity-context`.
|
||||
4. As new information appears during the day, update context before asking for drafting help.
|
||||
|
||||
Project commands live under `.opencode/commands/` and are intended to:
|
||||
|
||||
- load the baseline Fidelity context
|
||||
- sync Mattermost context into the workspace inbox
|
||||
- load the reusable core plus active project profile
|
||||
- sync live communication context into the workspace inbox
|
||||
- draft standups
|
||||
- draft manager updates
|
||||
- draft Copilot prompts for coding work on the Fidelity machine
|
||||
- force-refresh and inspect latest Mattermost messages
|
||||
- draft prompts for another AI on the implementation machine
|
||||
- force-refresh and inspect latest communication messages
|
||||
- convert rough notes into daily log updates
|
||||
|
||||
This keeps AI output tied to the latest workspace state instead of relying on chat memory alone.
|
||||
|
||||
---
|
||||
|
||||
## Mattermost Memory Flow
|
||||
## Generic Commands
|
||||
|
||||
This workspace supports a live-memory pattern for Mattermost.
|
||||
- `/workspace-context` -> load core plus active profile
|
||||
- `/communication-sync` -> sync live communication evidence and promote high-confidence memory
|
||||
- `/archive-import` -> import historical archive evidence
|
||||
- `/ai-prompt` -> generate a self-contained prompt for another AI
|
||||
- `/standup` -> generate a work-item-aware daily standup
|
||||
- `/manager-update` -> draft stakeholder-ready status
|
||||
- `/translate` -> rewrite rough notes into professional English
|
||||
- `/sync-context` -> incorporate new facts or corrections into memory
|
||||
|
||||
Compatibility aliases remain available for the Fidelity profile:
|
||||
|
||||
- `/fidelity-context`
|
||||
- `/mattermost-sync`
|
||||
- `/slack-import`
|
||||
- `/copilot-prompt`
|
||||
- `/swift-help`
|
||||
|
||||
---
|
||||
|
||||
## Communication Memory Flow
|
||||
|
||||
This workspace supports a live-memory pattern for communication sources such as Mattermost.
|
||||
|
||||
Recommended setup:
|
||||
|
||||
1. Use the workspace-local script at `scripts/mattermost/sync.sh`, or override it with `FIDELITY_MATTERMOST_SYNC_CMD`.
|
||||
1. Use the workspace-local script at `scripts/mattermost/sync.sh`, or override it with `AIW_MATTERMOST_SYNC_CMD`.
|
||||
2. Let OpenCode run with the project plugins enabled.
|
||||
3. The Mattermost inbox plugin will periodically refresh `ai/inbox/mattermost-latest.md`.
|
||||
4. Promote durable facts from the inbox into `ai/logs/`, `ai/state/`, and `ai/context/`.
|
||||
|
||||
Use `/mattermost-sync` when you want to force a refresh manually.
|
||||
Use `/communication-sync` or `/mattermost-sync` when you want to force a refresh manually.
|
||||
|
||||
Generic environment variables:
|
||||
|
||||
- `AIW_PROJECT_PROFILE`
|
||||
- `AIW_CHANNEL_PREFIX`
|
||||
- `AIW_MATTERMOST_SYNC_CMD`
|
||||
- `AIW_MATTERMOST_SYNC_INTERVAL_MINUTES`
|
||||
- `AIW_SLACK_EXPORT_PATH`
|
||||
|
||||
The older `FIDELITY_*` variables remain supported for compatibility with this project profile.
|
||||
|
||||
---
|
||||
|
||||
## Creating Another Project
|
||||
|
||||
1. Copy `profiles/example/` to `profiles/<project>/`.
|
||||
2. Fill in `profiles/<project>/profile.md`.
|
||||
3. Set `AIW_PROJECT_PROFILE=<project>`.
|
||||
4. Configure any communication connector with `AIW_*` variables.
|
||||
5. Keep project-specific context under `ai/context/`, not under `core/`.
|
||||
6. Use `/workspace-context` to load the core plus active profile.
|
||||
|
||||
See `core/profiles/create-project-profile.md` for the full checklist.
|
||||
|
||||
@@ -6,6 +6,8 @@ Senior iOS engineer supporting Fidelity from a companion AI workspace.
|
||||
|
||||
This workspace is used to maintain context, organize communication, and draft accurate updates while the main implementation work happens on a different machine.
|
||||
|
||||
The reusable operating model lives in `core/`. Fidelity is the active project profile in `profiles/fidelity/`.
|
||||
|
||||
---
|
||||
|
||||
## Primary Responsibilities
|
||||
@@ -61,6 +63,8 @@ When drafting messages for a manager or stakeholder:
|
||||
## Context Maintenance
|
||||
|
||||
- Treat workspace files as persistent memory, not just reference notes
|
||||
- Treat `core/` as project-independent workspace logic and keep Fidelity-specific facts in profile/context files
|
||||
- Prefer generic `AIW_*` integration variables for new tooling while preserving `FIDELITY_*` fallbacks for compatibility
|
||||
- Before answering prompts about current work, verify `ai/state/current.md` and the latest relevant log in `ai/logs/`
|
||||
- Before answering architecture, process, or historical questions, check the relevant file under `ai/context/systems/`, `ai/context/workstreams/`, or `ai/context/process/`
|
||||
- Before answering Swift, SwiftUI, iOS architecture, testing, or debugging questions, check `ai/context/ios/` and use the project-local iOS skills when available
|
||||
|
||||
59
core/README.md
Normal file
59
core/README.md
Normal file
@@ -0,0 +1,59 @@
|
||||
# AI Workspace Core
|
||||
|
||||
Reusable operating layer for AI-assisted professional workspaces.
|
||||
|
||||
The core is project-independent. It defines how an AI agent should maintain file-based memory, ingest communication evidence, draft recurring updates, and adjust its own commands, prompts, and skills when reusable behavior changes.
|
||||
|
||||
---
|
||||
|
||||
## Core Responsibilities
|
||||
|
||||
- Maintain operational memory across sessions
|
||||
- Separate imported evidence from promoted memory
|
||||
- Provide reusable command and prompt patterns
|
||||
- Support project profiles without embedding project-specific facts in the core
|
||||
- Keep tooling behavior editable by the agent when the user corrects recurring output
|
||||
|
||||
---
|
||||
|
||||
## Project Profiles
|
||||
|
||||
Each real project should provide a profile under `profiles/<project>/`.
|
||||
|
||||
A profile declares:
|
||||
|
||||
- project name and audience
|
||||
- active communication sources
|
||||
- ticket/work-item system
|
||||
- manager or stakeholder mapping
|
||||
- domain-specific context files
|
||||
- enabled commands and skills
|
||||
|
||||
The core should never require a specific company, codebase, manager, channel name, ticket prefix, or programming stack.
|
||||
|
||||
---
|
||||
|
||||
## Memory Layers
|
||||
|
||||
- `daily`: facts from a specific workday
|
||||
- `state`: current active focus and near-term constraints
|
||||
- `work-items`: canonical memory for active units of work
|
||||
- `stable-context`: durable system, domain, process, or architecture knowledge
|
||||
- `people`: role, stakeholder, and collaboration memory
|
||||
- `decisions`: confirmed decisions with ongoing impact
|
||||
- `tooling-behavior`: reusable rules that change commands, prompts, skills, or agent behavior
|
||||
|
||||
See `core/memory/operational-memory.md` for the detailed rules.
|
||||
|
||||
---
|
||||
|
||||
## Integration Model
|
||||
|
||||
Integrations extract evidence. They do not decide what becomes memory.
|
||||
|
||||
- live communication connectors write recent evidence to `ai/inbox/`
|
||||
- historical archive connectors write selected evidence to `scripts/<source>/generated/`
|
||||
- the agent promotes only high-confidence, project-relevant facts into memory
|
||||
|
||||
See `core/integrations/communication-model.md` for the reusable connector contract.
|
||||
|
||||
83
core/integrations/communication-model.md
Normal file
83
core/integrations/communication-model.md
Normal file
@@ -0,0 +1,83 @@
|
||||
# Communication Integration Model
|
||||
|
||||
## Principle
|
||||
|
||||
Communication integrations extract evidence. The agent promotes memory.
|
||||
|
||||
Connectors should not decide that a message is durable project truth. They should fetch, normalize, and store evidence in predictable files so the agent can apply memory rules.
|
||||
|
||||
---
|
||||
|
||||
## Connector Types
|
||||
|
||||
### Live Communication Connector
|
||||
|
||||
Use for active systems such as Mattermost, Slack, Teams, or email.
|
||||
|
||||
Expected behavior:
|
||||
|
||||
- fetch recent messages from configured channels or conversations
|
||||
- support a forced refresh for "latest message" prompts
|
||||
- write the latest evidence to `ai/inbox/`
|
||||
- write status separately from project memory
|
||||
- fail safely without updating logs, state, or context
|
||||
|
||||
### Historical Archive Connector
|
||||
|
||||
Use for exports such as Slack archives.
|
||||
|
||||
Expected behavior:
|
||||
|
||||
- read raw archive files from an ignored archive location
|
||||
- select high-signal evidence without treating the archive as current truth
|
||||
- write generated summaries and JSONL to `scripts/<source>/generated/`
|
||||
- preserve enough source metadata for later review
|
||||
|
||||
---
|
||||
|
||||
## Standard Evidence Shape
|
||||
|
||||
Connectors should emit JSONL records with this minimum shape when practical:
|
||||
|
||||
```json
|
||||
{
|
||||
"source": "communication-system",
|
||||
"channel": "readable-channel-name",
|
||||
"timestamp": "ISO-8601 timestamp",
|
||||
"username": "display name or handle",
|
||||
"message": "message text",
|
||||
"thread_id": "optional thread id",
|
||||
"metadata": {}
|
||||
}
|
||||
```
|
||||
|
||||
Additional fields are allowed when useful, but the core should not depend on project-specific fields.
|
||||
|
||||
---
|
||||
|
||||
## Environment Variables
|
||||
|
||||
Prefer generic `AIW_*` variables for reusable workspaces:
|
||||
|
||||
- `AIW_PROJECT_PROFILE`
|
||||
- `AIW_CHANNEL_PREFIX`
|
||||
- `AIW_MATTERMOST_SYNC_CMD`
|
||||
- `AIW_MATTERMOST_SYNC_INTERVAL_MINUTES`
|
||||
- `AIW_SLACK_EXPORT_PATH`
|
||||
|
||||
Project-specific variables may remain as compatibility aliases, but new integrations should prefer `AIW_*`.
|
||||
|
||||
---
|
||||
|
||||
## Failure Rules
|
||||
|
||||
If a connector fails:
|
||||
|
||||
- record operational status only
|
||||
- do not update daily logs
|
||||
- do not update current state
|
||||
- do not update stable context
|
||||
- do not infer project facts from the failure
|
||||
|
||||
The agent may report the operational failure to the user, but it must not promote the failure as project memory unless the user explicitly asks to track tooling work.
|
||||
|
||||
138
core/memory/operational-memory.md
Normal file
138
core/memory/operational-memory.md
Normal file
@@ -0,0 +1,138 @@
|
||||
# Operational Memory
|
||||
|
||||
## Definition
|
||||
|
||||
Operational memory is a versionable file-based system where the agent decides whether each interaction introduces, corrects, or invalidates knowledge, then updates the smallest correct canonical file.
|
||||
|
||||
The goal is not transcript storage. The goal is a curated working memory that improves future reasoning, communication, and execution.
|
||||
|
||||
---
|
||||
|
||||
## Memory Classes
|
||||
|
||||
### `daily`
|
||||
|
||||
Use for same-day progress, findings, evolving reproduction notes, and work that may change soon.
|
||||
|
||||
Default path pattern:
|
||||
|
||||
```text
|
||||
ai/logs/YYYY-MM-DD.md
|
||||
```
|
||||
|
||||
### `state`
|
||||
|
||||
Use for current priorities, active blockers, near-term constraints, and communication needs that affect the next few days.
|
||||
|
||||
Default paths:
|
||||
|
||||
```text
|
||||
ai/state/current.md
|
||||
ai/state/work-items.md
|
||||
```
|
||||
|
||||
### `work-items`
|
||||
|
||||
Use for canonical memory about active tickets, tasks, stories, investigations, or other units of work.
|
||||
|
||||
Default path pattern:
|
||||
|
||||
```text
|
||||
ai/work-items/<id-or-slug>.md
|
||||
```
|
||||
|
||||
### `stable-context`
|
||||
|
||||
Use for durable project knowledge that should survive beyond the current work window.
|
||||
|
||||
Default path pattern:
|
||||
|
||||
```text
|
||||
ai/context/<domain>/*.md
|
||||
```
|
||||
|
||||
### `people`
|
||||
|
||||
Use for repeated collaborators, role mappings, manager/stakeholder context, and communication preferences.
|
||||
|
||||
Default path pattern:
|
||||
|
||||
```text
|
||||
ai/context/people/*.md
|
||||
```
|
||||
|
||||
### `decisions`
|
||||
|
||||
Use for confirmed decisions with ongoing impact.
|
||||
|
||||
Default path pattern:
|
||||
|
||||
```text
|
||||
ai/context/decisions/*.md
|
||||
```
|
||||
|
||||
### `tooling-behavior`
|
||||
|
||||
Use when a user correction changes how the workspace should behave in the future.
|
||||
|
||||
Default path patterns:
|
||||
|
||||
```text
|
||||
.opencode/commands/*.md
|
||||
.opencode/agents/*.md
|
||||
.opencode/skills/*/SKILL.md
|
||||
prompts/*.md
|
||||
knowledge/*.md
|
||||
ai/context/process/*.md
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Promotion Rules
|
||||
|
||||
Promote information when it is:
|
||||
|
||||
- explicit enough to preserve safely
|
||||
- relevant to the current project or workflow
|
||||
- likely to matter in a future session
|
||||
- useful for standups, status updates, debugging, planning, or decision making
|
||||
|
||||
Do not promote:
|
||||
|
||||
- tool failures
|
||||
- sync attempts
|
||||
- empty inbox states
|
||||
- generic chat noise
|
||||
- unverified guesses
|
||||
- duplicate paraphrases of existing memory
|
||||
|
||||
If confidence is mixed, prefer the daily log and preserve uncertainty.
|
||||
|
||||
---
|
||||
|
||||
## Correction Rules
|
||||
|
||||
When new information supersedes old memory:
|
||||
|
||||
- update the existing canonical file directly
|
||||
- do not leave stale and corrected versions side by side
|
||||
- preserve qualifiers when the fact remains partially confirmed
|
||||
- update indexes when adding new stable context files
|
||||
|
||||
The agent should behave like a senior engineer maintaining project notes, not like a transcript accumulator.
|
||||
|
||||
---
|
||||
|
||||
## Self-Maintenance Rules
|
||||
|
||||
When the user corrects recurring output or behavior, update the operational surface that controls that behavior.
|
||||
|
||||
Examples:
|
||||
|
||||
- standup format correction -> update `prompts/standup.md` and the standup command
|
||||
- communication freshness correction -> update the communication sync command/plugin
|
||||
- prompt-engineering correction -> update the AI prompt command or skill
|
||||
- memory routing correction -> update memory rules and context-maintenance guidance
|
||||
|
||||
The daily log may preserve evidence, but reusable behavior must live in the command, prompt, skill, agent, or knowledge file that enforces it.
|
||||
|
||||
88
core/profiles/create-project-profile.md
Normal file
88
core/profiles/create-project-profile.md
Normal file
@@ -0,0 +1,88 @@
|
||||
# Create A Project Profile
|
||||
|
||||
Use this checklist when adapting the workspace core for a new project.
|
||||
|
||||
---
|
||||
|
||||
## 1. Create The Profile
|
||||
|
||||
Create:
|
||||
|
||||
```text
|
||||
profiles/<project>/profile.md
|
||||
profiles/<project>/README.md
|
||||
```
|
||||
|
||||
The profile should declare:
|
||||
|
||||
- project name
|
||||
- workspace purpose
|
||||
- primary audience
|
||||
- communication sources
|
||||
- ticket/work-item system
|
||||
- manager or stakeholder mapping
|
||||
- active context files
|
||||
- enabled commands
|
||||
- enabled skills
|
||||
|
||||
---
|
||||
|
||||
## 2. Configure Context
|
||||
|
||||
Create or update:
|
||||
|
||||
```text
|
||||
ai/context/project.md
|
||||
ai/context/index.md
|
||||
ai/context/process/
|
||||
ai/context/people/
|
||||
ai/state/current.md
|
||||
ai/state/work-items.md
|
||||
ai/work-items/index.md
|
||||
```
|
||||
|
||||
Keep project-specific facts out of `core/`.
|
||||
|
||||
---
|
||||
|
||||
## 3. Configure Integrations
|
||||
|
||||
Use generic variables first:
|
||||
|
||||
```text
|
||||
AIW_PROJECT_PROFILE=<project>
|
||||
AIW_CHANNEL_PREFIX=<project-or-team-prefix>
|
||||
AIW_MATTERMOST_SYNC_CMD=<optional custom command>
|
||||
AIW_SLACK_EXPORT_PATH=<optional archive path>
|
||||
```
|
||||
|
||||
Connector secrets belong in ignored `.env` files, not in profile files.
|
||||
|
||||
---
|
||||
|
||||
## 4. Configure Commands And Skills
|
||||
|
||||
Start with generic commands:
|
||||
|
||||
- `/workspace-context`
|
||||
- `/communication-sync`
|
||||
- `/archive-import`
|
||||
- `/standup`
|
||||
- `/manager-update`
|
||||
- `/translate`
|
||||
- `/ai-prompt`
|
||||
|
||||
Add project-specific aliases only when they reduce friction.
|
||||
|
||||
---
|
||||
|
||||
## 5. Validate
|
||||
|
||||
Before using the workspace for real work:
|
||||
|
||||
- confirm `opencode.json` is valid JSON
|
||||
- confirm the profile has no secrets
|
||||
- run a communication sync with test channels or a dry sample
|
||||
- generate one standup from sample context
|
||||
- verify that imported evidence and promoted memory stay separate
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
|
||||
This repository is a support workspace, not the implementation repository.
|
||||
|
||||
It now has two layers:
|
||||
|
||||
- `core/` contains reusable project-independent operating rules
|
||||
- `profiles/<project>/` contains project-specific configuration and assumptions
|
||||
|
||||
---
|
||||
|
||||
## What belongs here
|
||||
@@ -14,6 +19,7 @@ This repository is a support workspace, not the implementation repository.
|
||||
- stable project knowledge
|
||||
- debugging summaries
|
||||
- reusable command, prompt, skill, and agent rules that make the workspace behave consistently
|
||||
- project profiles that configure the reusable core for a specific project
|
||||
|
||||
---
|
||||
|
||||
@@ -29,6 +35,8 @@ This repository is a support workspace, not the implementation repository.
|
||||
|
||||
When the user corrects a recurring behavior, the workspace should update the file that controls that behavior:
|
||||
|
||||
- `core/` for reusable project-independent behavior
|
||||
- `profiles/<project>/` for project-specific assumptions
|
||||
- `.opencode/commands/` for slash commands
|
||||
- `prompts/` for reusable drafting templates
|
||||
- `.opencode/agents/` and `ai/AGENTS.md` for default agent behavior
|
||||
|
||||
@@ -41,6 +41,11 @@
|
||||
},
|
||||
"instructions": [
|
||||
"./README.md",
|
||||
"./core/README.md",
|
||||
"./core/memory/operational-memory.md",
|
||||
"./core/integrations/communication-model.md",
|
||||
"./core/profiles/create-project-profile.md",
|
||||
"./profiles/fidelity/profile.md",
|
||||
"./ai/context/index.md",
|
||||
"./ai/context/project.md",
|
||||
"./ai/context/ios/index.md",
|
||||
|
||||
60
profiles/example/profile.md
Normal file
60
profiles/example/profile.md
Normal file
@@ -0,0 +1,60 @@
|
||||
# Example Project Profile
|
||||
|
||||
## Purpose
|
||||
|
||||
Non-sensitive example profile showing how a new project can reuse the workspace core without inheriting another project's context.
|
||||
|
||||
---
|
||||
|
||||
## Project
|
||||
|
||||
- Name: Example Project
|
||||
- Workspace role: companion AI workspace
|
||||
- Primary use: memory, status drafting, work-item tracking, and communication polishing
|
||||
|
||||
---
|
||||
|
||||
## Communication Sources
|
||||
|
||||
- Live communication: configure a connector if needed
|
||||
- Historical archive: optional
|
||||
- Recommended generic variables:
|
||||
- `AIW_PROJECT_PROFILE=example`
|
||||
- `AIW_CHANNEL_PREFIX=example`
|
||||
- `AIW_MATTERMOST_SYNC_CMD=<optional>`
|
||||
- `AIW_SLACK_EXPORT_PATH=<optional>`
|
||||
|
||||
---
|
||||
|
||||
## Work System
|
||||
|
||||
- Use `ai/work-items/` for active units of work
|
||||
- Use any ticket ID format relevant to the project
|
||||
- Keep approved titles or explicit task names visible for recurring updates
|
||||
|
||||
---
|
||||
|
||||
## Context
|
||||
|
||||
Project-specific durable context should live under `ai/context/`.
|
||||
|
||||
Do not place company secrets, raw exports, credentials, or private communication transcripts in the profile.
|
||||
|
||||
---
|
||||
|
||||
## Suggested Commands
|
||||
|
||||
- `/workspace-context`
|
||||
- `/communication-sync`
|
||||
- `/archive-import`
|
||||
- `/standup`
|
||||
- `/manager-update`
|
||||
- `/translate`
|
||||
- `/ai-prompt`
|
||||
|
||||
## Suggested Generic Skills
|
||||
|
||||
- `workspace-memory-curation`
|
||||
- `professional-communication`
|
||||
- `status-reporting`
|
||||
- `ai-prompt-engineering`
|
||||
121
profiles/fidelity/profile.md
Normal file
121
profiles/fidelity/profile.md
Normal file
@@ -0,0 +1,121 @@
|
||||
# Fidelity Profile
|
||||
|
||||
## Purpose
|
||||
|
||||
This is the first real project profile for the reusable AI workspace core.
|
||||
|
||||
It keeps Fidelity-specific context, integrations, commands, and skills separate from the project-independent operating model in `core/`.
|
||||
|
||||
---
|
||||
|
||||
## Project
|
||||
|
||||
- Name: Fidelity iOS ecosystem
|
||||
- Workspace role: companion AI workspace, not the product codebase
|
||||
- Main development happens on a different machine
|
||||
- Primary use: context memory, communication drafting, standups, Jira/story support, and AI-to-AI prompt generation
|
||||
|
||||
---
|
||||
|
||||
## Communication Sources
|
||||
|
||||
- Live communication: Mattermost
|
||||
- Historical archive: Slack export
|
||||
- Preferred channel naming: readable channel names instead of raw IDs
|
||||
- Current high-signal channel: `fidelity-preguntas`
|
||||
|
||||
Compatibility environment variables:
|
||||
|
||||
- `FIDELITY_MATTERMOST_SYNC_CMD`
|
||||
- `FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES`
|
||||
- `FIDELITY_SLACK_EXPORT_PATH`
|
||||
|
||||
Generic variables should be preferred for new setup:
|
||||
|
||||
- `AIW_MATTERMOST_SYNC_CMD`
|
||||
- `AIW_MATTERMOST_SYNC_INTERVAL_MINUTES`
|
||||
- `AIW_SLACK_EXPORT_PATH`
|
||||
- `AIW_CHANNEL_PREFIX=fidelity`
|
||||
- `AIW_PROJECT_PROFILE=fidelity`
|
||||
|
||||
---
|
||||
|
||||
## Work System
|
||||
|
||||
- Work items are Jira-linked when available
|
||||
- Active ticket memory lives in `ai/work-items/`
|
||||
- Compact active summary lives in `ai/state/work-items.md`
|
||||
- Jira IDs and approved titles should remain visible for standups and manager updates
|
||||
|
||||
---
|
||||
|
||||
## Stakeholders
|
||||
|
||||
- Current manager mapping lives in `ai/context/people/manager.md`
|
||||
- Person-specific collaboration context lives in `ai/context/people/`
|
||||
- Manager-facing messages should be concise, explicit, and natural professional US English
|
||||
|
||||
---
|
||||
|
||||
## Domain Context
|
||||
|
||||
Core Fidelity context remains in:
|
||||
|
||||
- `ai/context/project.md`
|
||||
- `ai/context/systems/`
|
||||
- `ai/context/workstreams/`
|
||||
- `ai/context/ios/`
|
||||
- `ai/context/process/`
|
||||
- `ai/context/decisions/`
|
||||
|
||||
Important domain themes:
|
||||
|
||||
- Fid4 consumer validation
|
||||
- XFlowSDK backend-driven UI
|
||||
- XFlowViewMaker adapter/release coupling
|
||||
- FTFrameworks feature modules
|
||||
- REST migration from GraphQL/Apollo
|
||||
- AO/Discourse external issue handling
|
||||
- authenticated vs non-authenticated reproduction
|
||||
|
||||
---
|
||||
|
||||
## Enabled Commands
|
||||
|
||||
Generic commands:
|
||||
|
||||
- `/workspace-context`
|
||||
- `/communication-sync`
|
||||
- `/archive-import`
|
||||
- `/ai-prompt`
|
||||
- `/standup`
|
||||
- `/manager-update`
|
||||
- `/translate`
|
||||
- `/sync-context`
|
||||
- `/log-note`
|
||||
|
||||
Compatibility aliases:
|
||||
|
||||
- `/fidelity-context`
|
||||
- `/mattermost-sync`
|
||||
- `/slack-import`
|
||||
- `/copilot-prompt`
|
||||
- `/swift-help`
|
||||
|
||||
---
|
||||
|
||||
## Enabled Skills
|
||||
|
||||
Generic:
|
||||
|
||||
- `workspace-memory-curation`
|
||||
- `professional-communication`
|
||||
- `status-reporting`
|
||||
- `ai-prompt-engineering`
|
||||
- `copilot-prompt-engineering`
|
||||
|
||||
Domain-specific:
|
||||
|
||||
- `ios-swift-answering`
|
||||
- `ios-testing-strategy`
|
||||
- `swiftui-xflow-review`
|
||||
@@ -29,12 +29,13 @@ 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_CMD`
|
||||
- `FIDELITY_MATTERMOST_SYNC_CMD`
|
||||
|
||||
Example:
|
||||
|
||||
```bash
|
||||
export FIDELITY_MATTERMOST_SYNC_CMD="/absolute/path/to/your-mattermost-sync-script"
|
||||
export AIW_MATTERMOST_SYNC_CMD="/absolute/path/to/your-mattermost-sync-script"
|
||||
```
|
||||
|
||||
Expected behavior:
|
||||
@@ -48,13 +49,14 @@ OpenCode can then use that output to refresh `ai/inbox/mattermost-latest.md` pro
|
||||
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 `fidelity*` channels and auto-tune message selection for very large exports.
|
||||
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.
|
||||
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
MATTERMOST_URL=https://tu-mattermost.example.com
|
||||
MATTERMOST_TOKEN=tu_personal_access_token
|
||||
CHANNELS=fidelity-preguntas
|
||||
AIW_PROJECT_PROFILE=fidelity
|
||||
AIW_CHANNEL_PREFIX=fidelity
|
||||
# Optional generic OpenCode overrides:
|
||||
# AIW_MATTERMOST_SYNC_CMD=bash scripts/mattermost/sync.sh
|
||||
# AIW_MATTERMOST_SYNC_INTERVAL_MINUTES=15
|
||||
# AIW_MANAGER_NAME=jeff
|
||||
# Optional only if the same channel name exists in multiple teams:
|
||||
# MATTERMOST_TEAM_NAME=fidelity
|
||||
# MATTERMOST_TEAM_ID=team_id_here
|
||||
# Legacy Fidelity-specific options still supported by workspace plugins:
|
||||
# FIDELITY_MATTERMOST_SYNC_CMD=bash scripts/mattermost/sync.sh
|
||||
# FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES=15
|
||||
# FIDELITY_MANAGER_NAME=jeff
|
||||
# Legacy options still supported:
|
||||
# CHANNEL_NAMES=fidelity-preguntas,otro-canal
|
||||
# CHANNEL_IDS=canal_id_1,canal_id_2
|
||||
|
||||
@@ -58,7 +58,16 @@ Manual run:
|
||||
bash scripts/mattermost/sync.sh
|
||||
```
|
||||
|
||||
OpenCode can use this script directly. If `FIDELITY_MATTERMOST_SYNC_CMD` is not set, the workspace plugins will fall back to this wrapper automatically.
|
||||
OpenCode can use this script directly. If `AIW_MATTERMOST_SYNC_CMD` is not set, the workspace plugins will fall back to `FIDELITY_MATTERMOST_SYNC_CMD`, then to this wrapper automatically.
|
||||
|
||||
Generic workspace variables are preferred for reusable projects:
|
||||
|
||||
- `AIW_PROJECT_PROFILE`
|
||||
- `AIW_CHANNEL_PREFIX`
|
||||
- `AIW_MATTERMOST_SYNC_CMD`
|
||||
- `AIW_MATTERMOST_SYNC_INTERVAL_MINUTES`
|
||||
|
||||
The older `FIDELITY_*` variables remain supported for this project profile.
|
||||
|
||||
Previous workday mode for standups:
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ Use old Slack history to recover durable project context, stakeholder relationsh
|
||||
- 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
|
||||
- for reusable project profiles, set `AIW_CHANNEL_PREFIX` so the importer can auto-detect project-specific channels without hardcoding a prefix
|
||||
|
||||
## Supported Export Shape
|
||||
|
||||
@@ -30,7 +31,7 @@ Manual example:
|
||||
```bash
|
||||
python3 scripts/slack/import_slack_export.py \
|
||||
--export-path /absolute/path/to/slack-export \
|
||||
--channel-prefix fidelity \
|
||||
--channel-prefix "${AIW_CHANNEL_PREFIX:-fidelity}" \
|
||||
--output-dir scripts/slack/generated
|
||||
```
|
||||
|
||||
@@ -46,6 +47,7 @@ Use the OpenCode command `/slack-import ...` for the guided workflow.
|
||||
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
|
||||
- uses `AIW_CHANNEL_PREFIX` when set; otherwise defaults to `fidelity` for compatibility with this workspace
|
||||
- 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
|
||||
@@ -69,4 +71,4 @@ If you want the workspace to find the export later without needing a custom path
|
||||
archives/slack/export/
|
||||
```
|
||||
|
||||
The `/slack-import` command will use that location automatically when no explicit path or environment variable is provided.
|
||||
The `/archive-import` and `/slack-import` commands will use that location automatically when no explicit path or environment variable is provided.
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
from collections import Counter
|
||||
@@ -99,7 +100,7 @@ def parse_args() -> argparse.Namespace:
|
||||
)
|
||||
parser.add_argument(
|
||||
"--channel-prefix",
|
||||
default="fidelity",
|
||||
default=os.getenv("AIW_CHANNEL_PREFIX", "fidelity"),
|
||||
help="Default channel prefix to auto-detect when --channels is omitted.",
|
||||
)
|
||||
parser.add_argument(
|
||||
|
||||
@@ -10,7 +10,7 @@ Keep this workspace aligned with work happening on another machine so AI output
|
||||
|
||||
1. Capture the main tasks worked on during the day.
|
||||
2. Record key debugging findings and open questions.
|
||||
3. Copy relevant Mattermost communication into the daily log as summarized notes.
|
||||
3. Sync or copy relevant communication evidence into the inbox or daily log as summarized notes.
|
||||
4. Update `ai/state/current.md` if priorities or concerns changed.
|
||||
5. Add any stable learning to `ai/context/` or `knowledge/`.
|
||||
5. Add any stable learning to `ai/context/` or `knowledge/`; if the learning changes reusable workspace behavior, update `core/`, commands, prompts, skills, or agent rules too.
|
||||
6. Before asking AI for a standup or manager update, confirm the log reflects the latest state.
|
||||
|
||||
@@ -10,15 +10,15 @@ Use OpenCode as the daily AI entry point for this workspace without losing proje
|
||||
|
||||
1. Open this repository as its own VS Code workspace.
|
||||
2. Run `opencode` from the integrated terminal at the repository root.
|
||||
3. Use the `fidelity` primary agent when available.
|
||||
3. Use the `fidelity` primary agent for this project profile, or the generic `workspace` agent for reusable profile work.
|
||||
4. Let project-level config load from `AGENTS.md`, `opencode.json`, `.opencode/commands/`, and `.opencode/plugins/`.
|
||||
|
||||
---
|
||||
|
||||
## Recommended Daily Sequence
|
||||
|
||||
1. Run `/fidelity-context` at the start of the day.
|
||||
2. If Mattermost sync is configured, let the inbox refresh automatically or run `/mattermost-sync`.
|
||||
1. Run `/workspace-context` at the start of the day, or `/fidelity-context` when you want the Fidelity alias.
|
||||
2. If live communication sync is configured, let the inbox refresh automatically or run `/communication-sync`.
|
||||
3. When new work happens on the main development machine, run `/sync-context ...` or `/log-note ...`.
|
||||
4. When you need a supervisor update, run `/manager-update ...`.
|
||||
5. When you need polished English for Mattermost, run `/translate ...`.
|
||||
@@ -30,9 +30,9 @@ Use OpenCode as the daily AI entry point for this workspace without losing proje
|
||||
|
||||
- Project instructions load automatically from `opencode.json`.
|
||||
- Root rules also load automatically from `AGENTS.md`.
|
||||
- The main context command reads the stable workspace files plus today's log.
|
||||
- The main context command reads the reusable `core/`, active profile, stable workspace files, and today's log.
|
||||
- Stable context is split by systems, workstreams, process, people, and decisions so the agent can pull the right layer instead of overloading one project file.
|
||||
- Mattermost context can be refreshed into `ai/inbox/` using your existing local sync script.
|
||||
- Live communication context can be refreshed into `ai/inbox/` using the configured connector.
|
||||
- Direct prompts are also treated as memory opportunities, so the agent can update workspace context during normal conversation.
|
||||
- Daily updates go back into the workspace, so later prompts inherit better context.
|
||||
- The local compaction plugin helps preserve the most important workspace context during long sessions.
|
||||
|
||||
Reference in New Issue
Block a user