<!-- task=m-iop-agent-cli-runtime/13_agent_domain plan=1 tag=API -->

# Agent Application Domain Bootstrap

## For the Implementing Agent

Filling implementation-owned sections in `CODE_REVIEW-cloud-G02.md` is mandatory. Run every verification command, paste actual notes/output, leave the active pair in place, and report ready for review. Finalization belongs only to the code-review skill. If blocked, record exact blocker evidence and resume conditions without asking the user, creating stop files, archiving, or writing `complete.log`.

## Background

Standalone application code must not enter `apps/agent/**` before the project-only domain boundary exists. This packet creates only that rule and project mapping so later host and adapter packets can proceed under an explicit ownership contract.

## Analysis

### Files Read

- `agent-task/m-iop-agent-cli-runtime/13_agent_domain/plan_cloud_G09_0.log`
- `agent-task/m-iop-agent-cli-runtime/13_agent_domain/code_review_cloud_G09_0.log`
- `agent-ops/rules/project/rules.md`

### SDD Criteria

The approved SDD treats the application domain as a compatibility-preserving prerequisite for S10, S11, S12, and S15. This packet does not claim a Roadmap Task.

### Verification Context

Use the original plan's deterministic file-existence, unique-mapping, and diff checks. No Go source, external runner, or secret is involved.

### Test Coverage Gaps

No project rule currently owns `apps/agent/**`; code tests are not applicable to this documentation boundary.

### Symbol References

None.

### Split Judgment

The domain mapping is a stable, independently verifiable prerequisite. `14+13_cli_config_fixtures`, `15+13_host_lifecycle`, and `17+13_project_log_records` may consume it after PASS.

### Scope Rationale

Do not add application Go source, host lifecycle behavior, bootstrap composition, CLI commands, logs, sockets, or process management.

### Final Routing

- evaluation_mode: `isolated-reassessment`
- finalizer: `finalize-task-policy.sh pair`
- build closures: all `true`; grade scores `1/0/1/0/0`; route `local-fit`, `local-G02`, filename `PLAN-local-G02.md`
- review closures: all `true`; grade scores `1/0/1/0/0`; route `official-review`, `cloud-G02`, filename `CODE_REVIEW-cloud-G02.md`
- large_indivisible_context: `false`
- positive loop risks: none (count `0`)
- recovery signals: rework `0`, evidence-integrity failure `false`
- capability-gap evidence: none

## Implementation Checklist

- [x] Bootstrap the project-only `agent` domain rule and map `apps/agent/**` before adding application code.
- [x] Fill implementation-owned sections in CODE_REVIEW-*-G??.md with actual implementation notes and verification output.

### [API-1] Bootstrap the Agent Application Domain

#### Problem

`agent-ops/rules/project/rules.md` has no mapping for the planned `apps/agent/**` application.

#### Solution

Create the project-only agent domain rule and update only the project mapping. The rule must define standalone daemon ownership, application-vs-common package boundaries, config/state locality, same-user control assumptions, test expectations, and prohibitions against duplicating shared task/provider runtime logic.

#### Modified Files and Checklist

- [x] `agent-ops/rules/project/domain/agent/rules.md` — add the project-only domain rule.
- [x] `agent-ops/rules/project/rules.md` — register `apps/agent/**` and document the application root.

#### Test Strategy

No code test is needed. Verify the mapping is unique and every referenced rule path exists.

#### Verification

```bash
test -f agent-ops/rules/project/domain/agent/rules.md
test "$(rg -n 'apps/agent/\\*\\*' agent-ops/rules/project/rules.md | wc -l | tr -d ' ')" = 1
```

Expected: both commands exit 0.

## Modified Files Summary

| File | Item |
|------|------|
| `agent-ops/rules/project/domain/agent/rules.md` | API-1 |
| `agent-ops/rules/project/rules.md` | API-1 |

## Final Verification

```bash
test -f agent-ops/rules/project/domain/agent/rules.md
test "$(rg -n 'apps/agent/\\*\\*' agent-ops/rules/project/rules.md | wc -l | tr -d ' ')" = 1
git diff --check
```

Expected: the project-only rule and unique mapping exist, and the diff check passes. After completing all code changes, fill implementation-owned sections in `CODE_REVIEW-*-G??.md`.
