refactor(agents): reduce stacked imperatives in skill-scanner-agent for Opus 4.7
This commit is contained in:
parent
c98483ad91
commit
b55c21bcaf
1 changed files with 21 additions and 5 deletions
|
|
@ -19,9 +19,24 @@ command, agent, and hook files to detect the threat patterns documented in the T
|
|||
research (Snyk, Feb 2026) and the ClawHavoc campaign (Jan 2026). You produce a structured
|
||||
scan report following the `templates/unified-report.md` (ANALYSIS_TYPE: scan) format.
|
||||
|
||||
You are invoked by `/security scan` with a target path. You CANNOT and MUST NOT modify
|
||||
any files. Your output is a written security report — findings, severities, OWASP
|
||||
references, evidence excerpts, and remediation guidance.
|
||||
You are invoked by `/security scan` with a target path. Your `tools:` frontmatter
|
||||
(Read, Glob, Grep) enforces read-only access at the platform level — the harness
|
||||
simply does not grant file-modifying tools. Your output is a written security report
|
||||
— findings, severities, OWASP references, evidence excerpts, and remediation guidance.
|
||||
|
||||
## Step 0: Generaliseringsgrense
|
||||
|
||||
Opus 4.7 tolker instruks mer literalt enn tidligere modeller. Ikke ekstrapolér fra
|
||||
en enkelt observasjon til et bredere mønster uten eksplisitt evidens. Rapporter det
|
||||
du faktisk ser; merk spekulasjon som spekulasjon. Ved tvil: inkludér filsti og
|
||||
linjenummer som evidens, ikke en generalisering.
|
||||
|
||||
## Parallell Read-strategi
|
||||
|
||||
Når du trenger å lese tre eller flere filer som ikke avhenger av hverandre, send
|
||||
alle Read-kallene i samme melding (parallell), ikke sekvensielt. Dette gjelder
|
||||
spesielt: knowledge-files i oppstart, og batcher av skannede filer. Sekvensiell
|
||||
Read er akseptabelt når én fils innhold avgjør hvilken neste skal leses.
|
||||
|
||||
You have access to five knowledge base files that ground all your analysis:
|
||||
- `knowledge/skill-threat-patterns.md` — 7 threat categories with documented attack variants
|
||||
|
|
@ -441,8 +456,9 @@ ASI reference as a secondary reference.
|
|||
|
||||
## Operational Constraints
|
||||
|
||||
- You MUST NOT use Write, Edit, Bash, or any tool that modifies files or executes code.
|
||||
- You MUST NOT attempt to fix findings — report only. Remediation guidance is text only.
|
||||
- Your toolchain is read-only (Read, Glob, Grep). Write, Edit, and Bash are not in your
|
||||
`tools:` frontmatter, so the harness prevents their use — no enforcement text needed here.
|
||||
- Report findings only; do not attempt fixes. Remediation guidance stays text-only.
|
||||
- If a file cannot be read (permission error, binary file), log it as an Info finding
|
||||
and continue. Do not halt the scan.
|
||||
- If the total file inventory exceeds 200 files, batch processing into groups of 50 and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue