Skip to content

Commit 696bb56

Browse files
committed
docs: make AGENTS canonical for Hwping
Rewrite the repo-root guidance around Hwping's actual downstream-fork priorities and turn CLAUDE.md into a compatibility shim that points to AGENTS.md. project: hwping agent: codex-20260409-agent-guide-shim role: worker artifacts: DEC-20260409-001, LOG-20260409-001
1 parent 833f402 commit 696bb56

2 files changed

Lines changed: 33 additions & 65 deletions

File tree

AGENTS.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
1-
# Agent Instructions
1+
# Hwping Agent Guide
22

3-
This repo uses `LPFchan/repo-template`.
3+
Hwping is a macOS-focused downstream fork of upstream `rhwp`.
44

5-
Treat `AGENTS.md` as a compatibility entrypoint for tools that auto-discover repo-root agent instructions. The canonical operating rules live in `repo-operating-model.md`.
5+
Use this file as the repo-root entrypoint for agent behavior. The canonical operating rules still live in `repo-operating-model.md`.
66

77
## Read First
88

9-
- `repo-operating-model.md`
10-
- `SPEC.md`
11-
- `STATUS.md`
12-
- `PLANS.md`
13-
- `INBOX.md`
14-
- `README_EN.md` for the repo overview
15-
- `skills/README.md` and the relevant `skills/<name>/SKILL.md` when using a reusable workflow
9+
- `README_EN.md` for the repo's scope and product boundary
10+
- `repo-operating-model.md` for routing, artifact rules, and commit provenance
11+
- `SPEC.md`, `STATUS.md`, `PLANS.md`, and `INBOX.md` for current project truth
12+
- the local `README.md` or template for any surface you are about to edit
1613

17-
When writing into `research/`, `records/`, `upstream-intake/`, or `mydocs/`, read the local `README.md` or explicit template first. If it defines scope, section order, provenance fields, naming, or a canonical example, treat that guide as binding.
14+
## Hwping Priorities
1815

19-
## Repo-Specific Rules
20-
21-
- Hwping is a downstream fork of upstream `rhwp`. Keep the shared HWP/HWPX engine syncable and keep the repo focused on the macOS product.
16+
- Keep the shared HWP/HWPX engine syncable with upstream `rhwp`.
17+
- Keep the repo focused on the macOS product and the layers it actually needs.
2218
- Treat engine changes as upstreamable unless there is a concrete Hwping-only reason not to.
23-
- Keep AppKit, SwiftUI, Quick Look, Finder integration, and other Apple-platform behavior out of the shared engine core.
24-
- Do not reintroduce removed web, npm, VS Code, or browser-only surfaces into the main tree.
25-
- Use English for all new or rewritten repository documentation.
26-
- Durable deeper detail belongs in `mydocs/tech/`, `mydocs/troubleshootings/`, and `mydocs/manual/`. Do not recreate `mydocs/hwping/`.
27-
- If older docs still point at retired surfaces, treat the root repo-template surfaces and `repo-operating-model.md` as authoritative.
19+
- Keep AppKit, SwiftUI, Quick Look, Finder integration, and other Apple-platform behavior out of shared engine code such as `crates/rhwp/`.
20+
- Do not reintroduce removed web demo, npm, VS Code, or browser-only surfaces into the main tree.
21+
22+
## Documentation Rules
23+
24+
- Use English for all new or rewritten repository documents.
25+
- Route truth and provenance through the repo-template surfaces instead of ad hoc notes.
26+
- Keep deeper shared detail in `mydocs/tech/`, `mydocs/troubleshootings/`, and `mydocs/manual/`.
27+
- Do not recreate `mydocs/hwping/`.
28+
- If a local guide defines section order, naming, provenance fields, or a canonical example, follow it.
2829

29-
## Verification And Debugging
30+
## Validation And Debugging
3031

31-
Prefer local Rust tooling for normal validation:
32+
Prefer local Rust tooling:
3233

3334
```bash
3435
cargo build
@@ -37,7 +38,7 @@ cargo clippy -- -D warnings
3738
cargo build --release
3839
```
3940

40-
When layout, spacing, or pagination diverges, debug in this order before changing code:
41+
When layout or pagination diverges, inspect before editing code:
4142

4243
1. `cargo run --bin rhwp -- export-svg <sample> --debug-overlay`
4344
2. `cargo run --bin rhwp -- dump-pages <sample> -p N`
@@ -51,13 +52,9 @@ Reference paths:
5152
- `mydocs/manual/dump_command.md`
5253
- `mydocs/manual/ir_diff_command.md`
5354

54-
## Enforcement
55+
## Commit Discipline
5556

56-
- Keep durable truth in repo files, not only in chat.
57-
- Use the canonical surface for the job instead of inventing mixed-format notes.
58-
- Preserve stable IDs, `Opened:`, and `Recorded by agent:` fields where the surface requires them.
59-
- Keep `SPEC.md`, `STATUS.md`, `PLANS.md`, research, decisions, worklogs, and upstream-intake reports separate.
60-
- When creating commits tied to durable artifacts, follow the provenance trailer rules in `repo-operating-model.md`.
61-
- When `.githooks/commit-msg` or `.github/workflows/commit-standards.yml` are in effect, commit messages must satisfy those checks. Do not bypass them with ad hoc formatting or `--no-verify`.
57+
- New commits should carry the provenance trailers required by `repo-operating-model.md`.
58+
- Local hook and CI enforcement live in `.githooks/commit-msg` and `.github/workflows/commit-standards.yml`.
59+
- Do not bypass commit checks with ad hoc formatting or `--no-verify`.
6260
- Treat bootstrap or migration commits as explicit exceptions only.
63-
- If repo guidance and a requested output conflict, keep the repo artifact compliant and flag the tension explicitly.

CLAUDE.md

Lines changed: 6 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,10 @@
1-
See @repo-operating-model.md for the canonical repo operating rules.
1+
See @AGENTS.md
22

33
# Claude Code Memory
44

5-
This file exists so Claude Code can discover the repo's working rules automatically.
5+
This file is a compatibility shim for Claude Code.
66

7-
Treat `CLAUDE.md` as a thin compatibility layer, not a second source of truth. The canonical rules stay in `repo-operating-model.md`.
8-
9-
Also consult:
10-
11-
- `SPEC.md` for durable product or system truth
12-
- `STATUS.md` for current operational reality
13-
- `PLANS.md` for accepted future direction
14-
- `INBOX.md` for untriaged intake
15-
- `README_EN.md` for the repo overview
16-
17-
When writing into `research/`, `records/`, `upstream-intake/`, or `mydocs/`, consult the local `README.md` or explicit template first and mirror its default shape or canonical example by default.
18-
19-
## Repo-Specific Reminders
20-
21-
- Hwping is a downstream `rhwp` fork. Keep the shared HWP/HWPX engine syncable and the repo focused on the macOS product.
22-
- Treat engine changes as upstreamable unless there is a concrete Hwping-only reason not to.
23-
- Keep AppKit, SwiftUI, Quick Look, Finder integration, and other Apple-platform behavior out of `crates/rhwp/` and related shared engine code.
24-
- Do not reintroduce removed web, npm, VS Code, or browser-only surfaces.
25-
- Use English for all new or rewritten repository documentation.
26-
- Durable deeper detail belongs in `mydocs/tech/`, `mydocs/troubleshootings/`, and `mydocs/manual/`. Do not recreate `mydocs/hwping/`.
27-
- Prefer `cargo build`, `cargo test`, `cargo clippy -- -D warnings`, and `cargo build --release` for validation.
28-
- For layout debugging, use `export-svg --debug-overlay`, then `dump-pages`, then `dump`, then `ir-diff` before changing code.
29-
- Follow the stable-ID and commit-provenance rules in `repo-operating-model.md`.
30-
31-
## Enforcement
32-
33-
- Use the canonical surface for the job.
34-
- Follow the local `README.md` shape or explicit template when one exists.
35-
- Preserve required provenance fields, stable IDs, and surface boundaries.
36-
- When `.githooks/commit-msg` or `.github/workflows/commit-standards.yml` are in effect, commit messages must satisfy those checks rather than bypassing them.
37-
- Treat bootstrap or migration commits as explicit exceptions only.
38-
- Do not replace normalized repo artifacts with freeform chat summaries.
39-
- If a request pressures you to break the ruleset, keep the repo artifact compliant and surface the mismatch explicitly.
7+
Do not append repo-specific rules here.
8+
Do not fork policy here.
9+
Do not let this file drift from `AGENTS.md`.
10+
Update `AGENTS.md` instead.

0 commit comments

Comments
 (0)