Compare commits

..

80 Commits

Author SHA1 Message Date
0980e6695a docs: complete accountlink UIKit validation, add daily log, and document force-path testing guide 2026-05-22 16:29:45 -06:00
abab9bb9b6 chore: decommission repository and document migration to new runtime structure 2026-05-22 15:24:12 -06:00
60868b9c96 docs: add initial project architecture, concepts, and quick-start documentation 2026-05-22 09:26:53 -06:00
7594e8ebc9 docs: add AI workspace improvements document and link it in the getting started guide 2026-05-22 07:48:05 -06:00
d01ee1ac1a chore: transition work items to in-review, update validation logs, and document AI workspace improvements 2026-05-22 07:48:01 -06:00
cc716f8f7e feat: implement dynamic profile discovery and improve UI responsiveness for service management 2026-05-21 14:49:52 -06:00
e03518e507 fix: update profile paths in documentation and scripts for consistency and clarity 2026-05-21 14:17:15 -06:00
ad230e1abe Refactor Mattermost and Slack integration workflows to remove legacy Fidelity variables, streamline command execution, and enhance documentation for project profiles. Update scripts and README files to reflect changes in directory structure and configuration precedence, ensuring a consistent approach to project knowledge management across profiles. Improve error handling and validation in profile creation and doctor commands, and enhance test coverage for profile-related functionalities. 2026-05-21 14:13:21 -06:00
1ad707373a Add daily logs and templates for project fidelity
- Created daily log entries for May 13, 14, 18, 19, 20, and 21, capturing work done, findings, and next steps.
- Established a daily logs index for easy navigation of daily notes.
- Developed templates for daily logs, decisions, meeting notes, people, systems, and work items to standardize documentation.
- Introduced base files for filtering and displaying various types of project knowledge, including daily notes, decisions, people, systems, work items, and workstreams.
- Added maps for current work, fidelity apps, and fidelity domain to enhance project navigation and context.
2026-05-21 12:28:07 -06:00
7cbb49134a feat: update profile path resolution and enhance scripts for improved project adaptability 2026-05-21 10:43:44 -06:00
f0d3cd4ce9 feat: enhance profile path resolution and add example profiles for better project adaptability 2026-05-21 10:21:52 -06:00
fb8a6ba2d9 feat: add comprehensive documentation for AI Workspace, including architecture, memory model, profiles, services, and security guidelines 2026-05-21 09:32:09 -06:00
e0069fd8c6 feat: implement local indexer for project-knowledge and add memory hybrid search functionality 2026-05-21 09:13:07 -06:00
fc2abda588 feat: update validation notes and open draft PRs for PDIAP-12284 and PDIAP-15836 2026-05-21 08:39:33 -06:00
7da22da168 feat: add DMG build script and enhance README with installation instructions and Start at Login feature 2026-05-20 16:41:18 -06:00
b7ce929c50 feat: add one-step installer script and enhance README with installation instructions 2026-05-20 16:24:47 -06:00
4000747641 feat: enhance AI Workspace Menu Bar App with packaging scripts, login management, and service status improvements 2026-05-20 16:11:45 -06:00
ab36e4b465 feat: add initial implementation of AI Workspace macOS Menu Bar App with service management functionality 2026-05-20 15:52:58 -06:00
8c58210c0c feat: enhance service status reporting with JSON output and add related tests 2026-05-20 15:29:21 -06:00
b21889c4ab feat: add AI Workspace Menu Bar App design and enhance MCP server with resource definitions and read functionality 2026-05-20 15:22:37 -06:00
cfd61bdee3 feat: add AI Workspace context MCP configuration and enhance communication channel filtering in server 2026-05-20 15:16:41 -06:00
d3e909d39e feat: implement AI Workspace context MCP server with read-only access and add related tests 2026-05-20 14:57:54 -06:00
9f8d3b975f feat: enhance service manager with manifest validation, logging rotation, and command existence checks 2026-05-20 14:51:09 -06:00
1121433db8 feat: implement AI Workspace service manager with lifecycle control for local services 2026-05-20 14:43:52 -06:00
eb11bb9442 feat: update Mattermost integration documentation with MCP support guidelines and focused reader mode instructions 2026-05-20 14:30:43 -06:00
fdbf52f811 feat: update validation notes and add daily summary for ongoing PDIAP-12284 and PDIAP-15836 work 2026-05-20 08:03:33 -06:00
ee35f70c3e feat: enhance Mattermost integration with focused context for standups and improved channel filtering 2026-05-20 07:47:19 -06:00
3d4da1919a feat: update Mattermost integration to prefer local proxy mirror evidence and enhance context retrieval methods 2026-05-20 07:11:06 -06:00
e081360a84 feat: enhance Mattermost mirror with direct-message and group DM labeling for improved clarity 2026-05-19 16:35:24 -06:00
d318701899 feat: enhance Mattermost mirror structure with channels, by-date, and thread directories for improved organization and analysis 2026-05-19 16:32:05 -06:00
3816487bec feat: update Mattermost proxy configuration and documentation for improved clarity and default behavior 2026-05-19 16:15:48 -06:00
b886c61afd feat: enhance Mattermost proxy with improved post ID deduplication and file tracking 2026-05-19 16:03:16 -06:00
9dd731f758 feat: implement Mattermost proxy mirror with configuration and scripts for capturing traffic 2026-05-19 15:57:09 -06:00
73166b585f feat: add tooling and documentation for archiving Discourse content via Charles Proxy .chlsx sessions. 2026-05-19 14:28:45 -06:00
f726814811 feat: reorganize IA improvements documentation for clarity and structure 2026-05-18 07:39:16 -06:00
8950cfcdf0 feat: update iPhone photo inbox scripts with environment file support and refactor batch handling 2026-05-15 08:43:19 -06:00
456a4c3381 feat: add clipboard file handling for Mattermost and implement batch debounce functionality 2026-05-15 07:54:01 -06:00
7fc4320f46 feat: expand validation scope for PDIAP-12284 and PDIAP-15836, including broader entry and dismissal testing in both UIKit and SwiftUI modes 2026-05-14 16:13:48 -06:00
5949820347 feat: update daily logs and work items with May 14 entries, including validation progress for PDIAP-12284 and PDIAP-15836 2026-05-14 15:47:43 -06:00
286adf2d6c feat: update Mattermost rendering guidelines for standups and enhance daily logs with recent validation details 2026-05-13 07:44:30 -06:00
bc467c8a8c feat: update implementation details for PDIAP-12284 and PDIAP-15836, including host-mode API changes and dependency alignment 2026-05-12 08:00:14 -06:00
12f3e74d39 docs: update standup prompt with Mattermost rendering notes for section headers 2026-05-12 07:27:22 -06:00
767f97f3bb chore: update work items and daily logs with May 12 entries, including REST backend deployment and validation meeting details 2026-05-12 07:24:04 -06:00
b5c3ada57d feat: enhance iPhone photo inbox receiver with profile management and clipboard options 2026-05-11 12:06:35 -06:00
97ef0be216 feat: enhance iPhone photo inbox receiver with notification, reveal, and clipboard copy options 2026-05-11 11:27:42 -06:00
e01b59c065 feat: implement iPhone photo inbox receiver for JPEG uploads and add README documentation 2026-05-11 10:08:04 -06:00
1c7e18d7c1 chore: update work item statuses and daily logs for May 11, 2026, including new daily log entry and adjustments to dismissal sequencing validation 2026-05-11 10:01:24 -06:00
46c7ce2824 refactor: update work items and daily logs for PDIAP-12284 and PDIAP-15836, enhancing host-mode resolution strategy and lifecycle sequencing 2026-05-11 07:15:34 -06:00
1382f1ac1a chore: update work item statuses and daily logs for May 8, 2026, including new daily log entry 2026-05-08 08:09:39 -06:00
1c9b9fd51a feat: add mem9 integration documentation, enhance AI-to-AI prompting guidelines, and create daily logs for May 1 and May 7 2026-05-08 07:28:00 -06:00
f72a828805 refactor: update skill paths to use .agents/skills/ for consistency and remove obsolete skill references 2026-05-05 16:22:42 -06:00
e4b39c4a9e refactor: update work item statuses and sprint planning details for PDIAP-15836 and PDIAP-12284 2026-05-05 16:09:48 -06:00
2a234701c5 Update work items and daily logs for project fidelity
- Updated work items with new statuses, notes, and dependencies:
  - `PDIAP-15838` moved to Done, draft PR remains unmerged.
  - `PDIAP-15836` status updated to backlog-ready, sequenced after `PDIAP-15838`.
  - `PDIAP-12284` reopened for UIKit removal, dependency for `PDIAP-15836`.
  - Added new backlog items: `PDIAP-11961`, `PDIAP-11962`, `PDIAP-11562`, `PDIAP-12226`, `PDIAP-12227`, `PDIAP-12228`.
- Completed `PDIAP-16167`, documented findings in Confluence.
- Created daily log for 2026-05-05 summarizing work item updates and backlog triage.
- Added diagnostic script for workspace analysis.
2026-05-05 15:54:45 -06:00
63e784cc97 refactor: update agent sync behavior, improve freshness detection patterns, and add diagnostic troubleshooting script 2026-05-05 07:43:45 -06:00
f685ac37dd feat: add shared agent skills index and integrate SwiftUI skills for Antigravity compatibility 2026-05-04 11:06:49 -06:00
7129a7dc7e chore: remove compatibility field from various agent rules for consistency 2026-05-04 10:04:07 -06:00
ff4ed6a759 feat: refactor work item file retrieval to use Python script for improved error handling and readability 2026-05-04 09:45:28 -06:00
541c9b43de chore: remove unnecessary quotes from ticket title in PDIAP-16167 metadata 2026-05-04 07:59:45 -06:00
a18323d095 feat: initialize PDIAP-16167 work item, add daily log, and update status tracking 2026-05-04 07:33:51 -06:00
7f0de3658f feat: update daily logs for 2026-04-30; refine Discourse / FTTransfer investigation findings and root cause analysis 2026-05-04 07:16:14 -06:00
4e8c018f83 feat: mandate real-time auto-documentation of project memory updates across all interaction turns 2026-04-30 15:05:49 -06:00
5ceb3ec42e docs: update Discourse AccountLink investigation status and capture April 30 daily progress 2026-04-30 11:28:14 -06:00
fa1ab57de8 feat: update daily logs and work items for 2026-04-29; refine Apollo removal strategy and address FTTransfer issue 2026-04-29 07:39:55 -06:00
d3c5d8f7de feat: add daily log for 2026-04-28 with focus on FTTransfer / AccountLink reproduction path 2026-04-28 16:38:33 -06:00
b6491fe33d feat: add turbo-all directive to workflow markdown files for improved processing 2026-04-28 12:16:03 -06:00
661c7ca877 chore: ignore obsidian graph settings and update default graph scale 2026-04-28 12:03:50 -06:00
d2242aa3f5 feat: transition PDIAP-15838 to active status and update Apollo removal strategy to include production-gated merge requirements and PicoSDK dependency cleanup. 2026-04-28 12:01:11 -06:00
2892fe8da1 feat: update work item PDIAP-15838 with new team members and latest status; add daily log for Apollo removal progress 2026-04-28 07:24:34 -06:00
fc634280a4 feat: add shared workflow and skill references in .agents and update GEMINI.md for clarity on workspace structure 2026-04-28 07:24:23 -06:00
0e6957d0b3 feat: add comprehensive agent rules and workflows for memory curation, communication synchronization, and project documentation management 2026-04-27 10:41:03 -06:00
de7f2b02f6 feat: integrate Obsidian MCP server via opencode config and add migration strategy documentation 2026-04-27 09:54:27 -06:00
e19a10f588 feat: Update standup prompt and daily log to enhance clarity and communication guidelines for Apollo removal progress 2026-04-27 07:43:47 -06:00
e5d41c876e feat: Update work items and daily log for Apollo removal progress and SwiftUI migration cleanup 2026-04-21 11:52:13 -06:00
44d70f4d7a feat: Enhance prompting guidelines for AI sessions to improve context handling and clarity 2026-04-21 10:18:19 -06:00
3cfc69e9a6 feat: Update daily log for PDIAP-15838 with recent Apollo removal progress and next steps 2026-04-21 10:18:13 -06:00
3709674665 feat: Update work item notes for PDIAP-15838 and add daily log for Apollo removal progress 2026-04-21 09:50:10 -06:00
9d7aad4ef9 feat: Add guideline to prefer 'toggle' over 'flag' in Fidelity-facing communication 2026-04-21 09:35:19 -06:00
73947adee7 feat: Refine Apollo cleanup design direction to prioritize native Swift models and limit dictionary usage to REST boundaries 2026-04-21 09:11:41 -06:00
f51fb07bfb feat: Add prompt engineering lessons for reusable prompting strategies and standup-specific guidance 2026-04-21 09:11:12 -06:00
b264d380bc feat: Update standup prompt and related documentation for clarity and improved context handling 2026-04-21 08:11:07 -06:00
321 changed files with 11214 additions and 2180 deletions

1
.agent Symbolic link
View File

@@ -0,0 +1 @@
.agents

8
.agents/mcp_config.json Normal file
View File

@@ -0,0 +1,8 @@
{
"mcpServers": {
"aiw-context-mcp": {
"url": "http://127.0.0.1:8765/mcp",
"serverUrl": "http://127.0.0.1:8765/mcp"
}
}
}

View File

@@ -1,7 +1,8 @@
---
name: ai-prompt-engineering
description: Create self-contained prompts for another AI assistant that lacks access to this workspace memory.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use
@@ -23,4 +24,3 @@ Use this skill when the user wants a prompt for another AI assistant, coding age
- Prefer clear sections over long prose.
- Include work-item ID and title when relevant.
- Make assumptions explicit.

View File

@@ -1,7 +1,8 @@
---
name: copilot-prompt-engineering
description: Create high-quality prompts for GitHub Copilot or another AI running on the Fidelity development machine, using this workspace's context without assuming the target AI has access to it.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use
@@ -18,10 +19,10 @@ Use this skill when the user wants a prompt for another AI assistant, GitHub Cop
- test strategy
- story/PR drafting
2. Pull only the relevant context:
- `project-knowledge/02-work-items/` for ticket-specific context
- `project-knowledge/03-context/systems/` for component context
- `project-knowledge/03-context/workstreams/` for recurring constraints
- `project-knowledge/03-context/ios/` for Swift/iOS guidance
- `workspaces/fidelity/project-knowledge/02-work-items/` for ticket-specific context
- `workspaces/fidelity/project-knowledge/03-context/systems/` for component context
- `workspaces/fidelity/project-knowledge/03-context/workstreams/` for recurring constraints
- `workspaces/fidelity/project-knowledge/03-context/ios/` for Swift/iOS guidance
3. Make the prompt self-contained.
4. Tell the target AI what to inspect before acting.
5. State constraints, non-goals, and validation expectations.
@@ -31,6 +32,7 @@ Use this skill when the user wants a prompt for another AI assistant, GitHub Cop
- Write the final prompt in English unless the user explicitly requests another language.
- Default to first-person wording so the user can paste the prompt directly into Copilot.
- Keep the prompt short unless the user asks for more detail.
- For follow-up prompts in the same AI session, assume recent shared context and avoid repeating which side made the previous changes unless it matters for the task.
- Include Jira ID and approved title when available.
- For REST work, say REST is behind a feature flag and GraphQL is fallback unless confirmed otherwise.
- For XFlow work, say behavior may depend on entry point, auth state, backend config, and consumer integration.

View File

@@ -1,7 +1,8 @@
---
name: ios-swift-answering
description: Answer Swift, SwiftUI, and iOS programming questions using current Apple guidance while adapting recommendations to Fidelity/XFlow project constraints.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use
@@ -11,8 +12,8 @@ Use this skill for Swift, SwiftUI, iOS architecture, concurrency, testing, or de
## Workflow
1. Identify whether the question is general Swift/iOS or Fidelity-specific.
2. Read `project-knowledge/03-context/ios/current-practices.md` for currentness rules.
3. Read `project-knowledge/03-context/ios/project-swift-guidance.md` when the answer may affect XFlow, Fid4, XFlowViewMaker, FTFrameworks, feature flags, or consumer validation.
2. Read `workspaces/fidelity/project-knowledge/03-context/ios/current-practices.md` for currentness rules.
3. Read `workspaces/fidelity/project-knowledge/03-context/ios/project-swift-guidance.md` when the answer may affect XFlow, Fid4, XFlowViewMaker, FTFrameworks, feature flags, or consumer validation.
4. If the answer depends on current Apple APIs, Xcode versions, dependency tooling, package-manager behavior, testing frameworks, or migration guidance, verify with official/primary documentation before making strong claims.
5. Separate:
- current best practice

View File

@@ -1,7 +1,8 @@
---
name: ios-testing-strategy
description: Recommend iOS testing approaches for Swift, SwiftUI, XFlow, Fid4, and REST migration work while respecting existing XCTest/Swift Testing/project constraints.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use

View File

@@ -1,7 +1,8 @@
---
name: professional-communication
description: Rewrite rough technical notes into clear, concise, stakeholder-ready professional English while preserving scope and technical meaning.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use
@@ -21,4 +22,3 @@ Use this skill for manager updates, stakeholder messages, translations, issue cl
- 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.

View File

@@ -1,7 +1,8 @@
---
name: status-reporting
description: Generate work-item-aware standups and status summaries from current workspace memory, recent logs, and communication evidence.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use
@@ -21,5 +22,5 @@ Use this skill for standups, daily scrum updates, end-of-day summaries, and shor
- 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.
- For Mattermost-ready standups, include a visible blank line before section headers such as `Today:` and `Blockers:`. Always verify there is an empty line immediately above `Today:` before returning the draft.
- Use `Blockers: None` only when no blocker is visible in current memory.

View File

@@ -1,7 +1,8 @@
---
name: swiftui-xflow-review
description: Review or reason about SwiftUI code in XFlow/Fidelity contexts, especially lifecycle, modal presentation, navigation, backend-driven UI, and UIKit bridge removal.
compatibility: opencode
trigger: always_on
glob: ""
---
## When To Use

View File

@@ -1,7 +1,8 @@
---
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
trigger: always_on
glob: ""
---
## When To Use
@@ -22,4 +23,3 @@ Use this skill when new information may change workspace memory, project state,
- 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.

View File

@@ -0,0 +1 @@
../../rules/ai-prompt-engineering.md

View File

@@ -0,0 +1 @@
../../rules/copilot-prompt-engineering.md

30
.agents/skills/index.md Normal file
View File

@@ -0,0 +1,30 @@
# Shared Agent Skills Index
Skills available through the shared `.agents/` surface for Antigravity-compatible workflow views and other tools that read the Agent Skills open format.
---
## Generic Skills
- [Workspace Memory Curation](workspace-memory-curation/SKILL.md)
- [Professional Communication](professional-communication/SKILL.md)
- [Status Reporting](status-reporting/SKILL.md)
- [AI Prompt Engineering](ai-prompt-engineering/SKILL.md)
---
## Fidelity / iOS Skills
- [Copilot Prompt Engineering](copilot-prompt-engineering/SKILL.md)
- [iOS Swift Answering](ios-swift-answering/SKILL.md)
- [iOS Testing Strategy](ios-testing-strategy/SKILL.md)
- [SwiftUI Expert Skill](swiftui-expert-skill/SKILL.md)
- [SwiftUI XFlow Review](swiftui-xflow-review/SKILL.md)
- [Update SwiftUI APIs](update-swiftui-apis/SKILL.md)
---
## Compatibility Notes
- `.agents/skills/` is the shared skill source intended for Antigravity-compatible and cross-tool discovery.
- OpenCode CLI also discovers `.agents/skills/`; do not mirror these skills into `.opencode/skills/`, because duplicate skill names create warnings and ambiguous discovery.

View File

@@ -0,0 +1 @@
../../rules/ios-swift-answering.md

View File

@@ -0,0 +1 @@
../../rules/ios-testing-strategy.md

View File

@@ -0,0 +1 @@
../../rules/professional-communication.md

View File

@@ -0,0 +1 @@
../../rules/status-reporting.md

View File

@@ -0,0 +1 @@
../../vendor/agent-skills/SwiftUI-Agent-Skill/swiftui-expert-skill

View File

@@ -0,0 +1 @@
../../rules/swiftui-xflow-review.md

View File

@@ -0,0 +1 @@
../../vendor/agent-skills/SwiftUI-Agent-Skill/.agents/skills/update-swiftui-apis

View File

@@ -0,0 +1 @@
../../rules/workspace-memory-curation.md

View File

@@ -0,0 +1,60 @@
---
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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/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:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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`
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,56 @@
---
description: Import a historical communication archive and refine workspace memory
---
// turbo-all
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
- 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 [ -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, or place an extracted export in archives/slack/export."; fi`
Read:
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@agent-memory/memory/context-maintenance.md
@workspaces/fidelity/project-knowledge/04-people/index.md
@workspaces/fidelity/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 `workspaces/fidelity/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 `workspaces/fidelity/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,47 @@
---
description: Sync live communication context and promote high-confidence memory
---
// turbo-all
Use the configured live communication connector to fetch fresh evidence and maintain workspace memory automatically.
Preferred command sources:
- `AIW_MATTERMOST_SYNC_CMD`
- Built-in wrapper: `bash scripts/mattermost/sync.sh`
Run the connector:
!`if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@agent-memory/memory/context-maintenance.md
Fresh communication evidence:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
Instructions:
- if the sync command failed, stop and do not edit workspace memory
- prefer local proxy mirror evidence when present; use the configured sync wrapper only when a fresh API pull is required
- treat connector output as evidence, not automatically as project truth
- promote only explicit, project-relevant, high-confidence facts
- default destination is `workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md`
- update `workspaces/fidelity/project-knowledge/01-current/current-work.md` only for facts that materially change the active work window
- update `workspaces/fidelity/project-knowledge/02-work-items/*.md` for explicit work-item IDs, approved titles, points, scope, and status notes
- keep `workspaces/fidelity/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,65 @@
---
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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@agent-memory/workflows/ai-to-ai-prompting.md
@workspaces/fidelity/project-knowledge/03-context/ios/index.md
@workspaces/fidelity/project-knowledge/03-context/ios/project-swift-guidance.md
@workspaces/fidelity/project-knowledge/03-context/systems/index.md
@workspaces/fidelity/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:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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`
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,70 @@
---
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:
@profiles/fidelity/profile.md
@agent-memory/behavior/agent-behavior.md
@agent-memory/behavior/learning-sessions.md
@agent-memory/memory/promotion-rules.md
@agent-memory/integrations/technical-verification.md
@workspaces/fidelity/project-knowledge/00-start/start-here.md
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/process/communication.md
@workspaces/fidelity/project-knowledge/03-context/ios/index.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
@workspaces/fidelity/project-knowledge/04-people/index.md
Today's date:
!`date +%F`
Today's canonical daily note, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest daily notes available:
!`if [ -d workspaces/fidelity/project-knowledge/06-daily ]; then ls -1 workspaces/fidelity/project-knowledge/06-daily 2>/dev/null | sort | tail -n 3; else echo "No daily notes directory available."; fi`
Detailed active work item files, if available:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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`
Latest Mattermost context, if available:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
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,45 @@
# 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)

View File

@@ -0,0 +1,43 @@
---
description: Force-sync Mattermost and answer from the latest matching message
---
Refresh/read Mattermost first, then answer the user's question from the freshest evidence. Prefer the local proxy mirror when it is present; use the configured sync wrapper only when a fresh API pull is required.
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/fallback refresh:
!`start=$(date +%s); if [ -n "$AIW_MATTERMOST_SYNC_CMD" ]; then bash -lc "$AIW_MATTERMOST_SYNC_CMD"; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi; status=$?; end=$(date +%s); echo "__MATTERMOST_SYNC_SECONDS__=$((end - start))"; exit "$status"`
Read a focused slice of refreshed Mattermost context, preferring the proxy mirror:
!`python3 scripts/mattermost-proxy/read-context.py --mode focused`
User request:
$ARGUMENTS
Instructions:
- Do not answer from old conversation memory.
- Use only the focused 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.
- Do not edit workspace memory in this command.
- If the message appears to change project context, report it as a memory update candidate and name the likely target file.
- Use `/communication-sync` or an explicit user request to promote the fact after the latest-message answer is complete.
- If sync fails or no refreshed context is available, say that directly and do not infer from stale context.
- If a write or patch attempt fails in this flow, stop immediately and return the latest-message answer plus the failed target; do not retry.
Return:
1. Latest matching message
2. Why it matters
3. Memory update candidate, if any

View File

@@ -0,0 +1,42 @@
---
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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/index.md
@agent-memory/memory/context-maintenance.md
Today's existing log, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/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 `workspaces/fidelity/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,73 @@
---
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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/process/communication.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
@workspaces/fidelity/project-knowledge/04-people/index.md
Today's log, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest Mattermost context, if available:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
Detailed active work item files, if available:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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`
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,42 @@
---
description: Sync Mattermost context and automatically promote high-confidence project memory
---
// turbo-all
Use the configured Mattermost sync command and/or local proxy mirror evidence to fetch fresh communication context and maintain workspace memory automatically.
Preferred command sources:
- `AIW_MATTERMOST_SYNC_CMD`
- Built-in wrapper: `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 [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh; else echo "No Mattermost sync command is configured."; fi`
Fresh Mattermost evidence, preferring the proxy mirror:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
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
- prefer the local proxy mirror via `scripts/mattermost-proxy/read-context.py --mode latest` when it has evidence
- otherwise use `workspaces/fidelity/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 `workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md`
- update `workspaces/fidelity/project-knowledge/01-current/current-work.md` only for facts that materially change the current work window
- update `workspaces/fidelity/project-knowledge/02-work-items/*.md` for explicit Jira IDs, approved titles, points, scope, and status notes
- keep `workspaces/fidelity/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,43 @@
---
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
@workspaces/fidelity/project-knowledge/09-templates/work-item.md
@workspaces/fidelity/project-knowledge/09-templates/person.md
@workspaces/fidelity/project-knowledge/09-templates/decision.md
@workspaces/fidelity/project-knowledge/09-templates/system.md
@workspaces/fidelity/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,27 @@
---
description: Check canonical memory health and Obsidian adapter status
---
// turbo-all
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,64 @@
---
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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/systems/index.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/index.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/flow-page-references.md
@workspaces/fidelity/project-knowledge/03-context/process/index.md
Today's log, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Current Mattermost inbox, if present:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
Generated Mattermost context, if present:
!`if [ -s scripts/mattermost/generated/mattermost_context.jsonl ]; then cat scripts/mattermost/generated/mattermost_context.jsonl; else echo "No legacy 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:
- `workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md`
- `workspaces/fidelity/project-knowledge/01-current/current-work.md`
- `workspaces/fidelity/project-knowledge/02-work-items/*.md`
- `workspaces/fidelity/project-knowledge/01-current/work-items.md`
- `workspaces/fidelity/project-knowledge/03-context/project.md`
- `workspaces/fidelity/project-knowledge/03-context/systems/*.md`
- `workspaces/fidelity/project-knowledge/03-context/workstreams/*.md`
- `workspaces/fidelity/project-knowledge/03-context/process/*.md`
- `workspaces/fidelity/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
- `.agents/skills/*/SKILL.md` when a specialized workflow needs to change
- `workspaces/fidelity/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,78 @@
---
description: Import a historical Slack export and refine workspace memory from it
---
// turbo-all
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
- 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 [ -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, or place an extracted export in archives/slack/export."; fi`
Read:
@core/README.md
@core/memory/operational-memory.md
@core/integrations/communication-model.md
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/systems/index.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/index.md
@workspaces/fidelity/project-knowledge/03-context/process/index.md
@workspaces/fidelity/project-knowledge/04-people/index.md
@workspaces/fidelity/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 `workspaces/fidelity/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 `workspaces/fidelity/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,144 @@
---
description: Draft a standup from the latest Fidelity workspace context
---
Generate a standup update using the latest workspace state.
Temporal context. Read this before interpreting `today`, `yesterday`, `previous workday`, or `last workday`:
!`python3 - <<'PY'
from datetime import datetime, timedelta
now = datetime.now().astimezone()
today = now.date()
calendar_yesterday = today - timedelta(days=1)
default_previous_workday = calendar_yesterday
while default_previous_workday.weekday() >= 5:
default_previous_workday -= timedelta(days=1)
print("## Temporal Context")
print(f"current_time: {now.isoformat()}")
print(f"today: {today.isoformat()} ({today.strftime('%A')})")
print(f"calendar_yesterday: {calendar_yesterday.isoformat()} ({calendar_yesterday.strftime('%A')})")
print(f"default_previous_workday: {default_previous_workday.isoformat()} ({default_previous_workday.strftime('%A')})")
print("standup_rule: Generate the report for today. The previous-work section must describe work from calendar_yesterday when it was a workday; otherwise use the latest prior day with Mattermost activity.")
PY`
First, refresh Mattermost before drafting. This is mandatory for start-of-day standups and must not be skipped:
!`python3 - <<'PY'
import os
import subprocess
from pathlib import Path
from datetime import datetime
cmd = os.environ.get("AIW_MATTERMOST_SYNC_CMD")
today = datetime.now().astimezone().date().isoformat()
commands = []
if Path("scripts/mattermost/sync.sh").is_file():
commands.append(("latest", ["bash", "scripts/mattermost/sync.sh"]))
commands.append(("previous-workday", ["bash", "scripts/mattermost/sync.sh", "--previous-workday", "--today", today]))
elif cmd:
commands.append(("configured", ["bash", "-lc", cmd]))
if not commands:
print("No Mattermost sync command configured.")
raise SystemExit(0)
failed = False
for label, command in commands:
result = subprocess.run(command, capture_output=True, text=True)
print(f"__MATTERMOST_SYNC_LABEL__={label}")
print(f"__MATTERMOST_SYNC_RETURN_CODE__={result.returncode}")
if result.returncode != 0:
failed = True
print("__MATTERMOST_SYNC_FAILED__")
if result.stdout.strip():
print(result.stdout.strip())
if result.stderr.strip():
print(result.stderr.strip())
if failed:
raise SystemExit(0)
PY`
Read:
@prompts/standup.md
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/flow-page-references.md
@workspaces/fidelity/project-knowledge/03-context/process/communication.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
Today's log, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest refreshed Mattermost context, if present:
!`python3 scripts/mattermost-proxy/read-context.py --mode standup --today $(date +%F)`
Detailed active work item files, if available:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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
- Mattermost refresh is mandatory for standup; do not draft from stale workspace memory if the refresh did not run
- 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 `workspaces/fidelity/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 `workspaces/fidelity/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
- includes a visible blank line before `Today:` and before `Blockers:` when present; before returning, verify there is an empty line immediately above each section header so Mattermost renders it correctly
- is ready to copy/paste into Mattermost as Markdown

View File

@@ -0,0 +1,88 @@
---
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
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/index.md
@workspaces/fidelity/project-knowledge/03-context/process/communication.md
@workspaces/fidelity/project-knowledge/03-context/process/jira-story-rules.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
@workspaces/fidelity/project-knowledge/04-people/index.md
Today's log, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest Mattermost context, if available:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
Detailed active work item files, if available:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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`
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,35 @@
---
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:
@workspaces/fidelity/project-knowledge/03-context/ios/index.md
@workspaces/fidelity/project-knowledge/03-context/ios/current-practices.md
@workspaces/fidelity/project-knowledge/03-context/ios/project-swift-guidance.md
@agent-memory/integrations/technical-verification.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/systems/index.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/index.md
@workspaces/fidelity/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,65 @@
---
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
@workspaces/fidelity/project-knowledge/00-start/start-here.md
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/systems/index.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/index.md
@workspaces/fidelity/project-knowledge/03-context/workstreams/flow-page-references.md
@agent-memory/memory/context-maintenance.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
@workspaces/fidelity/project-knowledge/04-people/index.md
Today's existing log, if present:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/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 `workspaces/fidelity/project-knowledge/01-current/` or `workspaces/fidelity/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: `workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md`
- current work: `workspaces/fidelity/project-knowledge/01-current/current-work.md`
- work items: `workspaces/fidelity/project-knowledge/02-work-items/*.md`
- active work summary: `workspaces/fidelity/project-knowledge/01-current/work-items.md`
- project overview: `workspaces/fidelity/project-knowledge/03-context/project.md`
- systems: `workspaces/fidelity/project-knowledge/03-context/systems/`
- workstreams: `workspaces/fidelity/project-knowledge/03-context/workstreams/`
- process: `workspaces/fidelity/project-knowledge/03-context/process/`
- manager mapping: `workspaces/fidelity/project-knowledge/04-people/manager.md`
- people roster: `workspaces/fidelity/project-knowledge/04-people/index.md`
- people notes: `workspaces/fidelity/project-knowledge/04-people/*.md`
- decisions: `workspaces/fidelity/project-knowledge/05-decisions/`
- `.agents/workflows/*.md`
- `.agents/rules/*.md`
- `prompts/*.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,31 @@
---
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
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/process/communication.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
@workspaces/fidelity/project-knowledge/04-people/index.md
If relevant, use today's log for context:
!`if [ -f workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/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,77 @@
---
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:
@profiles/fidelity/profile.md
@agent-memory/behavior/agent-behavior.md
@agent-memory/behavior/learning-sessions.md
@agent-memory/memory/promotion-rules.md
@agent-memory/integrations/technical-verification.md
Read active workspace memory:
@workspaces/fidelity/project-knowledge/00-start/start-here.md
@workspaces/fidelity/project-knowledge/01-current/current-work.md
@workspaces/fidelity/project-knowledge/01-current/work-items.md
@workspaces/fidelity/project-knowledge/03-context/project.md
@workspaces/fidelity/project-knowledge/03-context/process/communication.md
@workspaces/fidelity/project-knowledge/03-context/ios/index.md
@workspaces/fidelity/project-knowledge/04-people/manager.md
@workspaces/fidelity/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 workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md ]; then cat workspaces/fidelity/project-knowledge/06-daily/$(date +%F).md; else echo "No daily note exists for today yet."; fi`
Latest daily notes available:
!`if [ -d workspaces/fidelity/project-knowledge/06-daily ]; then ls -1 workspaces/fidelity/project-knowledge/06-daily 2>/dev/null | sort | tail -n 3; else echo "No daily notes directory available."; fi`
Detailed active work item files, if available:
!`python3 - <<'PY'
import re
from pathlib import Path
summary = Path("workspaces/fidelity/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: `(workspaces/fidelity/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`
Latest communication inbox, if available:
!`python3 scripts/mattermost-proxy/read-context.py --mode latest`
Respond with:
1. Current context
2. Communication risks
3. Missing context to capture today
Keep the response concise, then wait for the next request.

37
.gitignore vendored
View File

@@ -8,23 +8,40 @@ __pycache__/
.venv/
# Mattermost raw inbox artifacts
ai/inbox/mattermost-latest.md
ai/inbox/mattermost-*.md
ai/inbox/mattermost-status.json
workspaces/*/inbox/mattermost-latest.md
workspaces/*/inbox/mattermost-*.md
workspaces/*/inbox/mattermost-status.json
workspaces/*/inbox/mattermost-mirror/*
!workspaces/*/inbox/mattermost-mirror/.gitkeep
workspaces/*/inbox/photos/*
!workspaces/*/inbox/photos/.gitkeep
# Local build artifact for the iPhone photo inbox pasteboard helper
scripts/iphone-photo-inbox/.env
scripts/iphone-photo-inbox/copy_files_to_clipboard
# Workspace-local Mattermost runtime artifacts
scripts/mattermost/.env
scripts/mattermost/.venv/
scripts/mattermost/generated/*
!scripts/mattermost/generated/.gitkeep
scripts/mattermost-proxy/.env
# Obsidian local runtime state
/.obsidian/
project-knowledge/.obsidian/workspace*.json
project-knowledge/.obsidian/workspace-mobile*.json
project-knowledge/.obsidian/hotkeys.json
project-knowledge/.obsidian/community-plugins.json
project-knowledge/.obsidian/plugins/
project-knowledge/.obsidian/snippets/
project-knowledge/.obsidian/cache/
workspaces/*/project-knowledge/.obsidian/workspace*.json
workspaces/*/project-knowledge/.obsidian/workspace-mobile*.json
workspaces/*/project-knowledge/.obsidian/graph.json
workspaces/*/project-knowledge/.obsidian/hotkeys.json
workspaces/*/project-knowledge/.obsidian/community-plugins.json
workspaces/*/project-knowledge/.obsidian/plugins/
workspaces/*/project-knowledge/.obsidian/snippets/
workspaces/*/project-knowledge/.obsidian/cache/
.trash/
# Antigravity CLI local workspace configuration
.antigravitycli/
# AI Workspace local service runtime
.aiw/runtime/
.aiw/indexes/

3
.gitmodules vendored Normal file
View File

@@ -0,0 +1,3 @@
[submodule "vendor/agent-skills/SwiftUI-Agent-Skill"]
path = vendor/agent-skills/SwiftUI-Agent-Skill
url = https://github.com/AvdLee/SwiftUI-Agent-Skill.git

View File

@@ -12,20 +12,22 @@ Behavior rules:
- Treat `core/` as the reusable project-independent operating model.
- Treat `profiles/fidelity/profile.md` as the active Fidelity project profile.
- Treat `project-knowledge/` as the canonical clean project knowledge base for humans and AI.
- Treat `workspaces/fidelity/project-knowledge/` as the canonical clean project knowledge base for humans and AI.
- Treat `agent-memory/` as the operating memory for agent behavior, learning, promotion, verification, and self-maintenance rules.
- Treat `scripts/memory/` as the project-agnostic access layer for note creation, project-knowledge search, Base queries, and health checks.
- Treat `scripts/obsidian/` as the current Obsidian adapter. Do not couple durable memory rules to Obsidian-specific behavior.
- Treat `ai/inbox/` and generated connector files as raw evidence only, not promoted memory.
- Keep Obsidian Bases clean: do not let templates in `project-knowledge/09-templates/` appear as real daily notes, work items, people, decisions, systems, or workstreams.
- Role mapping notes such as `project-knowledge/04-people/manager.md` are `type: role-map`; actual people profiles are `type: person`.
- Treat `workspaces/fidelity/inbox/` and generated connector files as raw evidence only, not promoted memory.
- For Mattermost context, prefer the local proxy mirror in `workspaces/fidelity/inbox/mattermost-mirror/` when present. Use `scripts/mattermost-proxy/read-context.py` or the mirror views (`latest.*`, `by-date/`, `channels/`, `threads/`) before falling back to legacy `workspaces/fidelity/inbox/mattermost-latest.md` or `scripts/mattermost/generated/` artifacts.
- Keep Obsidian Bases clean: do not let templates in `workspaces/fidelity/project-knowledge/09-templates/` appear as real daily notes, work items, people, decisions, systems, or workstreams.
- Role mapping notes such as `workspaces/fidelity/project-knowledge/04-people/manager.md` are `type: role-map`; actual people profiles are `type: person`.
- When editing canonical project notes, update useful metadata at the same time: `updated`, `systems`, `workstreams`, `people`, `related`, `focus`, `work-items`, and `blockers` when applicable.
- When creating a new typed note, prefer `bash scripts/memory/memory.sh create <type> <slug> [title]`, then inspect and refine the generated Markdown.
- When checking project knowledge quality, use `bash scripts/memory/memory.sh health` and direct file inspection.
- Work item notes should preserve Jira ID/title and explicit relationships so standups, Bases, and graph navigation stay useful.
- Daily notes should include `focus`, `work-items`, and `blockers` when those values are clear.
- 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.
- If the prompt asks for the latest Mattermost message, the last message from Jeff/current manager, or what someone just said, refresh or read the freshest Mattermost evidence before answering; the proxy mirror is the primary source when it is present, and configured sync artifacts are secondary evidence.
- Treat latest-message prompts as read-first: answer from refreshed evidence and report memory update candidates instead of editing canonical memory by default.
- For learning-style questions, answer from known context and verified facts only; explicitly label unknowns, assumptions, and inferences.
- For learning sessions, prioritize durable architecture, process, ownership, debugging strategy, release mechanics, domain concepts, and decision rules over transient ticket status.
- If the user asks what to clarify, ask 3 to 5 high-leverage questions that would help a senior iOS engineer ramp into the project; include why each question matters.
@@ -33,32 +35,35 @@ Behavior rules:
- If missing context materially affects the answer, ask a concise clarification question instead of inventing details.
- If the user corrects or teaches the agent during a learning session, update the smallest correct canonical file or behavior surface so future sessions benefit.
- For any meaningful prompt, decide whether the interaction adds, corrects, or sharpens project memory.
- When the user provides new durable information, update the right workspace files before or while answering.
- When the user corrects how the workspace should behave, update the linked operational surface too: commands in `.opencode/commands/`, prompt templates in `prompts/`, agent rules in `AGENTS.md` or `.opencode/agents/`, skills in `.opencode/skills/`, and agent operating rules in `agent-memory/` when those files control the behavior.
- When the user provides new durable information, update the right workspace files during the same turn when the destination is clear, but do not delay a straightforward answer just to create or reorganize memory.
- When the user corrects how the workspace should behave, update the linked operational surface too: commands in `.opencode/commands/`, prompt templates in `prompts/`, agent rules in `AGENTS.md` or `.opencode/agents/`, skills in `.agents/skills/`, and agent operating rules in `agent-memory/` when those files control the behavior.
- If existing context is stale, correct it directly instead of leaving conflicting versions.
- Promote information carefully:
- daily facts go to `project-knowledge/06-daily/YYYY-MM-DD.md`
- current priorities go to `project-knowledge/01-current/current-work.md`
- active Jira-linked work goes to `project-knowledge/02-work-items/*.md`
- the active-work summary goes to `project-knowledge/01-current/work-items.md`
- durable project knowledge overview goes to `project-knowledge/03-context/project.md`
- system-specific durable knowledge goes to `project-knowledge/03-context/systems/`
- workstream-specific durable knowledge goes to `project-knowledge/03-context/workstreams/`
- project-facing process knowledge goes to `project-knowledge/03-context/process/`
- confirmed team or manager communication preferences go to `project-knowledge/04-people/manager.md`
- role-to-person mapping and recurring stakeholders go to `project-knowledge/04-people/`
- confirmed decisions go to `project-knowledge/05-decisions/`
- daily facts go to `workspaces/fidelity/project-knowledge/06-daily/YYYY-MM-DD.md`
- current priorities go to `workspaces/fidelity/project-knowledge/01-current/current-work.md`
- active Jira-linked work goes to `workspaces/fidelity/project-knowledge/02-work-items/*.md`
- the active-work summary goes to `workspaces/fidelity/project-knowledge/01-current/work-items.md`
- durable project knowledge overview goes to `workspaces/fidelity/project-knowledge/03-context/project.md`
- system-specific durable knowledge goes to `workspaces/fidelity/project-knowledge/03-context/systems/`
- workstream-specific durable knowledge goes to `workspaces/fidelity/project-knowledge/03-context/workstreams/`
- project-facing process knowledge goes to `workspaces/fidelity/project-knowledge/03-context/process/`
- confirmed team or manager communication preferences go to `workspaces/fidelity/project-knowledge/04-people/manager.md`
- role-to-person mapping and recurring stakeholders go to `workspaces/fidelity/project-knowledge/04-people/`
- confirmed decisions go to `workspaces/fidelity/project-knowledge/05-decisions/`
- behavioral rules for how this workspace should respond go to the exact command, prompt, agent, skill, or `agent-memory/` file that enforces that behavior
- Use generic `AIW_*` integration variables for new tooling and keep `FIDELITY_*` only as Fidelity-profile aliases.
- Use generic `AIW_*` integration variables for workspace tooling.
- Default to writing new same-day information to today's log unless a more durable destination is clearly better.
- Write canonical memory to `project-knowledge/`.
- Write canonical memory to `workspaces/fidelity/project-knowledge/`.
- 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.
- For analysis, drafting, review, or translation prompts, answer first and persist second unless saving the fact is required to produce the answer safely.
- Avoid creating brand-new canonical notes in the middle of a response unless the user explicitly asked for persistence or the new note is the smallest correct update.
- If a non-essential memory patch fails verification, stop retrying and return the answer plus the intended target file.
- Do not leave behavior-only corrections only in daily logs. If a correction should affect future output, update the tool or instruction that produces that output.
- If the memory interface or Obsidian adapter fails, continue with direct Markdown operations when safe and do not promote the failure as project memory.
- Do not over-promote uncertain information. Keep uncertain items in the daily log.
- When drafting communication, preserve technical meaning and improve clarity in natural US English.
- When answering Swift/iOS programming questions, use the project-local iOS skills and `project-knowledge/03-context/ios/`.
- When answering Swift/iOS programming questions, use the project-local iOS skills and `workspaces/fidelity/project-knowledge/03-context/ios/`.
- When answering programming, dependency-management, package-manager, CI/build, testing, or architecture-practice questions, verify with primary/current documentation when the topic may be outdated, disputed, version-sensitive, or project-critical.
- For CocoaPods, podspecs, private spec repos, trunk/CDN behavior, SPM, Xcode, Swift, and Apple frameworks, do not rely only on model memory before giving strong advice.
- When generating prompts for GitHub Copilot or another AI, use `agent-memory/workflows/ai-to-ai-prompting.md` and the `copilot-prompt-engineering` skill.

View File

@@ -12,11 +12,12 @@ 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 `project-knowledge/` as the canonical clean project knowledge base.
- Treat `workspaces/fidelity/project-knowledge/` as the canonical clean project knowledge base.
- Treat `agent-memory/` as the operating memory for agent behavior, learning, promotion, verification, and self-maintenance rules.
- Treat `scripts/memory/` as the stable memory access layer.
- Treat tool-specific integrations such as Obsidian as replaceable adapters.
- Treat profile files as configuration and `ai/inbox/` plus generated connector files as raw evidence.
- Treat profile files as configuration and `workspaces/fidelity/inbox/` plus generated connector files as raw evidence.
- For live communication context, prefer project-local mirror evidence under `workspaces/fidelity/inbox/*-mirror/` through its reader script when available, then fall back to legacy inbox/generated connector artifacts.
- Keep Obsidian Bases clean by excluding templates and typing role maps separately from people.
- When updating canonical project notes, maintain relationship metadata and `updated` fields so project knowledge remains useful to both humans and agents.
- Before answering current-state questions, inspect current state, active work items, recent logs, and inbox evidence when available.
@@ -38,11 +39,11 @@ Behavior rules:
Memory destinations:
- daily facts -> `project-knowledge/06-daily/YYYY-MM-DD.md`
- current priorities -> `project-knowledge/01-current/current-work.md`
- active work items -> `project-knowledge/02-work-items/*.md`
- active-work summary -> `project-knowledge/01-current/work-items.md`
- durable project knowledge -> `project-knowledge/03-context/`
- people and roles -> `project-knowledge/04-people/`
- confirmed decisions -> `project-knowledge/05-decisions/`
- reusable behavior -> `.opencode/commands/`, `prompts/`, `.opencode/agents/`, `.opencode/skills/`, `agent-memory/`, `core/`, or `scripts/`
- daily facts -> `workspaces/fidelity/project-knowledge/06-daily/YYYY-MM-DD.md`
- current priorities -> `workspaces/fidelity/project-knowledge/01-current/current-work.md`
- active work items -> `workspaces/fidelity/project-knowledge/02-work-items/*.md`
- active-work summary -> `workspaces/fidelity/project-knowledge/01-current/work-items.md`
- durable project knowledge -> `workspaces/fidelity/project-knowledge/03-context/`
- people and roles -> `workspaces/fidelity/project-knowledge/04-people/`
- confirmed decisions -> `workspaces/fidelity/project-knowledge/05-decisions/`
- reusable behavior -> `.opencode/commands/`, `prompts/`, `.opencode/agents/`, `.agents/skills/`, `agent-memory/`, `core/`, or `scripts/`

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,67 +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:
!`if [ -n "$FIDELITY_MATTERMOST_SYNC_CMD" ]; then bash -lc "$FIDELITY_MATTERMOST_SYNC_CMD" >/dev/null 2>&1 || true; elif [ -f scripts/mattermost/sync.sh ]; then bash scripts/mattermost/sync.sh >/dev/null 2>&1 || true; fi`
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:
!`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`
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
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 Jeff by name
- free of any mention of Mattermost, since it is internal-only communication
- 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

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

View File

@@ -13,33 +13,21 @@ export const FidelityCompaction = async ({ directory }) => {
return {
"experimental.session.compacting": async (_input, output) => {
const baseFiles = [
"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/agent-behavior.md",
"agent-memory/behavior/learning-sessions.md",
"agent-memory/memory/promotion-rules.md",
"agent-memory/memory/context-maintenance.md",
"agent-memory/integrations/technical-verification.md",
"agent-memory/workflows/workspace-model.md",
"agent-memory/workflows/ai-to-ai-prompting.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/ios/index.md",
"project-knowledge/03-context/ios/current-practices.md",
"project-knowledge/03-context/ios/project-swift-guidance.md",
"project-knowledge/03-context/systems/index.md",
"project-knowledge/03-context/workstreams/index.md",
"project-knowledge/03-context/process/communication.md",
"project-knowledge/03-context/ios/index.md",
"project-knowledge/03-context/ios/project-swift-guidance.md",
"project-knowledge/04-people/manager.md",
"project-knowledge/04-people/index.md",
"project-knowledge/05-decisions/rest-vs-graphql.md",
"project-knowledge/05-decisions/discourse-handling.md",
]
const sections = []
@@ -56,7 +44,7 @@ export const FidelityCompaction = async ({ directory }) => {
const logs = (await readdir(logsDir))
.filter((name) => name.endsWith(".md"))
.sort()
.slice(-2)
.slice(-1)
for (const logName of logs) {
const content = await safeRead(path.join(logsDir, logName))

View File

@@ -13,10 +13,14 @@ function nowIso() {
return new Date().toISOString()
}
function envFlag(name, defaultValue = false) {
const value = process.env[name]
if (value === undefined) return defaultValue
return ["1", "true", "yes", "on"].includes(value.trim().toLowerCase())
}
async function resolveSyncCommand(directory) {
const configured =
process.env.AIW_MATTERMOST_SYNC_CMD?.trim() ||
process.env.FIDELITY_MATTERMOST_SYNC_CMD?.trim()
const configured = process.env.AIW_MATTERMOST_SYNC_CMD?.trim()
if (configured) return configured
const fallbackScript = path.join(directory, "scripts/mattermost/sync.sh")
@@ -37,6 +41,21 @@ async function resolveSyncContent(directory, stdoutText) {
return (generated || "").trim()
}
async function resolveProfileInbox(directory) {
const profile = process.env.AIW_PROJECT_PROFILE?.trim() || "fidelity"
const configured = process.env.AIW_PROJECT_INBOX_DIR?.trim()
if (configured) return path.isAbsolute(configured) ? configured : path.join(directory, configured)
const workspaceConfigPath = path.join(directory, "profiles", profile, "workspace.json")
try {
const config = JSON.parse(await readFile(workspaceConfigPath, "utf8"))
const inboxDir = config?.inbox_dir || `workspaces/${profile}/inbox`
return path.isAbsolute(inboxDir) ? inboxDir : path.join(directory, inboxDir)
} catch {
return path.join(directory, "workspaces", profile, "inbox")
}
}
function extractPromptText(event) {
const candidates = [
event?.properties?.text,
@@ -66,30 +85,16 @@ function requiresFreshMattermost(promptText) {
.replace(/[\u0300-\u036f]/g, "")
.toLowerCase()
const freshnessTerms = [
"ultimo",
"ultimos",
"ultima",
"ultimas",
"latest",
"last",
"reciente",
"recent",
"nuevo",
"new",
"actualiza",
"sync",
"sincroniza",
"revisa",
"dijo",
"menciono",
"respondio",
"contesto",
"check",
"look at",
"said",
"mentioned",
"replied",
const freshnessPatterns = [
/\bultimo(?:s|a|as)?\s+(?:mensaje|mensajes|respuesta|respuestas|update|updates)\b/,
/\bmensaje(?:s)?\s+(?:mas\s+)?reciente(?:s)?\b/,
/\bque\s+(?:dijo|menciono|respondio|contesto)\b/,
/\b(?:dijo|menciono|respondio|contesto)\s+(?:jeff|manager|supervisor)\b/,
/\b(?:latest|last|recent)\s+(?:message|messages|reply|replies|update|updates)\b/,
/\bwhat\s+did\s+.+\s+(?:say|mention|reply)\b/,
/\b(?:said|mentioned|replied)\s+(?:jeff|manager|supervisor)\b/,
/\b(?:sync|refresh|sincroniza|actualiza)\s+(?:mattermost|mensajes|messages|inbox)\b/,
/\b(?:revisa|check|look\s+at)\s+(?:mattermost|mensajes|messages|inbox)\b/,
]
const mattermostTerms = [
@@ -109,7 +114,6 @@ function requiresFreshMattermost(promptText) {
process.env.AIW_COMMUNICATION_FRESH_TERMS,
process.env.AIW_MANAGER_NAME,
process.env.AIW_PRIMARY_STAKEHOLDER,
process.env.FIDELITY_MANAGER_NAME,
"jeff",
"fidelity-preguntas",
]
@@ -123,10 +127,8 @@ function requiresFreshMattermost(promptText) {
...configuredTerms,
]
return (
freshnessTerms.some((term) => text.includes(term)) &&
return freshnessPatterns.some((pattern) => pattern.test(text)) &&
sourceTerms.some((term) => text.includes(term))
)
}
export const MattermostInbox = async ({ $, directory, client }) => {
@@ -143,7 +145,6 @@ export const MattermostInbox = async ({ $, directory, client }) => {
const intervalMinutes = Number.parseInt(
process.env.AIW_MATTERMOST_SYNC_INTERVAL_MINUTES ||
process.env.FIDELITY_MATTERMOST_SYNC_INTERVAL_MINUTES ||
"15",
10,
)
@@ -152,15 +153,14 @@ export const MattermostInbox = async ({ $, directory, client }) => {
if (!options.force && now - lastSyncAt < minIntervalMs) return
lastSyncAt = now
const syncStartedAt = Date.now()
const inboxDir = path.join(directory, "ai/inbox")
const inboxDir = await resolveProfileInbox(directory)
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 {
@@ -179,6 +179,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
await writeStatus(statusPath, {
syncedAt: nowIso(),
durationMs: Date.now() - syncStartedAt,
reason,
forced: Boolean(options.force),
changed: previous !== `${output}\n` && previous !== output,
@@ -188,6 +189,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
} else {
await writeStatus(statusPath, {
syncedAt: nowIso(),
durationMs: Date.now() - syncStartedAt,
reason,
forced: Boolean(options.force),
changed: false,
@@ -199,6 +201,7 @@ export const MattermostInbox = async ({ $, directory, client }) => {
} catch (error) {
await writeStatus(statusPath, {
syncedAt: nowIso(),
durationMs: Date.now() - syncStartedAt,
reason,
forced: Boolean(options.force),
changed: false,
@@ -223,13 +226,20 @@ export const MattermostInbox = async ({ $, directory, client }) => {
return {
event: async ({ event }) => {
if (event.type === "session.created") {
if (
event.type === "session.created" &&
envFlag("AIW_MATTERMOST_SYNC_ON_SESSION", false)
) {
await sync("session.created")
}
if (event.type === "tui.prompt.append") {
const promptText = extractPromptText(event)
const forceFreshMattermost = requiresFreshMattermost(promptText)
const allowPromptSync = envFlag("AIW_MATTERMOST_SYNC_ON_PROMPT", false)
if (!forceFreshMattermost && !allowPromptSync) return
await sync(
forceFreshMattermost
? "tui.prompt.append:fresh-mattermost-request"

View File

@@ -1,29 +1,12 @@
# OpenCode Skills Index
# OpenCode Skills Compatibility
Skills available to the workspace agent.
OpenCode CLI discovers the shared skills from `.agents/skills/`.
---
Do not mirror skills into `.opencode/skills/`; duplicate skill names create warnings and ambiguous discovery.
## Generic Skills
- [Workspace Memory Curation](workspace-memory-curation/SKILL.md)
- [Professional Communication](professional-communication/SKILL.md)
- [Status Reporting](status-reporting/SKILL.md)
- [AI Prompt Engineering](ai-prompt-engineering/SKILL.md)
---
## Fidelity / iOS Skills
- [Copilot Prompt Engineering](copilot-prompt-engineering/SKILL.md)
- [iOS Swift Answering](ios-swift-answering/SKILL.md)
- [iOS Testing Strategy](ios-testing-strategy/SKILL.md)
- [SwiftUI XFlow Review](swiftui-xflow-review/SKILL.md)
---
## Related
Use:
- [Shared Skills Index](../../.agents/skills/index.md)
- [Tooling Map](../../agent-memory/maps/tooling.md)
- [Commands Index](../commands/index.md)
- [Prompts Index](../../prompts/index.md)

View File

@@ -9,80 +9,76 @@ OpenCode should treat this project as a persistent context layer used to:
- draft standups and Mattermost messages
- improve communication for the current manager or stakeholder in natural professional English
## Always-Loaded Context
## Hot Context
The detailed operating rules live in:
Keep the always-loaded context small. The hot set is:
- `project-knowledge/00-start/start-here.md`
- `agent-memory/README.md`
- `profiles/fidelity/profile.md`
- `agent-memory/behavior/agent-behavior.md`
- `agent-memory/behavior/learning-sessions.md`
- `agent-memory/behavior/self-maintenance.md`
- `agent-memory/memory/operational-memory.md`
- `agent-memory/memory/context-maintenance.md`
- `agent-memory/workflows/workspace-architecture.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/ios/index.md`
- `project-knowledge/03-context/ios/current-practices.md`
- `project-knowledge/03-context/ios/project-swift-guidance.md`
- `project-knowledge/03-context/systems/index.md`
- `project-knowledge/03-context/workstreams/index.md`
- `project-knowledge/03-context/process/communication.md`
- `agent-memory/memory/promotion-rules.md`
- `agent-memory/integrations/technical-verification.md`
- `agent-memory/workflows/ai-to-ai-prompting.md`
- `agent-memory/workflows/workspace-model.md`
- `agent-memory/memory/promotion-rules.md`
- `agent-memory/integrations/memory-interface.md`
- `agent-memory/integrations/obsidian.md`
- `agent-memory/integrations/communication-sources.md`
- `core/integrations/memory-vault-model.md`
- `project-knowledge/04-people/manager.md`
- `project-knowledge/04-people/index.md`
- `project-knowledge/02-work-items/index.md`
- `workspaces/fidelity/project-knowledge/00-start/start-here.md`
- `workspaces/fidelity/project-knowledge/01-current/current-work.md`
- `workspaces/fidelity/project-knowledge/01-current/work-items.md`
- `workspaces/fidelity/project-knowledge/03-context/project.md`
- `workspaces/fidelity/project-knowledge/03-context/process/communication.md`
- `workspaces/fidelity/project-knowledge/03-context/ios/index.md`
- `workspaces/fidelity/project-knowledge/03-context/ios/project-swift-guidance.md`
- `workspaces/fidelity/project-knowledge/04-people/manager.md`
- `workspaces/fidelity/project-knowledge/04-people/index.md`
These are also loaded through `opencode.json`.
Load everything else lazily when the task actually needs it.
Do not preemptively load broad context sets, all work-item files, or all process notes unless the current task clearly requires them.
## Required Behavior
- Assume the workspace may contain stale context until checked.
- Treat `project-knowledge/` as the canonical clean project memory for humans and AI. Treat `agent-memory/` as agent operating memory. Treat `ai/inbox/` as raw evidence only.
- Treat `workspaces/fidelity/project-knowledge/` as the canonical clean project memory for humans and AI. Treat `agent-memory/` as agent operating memory. Treat `workspaces/fidelity/inbox/` as raw evidence only.
- Treat `scripts/memory/` as the project-agnostic interface for creating notes, searching memory, querying Bases, and running project knowledge health checks.
- Treat `scripts/obsidian/` as the current Obsidian adapter, not as the core memory abstraction.
- Keep Obsidian Bases clean: templates in `project-knowledge/09-templates/` must not be treated as real notes, and role mapping files such as `project-knowledge/04-people/manager.md` must not be typed as people.
- Keep Obsidian Bases clean: templates in `workspaces/fidelity/project-knowledge/09-templates/` must not be treated as real notes, and role mapping files such as `workspaces/fidelity/project-knowledge/04-people/manager.md` must not be typed as people.
- Maintain useful project-note properties when editing canonical notes, especially work-item relationships (`systems`, `workstreams`, `people`, `related`) and daily note fields (`focus`, `work-items`, `blockers`).
- Before answering questions that depend on current work state, inspect `project-knowledge/01-current/current-work.md` and the latest relevant daily note under `project-knowledge/06-daily/`.
- If `ai/inbox/mattermost-latest.md` exists, inspect it for fresher communication context before answering standup, status, or manager-message prompts.
- If the user asks for the latest/last/recent Mattermost message, the latest message from Jeff/current manager, or what someone just said, synchronize Mattermost first instead of relying on existing inbox context.
- If automatic refresh is uncertain, use the explicit latest-message flow: run the Mattermost sync command, then answer from the refreshed inbox only.
- Before answering questions that depend on current work state, inspect `workspaces/fidelity/project-knowledge/01-current/current-work.md` and the latest relevant daily note under `workspaces/fidelity/project-knowledge/06-daily/`.
- Prefer lazy loading over eager loading. Pull in only the smallest relevant files for the active task.
- For Mattermost evidence, prefer the local proxy mirror under `workspaces/fidelity/inbox/mattermost-mirror/` when present. Use `scripts/mattermost-proxy/read-context.py` or mirror views (`latest.*`, `by-date/`, `channels/`, `threads/`) before falling back to legacy `workspaces/fidelity/inbox/mattermost-latest.md` or `scripts/mattermost/generated/` artifacts.
- If the user asks for the latest/last/recent Mattermost message, the latest message from Jeff/current manager, or what someone just said, use the explicit latest-message flow and answer from the freshest refreshed evidence; the proxy mirror is primary when available.
- If automatic refresh is uncertain and the proxy mirror is not available, run the Mattermost sync command, then answer from the refreshed inbox only.
- Treat latest-message flows as read-first. Report memory update candidates, but do not edit canonical memory from that command unless the user explicitly asks to promote the fact.
- For learning-style questions, answer from known context and verified facts only; label unknowns, assumptions, and inferences instead of inventing missing details.
- For learning sessions, prioritize durable architecture, process, ownership, debugging strategy, release mechanics, domain concepts, and decision rules over transient ticket status.
- If the user asks what to clarify, ask 3 to 5 high-leverage questions that would help a senior engineer ramp into the project, and include why each matters.
- Ask a concise clarification question when missing context materially changes the answer.
- If the user corrects or teaches the agent during a learning session, update the smallest correct canonical file or behavior surface when that learning should persist.
- For any meaningful prompt, decide whether the interaction introduces or corrects project memory.
- For analysis, review, translation, or drafting requests, answer first unless a memory update is required to avoid losing a clear durable fact.
- Do not create new canonical notes before answering unless the user asked to save the information, the destination is obvious, and the write is small and non-blocking.
- Prefer updating existing canonical files over creating new files during the critical path of a user-facing answer.
- If a sync command, extraction script, or inbox refresh fails, do not update logs, state, or context files from that failed attempt.
- Treat sync failures as operational errors, not project context.
- If a patch or edit verification fails while making a non-essential memory update, stop retrying and return the user-facing answer with the failed target noted.
- `mattermost-sync` should automatically promote high-confidence project facts without asking what to promote.
- Prefer `project-knowledge/06-daily/` as the default destination for new Mattermost-derived facts.
- Promote to `project-knowledge/01-current/current-work.md` only when the fact materially changes active work over the next few days.
- Keep explicit Jira IDs and approved titles visible in `project-knowledge/02-work-items/` and summarize active items in `project-knowledge/01-current/work-items.md` when they are useful for future standups or manager updates.
- Promote to `project-knowledge/03-context/project.md` only when the fact changes durable project understanding.
- When a repeatedly mentioned person becomes relevant to project flow, create or update a file under `project-knowledge/04-people/`.
- Keep role-to-person mapping explicit in `project-knowledge/04-people/manager.md` and the roster in `project-knowledge/04-people/index.md`.
- Prefer `workspaces/fidelity/project-knowledge/06-daily/` as the default destination for new Mattermost-derived facts.
- Promote to `workspaces/fidelity/project-knowledge/01-current/current-work.md` only when the fact materially changes active work over the next few days.
- Keep explicit Jira IDs and approved titles visible in `workspaces/fidelity/project-knowledge/02-work-items/` and summarize active items in `workspaces/fidelity/project-knowledge/01-current/work-items.md` when they are useful for future standups or manager updates.
- Promote to `workspaces/fidelity/project-knowledge/03-context/project.md` only when the fact changes durable project understanding.
- When a repeatedly mentioned person becomes relevant to project flow, create or update a file under `workspaces/fidelity/project-knowledge/04-people/`.
- Keep role-to-person mapping explicit in `workspaces/fidelity/project-knowledge/04-people/manager.md` and the roster in `workspaces/fidelity/project-knowledge/04-people/index.md`.
- Never promote tooling chatter, sync status, or generic conversation noise.
- Direct user prompts are also memory sources. Do not limit memory updates to explicit sync commands.
- If a new prompt corrects prior understanding, update the canonical file directly instead of keeping both versions alive.
- Do not ask what should be saved when the correct destination is already clear.
- If the user provides durable new facts, update the appropriate context files instead of leaving the new information only in chat history.
- When the prompt is primarily asking for analysis of a screenshot, message, or document, do not interrupt the answer to perform proactive note creation unless that persistence is the explicit goal.
- When creating a new canonical note from a known type, prefer `scripts/memory/memory.sh create <type> <slug> [title]` so type-to-folder routing stays centralized.
- If the Obsidian CLI adapter fails, fall back to direct Markdown operations and treat the failure as tooling status, not project context.
- If a previous context file is now stale or inaccurate, update that file directly.
- Prefer correcting canonical context over appending contradictory notes.
- Keep changes concise and auditable.
- When the topic is architectural or historical, prefer updating the relevant file under `project-knowledge/03-context/systems/`, `project-knowledge/03-context/workstreams/`, or project-facing `project-knowledge/03-context/process/` instead of overloading `project-knowledge/03-context/project.md`.
- When the user asks Swift, SwiftUI, iOS architecture, testing, or debugging questions, use `project-knowledge/03-context/ios/` and the local OpenCode iOS skills before answering.
- When the topic is architectural or historical, prefer updating the relevant file under `workspaces/fidelity/project-knowledge/03-context/systems/`, `workspaces/fidelity/project-knowledge/03-context/workstreams/`, or project-facing `workspaces/fidelity/project-knowledge/03-context/process/` instead of overloading `workspaces/fidelity/project-knowledge/03-context/project.md`.
- When the user asks Swift, SwiftUI, iOS architecture, testing, or debugging questions, use `workspaces/fidelity/project-knowledge/03-context/ios/` and the local OpenCode iOS skills before answering.
- When the user asks about programming concepts, dependency tooling, package managers, CI/build tooling, testing frameworks, or practices that may be outdated or opinion-sensitive, verify against primary/current documentation before making strong claims.
- For CocoaPods, podspecs, private specs repos, trunk/CDN behavior, Swift Package Manager, Xcode, Swift, Apple frameworks, and similar project-linked tooling, do not rely only on memory.
- When the user asks for a prompt for another AI, GitHub Copilot, or the Fidelity development machine, use `agent-memory/workflows/ai-to-ai-prompting.md` and generate a self-contained prompt.

24
DECOMMISSIONED.md Normal file
View File

@@ -0,0 +1,24 @@
# Decommissioned Workspace
This repository is no longer the active AIWorkspace runtime.
As of 2026-05-22, the active split is:
- reusable core: `/Users/david/Developer/ai-workspace`
- Fidelity context pack: `/Users/david/Developer/fidelity-ai-context`
- local project registry: `~/Library/Application Support/AIWorkspace/projects.json`
- runtime state: `~/Library/Application Support/AIWorkspace/runtime/`
- logs: `~/Library/Logs/AIWorkspace/`
Do not start services from this repository unless intentionally rolling back.
Use the new core instead:
```bash
cd /Users/david/Developer/ai-workspace
python3 scripts/aiw/services.py status --project fidelity
python3 scripts/aiw/services.py doctor --project fidelity
```
The old profile-based service manager may report services as `externally running`
because the new core owns the same health ports.

29
GEMINI.md Normal file
View File

@@ -0,0 +1,29 @@
# Gemini Workspace Entry
Use this file as the Gemini CLI entry point for this workspace.
Shared rules and context already live in the normal workspace files. Do not duplicate or reinterpret them here.
Read these first:
@./AGENTS.md
@./workspaces/fidelity/project-knowledge/00-start/start-here.md
@./workspaces/fidelity/project-knowledge/01-current/current-work.md
@./workspaces/fidelity/project-knowledge/01-current/work-items.md
## Tool Surface
- `AGENTS.md` is the primary shared rule file.
- `.agents/` is the canonical shared cross-platform surface for workflows and reusable rule/skill content.
- `.opencode/` is the OpenCode compatibility/runtime surface.
- `.agent/` is an alias for tools that expect the singular directory naming.
- `workspaces/fidelity/project-knowledge/` is canonical project memory.
- `agent-memory/` is agent operating memory.
## Gemini-Specific Operating Notes
- Keep the hot context small and load additional files lazily based on the active task.
- Follow `AGENTS.md` as the shared source of truth for answer-first behavior, memory promotion, and lazy loading.
- For analysis, review, translation, or drafting prompts, answer first and persist second unless saving the fact is clearly required to produce a safe answer.
- Do not create new canonical notes in the critical path of a simple answer unless the user explicitly asked to save the information or the destination is obvious and non-blocking.
- When memory should be updated, prefer the smallest correct change to `workspaces/fidelity/project-knowledge/` and avoid duplicating stale and corrected versions.

434
README.md
View File

@@ -1,340 +1,216 @@
# AI Workspace - Fidelity Profile
# AI Workspace
Reusable AI-native companion workspace with Fidelity configured as the first real project profile.
> **Decommissioned:** this repository is no longer the active AIWorkspace runtime.
> Active services now run from `/Users/david/Developer/ai-workspace`, and Fidelity
> context lives in `/Users/david/Developer/fidelity-ai-context`. See
> [`DECOMMISSIONED.md`](DECOMMISSIONED.md) before using this repo.
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.
AI Workspace is a local, profile-based companion workspace for AI-assisted professional work. It keeps project memory, raw evidence, local services, and AI client integrations organized so agents can work from current, auditable context instead of chat history alone.
The reusable logic lives in `core/`. The clean project second brain lives in `project-knowledge/`. Agent operating memory lives in `agent-memory/`. Fidelity-specific setup lives in the active profile under `profiles/fidelity/`.
The first real profile in this repository is `fidelity`, but the reusable model is intentionally project-independent.
---
## What This Repo Is
## Purpose
Use this repository beside your real implementation work to:
- 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
- Generate high-quality prompts for GitHub Copilot or another AI on the Fidelity development machine
- Improve communication quality without losing technical accuracy
- maintain human-readable project memory;
- capture communication or screenshot evidence before curation;
- generate standups, stakeholder updates, and AI-to-AI prompts;
- expose bounded local context to AI clients through MCP;
- manage local services such as capture tools, context servers, and inbox helpers;
- support long-running AI workflows with durable state artifacts.
---
This repository is not the product codebase. It is a context and workflow layer.
## Operating Model
## Architecture At A Glance
You work on Fidelity from a different machine.
This workspace is used to:
- record what happened during implementation and debugging
- sync relevant communication from Mattermost
- preserve current project context between sessions
- draft messages for the current manager or stakeholder with the right tone and scope
- translate rough notes into concise native-sounding English
- generate self-contained prompts for another AI that does have access to the product codebase
```text
Communication / photos / archives / manual notes
Raw profile inbox evidence
Human or agent curation
Canonical Markdown project knowledge
Derived local index
Read-only MCP context server
OpenCode / Claude Code / Copilot / Antigravity / other AI clients
```
Core principle:
Context must be updated before asking AI to write.
```text
Markdown project knowledge is canonical. Inboxes, indexes, chat memory, and cloud memory are supporting layers.
```
Reusable principle:
## Main Folders
Integrations extract evidence. The agent promotes memory.
| Path | Purpose |
|---|---|
| `docs/` | Simple project-independent documentation for developers adopting the workspace |
| `core/` | Reusable operating model and architecture notes |
| `profiles/` | Project-specific configuration and assumptions |
| `workspaces/<profile>/project-knowledge/` | Profile-owned canonical Markdown vault |
| `agent-memory/` | Agent behavior, promotion, verification, and workflow memory |
| `workspaces/<profile>/inbox/` | Profile-owned raw evidence before promotion into canonical memory |
| `scripts/aiw/` | Service manager and local indexer |
| `scripts/mcp/` | MCP servers exposing bounded local context |
| `scripts/memory/` | Project-agnostic interface for canonical memory operations |
| `scripts/obsidian/` | Current Obsidian adapter |
| `scripts/mattermost-proxy/` | Mattermost proxy mirror connector for local evidence capture |
| `scripts/iphone-photo-inbox/` | Local photo inbox receiver |
| `apps/mac/AIWorkspace/` | macOS menu bar app for service visibility and control |
---
## Quick Start
## Reusable Architecture
Run basic checks for the active profile:
### /project-knowledge
```bash
python3 scripts/aiw/services.py doctor --profile fidelity
python3 scripts/aiw/services.py status --profile fidelity
python3 scripts/aiw/indexer.py build --profile fidelity
```
Canonical Obsidian second brain and transferable project knowledge.
Start the read-only context MCP server:
- `00-start/` -> onboarding, glossary, and start-here
- `01-current/` -> current work and active work-item summary
- `02-work-items/` -> ticket/task notes with metadata properties
- `03-context/` -> systems, workstreams, project-facing process, and iOS context
- `04-people/` -> people, roles, and collaboration context
- `05-decisions/` -> durable decisions
- `06-daily/` -> daily notes
- `07-maps/` -> graph hubs and semantic maps
- `08-bases/` -> Obsidian Bases
- `09-templates/` -> Obsidian templates
- `attachments/` -> vault assets
```bash
python3 scripts/aiw/services.py start aiw-context-mcp --profile fidelity
```
### /agent-memory
HTTP endpoint:
Agent operating memory.
```text
http://127.0.0.1:8765/mcp
```
- `behavior/` -> agent learning and self-maintenance rules
- `memory/` -> promotion, correction, and context-maintenance rules
- `integrations/` -> memory interface, Obsidian adapter, communication sources, and technical verification
- `workflows/` -> AI-to-AI prompting and workspace behavior model
- `maps/` -> agent-side navigation maps
Health endpoint:
### /core
```text
http://127.0.0.1:8765/health
```
Project-independent workspace logic.
## Documentation
- `README.md` -> reusable operating model
- `memory/operational-memory.md` -> reusable 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
Start here:
### /profiles
- [Getting Started](docs/getting-started.md)
- [Architecture](docs/architecture.md)
- [Profiles](docs/profiles.md)
- [Memory Model](docs/memory-model.md)
- [MCP](docs/mcp.md)
- [Services](docs/services.md)
- [Local RAG Index](docs/local-rag-index.md)
- [Security and Privacy](docs/security-and-privacy.md)
Project-specific configuration.
Profile-specific project knowledge starts at:
- `profiles/fidelity/` -> active Fidelity implementation profile
- `profiles/example/` -> non-sensitive example profile for new projects
- `workspaces/fidelity/project-knowledge/00-start/start-here.md` for the current Fidelity vault
- `profiles/fidelity/profile.md` for the Fidelity profile declaration
- `profiles/example/profile.md` for a sanitized reusable profile example
Profiles declare project assumptions, communication sources, work-item system, stakeholders, enabled commands, and enabled skills.
## Profiles
---
A profile represents one project, client, team, or workflow. It declares project assumptions, context sources, local services, and workflow defaults.
## Project Scope
Current profiles:
Fidelity iOS ecosystem:
```text
profiles/fidelity/
profiles/example/
```
- Fid4
- XFlowSDK
- FTFrameworks
- REST migration replacing GraphQL over time
- Discourse and AO issues that require careful classification
Each profile resolves memory and inbox paths from `profiles/<profile>/workspace.json`. Fidelity data now lives under `workspaces/fidelity/`.
---
## Memory Model
## Runtime Structure
The workspace separates memory by responsibility:
### /ai
- `workspaces/<profile>/project-knowledge/`: canonical project facts for humans and AI;
- `workspaces/<profile>/inbox/`: raw evidence;
- `agent-memory/`: rules for how agents behave;
- `.aiw/indexes/`: derived local search indexes;
- external systems such as mem9: optional agent recall, not project truth.
Runtime inbox for communication evidence.
Do not treat generated connector output or vector indexes as authoritative memory. Promote durable facts into the smallest correct Markdown file.
- `inbox/` -> communication evidence and transient inbox files before promotion into `project-knowledge/`
## MCP Model
### /prompts
`aiw-context-mcp` exposes profile-bounded, read-only context through MCP tools and resources. It does not capture traffic, send messages, or promote memory.
Reusable prompts for:
Current examples:
- standups
- Mattermost updates
- manager communication
- issue clarification
- `project_current_context`
- `project_search_memory`
- `memory_hybrid_search`
- `communication_latest`
- `communication_standup_context`
- `photos_latest`
### /workflows
## Service Manager
Repeatable working guides for:
The service manager provides a single local lifecycle surface:
- daily context sync
- flow debugging
- external issue analysis
```bash
python3 scripts/aiw/services.py start --profile fidelity
python3 scripts/aiw/services.py stop --profile fidelity
python3 scripts/aiw/services.py status --profile fidelity --json
python3 scripts/aiw/services.py logs aiw-context-mcp --profile fidelity
```
### /scripts
Runtime logs, PID files, and state live under `.aiw/runtime/` and are ignored.
Helpers for automation around memory access, context generation, communication drafting, and imports.
## Local Index
- `scripts/memory/` -> project-agnostic interface for canonical memory
- `scripts/obsidian/` -> current Obsidian adapter and URI helpers
- `scripts/mattermost/` -> live communication connector
- `scripts/slack/` -> historical archive importer
Build a derived search index over canonical Markdown:
### /project-knowledge/.obsidian
```bash
python3 scripts/aiw/indexer.py build --profile fidelity
python3 scripts/aiw/indexer.py search "dismissal lifecycle" --profile fidelity
```
Optional Obsidian vault configuration.
Indexes live under `.aiw/indexes/` and are ignored because they are rebuildable local artifacts.
Open `project-knowledge/` as the Obsidian vault. Do not open the repository root as the vault.
## Security Defaults
Portable vault configuration can be versioned, while local layout and plugin runtime files are ignored.
- Keep secrets in ignored `.env` files.
- Do not commit raw tokens, cookies, session IDs, or captured headers.
- Keep MCP read-only by default.
- Treat inboxes and generated indexes as sensitive local artifacts.
- Use cloud memory systems only with an explicit data policy.
Obsidian is the current visual interface over canonical memory. The reusable memory access layer is `scripts/memory/`, so the workspace can later swap Obsidian for another Markdown knowledge tool without changing the memory model.
## Tests
---
```bash
python3 scripts/aiw/test_services.py
python3 scripts/aiw/test_profile.py
python3 scripts/aiw/test_indexer.py
python3 scripts/mcp/aiw-context-mcp/test_server.py
python3 scripts/iphone-photo-inbox/test_receiver.py
```
## Daily Usage
## Adoption Strategy
### Start of day
Recommended order for new projects:
Read:
1. Create an isolated profile:
- `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/04-people/manager.md`
- `project-knowledge/04-people/index.md`
- latest file under `project-knowledge/06-daily/`
```bash
python3 scripts/aiw/profile.py create my-project --display-name "My Project"
```
### During the day
2. Configure only the services the project needs.
3. Keep raw evidence outside canonical memory.
4. Build the local index.
5. Connect AI clients through MCP.
6. Promote durable facts into Markdown as work progresses.
Capture:
Validate the profile layout with:
- implementation progress from the main development machine
- Mattermost conversations that change scope or priorities
- debugging findings
- open questions, blockers, and follow-ups
```bash
python3 scripts/aiw/profile.py doctor --profile my-project
```
Write updates in:
- `project-knowledge/06-daily/YYYY-MM-DD.md`
### Before sending a message
Confirm:
- context
- current observation
- requested or implied action
- whether the issue is external behavior or regression
- whether the flow is authenticated or non-authenticated
### End of day
Update:
- today log
- current state
- next communication needs for the current manager or stakeholder
---
## Expected Output
This workspace should help produce:
- high-signal standups
- clearer Mattermost updates
- concise supervisor communication
- better issue framing
- more reliable AI-generated English
---
## OpenCode Entry Point
This workspace is designed to work well with the OpenCode VS Code extension.
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 `/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 reusable core plus active project profile
- sync live communication context into the workspace inbox
- draft standups
- draft manager updates
- 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.
---
## Generic Commands
- `/workspace-context` -> load core plus active profile
- `/memory-health` -> check canonical memory and adapter health
- `/memory-create` -> create a typed canonical note through the memory interface
- `/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 `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 `project-knowledge/06-daily/`, `project-knowledge/01-current/`, `project-knowledge/02-work-items/`, and `project-knowledge/03-context/`.
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 `FIDELITY_*` variables remain supported as Fidelity-profile aliases, but new reusable setup should prefer `AIW_*`.
---
## Project Knowledge Vault
Open `project-knowledge/` as the Obsidian vault. The repository root remains the technical workspace for OpenCode, scripts, profiles, runtime inboxes, and generated evidence.
Recommended entry point:
- `project-knowledge/00-start/start-here.md`
- `project-knowledge/00-start/onboarding.md` for new members
- `project-knowledge/00-start/glossary.md` for terminology
- `project-knowledge/07-maps/` for graph hubs
Use Obsidian for:
- visual navigation
- graph/backlink review
- manual review of work items, people, decisions, and logs
- lightweight editing of the same Markdown memory files
Do not use Obsidian as a second memory database. The source of truth remains the versioned Markdown files under `project-knowledge/`.
Runtime/evidence stays outside the vault:
- `.opencode/`
- `scripts/`
- `core/`
- `profiles/`
- `ai/inbox/`
- `scripts/*/generated/`
Ignored Obsidian runtime files include workspace layout, plugin cache, snippets, and local plugin installs.
Project-agnostic memory helpers live under `scripts/memory/`:
- `scripts/memory/memory.sh create <type> <slug> [title]`
- `scripts/memory/memory.sh search <query> [folder]`
- `scripts/memory/memory.sh base-query <base-name> [format]`
- `scripts/memory/memory.sh health`
Obsidian adapter helpers live under `scripts/obsidian/`:
- `scripts/obsidian/cli.sh <obsidian-cli-command>`
- `scripts/obsidian/open.sh <vault-relative-path>`
- `scripts/obsidian/daily.sh`
- `scripts/obsidian/search.sh <query>`
- `scripts/obsidian/uri.sh <action> key=value`
---
## 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. Create or adapt `project-knowledge/` for the project-specific canonical memory.
6. Use `/workspace-context` to load the core plus active profile.
See `core/profiles/create-project-profile.md` for the full checklist.
The reusable core should not depend on a company name, ticket prefix, channel name, programming stack, or AI client.

View File

@@ -11,7 +11,7 @@ tags:
This folder contains the operating memory for the AI agent.
It is not Fidelity project documentation. Do not transfer this folder as project knowledge for a new engineer. Transfer `project-knowledge/` for the project second brain, and use this folder to explain how the agent should maintain that knowledge.
It is not Fidelity project documentation. Do not transfer this folder as project knowledge for a new engineer. Transfer `workspaces/fidelity/project-knowledge/` for the project second brain, and use this folder to explain how the agent should maintain that knowledge.
---
@@ -22,14 +22,14 @@ It is not Fidelity project documentation. Do not transfer this folder as project
- Define how the agent uses the memory interface and Obsidian adapter.
- Define how the agent verifies technical claims.
- Define how the agent updates commands, prompts, skills, and rules when recurring behavior changes.
- Preserve reusable prompting and output-quality lessons so the agent does not need to rediscover them in later sessions.
---
## Relationship To Project Knowledge
- `project-knowledge/` is the clean Obsidian vault and project second brain.
- `workspaces/fidelity/project-knowledge/` is the clean Obsidian vault and project second brain.
- `agent-memory/` is the agent operating manual.
- `ai/inbox/` and connector `generated/` folders are evidence, not canonical memory.
- `workspaces/fidelity/inbox/` and connector `generated/` folders are evidence, not canonical memory.
- `scripts/memory/` is the project-agnostic interface for reading, searching, creating, querying, and validating project knowledge.
- `scripts/obsidian/` is the current Obsidian adapter and must not become the core abstraction.

View File

@@ -1,7 +1,7 @@
---
type: agent-behavior
status: active
updated: 2026-04-17
updated: 2026-04-21
tags: [process, memory, agent]
---
@@ -13,9 +13,9 @@ Make workspace memory maintenance part of the agent's normal job, not a separate
---
## Default Agent Behavior
## Default Agent Behavior (Real-Time Auto-Documentation)
For any meaningful prompt, the agent should decide whether the interaction changes project memory.
For every meaningful prompt, the agent must evaluate whether a memory update is needed in the same turn. Auto-documentation is part of the job, but it must not dominate the critical path of simple user-facing answers.
This applies to:
@@ -27,7 +27,13 @@ This applies to:
- debugging discussions
- corrections to previous understanding
The agent should not wait for a separate promotion command when the right update is already clear.
The agent must not wait for a separate promotion command. The agent should proactively update `workspaces/fidelity/project-knowledge/` (including 01-current, 02-work-items, 03-context, 04-people, 06-daily) within the same conversational turn when new information is clear, durable, and the destination is obvious.
- When editing `workspaces/fidelity/project-knowledge/`, write as a human engineer maintaining shared project documentation.
- Keep agent-operating logic out of `workspaces/fidelity/project-knowledge/`; store that logic in prompts, commands, skills, agents, or `agent-memory/`.
- Answer-first rule: when the user's main goal is analysis, review, translation, or drafting, answer first unless persistence is required to avoid losing a clear durable fact.
- Do not create a brand-new canonical note during the critical path of the answer unless the user explicitly asked to save the fact or the new note is the smallest correct update.
- Prefer updating an existing canonical note over creating a new file when both are valid.
---
@@ -65,7 +71,7 @@ Avoid low-value learning-session questions such as:
- whether a specific PR was approved today
- whether a ticket moved columns today
- what the next standup line should be
- temporary sequencing questions that belong in `project-knowledge/01-current/` or `project-knowledge/06-daily/`
- temporary sequencing questions that belong in `workspaces/fidelity/project-knowledge/01-current/` or `workspaces/fidelity/project-knowledge/06-daily/`
Prefer high-value questions such as:
@@ -121,10 +127,10 @@ If a correction applies to a command, prompt, skill, agent, or reusable rule, up
Examples:
- A standup formatting correction should update `prompts/standup.md` and `.opencode/commands/standup.md`.
- A standup formatting correction should update `prompts/standup.md` and the shared workflow in `.agents/workflows/standup.md`.
- A Mattermost freshness correction should update the Mattermost command/plugin instructions.
- A Copilot prompt-structure correction should update `prompts/copilot-prompt.md`, `.opencode/commands/copilot-prompt.md`, or the Copilot skill.
- A Swift answer-quality correction should update the relevant iOS skill or `project-knowledge/03-context/ios/` guidance.
- A Copilot prompt-structure correction should update `prompts/copilot-prompt.md`, `.agents/workflows/copilot-prompt.md`, or the shared skill/rule source.
- A Swift answer-quality correction should update the relevant iOS skill or `workspaces/fidelity/project-knowledge/03-context/ios/` guidance.
Keep the daily log as evidence of what happened, but make the reusable behavior live in the file that controls that behavior.
@@ -132,7 +138,7 @@ Keep the daily log as evidence of what happened, but make the reusable behavior
## File Selection
### `project-knowledge/06-daily/YYYY-MM-DD.md`
### `workspaces/fidelity/project-knowledge/06-daily/YYYY-MM-DD.md`
Default destination for:
@@ -142,7 +148,7 @@ Default destination for:
- story and approval movement
- context that is important now but may evolve later
### `project-knowledge/01-current/current-work.md`
### `workspaces/fidelity/project-knowledge/01-current/current-work.md`
Use when the fact changes the active work window, including:
@@ -151,28 +157,28 @@ Use when the fact changes the active work window, including:
- current blockers or debugging constraints
- manager direction that changes the next few days of work
### `project-knowledge/02-work-items/*.md` and `project-knowledge/01-current/work-items.md`
### `workspaces/fidelity/project-knowledge/02-work-items/*.md` and `workspaces/fidelity/project-knowledge/01-current/work-items.md`
Use `project-knowledge/02-work-items/*.md` as the canonical memory for current Jira-linked work that should remain easy to reference across sessions, especially:
Use `workspaces/fidelity/project-knowledge/02-work-items/*.md` as the canonical memory for current Jira-linked work that should remain easy to reference across sessions, especially:
- Jira IDs
- approved or explicit titles
- currently relevant status notes
- current points or scope notes
Use `project-knowledge/01-current/work-items.md` as the summary view of what is active now.
Use `workspaces/fidelity/project-knowledge/01-current/work-items.md` as the summary view of what is active now.
These files should help standups and manager updates mention work items precisely.
### `project-knowledge/03-context/project.md`
### `workspaces/fidelity/project-knowledge/03-context/project.md`
Use for durable project knowledge that should survive beyond the current work window.
### `project-knowledge/04-people/manager.md`
### `workspaces/fidelity/project-knowledge/04-people/manager.md`
Use only when a communication preference or manager expectation becomes stable enough to reuse repeatedly.
### `project-knowledge/04-people/index.md` and `project-knowledge/04-people/*.md`
### `workspaces/fidelity/project-knowledge/04-people/index.md` and `workspaces/fidelity/project-knowledge/04-people/*.md`
Use these files for:
@@ -186,11 +192,11 @@ When the role is not explicit, store:
- what kinds of topics they influence
- how they affect approvals, scope, debugging, or communication
### `project-knowledge/05-decisions/*.md`
### `workspaces/fidelity/project-knowledge/05-decisions/*.md`
Use for explicit confirmed decisions with ongoing impact.
### `.opencode/commands/`, `prompts/`, `.opencode/agents/`, `.opencode/skills/`, and `agent-memory/`
### `.agents/workflows/`, `.agents/rules/`, `.agents/skills/`, `.opencode/`, `prompts/`, and `agent-memory/`
Use these when the new information changes how the workspace should operate:

View File

@@ -19,9 +19,9 @@ The agent must keep the workspace behavior aligned with recurring user correctio
- Update `.opencode/commands/` for slash-command behavior.
- Update `prompts/` for reusable drafting shape.
- Update `.opencode/agents/` and `AGENTS.md` for default agent behavior.
- Update `.opencode/skills/` for specialized workflows.
- Update `.agents/skills/` for specialized workflows.
- Update `agent-memory/` for reusable agent operating rules.
- Update `project-knowledge/` only when the correction changes project knowledge or project-facing process documentation.
- Update `workspaces/fidelity/project-knowledge/` only when the correction changes project knowledge or project-facing process documentation.
---
@@ -32,4 +32,3 @@ The agent must keep the workspace behavior aligned with recurring user correctio
- Agent implementation chatter.
- Generic preference notes that only affect agent behavior.
- Duplicate summaries of already-correct project facts.

View File

@@ -1,7 +1,7 @@
---
type: agent-integration
status: active
updated: 2026-04-17
updated: 2026-05-20
tags:
- communication
- evidence
@@ -17,10 +17,24 @@ Communication connectors extract evidence. The agent decides what to promote.
Mattermost is the current live communication connector.
- Fresh output goes to `ai/inbox/mattermost-latest.md`.
- Generated extraction artifacts stay under `scripts/mattermost/generated/`.
- Primary local evidence is the Mattermost proxy mirror under `workspaces/fidelity/inbox/mattermost-mirror/` when present.
- Prefer `workspaces/fidelity/inbox/mattermost-mirror/latest.md` / `latest.jsonl` for latest-message context, `by-date/YYYY/MM/YYYY-MM-DD.jsonl` for daily/standup context, `channels/<channel>/YYYY/MM/YYYY-MM-DD.jsonl` for channel-specific context, and `threads/<root-or-post-id>.jsonl` for thread-specific context.
- Use `scripts/mattermost-proxy/read-context.py` from commands/workflows instead of reading ad hoc files; it prefers the profile proxy mirror and can read configured sync artifacts when a mirror is unavailable.
- Legacy fresh output may still go to `workspaces/fidelity/inbox/mattermost-latest.md`.
- Legacy generated extraction artifacts stay under `scripts/mattermost/generated/`.
- Failed syncs must not update project knowledge.
- Latest-message requests must refresh Mattermost before answering.
- Latest-message requests are read-first. The agent may identify a memory update candidate, but should not edit `workspaces/fidelity/project-knowledge/` from the latest-message command unless the user explicitly asks to promote the fact.
- Standup generation is a separate required-refresh flow: it must fetch Mattermost before drafting, even though general prompts should not sync automatically.
- Standup reads should use the focused reader mode, `scripts/mattermost-proxy/read-context.py --mode standup --today YYYY-MM-DD`, which reads date-bucketed previous-workday/today records and should use the active profile's configured `AIW_MATTERMOST_CONTEXT_CHANNELS` when available. Avoid loading broad mirror `latest.md` into standup prompts because it may include stale or unrelated channels and waste tokens. Keep project-specific channel names out of reusable connector code.
- If adding MCP support for Mattermost, treat it as a read-only query wrapper over the existing proxy mirror and `read-context.py`, not as a replacement for the capture/mirror pipeline. Keep the mirror's file layout as canonical raw evidence and expose only narrow tools such as latest, standup/date, channel, and thread reads with channel filters and limits.
- Do not build a write-capable Mattermost MCP or expose tokens, cookies, raw headers, or broad unfiltered raw dumps through MCP. MCP output should remain evidence for agent reasoning; promotion to `workspaces/fidelity/project-knowledge/` still follows normal memory rules.
- If the proxy mirror is running, treat it as fresher than generated sync artifacts. Do not ignore mirror evidence merely because a sync command also ran.
- Do not refresh Mattermost just because a prompt mentions a manager or stakeholder.
- Treat document review, message polishing, translation, and "does this align with Jeff's expectations?" prompts as normal drafting tasks unless the user explicitly asks for the latest message or fresh Mattermost evidence.
- The OpenCode plugin syncs automatically only for explicit latest-message requests by default.
- Optional aggressive sync can be enabled with `AIW_MATTERMOST_SYNC_ON_SESSION=true` or `AIW_MATTERMOST_SYNC_ON_PROMPT=true`, but these should stay off for low-latency daily use.
- When invoking Mattermost sync from OpenCode, do not use parameter expansion that places a command with spaces into a single shell word, such as `${VAR:-bash scripts/mattermost/sync.sh}`. Run configured command strings via `bash -lc "$AIW_MATTERMOST_SYNC_CMD"`, and run the built-in wrapper as separate words: `bash scripts/mattermost/sync.sh`.
---
@@ -28,7 +42,6 @@ Mattermost is the current live communication connector.
Slack export import is the current historical archive connector.
- Archive evidence stays outside `project-knowledge/`.
- Archive evidence stays outside `workspaces/fidelity/project-knowledge/`.
- Promote only durable project facts, people context, process rules, or historical architecture lessons.
- Do not promote dated status details unless they explain current context.

View File

@@ -0,0 +1,77 @@
---
type: agent-integration
status: proposed
updated: 2026-05-05
tags:
- memory
- integration
- mem9
---
# mem9 Integration
## Goal
Use mem9 as a cross-session, cross-agent recall layer without replacing the workspace's auditable Markdown memory.
## Source Of Truth
`workspaces/fidelity/project-knowledge/` remains the canonical human-readable Fidelity project memory.
`agent-memory/` remains the canonical operating memory for agent behavior, workflows, promotion rules, and integration guidance.
mem9 should recall and surface relevant facts, but durable project updates must still be promoted into the correct Markdown file when they become canonical.
## Recommended Scope
Use a project-scoped mem9 profile for this workspace when possible so Fidelity context, agent behavior, and personal/global memories do not collapse into one undifferentiated pool.
Do not bulk-import raw inboxes, generated sync output, full chat transcripts, or broad project folders by default. Import only curated facts, stable preferences, and distilled summaries.
## What To Store
- Stable user/workspace preferences that should survive sessions.
- Durable agent behavior rules that are useful across Codex/OpenCode sessions.
- Verified project facts already present in canonical Markdown.
- Short summaries of current work that help recall where to begin.
## What Not To Store
- Secrets, credentials, API keys, tokens, auth cookies, or private environment values.
- Raw Mattermost/Slack inbox dumps.
- Fidelity product source code or proprietary implementation snippets.
- Unverified assumptions, temporary sync failures, or tooling chatter.
- Duplicates of every daily note without curation.
## Efficient Use Pattern
1. Recall mem9 early for user preferences and relevant workspace history.
2. Load hot Markdown context from `AGENTS.md` / `opencode.json` instructions.
3. For current-work questions, still inspect `workspaces/fidelity/project-knowledge/01-current/current-work.md` and the latest relevant daily note.
4. Answer or act from verified context.
5. When the interaction adds durable knowledge, update canonical Markdown first; store a compact mem9 memory only if it improves future recall.
## Codex Setup Notes
The upstream mem9 Codex integration uses a marketplace plugin and managed hooks. `$mem9:setup` is the primary setup command. It manages shared profiles, credentials, user/project scope, and hook repair.
Expected local surfaces include:
- `$CODEX_HOME/hooks.json`
- `$CODEX_HOME/config.toml`
- `$CODEX_HOME/mem9/`
- `$MEM9_HOME/.credentials.json`
- `<project>/.codex/mem9/config.json` for project overrides
Keep `$MEM9_HOME/.credentials.json` outside the repository and never commit API keys.
## Validation Checklist
- Confirm Codex CLI is at least the version required by the mem9 plugin.
- Confirm Node.js 22 or newer is available to the Codex runtime.
- Install the mem9 Codex plugin from the mem9 marketplace.
- Run `$mem9:setup` and choose hosted API or self-hosted API.
- Apply project scope for this workspace if using a dedicated Fidelity profile.
- Verify `$mem9:recall` returns relevant memories.
- Verify `$mem9:store` stores one approved non-sensitive memory.
- Inspect mem9 dashboard / memory list for accidental sensitive content.
- Keep canonical Markdown updates auditable through git.

View File

@@ -15,20 +15,16 @@ Use `scripts/memory/memory.sh` as the project-agnostic interface to project know
## Default Root
The primary project knowledge directory is `project-knowledge/`.
The primary project knowledge directory is `workspaces/fidelity/project-knowledge/`.
Environment variable precedence:
Configuration precedence:
1. `AIW_PROJECT_KNOWLEDGE_DIR`
2. `AIW_MEMORY_VAULT_DIR`
3. `AIW_OBSIDIAN_VAULT_DIR`
4. `<workspace-root>/project-knowledge`
`AIW_MEMORY_VAULT_DIR` and `AIW_OBSIDIAN_VAULT_DIR` are transition aliases only.
1. `AIW_PROJECT_PROFILE`
2. `profiles/<profile>/workspace.json`
3. optional local `AIW_PROJECT_KNOWLEDGE_DIR` override
---
## Agent Rule
Prefer the memory interface for typed note creation, search, Base queries, and health checks. Use direct Markdown edits when the adapter fails or when precise edits are simpler and safer.

View File

@@ -16,13 +16,13 @@ Obsidian is the current interface over canonical Markdown memory. The workspace-
## Recommended Start
Open the `project-knowledge/` folder as the Obsidian vault, not the repository root and not `agent-memory/`.
Open the `workspaces/fidelity/project-knowledge/` folder as the Obsidian vault, not the repository root and not `agent-memory/`.
Open:
- [Start Here](../../project-knowledge/00-start/start-here.md)
- [New Member Onboarding](../../project-knowledge/00-start/onboarding.md)
- [Knowledge Maps](../../project-knowledge/07-maps/index.md)
- [Start Here](../../workspaces/fidelity/project-knowledge/00-start/start-here.md)
- [New Member Onboarding](../../workspaces/fidelity/project-knowledge/00-start/onboarding.md)
- [Knowledge Maps](../../workspaces/fidelity/project-knowledge/07-maps/index.md)
---
@@ -32,26 +32,26 @@ Open:
Start with:
- [New Member Onboarding](../../project-knowledge/00-start/onboarding.md)
- [Glossary](../../project-knowledge/00-start/glossary.md)
- [Current Work Map](../../project-knowledge/07-maps/current-work.md)
- [Fidelity Domain Map](../../project-knowledge/07-maps/fidelity-domain.md)
- [New Member Onboarding](../../workspaces/fidelity/project-knowledge/00-start/onboarding.md)
- [Glossary](../../workspaces/fidelity/project-knowledge/00-start/glossary.md)
- [Current Work Map](../../workspaces/fidelity/project-knowledge/07-maps/current-work.md)
- [Fidelity Domain Map](../../workspaces/fidelity/project-knowledge/07-maps/fidelity-domain.md)
### Daily Work View
Start with:
- [Current Work Map](../../project-knowledge/07-maps/current-work.md)
- [Work Items Map](../../project-knowledge/07-maps/work-items.md)
- [Daily Notes Index](../../project-knowledge/06-daily/index.md)
- [Current Work Map](../../workspaces/fidelity/project-knowledge/07-maps/current-work.md)
- [Work Items Map](../../workspaces/fidelity/project-knowledge/07-maps/work-items.md)
- [Daily Notes Index](../../workspaces/fidelity/project-knowledge/06-daily/index.md)
### System Understanding View
Start with:
- [Fidelity Domain Map](../../project-knowledge/07-maps/fidelity-domain.md)
- [Fidelity Apps Map](../../project-knowledge/07-maps/fidelity-apps.md)
- [People Map](../../project-knowledge/07-maps/people.md)
- [Fidelity Domain Map](../../workspaces/fidelity/project-knowledge/07-maps/fidelity-domain.md)
- [Fidelity Apps Map](../../workspaces/fidelity/project-knowledge/07-maps/fidelity-apps.md)
- [People Map](../../workspaces/fidelity/project-knowledge/07-maps/people.md)
---

View File

@@ -50,4 +50,4 @@ Reusable workspace logic and project-independent operating rules.
## Project Profile
- Active project profile: `profiles/fidelity/profile.md`
- Project knowledge vault: `project-knowledge/`
- Project knowledge vault: `workspaces/fidelity/project-knowledge/`

Some files were not shown because too many files have changed in this diff Show More