mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-10-02 10:45:05 -04:00
BE: plugin input improvements
This commit is contained in:
1 parent
1c410bf2be
commit
6cc092f2ad
22 files changed
+1499
-330
No files matched your search
@@ -63,6 +63,8 @@ plugin_objects.add_object(...) # During processing
|
||||
plugin_objects.write_result_file() # Exactly once at end
|
||||
```
|
||||
|
||||
Every mapped field (`objectPrimaryId`/`objectSecondaryId`/`watchedValue1-4`/`extra`/`helpVal1-4`) is HTML/control-char-stripped by default before it's persisted: plugin output is untrusted (network responses, device-reported names, etc.). `foreignKey` is always sanitized too, unconditionally. Only opt a column out (`"allow_raw_text": true`) if it's a display-only type (`textarea_readonly`); see `docs/PLUGINS_DEV.md#field-sanitization`.
|
||||
|
||||
## Execution Phases
|
||||
|
||||
- `once`: runs once at startup
|
||||
@@ -84,7 +86,7 @@ plugin_objects.write_result_file() # Exactly once at end
|
||||
|
||||
## Before Opening a PR
|
||||
|
||||
Check the plugin against the [Conventions Checklist](../../../docs/PLUGINS_DEV.md#conventions-checklist) in `docs/PLUGINS_DEV.md` — `RUN` default, schedule precedent, `RUN_TIMEOUT` semantics, reusing core settings, description length, and the multi-instance settings pattern. Most plugin PR review comments trace back to one of these.
|
||||
Check the plugin against the [Conventions Checklist](../../../docs/PLUGINS_DEV.md#conventions-checklist) in `docs/PLUGINS_DEV.md` — `RUN` default, schedule precedent, `RUN_TIMEOUT` semantics, reusing core settings, description length, the multi-instance settings pattern, and `allow_raw_text` restricted to display-only column types. Most plugin PR review comments trace back to one of these.
|
||||
|
||||
## Starting Point
|
||||
|
||||
|
||||
@@ -27,7 +27,11 @@ Cut anything that narrates the past instead of stating the present:
|
||||
|
||||
## Rule 2: plain words, fewer words
|
||||
|
||||
If a shorter or simpler phrasing says the same thing, use it. Cut qualifiers that don't change the meaning ("actually," "really," "genuinely," "in this exact process"). Prefer a plain verb over a nominalization. A dense skill with real information beats a padded one — trim narration and hedging before trimming facts.
|
||||
If a shorter or simpler phrasing says the same thing, use it. Cut qualifiers that don't change the meaning ("actually," "really," "genuinely," "in this exact process"). Prefer a plain verb over a nominalization. A dense skill with real information beats a padded one: trim narration and hedging before trimming facts.
|
||||
|
||||
## Rule 3: no em-dashes
|
||||
|
||||
Never use an em-dash ("—"), in a skill or anywhere else this session writes prose (docs, code comments, PRDs, commit messages, chat replies). Use a period, comma, colon, semicolon, or parentheses instead, whichever actually fits the sentence.
|
||||
|
||||
## Sweep before calling a skill clean
|
||||
|
||||
@@ -35,9 +39,10 @@ Run this across `.claude/skills/`, `.gemini/skills/`, `.github/skills/` (or a si
|
||||
|
||||
```bash
|
||||
grep -rniE "as of 202|caught in review|caught mid-review|correction:|correction \(|shipped for real|previously|used to be|no longer|originally|was later|historically|in the past|distilled from|real mistake|it turned out|turns out|discovered that|during a past" .claude/skills/ .gemini/skills/ .github/skills/
|
||||
grep -rn "—" .claude/skills/ .gemini/skills/ .github/skills/
|
||||
```
|
||||
|
||||
Read every hit in context — some are legitimate (a rule instructing PRD authors to write correction trails, or "previously down" describing device state, are not violations). Fix the ones that narrate the skill's own history instead of the system's current behavior.
|
||||
Read every hit in context: some are legitimate (a rule instructing PRD authors to write correction trails, or "previously down" describing device state, are not violations). Fix the ones that narrate the skill's own history instead of the system's current behavior, and replace every em-dash hit per Rule 3.
|
||||
|
||||
## Also applies to: research/audit docs
|
||||
|
||||
|
||||
Reference in new issue
Block a user