Files
fidelity-ai-workspace/AGENTS.md

72 lines
4.2 KiB
Markdown

# Fidelity AI Workspace Rules
This repository is a companion workspace for Fidelity iOS work, not the product codebase.
OpenCode should treat this project as a persistent context layer used to:
- keep current project state accurate
- capture durable information from daily work
- draft standups and Mattermost messages
- improve communication for the current manager or stakeholder in natural professional English
## Always-Loaded Context
The detailed operating rules live in:
- `ai/AGENTS.md`
- `ai/context/index.md`
- `ai/context/project.md`
- `ai/context/ios/index.md`
- `ai/context/ios/current-practices.md`
- `ai/context/ios/project-swift-guidance.md`
- `ai/context/systems/index.md`
- `ai/context/workstreams/index.md`
- `ai/context/process/communication.md`
- `ai/context/process/ai-to-ai-prompting.md`
- `ai/context/people/manager.md`
- `ai/context/people/index.md`
- `ai/work-items/index.md`
- `ai/state/current.md`
- `ai/state/work-items.md`
- `knowledge/workspace-model.md`
- `knowledge/communication-rules.md`
These are also loaded through `opencode.json`.
## Required Behavior
- Assume the workspace may contain stale context until checked.
- Before answering questions that depend on current work state, inspect `ai/state/current.md` and the latest relevant log under `ai/logs/`.
- If `ai/inbox/mattermost-latest.md` exists, inspect it for fresher communication context before answering standup, status, or manager-message prompts.
- For any meaningful prompt, decide whether the interaction introduces or corrects project memory.
- 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.
- `mattermost-sync` should automatically promote high-confidence project facts without asking what to promote.
- Prefer `ai/logs/` as the default destination for new Mattermost-derived facts.
- Promote to `ai/state/current.md` only when the fact materially changes active work over the next few days.
- Keep explicit Jira IDs and approved titles visible in `ai/work-items/` and summarize active items in `ai/state/work-items.md` when they are useful for future standups or manager updates.
- Promote to `ai/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 `ai/context/people/`.
- Keep role-to-person mapping explicit in `ai/context/people/manager.md` and the roster in `ai/context/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.
- 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 `ai/context/systems/`, `ai/context/workstreams/`, or `ai/context/process/` instead of overloading `ai/context/project.md`.
- When the user asks Swift, SwiftUI, iOS architecture, testing, or debugging questions, use `ai/context/ios/` and the local OpenCode iOS skills before answering.
- When the user asks for a prompt for another AI, GitHub Copilot, or the Fidelity development machine, use `ai/context/process/ai-to-ai-prompting.md` and generate a self-contained prompt.
- If a Swift/iOS recommendation depends on current Apple APIs, Xcode behavior, or framework migration guidance, verify against official Apple or Swift documentation before making strong claims.
## Communication
When drafting or polishing messages:
- use Context, Observation, Action when appropriate
- clarify auth state when relevant
- separate external reports from regressions
- preserve technical meaning while improving English