@ryuenn3123/agentic-senior-core 6.14.0 → 6.15.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.
- package/.agents/plugins/agentic-senior-core/.codex-plugin/plugin.json +1 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-develop.md +1 -0
- package/.agents/plugins/agentic-senior-core/commands/asc-develop.toml +3 -0
- package/.agents/plugins/agentic-senior-core/commands/asc-reference.md +1 -0
- package/.agents/plugins/agentic-senior-core/commands/asc-reference.toml +3 -0
- package/.agents/plugins/agentic-senior-core/commands/asc-review.md +1 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-review.toml +2 -2
- package/.agents/plugins/agentic-senior-core/commands/asc-ui.md +1 -0
- package/.agents/plugins/agentic-senior-core/commands/asc-ui.toml +3 -0
- package/.agents/plugins/agentic-senior-core/commands/asc.md +1 -0
- package/.agents/plugins/agentic-senior-core/commands/asc.toml +3 -0
- package/.agents/plugins/agentic-senior-core/hooks/lib/known-ui-slop-patterns.json +15 -0
- package/.agents/plugins/agentic-senior-core/plugin.json +1 -1
- package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +6 -7
- package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +61 -26
- package/.agents/plugins/agentic-senior-core/skills/asc-develop/SKILL.md +85 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-reference/SKILL.md +2 -1
- package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +55 -51
- package/.agents/plugins/agentic-senior-core/skills/asc-ui/SKILL.md +157 -0
- package/README.md +1 -1
- package/gemini-extension.json +1 -1
- package/lib/cli/commands/adapter.mjs +14 -2
- package/lib/cli/commands/global.mjs +14 -2
- package/package.json +1 -1
- package/plugin.yaml +7 -19
- package/.agents/plugins/agentic-senior-core/commands/asc-add-feature.md +0 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-add-feature.toml +0 -6
- package/.agents/plugins/agentic-senior-core/commands/asc-audit.md +0 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-audit.toml +0 -2
- package/.agents/plugins/agentic-senior-core/commands/asc-dedup.md +0 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-dedup.toml +0 -2
- package/.agents/plugins/agentic-senior-core/commands/asc-fingerprint.md +0 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-fingerprint.toml +0 -2
- package/.agents/plugins/agentic-senior-core/commands/asc-help.md +0 -12
- package/.agents/plugins/agentic-senior-core/commands/asc-help.toml +0 -12
- package/.agents/plugins/agentic-senior-core/commands/asc-new-project.md +0 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-new-project.toml +0 -6
- package/.agents/plugins/agentic-senior-core/commands/asc-refactor.md +0 -1
- package/.agents/plugins/agentic-senior-core/commands/asc-refactor.toml +0 -2
- package/.agents/plugins/agentic-senior-core/skills/asc-adapter/SKILL.md +0 -49
- package/.agents/plugins/agentic-senior-core/skills/asc-add-feature/SKILL.md +0 -60
- package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +0 -61
- package/.agents/plugins/agentic-senior-core/skills/asc-bootstrap/SKILL.md +0 -27
- package/.agents/plugins/agentic-senior-core/skills/asc-debt/SKILL.md +0 -82
- package/.agents/plugins/agentic-senior-core/skills/asc-dedup/SKILL.md +0 -56
- package/.agents/plugins/agentic-senior-core/skills/asc-fingerprint/SKILL.md +0 -49
- package/.agents/plugins/agentic-senior-core/skills/asc-learn/SKILL.md +0 -40
- package/.agents/plugins/agentic-senior-core/skills/asc-new-project/SKILL.md +0 -62
- package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +0 -62
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Run the engineering lifecycle workflow from skills/asc-develop/SKILL.md (Greenfield scaffolding, Brownfield features, and Refactoring). Research analogous modules, plan architecture and fallbacks, apply the decision ladder, and verify with tests without creating disk checkpoint files.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
description = "Engineering lifecycle for greenfield apps, brownfield features, and refactoring"
|
|
2
|
+
prompt = "Load and follow the asc-develop skill. Research analogous modules, plan architecture and failure fallbacks, apply the decision ladder, and verify with tests without creating disk checkpoint files."
|
|
3
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Apply domain-specific engineering standards from skills/asc-reference/SKILL.md (RFC API design, database N+1/transactions, isolation testing contracts, infrastructure, and resilience).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Run the
|
|
1
|
+
Run the quality and security assurance workflow from skills/asc-review/SKILL.md (Code Review, OWASP Security Audit, and Clone Duplication). Prioritize findings strictly by severity with concrete evidence and remediations.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
description = "
|
|
2
|
-
prompt = "Load and follow the asc-review skill.
|
|
1
|
+
description = "Quality, security, and duplication audit"
|
|
2
|
+
prompt = "Load and follow the asc-review skill. Inspect PR/diff changes, audit security trust boundaries (OWASP), and detect code clones. Report findings ordered by severity."
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Run the UI/UX engineering and anti-slop guidelines from skills/asc-ui/SKILL.md. Clean up verbose microcopy, eliminate redundant headings/subtitles, enforce single-language purity without awkward foreign loanwords, optimize information density, and implement reliable data states.
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
description = "UI/UX engineering, microcopy hygiene, and anti-slop design"
|
|
2
|
+
prompt = "Load and follow the asc-ui skill. Inspect the target UI components and layouts. Strip out AI slop: eliminate redundant subtitles repeating headers, cut verbose copy by 50%, remove marketing buzzwords in functional tools, enforce strict single-language consistency without unidiomatic foreign loanwords, replace generic 3-card templates with scannable information density, and ensure proper state quad (loading, empty, error, populated) handling."
|
|
3
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Show Agentic Senior Core guidelines, fingerprint codebase conventions, manage preferences, and configure tool adapters from skills/asc/SKILL.md.
|
|
@@ -44,6 +44,21 @@
|
|
|
44
44
|
"id": "ui-stripped-focus-ring",
|
|
45
45
|
"regex": "(?:\\boutline-none\\b|\\bfocus:outline-none\\b)(?!.*(?:focus-visible:ring|focus:ring|focus-visible:outline))",
|
|
46
46
|
"message": "warning: 'outline-none' without a focus-visible ring breaks keyboard navigation (WCAG 2.4.7 violation). Pair with focus-visible:ring-2."
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"id": "copy-marketing-buzzwords",
|
|
50
|
+
"regex": "\\b(seamlessly|effortlessly|empower your|revolutionize your|at your fingertips)\\b",
|
|
51
|
+
"message": "note: marketing buzzword detected in functional UI copy. Strip conversational filler and speak plainly."
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "code-decorative-banner",
|
|
55
|
+
"regex": "//\\s*={5,}|//\\s*-{5,}\\s*[A-Z]+",
|
|
56
|
+
"message": "note: decorative ASCII character banner detected. Keep comments concise, sentence-case, and focused on rationale."
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"id": "code-step-narration",
|
|
60
|
+
"regex": "//\\s*Step\\s+[0-9]+:\\s*|//\\s*Initialize\\s+(?:the\\s+)?[a-zA-Z0-9_]+",
|
|
61
|
+
"message": "note: procedural line-by-line comment narration detected. Describe non-obvious intent and constraints instead of restating the obvious code flow."
|
|
47
62
|
}
|
|
48
63
|
]
|
|
49
64
|
}
|
|
@@ -25,8 +25,6 @@ When picking step 5 or 6 (unless trivial):
|
|
|
25
25
|
- One-line comment noting rationale and upgrade trigger if there is a ceiling.
|
|
26
26
|
- One runnable check (assertion, test, or demo) proving it works.
|
|
27
27
|
- Never simulate success or return hardcoded values mimicking live integrations. Temporary stubs must be marked with `// ASC-STUB: [reason] [ASC-DEBT-xxx]` and tracked in the debt ledger.
|
|
28
|
-
- Action Feedback Invariant: Every mutation/user action (submit, delete, update) MUST have a pending state (disabled button/spinner) and visible completion feedback (toast or banner with actionable retry). Never silently swallow errors.
|
|
29
|
-
- Resilience Invariant: Soft dependencies must have defined fallbacks (static safe default, stale cache, or degraded mode). Protect UI sections with localized error boundaries.
|
|
30
28
|
|
|
31
29
|
## Security (never skip)
|
|
32
30
|
- Validate and normalize ALL inputs at trust boundaries.
|
|
@@ -44,6 +42,8 @@ When picking step 5 or 6 (unless trivial):
|
|
|
44
42
|
- Early returns over deep nesting (keep happy path flat).
|
|
45
43
|
- Three similar lines is better than a premature abstraction (duplication over wrong abstraction).
|
|
46
44
|
- Single design source of truth: UI styling must reuse defined design tokens, theme variables, or existing page patterns. No ad-hoc palette, radius, or font deviations between pages.
|
|
45
|
+
- UI copy & microcopy hygiene: Functional UI is a tool, not a brochure. Zero conversational filler or marketing buzzwords ("seamless", "empower", "robust"). Never echo heading text in redundant subheadings. Enforce strict single-language consistency without unidiomatic foreign loanwords or hybrid transliterations.
|
|
46
|
+
- Code comment hygiene: Zero decorative character banners (// =====), zero line-by-line narration (// Step 1: validate), zero empty category tags (// Main logic), and zero signature echoes in docstrings. Keep only comments that document non-obvious operational constraints, security boundaries, concurrency hazards, or protocol contracts.
|
|
47
47
|
- Delete code that carries no behavior, safety, or test value. Readability wins over brevity.
|
|
48
48
|
- Detect and respect project linter/formatter configs. Do not restate style rules enforced by tooling.
|
|
49
49
|
|
|
@@ -83,8 +83,7 @@ When picking step 5 or 6 (unless trivial):
|
|
|
83
83
|
## Domain References & Skills (On-Demand)
|
|
84
84
|
Detailed domain guidelines are loaded on-demand via skills or scoped rules:
|
|
85
85
|
- **Testing, API Design, Database, Frontend, Infrastructure, Resilience** → run `/asc-reference`
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
89
|
-
- **
|
|
90
|
-
- **New Project Scaffolding** → run `/asc-new-project`
|
|
86
|
+
- **UI/UX Engineering & Anti-Slop Design** → run `/asc-ui`
|
|
87
|
+
- **Engineering Lifecycle & Features** → run `/asc-develop`
|
|
88
|
+
- **Quality, Security & Duplication Audit** → run `/asc-review`
|
|
89
|
+
- **Repository Meta & Configuration** → run `/asc`
|
|
@@ -1,40 +1,75 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc
|
|
3
3
|
description: >
|
|
4
|
-
Trigger this skill when the user
|
|
4
|
+
Trigger this skill when the user asks: "what are the rules", "coding guidelines", "best practices", "how should I write this", "staff engineer approach", "map this codebase", "document our patterns", "fingerprint this repository", "learn my preferences", "bootstrap preferences", "log this debt", "add to debt ledger", "install ASC", "configure for Cursor", "set up adapter", "apa aturannya", "panduan koding", "petakan codebase", "pasang asc". Covers Core Overview, Codebase Fingerprinting, Adaptive Preferences, Debt Tracking, and IDE Adapters.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Agentic Senior Core
|
|
7
|
+
# Agentic Senior Core: Architecture & Meta-Tools (`asc`)
|
|
8
8
|
|
|
9
|
-
Universal AI coding rules.
|
|
9
|
+
Universal AI coding rules and meta-tooling playbook. Grounded in Google Engineering Practices, OWASP, and USENIX Security.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. The 5 Core Meta-Skills Architecture
|
|
14
|
+
|
|
15
|
+
Agentic Senior Core organizes operational guidance into 5 high-density, non-overlapping playbooks:
|
|
16
|
+
|
|
17
|
+
1. **`/asc` (This Skill)**: Core engineering rules, codebase convention fingerprinting, adaptive preferences, debt tracking, and IDE adapter setup.
|
|
18
|
+
2. **`/asc-develop`**: Engineering lifecycle for greenfield scaffolding, brownfield feature implementation, and structured refactoring.
|
|
19
|
+
3. **`/asc-review`**: Quality and security assurance: production PR reviews, deep vulnerability audits (OWASP / ASI), and code clone deduplication.
|
|
20
|
+
4. **`/asc-reference`**: Domain architecture reference for REST/GraphQL APIs, database queries/migrations, testing contracts, infrastructure, and resilience.
|
|
21
|
+
5. **`/asc-ui`**: Human-interface engineering: UI visuals, UX microcopy hygiene, strict single-language localization, mobile reflow (`dvh`/`clamp`), and WCAG 2.2 AA accessibility.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Repository Fingerprinting
|
|
26
|
+
|
|
27
|
+
Extract this repository's architectural and procedural conventions before undertaking major changes. The goal is evidence-backed alignment with this codebase.
|
|
28
|
+
|
|
29
|
+
### Procedure
|
|
30
|
+
1. **Map Runtime & Stack**: Inspect package manifests, test runners, and deployment configs.
|
|
31
|
+
2. **Analogous Modules**: Locate at least 2 existing modules. Record their layer splits, naming conventions, validation schemas, error handling, and notification patterns.
|
|
32
|
+
3. **Evidence-Backed Conventions**: Report only falsifiable findings with file and line references. Separate observations from proposals.
|
|
33
|
+
4. **Project Conventions File**: When approved by the user, record project-specific conventions in `CONVENTIONS.md` at the project root. Never overwrite universal ASC rules.
|
|
12
34
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
- `/asc-reference` -- Domain-specific rules (testing, API, database, frontend, infra, resilience)
|
|
19
|
-
- `/asc-fingerprint` -- Map repository conventions, notification providers, and error patterns
|
|
20
|
-
- `/asc-dedup` -- Token-level clone and duplicate code audit via jscpd
|
|
21
|
-
- `/asc-debt` -- Track deferred enforcement violations (add, list, resolve, summary)
|
|
22
|
-
- `/asc-learn` -- Mine adaptive user preferences from session history
|
|
23
|
-
- `/asc-bootstrap` -- Seed baseline UI and notification preferences
|
|
24
|
-
- `/asc-help` -- Show this help
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 3. Adaptive Preferences & Baseline Onboarding
|
|
38
|
+
|
|
39
|
+
Customize AI coding behavior and design preferences dynamically.
|
|
25
40
|
|
|
26
|
-
|
|
41
|
+
### Workflow
|
|
42
|
+
- **Elicit Baseline Preferences**: Use `asc bootstrap` to select design slop patterns to ban (e.g. generic gradients, unlinked Inter font, stripped focus rings).
|
|
43
|
+
- **Learn from Corrections**: When a user corrects a styling or architectural choice (e.g. *"never use modals for multi-step flows"*, *"always use date-fns"*), log the rule into `.agents/adaptive_preferences.json` via `addRule()`.
|
|
44
|
+
- **Enforcement**: Project preferences are automatically consulted during code generation and compiled into local git hooks.
|
|
45
|
+
|
|
46
|
+
---
|
|
27
47
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
48
|
+
## 4. Technical Debt Ledger
|
|
49
|
+
|
|
50
|
+
Track deferred quality violations and temporary stubs systematically.
|
|
51
|
+
|
|
52
|
+
### Ledger Standards
|
|
53
|
+
- When an ASC nudge or quality violation is deferred with user consent, tag the stub in code:
|
|
54
|
+
`// ASC-STUB: [reason] [ASC-DEBT-xxx]`
|
|
55
|
+
- Record the item in `.agents/debt-ledger.json` with timestamp, file location, severity, and planned remediation.
|
|
56
|
+
- Never let temporary mocks or hardcoded values silently masquerade as completed production integrations.
|
|
57
|
+
|
|
58
|
+
---
|
|
33
59
|
|
|
34
|
-
|
|
60
|
+
## 5. Host Adapters & Setup
|
|
35
61
|
|
|
36
|
-
|
|
62
|
+
Synchronize ASC rules and skills across all installed AI coding tools.
|
|
37
63
|
|
|
38
|
-
|
|
64
|
+
### Supported Tools
|
|
65
|
+
- **Native Plugin Hosts (Zero setup)**: Antigravity, Claude Code, Codex CLI, Copilot CLI, OpenCode, Kilo Code.
|
|
66
|
+
- **Adapter Hosts (Single file in project)**: Cursor (`.cursor/rules/agentic-senior-core.mdc`), Windsurf/Devin (`.devin/rules/`), Cline, Continue, Zed, Aider.
|
|
39
67
|
|
|
40
|
-
|
|
68
|
+
### CLI Utility Commands
|
|
69
|
+
```bash
|
|
70
|
+
asc status # Detect installed AI coding tools
|
|
71
|
+
asc global --all # Install global rules and smart git hook dispatcher
|
|
72
|
+
asc adapter --all # Generate workspace adapters for all detected IDEs
|
|
73
|
+
asc adapter --cursor # Generate adapter specifically for Cursor
|
|
74
|
+
asc uninstall # Clean up adapter files and hooks
|
|
75
|
+
```
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asc-develop
|
|
3
|
+
description: >
|
|
4
|
+
Trigger this skill when the user is: building a new feature, creating an endpoint, adding components, scaffolding a new project, starting from scratch, or refactoring existing code. Trigger when the user says: "add a feature", "build this endpoint", "implement this", "extend this", "wire up", "create a new route", "add a new page", "tambah fitur", "bikin endpoint", "new project", "start from scratch", "scaffold this", "bootstrap app", "bikin project baru", "buat aplikasi baru", "refactor this", "clean up this code", "rewrite this", "extract this into", "simplify this module", "rapikan kode ini", "refactor ini". Handles Greenfield, Brownfield, and Refactoring workflows.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Engineering Lifecycle Playbook (`asc-develop`)
|
|
8
|
+
|
|
9
|
+
Universal engineering workflow for greenfield development, feature implementation, and structured refactoring. Enforces strict specification alignment, analog module reuse, and automated validation without cluttering repositories with disk checkpoint files.
|
|
10
|
+
|
|
11
|
+
Grounded in: Fowler's Refactoring, Spec-Driven Development (SDD), and HumanLayer RPI.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Mode 1: Greenfield (New Project Scaffolding)
|
|
16
|
+
|
|
17
|
+
Use when creating a new application, service, or repository from zero.
|
|
18
|
+
|
|
19
|
+
### Step 1: Define & Clarify (No Code)
|
|
20
|
+
1. Clarify essential project requirements with the user: target runtime, platform, frameworks, performance bounds, and explicit non-goals.
|
|
21
|
+
2. Propose the top-level directory layout and module boundaries following idiomatic conventions of the chosen stack.
|
|
22
|
+
3. Present an architectural summary and wait for user alignment before writing files.
|
|
23
|
+
|
|
24
|
+
### Step 2: Implementation & Decision Ladder
|
|
25
|
+
1. Apply the ASC Decision Ladder to every module:
|
|
26
|
+
- Does this need to be built?
|
|
27
|
+
- Can standard library or native platform handle it?
|
|
28
|
+
- Can this be one straightforward function?
|
|
29
|
+
2. Build the core domain entities, data models, and services first before protocol/transport controllers.
|
|
30
|
+
3. For frontend interfaces, follow the design standards in `/asc-ui`.
|
|
31
|
+
4. Generate a quality gate workflow (e.g., `.github/workflows/quality-gate.yml`) that runs linter, type-check, and tests.
|
|
32
|
+
|
|
33
|
+
### Step 3: Validation
|
|
34
|
+
1. Verify acceptance criteria against the initial specification.
|
|
35
|
+
2. Confirm no unnecessary dependencies or speculative abstractions were introduced.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Mode 2: Brownfield (Feature Implementation)
|
|
40
|
+
|
|
41
|
+
Use when adding endpoints, components, pages, or capabilities to an existing codebase.
|
|
42
|
+
|
|
43
|
+
### Step 1: Research (Codebase & Pattern Inventory)
|
|
44
|
+
1. Map existing code: scan analogous modules to inspect their layer split, naming conventions, error handling, and notification patterns.
|
|
45
|
+
2. **Reuse Inventory**: Identify existing shared components (`components/`, `ui/`), utility functions, and active toast/banner providers. Explicitly decide what must **NOT** be rebuilt.
|
|
46
|
+
3. Present a factual research summary identifying reused components and implementation direction. Stop and confirm before implementing.
|
|
47
|
+
|
|
48
|
+
### Step 2: Implementation Plan & Fallback Matrix
|
|
49
|
+
1. Define a step-by-step implementation plan with targeted files and functions.
|
|
50
|
+
2. **Failure Modes & Fallback Matrix**: Define concrete behavior for failure scenarios:
|
|
51
|
+
- What happens on network/API failure or timeout?
|
|
52
|
+
- What feedback does the user see? (Pending state, inline field error, toast/banner with retry).
|
|
53
|
+
- How can the system recover? (Retry, cached fallback, degraded mode).
|
|
54
|
+
3. If building UI, ensure compliance with `/asc-ui` (zero marketing fluff, single-language consistency, mobile reflow, WCAG AA contrast).
|
|
55
|
+
|
|
56
|
+
### Step 3: Implement & Validate
|
|
57
|
+
1. Implement the feature following the approved plan.
|
|
58
|
+
2. **Zero-Fake-Done Testing**: Run the project test suite (`ascx test`, `npm test`, `pytest`, `cargo test`). The test runner **MUST** exit with code 0.
|
|
59
|
+
3. Never weaken or delete test assertions to simulate a passing run. Fix the underlying business logic.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Mode 3: Refactoring (Structure Modernization)
|
|
64
|
+
|
|
65
|
+
Use when restructuring, simplifying, or modernizing code without changing external behavior.
|
|
66
|
+
|
|
67
|
+
### Step 1: YAGNI Scan & Baseline Verification
|
|
68
|
+
1. **Verify Baseline**: Run project tests to ensure all existing tests pass before touching code. Do not refactor on broken tests.
|
|
69
|
+
2. **YAGNI Scan**: Identify speculative code to remove:
|
|
70
|
+
- "Just in case" abstractions wrapping a single implementation with no second consumer.
|
|
71
|
+
- Dead branches, unused flags, and premature extension points.
|
|
72
|
+
|
|
73
|
+
### Step 2: Scope & Execution
|
|
74
|
+
1. **Low-Level Refactors** (rename, extract helper, type tightening, dead code removal): Proceed immediately.
|
|
75
|
+
2. **High-Level Refactors** (moving modules, altering architecture boundaries, redesigning contracts): Propose the plan and rationale, then confirm before applying.
|
|
76
|
+
3. Apply Refactor Invariants:
|
|
77
|
+
- Maintain flat happy paths via early returns over nested `if/else`.
|
|
78
|
+
- Preserve all user feedback indicators, error notifications, and fallbacks.
|
|
79
|
+
- Never drop error-handling branches.
|
|
80
|
+
- Run a final simplification pass.
|
|
81
|
+
|
|
82
|
+
### Step 3: Verification
|
|
83
|
+
1. Re-run tests to confirm that behavior, public contracts, and error handling remain identical.
|
|
84
|
+
2. For every changed module, confirm that readability, maintainability, and safety have improved.
|
|
85
|
+
|
|
@@ -49,6 +49,7 @@ Grounded in: WCAG 2.2 AA (accessibility), Fowler's Money Pattern (monetary types
|
|
|
49
49
|
- Accessible Notifications: Toast and status messages must use ARIA live regions (`role="status"`, `aria-live="polite"` for non-urgent feedback; `role="alert"` for critical errors). Never steal keyboard focus for toasts.
|
|
50
50
|
- WCAG 2.2 AA accessibility floor. Responsive by default.
|
|
51
51
|
- No placeholder, lorem, or TODO content in production UI.
|
|
52
|
+
- UI/UX Microcopy & Anti-Slop: For comprehensive UX writing, redundancy elimination, single-language localization hygiene, and layout de-sloppification, load the dedicated `/asc-ui` skill (`skills/asc-ui/SKILL.md`).
|
|
52
53
|
|
|
53
54
|
## Infrastructure
|
|
54
55
|
|
|
@@ -64,7 +65,7 @@ Grounded in: WCAG 2.2 AA (accessibility), Fowler's Money Pattern (monetary types
|
|
|
64
65
|
- Dependency Fallback Strategy (Hard vs Soft):
|
|
65
66
|
- Hard dependencies (core workflow blocks without them): Fail fast, roll back transactions, return structured RFC 9457 error with actionable explanation.
|
|
66
67
|
- Soft dependencies (non-critical enhancements): Provide graceful fallbacks:
|
|
67
|
-
- *Static Fallback*: Return safe default values, static placeholders, or empty collections
|
|
68
|
+
- *Static Fallback*: Return safe default values, static placeholders, or empty collections instead of throwing unhandled exceptions.
|
|
68
69
|
- *Stale Cache Fallback*: Serve last-known-good cached state (`stale-while-revalidate`) with an offline/stale indicator.
|
|
69
70
|
- *Degraded Mode*: Isolate and disable the failing peripheral widget while preserving core user journeys.
|
|
70
71
|
- Circuit breakers for unhealthy dependencies to fail fast and prevent thread/resource exhaustion.
|
|
@@ -1,73 +1,77 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: asc-review
|
|
3
3
|
description: >
|
|
4
|
-
Trigger this skill when the user says: "review this code", "check this PR", "what's wrong with this", "look at my changes", "
|
|
4
|
+
Trigger this skill when the user is: reviewing pull requests, checking recent changes, auditing security, scanning for vulnerabilities, threat modeling, or detecting duplicate code. Trigger when the user says: "review this code", "check this PR", "what's wrong with this", "look at my changes", "is this production-ready", "find bugs", "audit this", "security check", "find vulnerabilities", "check for XSS", "check for SQL injection", "OWASP check", "check auth", "find duplicate code", "check for clones", "audit for duplication", "review PR ini", "cek kodingan saya", "cari celah keamanan", "cari kode duplikat". Covers Code Review, Security Audit, and Duplicate Detection.
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# Quality & Security Assurance Playbook (`asc-review`)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Unified assurance playbook for rigorous code review, deep vulnerability audits, and structural duplication detection. Operates with an adversarial, zero-trust posture: prioritizing production risks, data security, and maintainability over superficial compliments.
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Grounded in: OWASP Top 10 (2025), OWASP ASVS v5.0, OWASP Agentic Applications (ASI01-ASI10), Google Engineering Practices, and Fowler's Rule of Three.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Mode 1: Production Code Review
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
Use when reviewing PRs, diffs, commits, or newly written feature code.
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
### Review Procedure
|
|
20
|
+
1. **Scope Inspection**: Run `git diff --stat` (or `git status`) to inspect modified files and line deltas.
|
|
21
|
+
2. **Test-Change Correlation**: For every modified application logic file, verify that a corresponding test was updated. If logic changed without tests, report as a missing test finding.
|
|
22
|
+
3. **Deterministic Verification**: Run project linter and test suite (`ascx test` / `npm test`).
|
|
23
|
+
4. **Severity Priority Order**:
|
|
24
|
+
- **Severity 1 (Critical)**: Correctness, data corruption, auth/permission bypass, security sinks, PII leakage.
|
|
25
|
+
- **Severity 2 (High)**: Action feedback failures (hanging spinners, unhandled mutations, missing error boundaries), unhandled async rejections, missing remote timeouts.
|
|
26
|
+
- **Severity 3 (Medium)**: Public contract drift, missing failure-path tests, architectural boundary violations.
|
|
27
|
+
- **Severity 4 (Low)**: Maintainability debt, performance micro-optimizations, code comment noise.
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
---
|
|
24
30
|
|
|
25
|
-
|
|
26
|
-
2. Action feedback & resilience: silent mutation failures, missing toasts/banners, hanging spinners, missing fallbacks on remote calls, or missing error boundaries.
|
|
27
|
-
3. Public contract drift: APIs, events, CLI behavior, data model, UI contract, docs.
|
|
28
|
-
4. Missing tests for changed behavior.
|
|
29
|
-
5. Architecture boundary drift and maintainability risk.
|
|
30
|
-
6. Performance and accessibility issues with concrete impact.
|
|
31
|
+
## Mode 2: Security & Vulnerability Audit
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
Use when assessing trust boundaries, reviewing auth systems, running threat models, or auditing external dependencies.
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
### Security Audit Procedure
|
|
36
|
+
1. **Dependency Audit**: Run native vulnerability scanners (`npm audit`, `cargo audit`, `pip-audit`).
|
|
37
|
+
2. **Lexical Sink & Secret Scan**: Search for hardcoded secrets, dangerous functions (`eval`, `pickle.load`, `shell=True`), unvalidated redirects, and unhandled stubs (`// ASC-STUB:`).
|
|
38
|
+
3. **Trust Boundary Mapping**: Trace all points where external, untrusted input enters the application. Validate that inputs are strictly sanitized, type-checked, and normalized.
|
|
37
39
|
|
|
38
|
-
|
|
40
|
+
### Security Scope Checklist
|
|
41
|
+
- **Authentication & Authorization**: Verify resource-level access control on every private endpoint, not just session presence.
|
|
42
|
+
- **Injection & XSS**: Verify all database queries are strictly parameterized. Check HTML escaping for user-controlled strings.
|
|
43
|
+
- **SSRF & Network**: Validate outbound URLs; verify service credentials follow least-privilege principles.
|
|
44
|
+
- **Agentic Risk Scope (OWASP Top 10 for Agentic Applications)**:
|
|
45
|
+
- Agent Goal Hijack (ASI01), Tool Parameter Tampering (ASI02), Identity & Privilege Abuse (ASI03).
|
|
46
|
+
- Supply Chain & Untrusted Plugins (ASI04), Sandboxing & Execution (ASI05).
|
|
47
|
+
- Memory & Context Poisoning (ASI06): Treat persistent state as untrusted input.
|
|
39
48
|
|
|
40
|
-
|
|
41
|
-
- Changed behavior matches the user request.
|
|
42
|
-
- Existing behavior preserved unless user approved a change.
|
|
43
|
-
- Edge cases, empty states, error paths, and fallbacks handled.
|
|
44
|
-
- Action feedback: mutations (forms, buttons, mutations) have visible pending indicators and clear completion notifications (toast or banner with retry). No silent failures or hanging spinners.
|
|
45
|
-
- Dependency resilience: remote calls have strict timeouts and soft dependencies have graceful fallbacks (static default, stale cache, or degraded mode). Component crashes are contained by error boundaries.
|
|
49
|
+
---
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
- External input validated at trust boundaries.
|
|
49
|
-
- Secrets, tokens, credentials not committed or logged.
|
|
50
|
-
- Authorization enforced at a trusted boundary.
|
|
51
|
-
- Error responses keep internal details out of client responses.
|
|
52
|
-
- User-derived URLs are protected against SSRF and user-controlled log values cannot forge or corrupt log entries.
|
|
53
|
-
- New dependencies have verified identity and provenance; plausible package names are not evidence. Confirm git clone targets and plugin/skill install paths against trusted sources (mitigate HalluSquatting).
|
|
51
|
+
## Mode 3: Clone & Code Duplication Audit
|
|
54
52
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
Use when evaluating copy-paste repetition or consolidating duplicated logic across a repository.
|
|
54
|
+
|
|
55
|
+
### Duplication Audit Procedure
|
|
56
|
+
1. **Rule of Three Threshold**: Duplication is permitted up to 2 instances to avoid premature wrong abstractions. Three or more identical or near-identical logic blocks must be flagged for consolidation.
|
|
57
|
+
2. **Scan Tools**: Execute token-level clone audit (e.g., `asc dedup` or `jscpd`) when available.
|
|
58
|
+
3. **Consolidation Guidance**:
|
|
59
|
+
- Prefer extracting pure, stateless utility functions over creating complex abstract base classes.
|
|
60
|
+
- Ensure the consolidated helper resides in a shared module matching existing project conventions.
|
|
61
|
+
|
|
62
|
+
---
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
- Changed behavior has appropriate tests (baseline: happy path + failure mode).
|
|
63
|
-
- Never mock the unit under test — mock only external boundaries and dependencies.
|
|
64
|
-
- Tests assert behavior and contracts, not implementation trivia.
|
|
65
|
-
- Critical flows include failure-path coverage.
|
|
64
|
+
## Output Format for Findings
|
|
66
65
|
|
|
67
|
-
|
|
68
|
-
- API, event, CLI, and data contract changes update docs in the same commit.
|
|
69
|
-
- Root README exists and stays current.
|
|
66
|
+
Report findings ordered strictly by severity with file and line references:
|
|
70
67
|
|
|
71
|
-
|
|
68
|
+
```
|
|
69
|
+
Severity: Critical | High | Medium | Low
|
|
70
|
+
Category: Correctness | Security | Resilience | Duplication
|
|
71
|
+
Location: path/to/file.ext:line
|
|
72
|
+
Impact: Concrete operational risk or threat vector
|
|
73
|
+
Evidence: Exact code excerpt or test failure
|
|
74
|
+
Remediation: Smallest safe, actionable fix
|
|
75
|
+
```
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
If no issues are found, state so explicitly and summarize the audit coverage.
|