project-governance-init 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: authentic-writing
3
+ description: Write direct, specific, human-sounding product and marketing copy without inflated AI phrasing. Use when creating or editing user-facing text, help content, error messages, landing pages, or documentation.
4
+ ---
5
+
6
+ # Authentic writing
7
+
8
+ Write for the actual reader and action. Prefer concrete nouns, active verbs, and plain language.
9
+
10
+ ## Rules
11
+
12
+ - Say what the product, feature, or message does; remove vague claims and puffery.
13
+ - Name the user, action, condition, and outcome when they matter.
14
+ - Vary sentence length. Use headings only when they help scanning.
15
+ - Avoid canned openings, forced summaries, generic optimism, and unnamed authority.
16
+ - Avoid inflated or formulaic terms such as “seamless”, “cutting-edge”, “game changer”, “holistic”, “delve”, “tapestry”, and “in conclusion”.
17
+ - Do not invent evidence, testimonials, guarantees, metrics, or SEO keywords.
18
+ - Preserve the project's voice, accessibility, and legal meaning; ask before changing claims.
19
+
20
+ ## Review
21
+
22
+ Read the copy aloud. Remove any sentence that could describe almost any product. Check that buttons state an action, errors explain recovery, and headings match the content that follows.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: design-preferences
3
+ description: Establish a visual direction before building or changing web and mobile interfaces. Use when UI work needs choices about surfaces, density, typography, color, motion, responsive behavior, or accessibility.
4
+ ---
5
+
6
+ # Design preferences
7
+
8
+ Ask for the design direction before choosing components or writing styles. Record decisions in the project governance file or design notes.
9
+
10
+ ## Intake
11
+
12
+ Ask the user to choose or describe:
13
+
14
+ - Visual language: glass/translucent, flat, editorial, tactile, dense, minimal, or another reference.
15
+ - Surface treatment: solid, translucent, bordered, elevated, or mixed. Use glass only when contrast, performance, and readability remain strong.
16
+ - Density and rhythm: compact, comfortable, or spacious.
17
+ - Type: existing brand fonts, system fonts, or a new pairing; include size and line-height expectations.
18
+ - Color: existing tokens, light/dark behavior, contrast requirements, and semantic states.
19
+ - Motion: none, subtle transitions, or expressive motion; respect reduced-motion settings.
20
+ - Responsive targets: smallest supported viewport, touch targets, keyboard use, and orientation changes.
21
+
22
+ If the user has no preference, propose one direction with a short rationale and wait for approval before committing to it.
23
+
24
+ ## Build rules
25
+
26
+ - Reuse the repository's tokens and components before adding new ones.
27
+ - Prefer semantic HTML or platform controls and visible focus states.
28
+ - Check contrast, keyboard navigation, screen-reader names, loading, empty, error, and disabled states.
29
+ - Test the real browser or device at the smallest and largest supported sizes.
30
+ - Keep decorative effects from hiding content or increasing motion, memory, or load cost.
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: secure-server
3
+ description: "Audit a Linux server's infrastructure for security issues, categorize findings by severity (P0-P3), and fix them one at a time via dependency-ordered subagents with verification and confirmation gates."
4
+ ---
5
+
6
+ # secure-server
7
+
8
+ A repeatable workflow for auditing and hardening a real, possibly-already-in-production Linux server, run by the orchestrating (main) agent — not delegated wholesale to a single subagent, because it needs to ask the user questions and make sequencing judgment calls between fixes.
9
+
10
+ This is a multi-phase workflow: **Audit → Categorize → Confirm → Fix (dependency-ordered) → Verify → Report**. Do not skip phases or collapse them — the categorize/confirm step exists specifically so the user sees the full picture before anything changes.
11
+
12
+ ## Hard rules (apply throughout, learned the hard way)
13
+
14
+ - **This server may already run other production services you don't know about.** Before touching any shared resource (ports 80/443, a docker network, a systemd service, ufw rules), inventory what's already there: `docker ps -a`, `docker network ls`, `ss -ltnp`, existing compose files under `/opt` or similar. Never assume greenfield. If you find an existing reverse proxy, database, or app already serving traffic, work *with* it (add a server block, join its network) rather than replacing it.
15
+ - **Never take down or degrade a working, unrelated production service to fix something else.** After every change that touches shared config (nginx, docker daemon, firewall), immediately verify the pre-existing services still respond correctly (curl a health endpoint, check container status) before moving on. If a fix would require real downtime, ask the user first — don't assume a maintenance window.
16
+ - **Docker single-file bind mounts go stale on edit.** If a config file is mounted into a container with `./file:/path/file:ro` (a single-file mount, not a directory mount), editing that file on the host via a tool that replaces-and-renames (most file-editing tools do) changes its inode, and the container keeps serving the *old* inode's content — `nginx -t` / `-s reload` will silently test/reload stale content. After editing any such mounted file: compare `stat -c '%i'` on host vs. `docker exec <container> stat -c '%i'` on the same path; if they differ, you must `docker restart <container>` (not just reload) to pick up the real content, then re-validate.
17
+ - **No passwordless sudo should be assumed.** Try one non-mutating sudo command (e.g. `sudo -n true`) to check. If it fails, do not repeatedly prompt for sudo — print the exact command(s) for the user to run themselves, explain what they do and why, and wait for confirmation before treating that step as done. Don't fabricate or assume the outcome.
18
+ - **Never print actual secret values** (passwords, API keys, private key material, tokens) in any report or message, even partially. Describe presence/absence/strength qualitatively only ("looks sufficiently random", "reused across services", "empty").
19
+ - **Respect the user's stated scope.** If they say "don't break X" or "only touch Y", that constraint applies to every subagent you spawn for the rest of the workflow, not just the next action — restate it explicitly in every fixer subagent's prompt.
20
+ - **Destructive or hard-to-reverse actions always get a confirmation gate** before executing, regardless of severity category: firewall changes, service restarts on shared infra, key/secret rotation, deleting anything, force-pushes, DB schema changes. Routine, easily-reversible, single-service changes (adding a log rotation option to one container, writing a new isolated config file) can proceed without a question if the user has already approved the category (see Phase 3).
21
+
22
+ ## Phase 1 — Discovery & Audit (read-only)
23
+
24
+ Spawn one or more **read-only** audit subagents (general-purpose type) to cover the surface areas relevant to this server. Split by domain so they can run in parallel and stay within context budgets; a single host with one compose stack can usually be one agent, a host with multiple stacks/apps should get one agent per stack plus one for host-level concerns (firewall, SSH, orphan processes, Docker daemon config).
25
+
26
+ Each audit agent's prompt must explicitly state:
27
+ - **Read-only**: no edits, no writes, no mutating `docker`/`systemctl`/`ufw`/`fail2ban-client` commands — inspection only (`docker inspect`, `docker ps`, `cat`, `ls`, `stat`, `grep`, `curl -I`, `docker exec ... cat`).
28
+ - The specific things to check (tailor per context, but the checklist below is a strong default):
29
+ 1. Network exposure: `docker ps` port mappings across the *whole host* (not just the target stack), `ss -ltnp`, ufw/iptables status, what's bound to `0.0.0.0` vs `127.0.0.1`.
30
+ 2. Reverse proxy / TLS config: security headers present or missing, rate limiting present or missing, cert validity and renewal setup, any server blocks with no auth in front of sensitive paths.
31
+ 3. Secrets handling: env files and credential files — permissions (world-readable is bad), whether they're baked into images/compose vs. externalized, whether default/weak values are in use (qualitative only).
32
+ 4. Datastores (DB, cache, queue): auth enabled or not, bind address, whether the app uses a scoped low-privilege credential vs. root/admin.
33
+ 5. Container hardening: `cap_drop`, `no-new-privileges`, read-only rootfs, resource limits — present or absent per service.
34
+ 6. Logging: Docker log driver options (`max-size`/`max-file`) — unbounded growth risk.
35
+ 7. Orphan/undocumented containers: anything running that isn't in the known compose file(s) — flag as a finding even if it looks intentional, since it's invisible to normal deploy/update flow.
36
+ 8. Host-level: SSH config (password auth allowed?, root login?), unattended-upgrades, fail2ban/ufw presence.
37
+ - Report format: a flat list of findings, each with a one-line risk description and a one-line suggested fix — no fixing, no fluff, under ~500 words per agent.
38
+
39
+ Wait for all audit agents to complete before moving to Phase 2. Do not start fixing anything during this phase, even if an agent flags something you already know how to fix.
40
+
41
+ ## Phase 2 — Categorize
42
+
43
+ Consolidate all findings into a single prioritized list using these bands (a P0 in a toy/dev-only server may only be P1 — use judgment about actual blast radius, not just the abstract pattern):
44
+
45
+ - **P0 — Critical**: exploitable right now, remotely, without extra preconditions — open datastore with no auth reachable from the app network or worse, secrets readable by any local user, an authentication bypass, a publicly exposed admin/debug endpoint.
46
+ - **P1 — High**: a real weakness that needs some precondition to bite (missing security headers, no rate limiting on auth endpoints, an unmanaged/orphan container with network access, legacy/weak crypto config, stale unpinned images on anything internet-facing).
47
+ - **P2 — Medium**: defense-in-depth gaps, not directly exploitable alone (missing container capability dropping, no log rotation, no resource limits, missing 2FA).
48
+ - **P3 — Low**: hygiene / best-practice, no meaningful risk on its own (deprecated config syntax warnings, minor version-notification/telemetry settings).
49
+
50
+ Present this categorized list to the user as the response to their audit request (this is itself useful output even if they don't want fixes applied yet). Do not proceed to fixing without the user seeing this list first.
51
+
52
+ ## Phase 3 — Confirm scope
53
+
54
+ Ask the user (AskUserQuestion is appropriate here) which categories/items to act on now. Reasonable default options: "Fix P0 only", "Fix P0 + P1", "Fix everything", "Let me pick specific items". If they picked specific items in their original request (e.g. "fix the two critical ones"), you can skip re-asking and proceed straight to Phase 4 for those items — but still surface the full categorized list first so they know what's being deferred.
55
+
56
+ ## Phase 4 — Build the dependency graph, then fix one item at a time
57
+
58
+ Before dispatching any fixer, sketch the dependency relationships among the approved fixes:
59
+
60
+ - **Same shared file/resource → sequential.** Two fixes that both edit the same nginx config, the same compose file, or both need a `docker restart` of the same container must not run concurrently — one subagent's edit can clobber or race the other's, and simultaneous restarts of a shared proxy compound risk. Serialize these explicitly.
61
+ - **Independent services/files → safe to parallelize**, but still verify after each completes rather than batching all verification at the end, so a failure is caught close to its cause.
62
+ - **Ordering matters when one fix's precondition is another's output** — e.g., "add rate limiting to nginx" and "add security headers to nginx" both touch the same file/server block, so do them as one combined edit or strictly in sequence, not as two racing subagents. "Set Redis auth" must land before "update app's Redis connection string to include the password" (or be done as a single fix if they're tightly coupled — don't artificially split a single logical change across two subagents just to parallelize).
63
+
64
+ For each fix, in dependency order:
65
+
66
+ 1. State briefly what you're about to do and its blast radius (which service(s) it touches, whether it's reversible, whether it risks the shared production services).
67
+ 2. If it's destructive/hard-to-reverse/production-impacting per the Hard Rules above, confirm with the user first — even if they approved the category in Phase 3, a specific irreversible action (e.g. rotating a credential, restarting the shared proxy) still deserves a heads-up given the "cost of pausing is low, cost of surprise is high" principle.
68
+ 3. Spawn a dedicated subagent scoped to exactly that one fix. Its prompt must include:
69
+ - The exact finding being addressed and why it matters (don't make it re-derive the audit).
70
+ - The specific files/services in scope, and explicitly what's **out of scope** ("do not touch nginx server blocks for other domains", "do not restart eom_mysql", etc. — restate the user's original constraints here).
71
+ - The verification step it must perform after the change (e.g. `curl` a health endpoint, `docker compose ps`, `nginx -t` with the inode-staleness check above) and report pass/fail.
72
+ - That it should stop and report back rather than improvising if it hits something unexpected (an existing config it didn't know about, a permissions wall, a service it can't safely restart).
73
+ 4. Wait for that subagent to finish. Independently re-verify anything that touches shared/production-adjacent resources yourself (don't just trust the subagent's self-report for high-blast-radius changes) before starting the next dependent fix.
74
+ 5. If a fix or its verification fails, stop the chain for anything depending on it, report the failure clearly, and ask the user how to proceed rather than guessing or rolling back unilaterally.
75
+
76
+ ## Phase 5 — Report
77
+
78
+ Summarize: what was fixed (and verified), what was explicitly deferred and why, what still needs the user to run manually (anything requiring sudo you don't have, anything requiring a decision only they can make), and any new reusable artifacts created (config files, jail definitions, cron jobs) with their locations. Keep it scannable — a short table or bulleted list per category, not prose.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: seo-review
3
+ description: Audit public-facing web pages for discoverability and search quality using evidence from the repository or live site. Use when reviewing SEO, metadata, indexing, structured data, content intent, or page performance.
4
+ ---
5
+
6
+ # SEO review
7
+
8
+ Review only the scope the user names. Start by reading any product or marketing context in the repository. Ask for the audience, business goal, target topics, affected URLs, and known changes when they are not documented.
9
+
10
+ ## Checks
11
+
12
+ - Crawlability: robots.txt, sitemap.xml, canonical URLs, redirects, status codes, and accidental noindex rules.
13
+ - Page basics: unique title, useful description, one clear main heading, descriptive links, image text alternatives, and stable URL intent.
14
+ - Structured data: valid JSON-LD that matches visible content; check rendered output for client-generated sites.
15
+ - Content: answer the target user's intent, use specific language, avoid keyword stuffing, and link related pages where useful.
16
+ - Performance and access: responsive rendering, keyboard access, readable contrast, and measured performance. Use PageSpeed or equivalent for field metrics.
17
+ - Indexation and ranking: use Search Console or a live search tool when access is provided; do not infer ranking from HTML alone.
18
+
19
+ ## Evidence contract
20
+
21
+ Every finding must include the URL or file, the check performed, the observed output or excerpt, impact, fix, and priority. If a check cannot be measured, put it in an out-of-scope section with the tool needed. Never claim that schema, indexing, or rankings are absent without running the relevant check.