# Memory Conventions

General specifications and rules for the team.

---

## OpenClaw Configuration

### Directory Rules
- Config directory: `~/openclaw-config/`
- **AI must NOT manually add new directories or files** without approval
- All additions must go through proper scripts

### Workspace Structure
- Workspace: `~/.openclaw/workspace/`
- Skills: `~/.openclaw/workspace/skills/`
- Memory: `~/.openclaw/workspace/memory/`

---

## Team Skills Structure

Team skills location: `~/github/data-service-infra-ai-configurations/skills/`

Each skill must contain:
- `SKILL.md` - Documentation
- `run.sh` or `<name>.sh` - Execution script (executable)

Link to workspace:
```bash
ln -sf ~/github/data-service-infra-ai-configurations/skills/{skill} ~/.openclaw/workspace/skills/team-{skill}
```

---

## Cron Jobs

### Important Rules
- Do NOT use `--target` parameter in `openclaw cron add` - it can corrupt bindings config
- Use `--to` for destination, `--message` for content, `--cron` for schedule

### Standard Parameters
```bash
openclaw cron add --name "job-name" --cron "0 9 * * *" --agent main --message "task description"
```

---

## Feishu Integration

### Group Chat Rules
- Only respond when mentioned (@)
- Do not interrupt conversations

### Alert Group
- Group ID: `oc_xxx`  <!-- Fill in your actual group ID -->

---

## Git Workflow

### PR Auto-Sync Rule
When someone private messages to write code and creates a PR:
1. Collect PR link + chat summary
2. Post to group: `oc_xxx`  <!-- Fill in your actual group ID -->

### PR Notification Groups
When a PR is created, notify the relevant groups with PR link + change description:
- **Personal group**: `oc_xxx`  <!-- Fill in your actual group ID -->
- **Team code group**: `oc_xxx`  <!-- Fill in your actual group ID -->

### Branch Protection
- Always create feature branch from main
- Require PR review before merging
- Main branch enforcement must be **active** (not disabled)

---

## Weekly Report Format

When generating weekly report:
1. Reply with Feishu Card message containing:
   - Data summary
   - Key events
   - Document link
2. In document, link all issues: `[ISSUE-123](https://...)`
3. **Must read issue content** - don't just use title

---

## Code Development

Use git worktree for each code change task:
```bash
git worktree add ../project-name feature-branch
```
