KeiSeiKit-1.0/skills/self-audit/phase-3-present.md
Parfii-bot a4e667de10 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00

57 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Phase 3 — Present
Show `CLASSIFIED` to the user as a multi-select click batch. User picks
which findings to address; selection becomes `SELECTED`.
## 3a — Silent-first guard
Read `~/.claude/memory/audit-backlog.md`. Parse the
`<!-- session_count: N -->` header. If `N < 10`:
- Log every finding to the backlog with a `[SELF-AUDIT SILENT]` prefix.
- Set `SELECTED = []` and SKIP to Phase 5.
This is the RULE 0.14 silent-first contract. Do NOT prompt the user.
## 3b — Sensitive-IP guard
If CWD sits under a banned project (`~/Projects/my-project`) OR a
`CLAUDE.md` in CWD contains a banned-marker line
matching `/restricted-project|sensitive-ip/i`:
- Log every finding to backlog with `[SELF-AUDIT OFFLINE]` prefix.
- Set `SELECTED = []` and SKIP to Phase 5.
Do NOT render transcript excerpts back to chat.
## 3c — Multi-select click
Emit ONE `AskUserQuestion`:
```json
{
"questions": [
{
"question": "Which findings do you want to address this session?",
"header": "Findings",
"multiSelect": true,
"options": [
{"label": "<class-1> ×<count> [severity]", "description": "<scope>"},
{"label": "<class-2> ×<count> [severity]", "description": "<scope>"},
...
{"label": "None — just log to backlog", "description": "Append all to backlog, pick up later"}
]
}
]
}
```
Cap the option list at 8 findings (highest `count` first). If more exist,
add a trailing option `"Show full list"` that dumps all of them to stdout
and re-emits the click batch on the next turn.
## Verify-criterion
- Exactly one `AskUserQuestion` call was emitted (unless guard fired).
- `SELECTED` is a list of finding dicts (possibly empty).
- "None — just log to backlog" treated as `SELECTED = []`.