# wenqu-mem Agent Guide

This repository is the public, reusable source of truth for the Wenqu MEM thesis skills. Read
`README.md`, `skills/README.md`, and `PRIVACY.md` before changing a skill, installer, template, or
privacy boundary.

## Repository model

- `skills/<name>/` contains the maintained Skill sources and their scripts, references, assets, and
  optional `agents/openai.yaml` metadata.
- `templates/` contains reusable, publishable template material.
- `scripts/` and `install.sh` provide initialization and multi-runtime installation.
- Real theses, personal identity, supervisor information, private source material, generated
  deliverables, and local configuration do not belong in this public repository.

Do not edit installed runtime copies under `~/.claude`, `~/.codex`, `~/.agents`, or WorkBuddy as the
maintained source. Edit this repository, validate the source, and install only when the user asks.

## Skill changes

- Keep each public Skill entry focused on its trigger boundary and shared workflow. Put conditional
  detail in its existing references instead of growing `SKILL.md` indiscriminately.
- Preserve valid YAML frontmatter, cross-runtime portability, relative resource links, and the
  repository's MIT/code and CC BY-SA/document licensing boundary.
- Reuse existing thesis routers and shared utilities. Do not create a parallel skill or duplicate a
  script merely to support one client.
- Never weaken evidence, citation, privacy, academic-integrity, or submission-gate checks to obtain a
  pass. Generated reports are evidence, not editable sources of truth.
- Keep user-specific values in `~/.config/wenqu-mem/` or documented local-only asset locations. Do not
  commit real names, IDs, contact details, thesis manuscripts, tokens, or private institutional files.

## Validation

Run the narrowest checks for the affected Skill. For Python changes, compile or run its focused tests;
for `thesis-quality-gate`, use:

```bash
python3 -m unittest discover -s skills/thesis-quality-gate/tests
```

For installer changes, run syntax/static checks before any installation. Do not invoke `install.sh`,
write runtime links, or overwrite local configuration as an implicit validation step.
