feat: add comprehensive agent rules and workflows for memory curation, communication synchronization, and project documentation management

This commit is contained in:
2026-04-27 10:41:03 -06:00
parent de7f2b02f6
commit 0e6957d0b3
57 changed files with 1359 additions and 1316 deletions

View File

@@ -1,39 +0,0 @@
---
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
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@agent-memory/workflows/ai-to-ai-prompting.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 project-knowledge/02-work-items ]; then for f in project-knowledge/02-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.

View File

@@ -0,0 +1 @@
../../.agents/workflows/ai-prompt.md

View File

@@ -1,57 +0,0 @@
---
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
- Fidelity profile alias: `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`
- Fidelity 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
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@agent-memory/memory/context-maintenance.md
@project-knowledge/04-people/index.md
@project-knowledge/04-people/manager.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 `project-knowledge/04-people/*.md` 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
- write promoted memory to `project-knowledge/`
Return:
1. What was imported
2. Which files were updated
3. Which historical facts were promoted or intentionally left as archive-only context

View File

@@ -0,0 +1 @@
../../.agents/workflows/archive-import.md

View File

@@ -1,47 +0,0 @@
---
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`
- Fidelity profile alias: `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
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@agent-memory/memory/context-maintenance.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 `project-knowledge/06-daily/$(date +%F).md`
- update `project-knowledge/01-current/current-work.md` only for facts that materially change the active work window
- update `project-knowledge/02-work-items/*.md` for explicit work-item IDs, approved titles, points, scope, and status notes
- keep `project-knowledge/01-current/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

View File

@@ -0,0 +1 @@
../../.agents/workflows/communication-sync.md

View File

@@ -1,44 +0,0 @@
---
description: Generate a high-quality prompt for GitHub Copilot on the Fidelity development machine
---
Generate a prompt that the user can send to GitHub Copilot or another AI assistant on the Fidelity development machine.
Read:
@core/README.md
@core/memory/operational-memory.md
@prompts/copilot-prompt.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@agent-memory/workflows/ai-to-ai-prompting.md
@project-knowledge/03-context/ios/index.md
@project-knowledge/03-context/ios/project-swift-guidance.md
@project-knowledge/03-context/systems/index.md
@project-knowledge/03-context/workstreams/index.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 project-knowledge/02-work-items ]; then for f in project-knowledge/02-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` 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.
- Tell Copilot what to inspect before making assumptions.
- Include constraints, non-goals, expected output, and validation.
- If the user asks for implementation help but the write scope is unclear, generate an investigation/plan prompt rather than a code-change prompt.
- Do not mention this workspace unless explaining that the target AI will not have access to it.
Return only the final prompt unless the user explicitly asks for commentary.

View File

@@ -0,0 +1 @@
../../.agents/workflows/copilot-prompt.md

View File

@@ -1,66 +0,0 @@
---
description: Load Fidelity workspace context for the current session
---
Load and internalize the active context for this Fidelity workspace before answering any follow-up questions today.
Use these files as the baseline context:
@README.md
@core/README.md
@core/memory/operational-memory.md
@core/integrations/memory-vault-model.md
@core/integrations/communication-model.md
@profiles/fidelity/profile.md
@agent-memory/README.md
@agent-memory/behavior/learning-sessions.md
@agent-memory/behavior/self-maintenance.md
@agent-memory/memory/operational-memory.md
@agent-memory/integrations/memory-interface.md
@agent-memory/integrations/obsidian.md
@agent-memory/integrations/communication-sources.md
@project-knowledge/00-start/start-here.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/07-maps/current-work.md
@project-knowledge/07-maps/fidelity-domain.md
@project-knowledge/07-maps/work-items.md
@project-knowledge/07-maps/people.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/process/communication.md
@agent-memory/integrations/technical-verification.md
@agent-memory/workflows/ai-to-ai-prompting.md
@project-knowledge/03-context/process/jira-story-rules.md
@agent-memory/workflows/workspace-model.md
@agent-memory/behavior/agent-behavior.md
@agent-memory/memory/promotion-rules.md
@project-knowledge/04-people/manager.md
@project-knowledge/04-people/index.md
Today's date:
!`date +%F`
Today's canonical daily note, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Recent daily notes available:
!`if [ -d project-knowledge/06-daily ]; then ls -1 project-knowledge/06-daily 2>/dev/null | sort | tail -n 5; else echo "No daily notes directory available."; fi`
Detailed active work item files, if available:
!`if [ -d project-knowledge/02-work-items ]; then for f in project-knowledge/02-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 Mattermost context, 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 Mattermost 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.

View File

@@ -0,0 +1 @@
../../.agents/workflows/fidelity-context.md

View File

@@ -1,45 +0,0 @@
# OpenCode Commands Index
Slash commands available in this workspace.
---
## Generic Commands
- [Workspace Context](workspace-context.md)
- [Memory Health](memory-health.md)
- [Memory Create](memory-create.md)
- [Communication Sync](communication-sync.md)
- [Archive Import](archive-import.md)
- [AI Prompt](ai-prompt.md)
- [Sync Context](sync-context.md)
- [Log Note](log-note.md)
- [Promote Project Context](promote-project-context.md)
- [Latest Message](latest-message.md)
---
## Communication Commands
- [Standup](standup.md)
- [Manager Update](manager-update.md)
- [Translate](translate.md)
- [Story Draft](story-draft.md)
---
## Fidelity Compatibility Aliases
- [Fidelity Context](fidelity-context.md)
- [Mattermost Sync](mattermost-sync.md)
- [Slack Import](slack-import.md)
- [Copilot Prompt](copilot-prompt.md)
- [Swift Help](swift-help.md)
---
## Related
- [Tooling Map](../../agent-memory/maps/tooling.md)
- [Prompts Index](../../prompts/index.md)
- [Skills Index](../skills/index.md)

1
.opencode/commands/index.md Symbolic link
View File

@@ -0,0 +1 @@
../../.agents/workflows/index.md

View File

@@ -1,40 +0,0 @@
---
description: Force-sync Mattermost and answer from the latest matching message
---
Force-refresh Mattermost first, then answer the user's question from the refreshed inbox.
Use this when the user asks for:
- the latest or last message
- what Jeff or another person just said
- the latest Mattermost update
- the latest message in `fidelity-preguntas`
Run sync:
!`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:
!`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 Mattermost context available after sync."; fi`
User request:
$ARGUMENTS
Instructions:
- Do not answer from old conversation memory.
- Use only the refreshed Mattermost output above.
- 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, writing to `project-knowledge/` first.
- If sync fails or no refreshed context is available, say that directly and do not infer from stale context.
Return:
1. Latest matching message
2. Why it matters
3. Any memory update made

View File

@@ -0,0 +1 @@
../../.agents/workflows/latest-message.md

View File

@@ -1,42 +0,0 @@
---
description: Update today's log from rough notes or contextual notes
---
Use this command for quick same-day note capture.
Read:
@README.md
@core/README.md
@core/memory/operational-memory.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/workstreams/index.md
@agent-memory/memory/context-maintenance.md
Today's existing log, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Incorporate these new rough notes into today's log:
$ARGUMENTS
Instructions:
- use `workspace-memory-curation` when available
- Update or create `project-knowledge/06-daily/$(date +%F).md`
- Maintain daily-note frontmatter for Obsidian Bases: `date`, `focus`, `work-items`, `blockers`, and `updated`
- Preserve concrete technical meaning
- Capture both technical findings and communication context when relevant
- Keep the log concise but reusable for later standups and manager updates
- If the notes are ambiguous, normalize them without inventing facts
- If a note clearly corrects or sharpens existing current memory, update the corresponding canonical file as well
- If a note reveals durable system, workstream, process, or people context, update the relevant canonical file instead of only appending to the log
- Prefer `sync-context` for broader memory updates; use this command for fast daily capture
After editing, respond with:
1. What was added or clarified
2. Whether any broader memory was also updated

View File

@@ -0,0 +1 @@
../../.agents/workflows/log-note.md

View File

@@ -1,53 +0,0 @@
---
description: Draft or polish a Mattermost update for the current manager or stakeholder
---
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
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/03-context/process/communication.md
@project-knowledge/04-people/manager.md
@project-knowledge/04-people/index.md
Today's log, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest Mattermost context, 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 Mattermost context available."; fi`
Detailed active work item files, if available:
!`if [ -d project-knowledge/02-work-items ]; then for f in project-knowledge/02-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 draft or rough notes:
$ARGUMENTS
Requirements:
- Use Context, Observation, Action
- Clarify scope
- Preserve technical meaning
- Rewrite fully when needed so the result sounds like a fluent senior engineer wrote it
- Separate the current issue from unrelated bugs, workarounds, and follow-up work unless the user clearly wants them combined
- Prefer evidence-backed wording over intuition when context includes concrete findings
- Make ownership explicit when relevant: XFlow vs consumer app vs service/configuration vs another framework
- Mention auth state when relevant
- Mention Jira IDs and approved titles when they materially improve clarity
- Do not label something a regression unless the context supports it
- Keep the result short enough for Mattermost
Return:
1. Final message
2. One-line note with any assumption you had to make

View File

@@ -0,0 +1 @@
../../.agents/workflows/manager-update.md

View File

@@ -1,38 +0,0 @@
---
description: Sync Mattermost context and automatically promote high-confidence project memory
---
Use the configured Mattermost sync command to fetch fresh communication context and maintain workspace memory automatically.
Preferred command sources:
- `AIW_MATTERMOST_SYNC_CMD`
- Fidelity profile alias: `FIDELITY_MATTERMOST_SYNC_CMD`
- fallback: `bash scripts/mattermost/sync.sh`
Run the command and use its output as fresh communication context:
!`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.
Then:
- if the command fails, stop there and do not edit any workspace files
- 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 `agent-memory/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 `project-knowledge/06-daily/$(date +%F).md`
- update `project-knowledge/01-current/current-work.md` only for facts that materially change the current work window
- update `project-knowledge/02-work-items/*.md` for explicit Jira IDs, approved titles, points, scope, and status notes
- keep `project-knowledge/01-current/work-items.md` aligned as the compact summary of active ticket files
- do not write tooling noise, sync status, or generic chat chatter into project memory
- if a fact is ambiguous, skip it rather than asking the user what to do
Return:
1. What was synchronized
2. Which files were updated
3. Which facts were promoted or intentionally skipped

View File

@@ -0,0 +1 @@
../../.agents/workflows/mattermost-sync.md

View File

@@ -1,43 +0,0 @@
---
description: Create a canonical memory note using the project-agnostic memory interface
---
Create a new canonical memory note from a known type.
Supported types:
- `daily`
- `work-item`
- `person`
- `decision`
- `system`
- `workstream`
- `meeting-note`
User request:
$ARGUMENTS
Read:
@core/integrations/memory-vault-model.md
@agent-memory/workflows/workspace-architecture.md
@project-knowledge/09-templates/work-item.md
@project-knowledge/09-templates/person.md
@project-knowledge/09-templates/decision.md
@project-knowledge/09-templates/system.md
@project-knowledge/09-templates/workstream.md
Instructions:
- Parse the requested type, slug, and title from `$ARGUMENTS`.
- Use `bash scripts/memory/memory.sh create <type> <slug> [title]` when type and slug are clear.
- If type or slug is not clear, do not guess. Explain the expected format.
- After creation, inspect the generated file and update metadata/content if the user provided enough context.
- Keep the note in the canonical folder selected by the memory interface.
Return:
1. Created file
2. Any metadata/content refined
3. Any missing details the user may want to add

View File

@@ -0,0 +1 @@
../../.agents/workflows/memory-create.md

View File

@@ -1,27 +0,0 @@
---
description: Check canonical memory health and Obsidian adapter status
---
Run a lightweight health check for canonical project knowledge.
Read:
@core/integrations/memory-vault-model.md
@core/integrations/obsidian-model.md
@agent-memory/workflows/workspace-architecture.md
Run:
!`bash scripts/memory/memory.sh health`
Structured views:
!`for base in work-items people decisions daily systems workstreams; do echo "\n## $base"; bash scripts/memory/memory.sh base-query "$base" paths 2>/dev/null || bash scripts/memory/memory.sh base-query "$base" 2>/dev/null || true; done`
Respond with:
1. Health status
2. Any issues that should be fixed now
3. Any optional Obsidian-only improvements
Do not modify project memory unless the user explicitly asks for cleanup.

View File

@@ -0,0 +1 @@
../../.agents/workflows/memory-health.md

View File

@@ -1,64 +0,0 @@
---
description: Manually promote confirmed project facts into Fidelity workspace memory
---
Use this only when you want an explicit manual promotion pass.
Read:
@core/README.md
@core/memory/operational-memory.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/systems/index.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/03-context/workstreams/flow-page-references.md
@project-knowledge/03-context/process/index.md
Today's log, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Current Mattermost inbox, if present:
!`if [ -f ai/inbox/mattermost-latest.md ]; then cat ai/inbox/mattermost-latest.md; else echo "No Mattermost inbox file is available."; fi`
Generated Mattermost context, if present:
!`if [ -s scripts/mattermost/generated/mattermost_context.jsonl ]; then cat scripts/mattermost/generated/mattermost_context.jsonl; else echo "No generated Mattermost context is available."; fi`
User direction or facts to promote:
$ARGUMENTS
Instructions:
- Promote only confirmed project-relevant facts
- Ignore tooling noise and sync status
- Update the smallest correct set of files among:
- `project-knowledge/06-daily/$(date +%F).md`
- `project-knowledge/01-current/current-work.md`
- `project-knowledge/02-work-items/*.md`
- `project-knowledge/01-current/work-items.md`
- `project-knowledge/03-context/project.md`
- `project-knowledge/03-context/systems/*.md`
- `project-knowledge/03-context/workstreams/*.md`
- `project-knowledge/03-context/process/*.md`
- `project-knowledge/05-decisions/*.md`
- `.opencode/commands/*.md` when command behavior needs to change
- `prompts/*.md` when a reusable output template needs to change
- `.opencode/agents/*.md` or `AGENTS.md` when default agent behavior needs to change
- `.opencode/skills/*/SKILL.md` when a specialized workflow needs to change
- `project-knowledge/00-start/*.md` when durable project onboarding guidance needs to change
- `agent-memory/**/*.md` when agent learning, promotion, verification, or self-maintenance behavior needs to change
- Prefer concrete project updates over broad summaries
- If a fact is still ambiguous, do not promote it
- If the promoted fact is a reusable behavior correction, do not leave it only in a daily log; update the operational file that controls future behavior
- Use this command when you want a deliberate manual pass beyond the agent's default automatic memory maintenance
Return:
1. Updated files
2. Promoted project facts
3. Remaining uncertainty

View File

@@ -0,0 +1 @@
../../.agents/workflows/promote-project-context.md

View File

@@ -1,79 +0,0 @@
---
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 `AIW_SLACK_EXPORT_PATH` when available
- Fidelity profile alias: `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`
- Fidelity 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:
!`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:
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/systems/index.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/03-context/process/index.md
@project-knowledge/04-people/index.md
@project-knowledge/04-people/manager.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, 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
- 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
- create or update `project-knowledge/04-people/*.md` when the archive shows a human repeatedly contributing across channels, years, or high-signal technical/process discussions
- store people conservatively:
- exact role only when explicitly supported by the archive
- otherwise store collaboration pattern, communication style, and project relationship
- actively look for:
- Jira IDs plus explicit titles, sizing, and scope changes
- repeated architecture themes around XFlow, SwiftUI, REST, GraphQL, auth, and entry-point behavior
- ownership or responsibility boundaries between framework and consuming app teams
- recurring pipeline or dependency failures that shaped project work
- named people who repeatedly drive approvals, technical framing, or debugging direction
- prioritize high-signal messages such as Jira references, approvals, scope changes, root-cause notes, points, and persistent technical constraints
- favor messages that help reconstruct project history across multiple years, not just the newest ones
- 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
- write promoted memory to `project-knowledge/`
Return:
1. What was imported
2. Which files were updated
3. Which historical facts were promoted or intentionally left as archive-only context

View File

@@ -0,0 +1 @@
../../.agents/workflows/slack-import.md

View File

@@ -1,117 +0,0 @@
---
description: Draft a standup from the latest Fidelity workspace context
---
Generate a standup update using the latest workspace state.
First, refresh Mattermost context before drafting:
!`python3 - <<'PY'
import os
import subprocess
from pathlib import Path
cmd = os.environ.get("AIW_MATTERMOST_SYNC_CMD") or os.environ.get("FIDELITY_MATTERMOST_SYNC_CMD")
if cmd:
result = subprocess.run(["bash", "-lc", cmd], capture_output=True, text=True)
elif Path("scripts/mattermost/sync.sh").is_file():
result = subprocess.run(["bash", "scripts/mattermost/sync.sh"], capture_output=True, text=True)
else:
print("No Mattermost sync command configured.")
raise SystemExit(0)
if result.returncode != 0:
print("__MATTERMOST_SYNC_FAILED__")
if result.stdout:
print(result.stdout.strip())
if result.stderr:
print(result.stderr.strip())
else:
if result.stdout.strip():
print(result.stdout.strip())
PY`
Read:
@prompts/standup.md
@project-knowledge/00-start/start-here.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/03-context/workstreams/flow-page-references.md
@project-knowledge/03-context/process/communication.md
@project-knowledge/03-context/process/jira-story-rules.md
@project-knowledge/04-people/manager.md
Previous workday Mattermost context, if present:
!`bash scripts/mattermost/sync.sh --previous-workday --today "$(date +%F)"`
Today's log, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest Mattermost context, preferring inbox and falling back to generated JSONL:
!`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 Mattermost context available."; fi`
Detailed active work item files, if available:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("project-knowledge/01-current/work-items.md")
if not summary.is_file():
print("No work item files available.")
raise SystemExit(0)
text = summary.read_text()
paths = re.findall(r"Detail: `(project-knowledge/02-work-items/[^`]+)`", text)
if not paths:
print("No work item files available.")
raise SystemExit(0)
for rel in paths:
path = Path(rel)
if not path.is_file():
continue
print(f"\n### {rel}")
print(path.read_text())
PY`
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
- mention Jira IDs and approved titles when they map cleanly to previous-work context
- prioritize story-based updates over side questions, memory refreshes, or manager-only context
- if documentation or root cause updates directly support a story, roll them into that story's update instead of listing them separately
- exclude items that are not directly tied to a story unless they are true blockers
- when one Jira item has multiple concrete updates, group them under one top-level `JIRA-ID - Title` bullet with indented markdown sub-bullets instead of repeating the same Jira line
- use `project-knowledge/03-context/workstreams/flow-page-references.md` to preserve real flow/page identifiers when shorthand appears in logs or messages
- for standups that will also be sent to Teams, prefer plain language over internal implementation jargon; avoid unexplained terms like `fallback`
- if work is in release-process waiting state, show the parallel story work explicitly instead of implying idle waiting
- if Mattermost sync failed, acknowledge that internally and rely on the latest saved workspace context instead of inventing fresher communication
- prefer only the detailed work-item files referenced by `project-knowledge/01-current/work-items.md`; do not mine unrelated or completed ticket files unless they are explicitly active in current memory
Return a standup that is:
- specific
- concise
- grounded in the latest context
- safe to send without overstating certainty
- written in natural US English that can be sent externally without rewriting
- written as David's progress report
- free of any mention of Mattermost, since it is internal-only communication
- starts with exactly `Hi @jeff, heres my daily scrum update:` for the active Fidelity profile
- does not mention Jeff again after the greeting unless explicitly needed
- uses bullet points for each item
- groups multiple updates for the same Jira item as indented sub-bullets
- uses `JIRA-ID - Title` or `JIRA-ID Title` formatting instead of comma-separated ID/title formatting
- preserves chronological order within each Jira item's sub-bullets
- omits future-sprint stories from `Today` unless they are real blockers
- is ready to copy/paste into Mattermost as Markdown

View File

@@ -0,0 +1 @@
../../.agents/workflows/standup.md

View File

@@ -1,67 +0,0 @@
---
description: Draft a Jira story proposal with Fidelity-ready context and acceptance criteria
---
Draft a future Jira story from rough notes, findings, or follow-up ideas.
This command should optimize for:
- professional story wording
- explicit scope
- useful acceptance criteria
- clear ownership framing
- natural US English that the current manager or stakeholder can reuse or forward without rewriting
Input notes or rough idea:
$ARGUMENTS
Read:
@core/README.md
@core/memory/operational-memory.md
@prompts/story-draft.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/03-context/process/communication.md
@project-knowledge/03-context/process/jira-story-rules.md
@project-knowledge/04-people/manager.md
@project-knowledge/04-people/index.md
Today's log, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest Mattermost context, 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 Mattermost context available."; fi`
Detailed active work item files, if available:
!`if [ -d project-knowledge/02-work-items ]; then for f in project-knowledge/02-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`
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
- Keep the title short, concrete, and Jira-ready
- Make the description specific enough that another engineer can understand the intended work
- Separate current problem, root-cause suspicion, workaround, and follow-up work when relevant
- Do not overstate certainty; if something is still a hypothesis, label it clearly
- Make ownership explicit when helpful: XFlow vs consumer app vs service/configuration vs other framework
- Acceptance criteria should be testable and scoped to the proposed story
- If the story looks too large or too ambiguous, say so explicitly and suggest spike framing instead
- If useful, include a short note about dependencies, blockers, or coordination needed
- If the story touches consumer validation or release propagation, reflect that explicitly in the description or notes
Return:
1. Suggested story type
2. Jira-ready title
3. Description
4. Acceptance criteria
5. Optional notes on dependencies / blockers / sizing concerns

View File

@@ -0,0 +1 @@
../../.agents/workflows/story-draft.md

View File

@@ -1,35 +0,0 @@
---
description: Answer Swift or iOS programming questions with Fidelity/XFlow context
---
Answer the user's Swift/iOS programming question using current iOS practices and this workspace's Fidelity context.
Read:
@project-knowledge/03-context/ios/index.md
@project-knowledge/03-context/ios/current-practices.md
@project-knowledge/03-context/ios/project-swift-guidance.md
@agent-memory/integrations/technical-verification.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/systems/index.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/01-current/work-items.md
User question:
$ARGUMENTS
Instructions:
- Use the `ios-swift-answering` skill if available.
- Use `swiftui-xflow-review` if the question touches SwiftUI, XFlow, UIKit bridge removal, modal presentation, lifecycle, or backend-driven UI.
- Use `ios-testing-strategy` if the question touches tests or validation.
- If current Apple API, Swift, CocoaPods, SPM, Xcode, CI/build, or testing behavior matters, verify against official/primary documentation before making strong claims.
- Contextualize the answer to Fidelity only when it materially changes the recommendation.
- Separate current best practice from project-safe recommendation when they differ.
Return:
1. Recommendation
2. Project-specific caveats
3. Validation or follow-up checks

View File

@@ -0,0 +1 @@
../../.agents/workflows/swift-help.md

View File

@@ -1,66 +0,0 @@
---
description: Update workspace memory from new facts, corrections, or contextual notes
---
Use this command when new information should become part of the persistent workspace context.
Read:
@README.md
@project-knowledge/00-start/start-here.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/systems/index.md
@project-knowledge/03-context/workstreams/index.md
@project-knowledge/03-context/workstreams/flow-page-references.md
@agent-memory/memory/context-maintenance.md
@project-knowledge/04-people/manager.md
@project-knowledge/04-people/index.md
Today's existing log, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
New information to incorporate:
$ARGUMENTS
Instructions:
- use `workspace-memory-curation` when available
- Treat direct user corrections and learning-session updates as memory sources.
- For learning-session updates, prefer durable project understanding over transient ticket status.
- Route durable learning to architecture/process/system/workstream notes; route only truly current operational state to `project-knowledge/01-current/` or `project-knowledge/06-daily/`.
- If the new information corrects the agent's uncertainty handling or recurring behavior, update the command, prompt, agent, skill, or process rule that controls that behavior.
- Decide whether the new information belongs in:
- today's daily note: `project-knowledge/06-daily/$(date +%F).md`
- current work: `project-knowledge/01-current/current-work.md`
- work items: `project-knowledge/02-work-items/*.md`
- active work summary: `project-knowledge/01-current/work-items.md`
- project overview: `project-knowledge/03-context/project.md`
- systems: `project-knowledge/03-context/systems/`
- workstreams: `project-knowledge/03-context/workstreams/`
- process: `project-knowledge/03-context/process/`
- manager mapping: `project-knowledge/04-people/manager.md`
- people roster: `project-knowledge/04-people/index.md`
- people notes: `project-knowledge/04-people/*.md`
- decisions: `project-knowledge/05-decisions/`
- `.opencode/commands/*.md`
- `prompts/*.md`
- `.opencode/agents/*.md`
- `.opencode/skills/*/SKILL.md`
- Update the appropriate files directly
- When updating a canonical project note, maintain frontmatter properties used by Obsidian Bases, including `updated`, `systems`, `workstreams`, `people`, `related`, `focus`, `work-items`, and `blockers` when applicable
- If an existing statement became stale, replace or refine it
- If the new information changes how this workspace should behave, update the linked command, prompt, agent, skill, or knowledge file that enforces that behavior
- Do not invent missing facts
- Keep uncertain information in the daily log instead of promoting it to stable context
- Do not ask for promotion confirmation when the correct destination is already clear
- Prefer correcting canonical memory over appending duplicate summaries
After editing, respond with:
1. Updated files
2. What changed in the persistent context
3. Any uncertainty that remains

View File

@@ -0,0 +1 @@
../../.agents/workflows/sync-context.md

View File

@@ -1,31 +0,0 @@
---
description: Rewrite rough engineering notes into natural Mattermost-ready US English
---
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.
If the notes mix multiple issues, separate the main issue from unrelated bugs or follow-up work unless the user clearly wants them combined.
$ARGUMENTS
Read:
@prompts/mattermost-translation.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/process/communication.md
@project-knowledge/04-people/manager.md
@project-knowledge/04-people/index.md
If relevant, use today's log for context:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Return:
1. Clean message
2. Short assumptions note

View File

@@ -0,0 +1 @@
../../.agents/workflows/translate.md

View File

@@ -1,73 +0,0 @@
---
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/memory-vault-model.md
@core/integrations/communication-model.md
@core/profiles/create-project-profile.md
@agent-memory/README.md
@agent-memory/behavior/learning-sessions.md
@agent-memory/behavior/self-maintenance.md
@agent-memory/memory/operational-memory.md
@agent-memory/integrations/memory-interface.md
@agent-memory/integrations/obsidian.md
@agent-memory/integrations/communication-sources.md
Read active workspace memory:
@README.md
@project-knowledge/00-start/start-here.md
@project-knowledge/00-start/onboarding.md
@project-knowledge/01-current/current-work.md
@project-knowledge/01-current/work-items.md
@project-knowledge/07-maps/current-work.md
@project-knowledge/07-maps/fidelity-domain.md
@project-knowledge/07-maps/work-items.md
@project-knowledge/07-maps/people.md
@project-knowledge/03-context/project.md
@project-knowledge/03-context/process/communication.md
@agent-memory/integrations/technical-verification.md
@agent-memory/memory/context-maintenance.md
@agent-memory/workflows/workspace-model.md
@agent-memory/behavior/agent-behavior.md
@agent-memory/memory/promotion-rules.md
@project-knowledge/04-people/manager.md
@project-knowledge/04-people/index.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 canonical daily note, if present:
!`if [ -f project-knowledge/06-daily/$(date +%F).md ]; then cat project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Recent daily notes available:
!`if [ -d project-knowledge/06-daily ]; then ls -1 project-knowledge/06-daily 2>/dev/null | sort | tail -n 5; else echo "No daily notes directory available."; fi`
Detailed active work item files, if available:
!`if [ -d project-knowledge/02-work-items ]; then for f in project-knowledge/02-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.

View File

@@ -0,0 +1 @@
../../.agents/workflows/workspace-context.md