chore: replace python -m agents.validator with hawk in all agent mode instructions
This commit is contained in:
@@ -12,4 +12,4 @@ Follow the audit-log design (`devplacepy/services/audit/`); confirm against the
|
||||
3. Call the recorder on the mutation's success path: `audit.record(request, event_key, ...)` in HTTP or WebSocket handlers, or `audit.record_system(event_key, ...)` in request-less contexts (services, jobs, CLI). On a guard or denial branch pass `result="denied"`; on a failure branch pass `result="failure"`.
|
||||
4. Route through the existing DRY choke point when one applies (`content.py`, the `project_files.py` helpers, `routers/containers.py` `_audit_instance`, the Devii dispatcher `_audit_mechanic`) instead of scattering call sites. The HTTP path and the Devii path for one mutation must stay disjoint (no double counting).
|
||||
5. Recording is best-effort: wrap nothing the caller depends on, and NEVER gate the audited action on the record succeeding.
|
||||
6. Validate with `python -m agents.validator` on the touched files and `python -c "from devplacepy.main import app"`.
|
||||
6. Validate with `hawk` on the touched files and `python -c "from devplacepy.main import app"`.
|
||||
|
||||
@@ -10,4 +10,4 @@ Follow the docs convention exactly (confirm against `devplacepy/routers/docs/pag
|
||||
1. Create `devplacepy/templates/docs/<slug>.html` as a prose page: one `<div class="docs-content" data-render> ... </div>` containing GitHub-flavored markdown. The page is rendered server-side. Any example component markup INSIDE the data-render block must be HTML-escaped (`<dp-...>`); a live demo, if any, goes in a SEPARATE block OUTSIDE the data-render div with its own `<script type="module">`.
|
||||
2. Register it in `DOCS_PAGES` in `devplacepy/routers/docs/pages.py`: `{"slug": "<slug>", "title": "<title>", "kind": "prose", "section": SECTION_*}`. Add `"admin": True` for an admin-only page. If a new section is needed, add a `SECTION_*` constant and place it in the correct `AUDIENCES` group.
|
||||
3. Write accurate, professional content - confirm every factual claim against the source. No em-dashes, no AI disclaimers, dates as DD/MM/YYYY.
|
||||
4. Validate: run `python -m agents.validator` on the new template and on `pages.py`, run `python -c "from devplacepy.main import app"`, and confirm the slug is registered with no duplicate.
|
||||
4. Validate: run `hawk` on the new template and on `pages.py`, run `python -c "from devplacepy.main import app"`, and confirm the slug is registered with no duplicate.
|
||||
|
||||
@@ -3,7 +3,7 @@ description: Run the DevPlace maintenance agent fleet (10 quality dimensions) in
|
||||
argument-hint: "[check|fix] [changed] [comma,list,of,dimensions]"
|
||||
---
|
||||
|
||||
You are orchestrating the DevPlace maintenance fleet, the native Claude Code mirror of the `agents/` Python fleet. Each dimension is a project subagent under `.claude/agents/`. The fleet enforces ten independent quality dimensions across the `devplacepy/` package and `tests/`.
|
||||
You are orchestrating the DevPlace maintenance fleet. Each dimension is a project subagent under `.claude/agents/`. The fleet enforces ten independent quality dimensions across the `devplacepy/` package and `tests/`.
|
||||
|
||||
## Dimension to subagent map
|
||||
| Dimension | Subagent | Enforces |
|
||||
@@ -19,7 +19,7 @@ You are orchestrating the DevPlace maintenance fleet, the native Claude Code mir
|
||||
| docs | `docs-maintainer` | docs coverage and role-aware show/hide |
|
||||
| test | `test-maintainer` | integration-test coverage |
|
||||
|
||||
The canonical run order (matches `agents/fleet.py`) is: **style, dry, security, audit, devii, seo, frontend, fanout, docs, test**.
|
||||
The canonical run order is: **style, dry, security, audit, devii, seo, frontend, fanout, docs, test**.
|
||||
|
||||
## Parse the arguments
|
||||
Arguments: `$ARGUMENTS`
|
||||
@@ -31,7 +31,7 @@ Arguments: `$ARGUMENTS`
|
||||
## Execute
|
||||
1. Resolve the dimension list and mode from the arguments above.
|
||||
2. **CHECK mode**: launch every selected subagent concurrently (one `Agent` call per dimension in a single message). Each subagent runs read-only and returns its findings report. Tell each subagent explicitly: "Operate in REPORT mode. Do not modify any file." If `changed`, append the file list and: "Restrict findings to these files."
|
||||
3. **FIX mode**: launch the selected subagents **one at a time in canonical order** (never in parallel - parallel edits to the same file would conflict). Tell each: "Operate in FIX mode: apply minimal root-cause fixes per your doctrine, then run `python -m agents.validator .` and confirm it passes." Wait for each to finish before starting the next. If `changed`, append the file list and: "Restrict fixes to these files."
|
||||
3. **FIX mode**: launch the selected subagents **one at a time in canonical order** (never in parallel - parallel edits to the same file would conflict). Tell each: "Operate in FIX mode: apply minimal root-cause fixes per your doctrine, then run `hawk .` and confirm it passes." Wait for each to finish before starting the next. If `changed`, append the file list and: "Restrict fixes to these files."
|
||||
4. Each subagent's final message is its report; it is not shown to the user directly, so collect them.
|
||||
|
||||
## Report
|
||||
|
||||
@@ -13,4 +13,4 @@ Mirror an existing service - read `devplacepy/services/base.py` (BaseService) an
|
||||
4. If it calls an LLM, default its endpoint to `config.INTERNAL_GATEWAY_URL` and authenticate with the internal gateway key, like the other AI consumers.
|
||||
5. Emit audit events via `record_system` for any state change it makes.
|
||||
6. Document it in `AGENTS.md` (Background services section) and in `README.md` if user-visible.
|
||||
7. Validate with `python -m agents.validator` on the touched files and `python -c "from devplacepy.main import app"`.
|
||||
7. Validate with `hawk` on the touched files and `python -c "from devplacepy.main import app"`.
|
||||
|
||||
@@ -7,7 +7,7 @@ Changed files in the working tree:
|
||||
|
||||
Verify the work is complete and correct, following the DevPlace verification rule (zero tolerance):
|
||||
|
||||
1. For each changed or new file under `devplacepy/` or `tests/`, run `python -m agents.validator <file>` (it covers Python, JavaScript, CSS, and HTML/Jinja). Every file must report clean.
|
||||
1. For each changed or new file under `devplacepy/` or `tests/`, run `hawk <file>` (it covers Python, JavaScript, CSS, and HTML/Jinja). Every file must report clean.
|
||||
2. Run `python -c "from devplacepy.main import app"` - it must import with no error.
|
||||
3. Grep the changed files for em-dash characters (U+2014 and U+2013) that are authored prose, and report any. Leave em-dashes that are data (replace/maketrans/regex targets, fixtures) untouched.
|
||||
4. Report a PASS or FAIL summary with the exact failures.
|
||||
|
||||
Reference in New Issue
Block a user