-
Notifications
You must be signed in to change notification settings - Fork 2
Team Best Practices
How to use ai-coding-ok effectively in a team. Memory sharing, conflict resolution, PR reviews, and onboarding.
ai-coding-ok memory files live in .github/agent/memory/ — they're committed to git and shared automatically.
your-project/
├── .github/
│ └── agent/
│ └── memory/
│ ├── project-memory.md ← Everyone sees the same architecture
│ ├── decisions-log.md ← Everyone sees the same decisions
│ └── task-history.md ← Everyone sees the same recent tasks
Each team member needs to install the ai-coding-ok skill once:
Claude Code users:
/plugin install ai-coding-ok@claude-plugins-officialCopilot users:
No install needed — .github/copilot-instructions.md auto-loads.
Cursor users:
No install needed — .cursor/rules/ai-coding-ok.mdc auto-loads.
The project files (.github/agent/, AGENTS.md, etc.) are already in the repo — no per-member setup needed beyond the skill installation.
git clone git@github.com:team/your-project.git
cd your-projectThe project already has ai-coding-ok installed. Memory files are in the repo.
Claude Code: /plugin install ai-coding-ok@claude-plugins-official
In Claude Code:
Read the project memory files and give me a 15-minute overview of the project.
The AI will:
- Summarize architecture from
project-memory.md - List key decisions from
decisions-log.md - Describe recent work from
task-history.md
Based on the memory, what are the top 3 constraints I should never violate?
This confirms the AI has correctly loaded the project context.
When reviewing a PR from a teammate (or AI), check:
-
task-history.mdhas a new entry for this PR - The entry is accurate (matches what the PR actually does)
- If architecture changed,
decisions-log.mdhas a new ADR - If project facts changed,
project-memory.mdis updated
- Tests are included
- Coding standards from
coding-standards.mdare followed - No regression in unrelated features
- The task-history entry is informative (not just "fixed stuff")
- ADR entries have rationale, not just "chose X"
- No duplicate or contradictory entries
Alice: TASK-050 in her branch
Bob: TASK-050 in his branch (same number)
Solution: The task numbering is not critical. On merge:
- Accept both entries
- Renumber one to TASK-051
- The content matters more than the number
Alice: ADR-010: Use PostgreSQL
Bob: ADR-010: Use MongoDB (different decision, same number)
Solution:
- Discuss and resolve the actual decision
- Keep the winning ADR with the correct number
- Move the losing ADR to "Deprecated" status with a note referencing the winner
Alice: Added "payment service" module
Bob: Added "notification service" module
Solution: Both are valid additions. Merge both. If they conflict structurally, resolve manually.
The CI workflow runs on every PR and checks:
# .github/workflows/memory-check.yml
- Check: task-history.md was modified
- Check: no {{placeholders}} leaked
- Check: version markers are consistentIf it fails, the PR gets a comment:
⚠️ Memory check failed:
- task-history.md was not updated in this PR
- Please add a task-history entry for this change
In your GitHub repo settings:
- Settings → Branches → Branch protection rules
- Add rule for
main(or your default branch) - Check "Require status checks to pass before merging"
- Add
memory-checkto the list
This ensures no PR merges without a memory update.
Agree as a team on the format:
### [TASK-XXX] {verb} {what}
- **Date**: YYYY-MM-DD
- **Type**: feat | fix | refactor | chore | docs
- **Author**: {name or "AI"}
- **Summary**: One sentence on what and why
- **Files changed**: key files
- **Related**: TASK-XXX, ADR-XXX (if applicable)Follow the ADR template consistently:
### ADR-XXX: {decision title}
- **Date**: YYYY-MM-DD
- **Status**: ✅ Accepted | ❌ Deprecated | 🔄 Superseded
- **Decision maker**: {name or "team consensus"}
#### Background
...
#### Options
| Option | Pros | Cons |
|--------|------|------|
#### Decision
...
#### Rationale
...
#### Impact
...Write an ADR when:
- Choosing between technologies (database, framework, library)
- Making a significant architecture change
- Introducing a new pattern or convention
- Deprecating an old approach
Don't write an ADR for:
- Routine implementation choices
- Bug fixes
- Minor refactors
For larger teams, designate a "memory maintainer" each week:
Responsibilities:
- Scan
task-history.mdfor quality (are entries informative?) - Check
project-memory.mdfor staleness - Archive old task-history entries if >30
- Propose deprecated ADRs for archival
This prevents memory rot without burdening any single person.
When a team member leaves:
- No special action needed — memory files are in git
- Their ADRs and task entries are part of the project history
- If they were the primary author of certain modules, add a note to
project-memory.md:## 👤 Module Ownership | Module | Primary | Backup | |--------|---------|--------| | payment/ | (was: Alice) → Bob | Carol |
If your team works across multiple repositories:
Each repo has its own ai-coding-ok installation. Memory is repo-scoped.
In a monorepo, one ai-coding-ok installation at the root covers all packages. Each package can have its own section in project-memory.md.
For decisions that span repos, create a shared docs/adr/ directory in one repo and link from others:
# In decisions-log.md
See ADR-005 (shared): [API versioning strategy](https://github.com/team/shared-docs/blob/main/adr/005-api-versioning.md)- Daily Workflow — individual workflow patterns
- CI Integration — setting up automated memory checks
- Customization Guide — standardizing customizations for the team
🧠 ai-coding-ok — AI 编程的 PDCA 记忆闭环。
GitHub · Issues · MIT License