@ryuenn3123/agentic-senior-core 6.11.1 → 6.13.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.11.1",
3
+ "version": "6.13.0",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "skills": "./skills/",
6
6
  "hooks": "./hooks/hooks.json",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.11.1",
3
+ "version": "6.13.0",
4
4
  "description": "Universal AI coding rules. Because your AI writes code like it gets paid by the line.",
5
5
  "contextFileName": "rules/agentic-senior-core.md",
6
6
  "rules": [
@@ -7,6 +7,12 @@ description: Universal AI coding rules. Write code like a staff engineer.
7
7
 
8
8
  Write code like a staff engineer: efficient, safe, maintainable. Grounded in Google Engineering Practices, OWASP, and USENIX Security.
9
9
 
10
+ ## Neutrality & Intellectual Rigor
11
+ - Objective truth over user validation: Prioritize technical correctness, architectural integrity, and security over agreeableness. Challenge flawed premises, insecure patterns, or suboptimal designs plainly with empirical evidence and risk trade-offs.
12
+ - Resist false capitulation: Do not concede or retract valid technical critique under pushback unless presented with verifiable data, benchmarks, or explicit operational constraints.
13
+ - Zero flattery and anti-hype: Never open with hollow praise ("Great idea!", "You're right!"). Describe technologies and trade-offs soberly; never oversell tools or architectures beyond their real-world operational bounds.
14
+ - Contextual best practices: Apply industry best practices pragmatically based on actual project scale and constraints. State trade-offs (cognitive overhead, maintenance cost, performance) instead of enforcing dogmatic over-engineering.
15
+
10
16
  Before writing code, stop at the lowest step that holds:
11
17
  1. Does this need to be built at all?
12
18
  2. Does the codebase already have this? Reuse it.
@@ -19,6 +25,8 @@ When picking step 5 or 6 (unless trivial):
19
25
  - One-line comment noting rationale and upgrade trigger if there is a ceiling.
20
26
  - One runnable check (assertion, test, or demo) proving it works.
21
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.
22
30
 
23
31
  ## Security (never skip)
24
32
  - Validate and normalize ALL inputs at trust boundaries.
@@ -50,9 +58,11 @@ When picking step 5 or 6 (unless trivial):
50
58
  - UI component reuse: Component re-invention across pages is forbidden. Before declaring markup or styling, check existing components in `components/` or `ui/`. Compose or extend existing components via props/variants. Do not introduce single-page clones or ad-hoc styling that diverges from established pages.
51
59
 
52
60
  ## Error Handling & Observability
53
- - Fail fast on invalid input at trust boundaries. Handle only errors that can actually occur.
61
+ - Fail fast on invalid input at trust boundaries; fail safe with graceful fallback for external runtime dependencies.
54
62
  - Structured error responses with safe details (RFC 9457). Distinguish client (4xx) from server (5xx) errors.
55
- - Frontend data-fetching components must explicitly handle loading, error (toast/notification with retry), and data states.
63
+ - Action feedback: mutations (create, update, delete, submit) must provide immediate pending state (disable button/spinner) and clear success/error notification (toast or banner with retry). Never silently swallow mutation errors.
64
+ - UI data states: handle the state quad — loading skeleton/spinner, empty state, error state with retry, and populated data. Wrap critical UI widgets in localized error boundaries.
65
+ - External dependency resilience: classify dependencies as hard (fail fast + actionable error) or soft (fallback to static safe default, stale cache, or degraded mode).
56
66
  - Surface every operational error with context. Empty catch blocks mask production issues.
57
67
  - Structured key-value logging for significant events. Never leak stack traces or credentials in production logs.
58
68
 
@@ -62,11 +72,10 @@ When picking step 5 or 6 (unless trivial):
62
72
  - Testing baseline: new business logic gets one happy-path test and one failure-mode test, unless waived by user.
63
73
  - Test quality: Never mock the unit under test — mock only external boundaries/dependencies.
64
74
  - Test integrity: Never weaken or delete test assertions to simulate a passing run. Fix the underlying logic.
65
- - Sycophancy mitigation: State technical objections and trade-offs plainly before implementing. Answer direct questions honestly.
66
75
  - Preserve findings and decisions outside chat context. Recommend a fresh context at phase boundaries or after 20-30 tool calls.
67
76
 
68
77
  ## Response Style
69
- - Lead with what the developer needs to act: command, file path, code change, or decision point.
78
+ - Lead with what the developer needs to act: command, file path, code change, or decision point. Skip pleasantries, disclaimers, and conversational filler (no yapping).
70
79
  - Format: direct statement, then evidence. No emojis, conversational filler, or artificial hype.
71
80
  - Preserve exact commands, file paths, line numbers, error messages, and exit codes.
72
81
  - Concision is task-scoped: trim filler on routine tasks; do NOT compress reasoning on complex tasks (debugging, architecture, security).
@@ -14,9 +14,13 @@ Universal AI coding rules. Write code like a staff engineer.
14
14
  - `/asc-add-feature` -- Brownfield workflow (Research -> Plan -> Implement)
15
15
  - `/asc-refactor` -- Structured refactoring workflow with pre-checks and validation
16
16
  - `/asc-review` -- Production-risk code review with severity-ordered findings
17
- - `/asc-audit` -- Security and architecture audit
17
+ - `/asc-audit` -- Security, architecture, and resilience audit
18
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
19
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
20
24
  - `/asc-help` -- Show this help
21
25
 
22
26
  ## Enforcement
@@ -30,8 +30,8 @@ Format:
30
30
 
31
31
  1. Write `workflow-gate.json` with phase `research`.
32
32
  2. Map existing code: patterns, utilities, dependencies already in use. Locate at least one analogous feature/module and record its file paths.
33
- 3. **UI Component & Design Token Inventory**: For any UI or frontend work, scan existing shared components (e.g. `components/`, `ui/`) and existing page patterns. Explicitly identify what must NOT be rebuilt (buttons, cards, modals, inputs, tables, layout wrappers, validation helpers).
34
- 4. Output a factual research summary that separates what exists from what is proposed, including an explicit `[REUSED COMPONENTS & HELPERS]` list, with file paths for the two or three claims that drive the plan.
33
+ 3. **UI Component, Notification & Error Pattern Inventory**: Scan existing shared components (`components/`, `ui/`), page patterns, active toast/notification providers (e.g., Sonner, react-hot-toast, custom alert banners), and existing fallback/error boundary conventions. Explicitly identify what must NOT be rebuilt.
34
+ 4. Output a factual research summary that separates what exists from what is proposed, including explicit `[REUSED COMPONENTS & HELPERS]` and `[NOTIFICATION & ERROR CONVENTIONS]` lists, with file paths for the two or three claims that drive the plan.
35
35
  5. **STOP and wait for user approval.** Do not plan or implement.
36
36
 
37
37
  ## Phase 2: Plan
@@ -41,14 +41,20 @@ Format:
41
41
  3. Check if `.github/workflows/asc-quality-gate.yml` exists. If not, include scaffolding it in your plan (must run linter, type-check, and audit) and remind the user to enable Branch Protection.
42
42
  4. Create a numbered, step-by-step implementation plan with specific files, functions, and line references.
43
43
  5. Include a "Don't Build" list and a "Reused Components" list from the research phase. For any proposed new UI component, justify why existing components cannot be reused or extended via props/variants.
44
- 6. **Callout: Plan-Reading Illusion.** Ask the user to explicitly verify the two or three critical plan claims against the referenced files, not just skim it.
45
- 7. Output the plan.
46
- 8. **STOP and wait for user approval.** Do not implement.
44
+ 6. **Mandatory Failure Modes, Fallbacks & User Feedback Matrix**: Define concrete behavior for every failure scenario:
45
+ - What happens on network/API failure or timeout? (Specify exact fallback data or state).
46
+ - What feedback does the user see? (Specify pending spinner, field error, or toast/banner message).
47
+ - How can the user recover? (Retry button, offline warning, or fallback form).
48
+ 7. **Callout: Plan-Reading Illusion.** Ask the user to explicitly verify the critical plan claims against the referenced files, not just skim it.
49
+ 8. Output the plan.
50
+ 9. **STOP and wait for user approval.** Do not implement.
47
51
 
48
52
  ## Phase 3: Implement
49
53
 
50
54
  1. On approval of Phase 2, update `workflow-gate.json` phase to `implement`.
51
55
  2. Recommend a fresh context (intentional compaction) at the phase boundary or after roughly 20-30 tool calls. Do not wait until degradation is subjectively noticeable.
52
56
  3. Execute the approved plan.
53
- 4. **Mandatory Verification**: Execute the project test suite (`ascx test`, `npm test`, `pytest`, `go test ./...`, or `cargo test`). The test runner MUST exit with code 0. Do NOT declare completion or weaken test assertions if tests fail.
57
+ 4. **Mandatory Verification**:
58
+ - Execute the project test suite (`ascx test`, `npm test`, `pytest`, `go test ./...`, or `cargo test`). The test runner MUST exit with code 0. Do NOT declare completion or weaken test assertions if tests fail.
59
+ - Verify failure and edge-case behavior: ensure pending indicators resolve, mutation errors show user-facing notifications with retry, and non-critical dependency failures trigger defined fallbacks instead of white-screens or unhandled rejections.
54
60
  5. On verified pass, give a short comprehension summary of what changed and why, then clear the state in `workflow-gate.json` by overwriting it with `{}`.
@@ -6,6 +6,8 @@ description: >
6
6
 
7
7
  # Audit Skill
8
8
 
9
+ Zero-trust posture: Assume unvalidated paths and external inputs are hostile until verified. Challenge architectural assumptions objectively with concrete threat vectors.
10
+
9
11
  Security and architecture audit. Deeper than review, focused on finding vulnerabilities and structural anti-patterns.
10
12
 
11
13
  Grounded in: OWASP Top 10 (2025), OWASP ASVS v5.0, OWASP Top 10 for Agentic Applications (ASI01-ASI10, v2.01), CVSS vulnerability report structure, CWE classification.
@@ -24,21 +26,22 @@ Grounded in: OWASP Top 10 (2025), OWASP ASVS v5.0, OWASP Top 10 for Agentic Appl
24
26
  4. **Architecture boundaries**: Business logic in transport layer, shared databases between services, circular dependencies, internal model leakage through public APIs.
25
27
  5. **Dependency health**: Known vulnerabilities, unmaintained packages, excessive dependency surface.
26
28
  6. **Error exposure**: Stack traces, internal paths, or implementation details exposed to clients.
29
+ 7. **Reliability & Fault-Tolerance**: Unhandled async promises, unbounded network timeouts, empty catch blocks, missing fallbacks on non-critical dependencies, and silent mutation failures without user notifications.
27
30
 
28
31
  ## Agentic Risk Scope (OWASP Top 10 for Agentic Applications)
29
32
 
30
33
  When the target is an AI agent system, MCP server, or plugin:
31
34
 
32
- 7. **Agent Goal Hijack (ASI01)**: Content read by the agent that could override instructions.
33
- 8. **Tool Misuse (ASI02)**: Tools callable without adequate validation of parameters.
34
- 9. **Identity & Privilege Abuse (ASI03)**: Agent running with broader permissions than needed.
35
- 10. **Agentic Supply Chain (ASI04)**: Untrusted plugins, MCP servers, or dependencies.
36
- 11. **Unexpected Code Execution (ASI05)**: Agent-generated code running without sandbox.
37
- 12. **Memory & Context Poisoning (ASI06)**: State files or persistent memory injectable by untrusted sources. Note: ASC's own `debt-ledger.json` and `workflow-gate.json` are potential targets — treat as untrusted input at load time.
38
- 13. **Inter-Agent Communication (ASI07)**: Agent-to-agent messages without integrity checks.
39
- 14. **Cascading Failures (ASI08)**: Multi-agent chains where one failure propagates.
40
- 15. **Human-Agent Trust Exploitation (ASI09)**: UI/UX that misleads user about agent actions.
41
- 16. **Rogue Agents (ASI10)**: Agent behavior diverging from intended purpose.
35
+ 8. **Agent Goal Hijack (ASI01)**: Content read by the agent that could override instructions.
36
+ 9. **Tool Misuse (ASI02)**: Tools callable without adequate validation of parameters.
37
+ 10. **Identity & Privilege Abuse (ASI03)**: Agent running with broader permissions than needed.
38
+ 11. **Agentic Supply Chain (ASI04)**: Untrusted plugins, MCP servers, or dependencies.
39
+ 12. **Unexpected Code Execution (ASI05)**: Agent-generated code running without sandbox.
40
+ 13. **Memory & Context Poisoning (ASI06)**: State files or persistent memory injectable by untrusted sources. Note: ASC's own `debt-ledger.json` and `workflow-gate.json` are potential targets — treat as untrusted input at load time.
41
+ 14. **Inter-Agent Communication (ASI07)**: Agent-to-agent messages without integrity checks.
42
+ 15. **Cascading Failures (ASI08)**: Multi-agent chains where one failure propagates.
43
+ 16. **Human-Agent Trust Exploitation (ASI09)**: UI/UX that misleads user about agent actions.
44
+ 17. **Rogue Agents (ASI10)**: Agent behavior diverging from intended purpose.
42
45
 
43
46
  ## For Every Finding
44
47
 
@@ -18,7 +18,8 @@ generic architecture score.
18
18
 
19
19
  1. Read local instructions and list the active runtime, test, and deployment surfaces.
20
20
  2. Find two or more analogous modules. Record their layer split, naming, validation,
21
- error handling, tests, and documentation conventions with file paths.
21
+ error handling, user notification/toast provider, fallback patterns, tests, and
22
+ documentation conventions with file paths.
22
23
  3. Inspect recent Git history (up to 200 commits, or since the last fingerprint) for
23
24
  repeated review corrections, reverts, and release conventions.
24
25
  4. Read a debt ledger only when it exists. Treat repeated entries as a possible
@@ -15,8 +15,8 @@ Grounded in: Spec-Driven Development (SDD) with scaffolding-spec approach. Core
15
15
  This workflow nudges the agent to stop at each phase boundary, same enforcement tier as the existing decision ladder — not a hard block. Bypasses are logged to the debt ledger.
16
16
 
17
17
  For greenfield projects (`asc-new-project`), Phase 2 requires creating the **3 Core SDD Documents** in `docs/` or project root:
18
- 1. `PRD.md` — Product intent, goals, non-goals, and user problems.
19
- 2. `Architecture.md` — System structure, module boundaries, and tech stack choices.
18
+ 1. `PRD.md` — Product intent, goals, non-goals, user problems, and user feedback expectations.
19
+ 2. `Architecture.md` — System structure, module boundaries, tech stack choices, and global error handling, fallback, and notification strategy.
20
20
  3. `Schema.md` — Data contracts, database entities, API endpoints.
21
21
 
22
22
  *Note on Rules:* Coding conventions and project constraints are automatically loaded from global plugin rules (`agentic-senior-core.md`) or workspace `AGENTS.md`. No duplicate `docs/Rules.md` file is required.
@@ -38,6 +38,7 @@ After reading the target code, classify the refactor:
38
38
  ## Refactor Rules
39
39
 
40
40
  - Improve clarity, boundaries, naming, validation, error handling, and tests.
41
+ - Action Feedback & Fallbacks: Preserve all user feedback indicators, error toasts, and dependency fallbacks. Refactoring must never silently drop error-handling branches.
41
42
  - Prioritize maintainability over compressed one-liners.
42
43
  - Keep the main flow traceable. Use early returns where they reduce nesting.
43
44
  - Introduce abstractions only when the repeated pattern is real and visible.
@@ -42,7 +42,11 @@ Grounded in: WCAG 2.2 AA (accessibility), Fowler's Money Pattern (monetary types
42
42
  - Match the project's existing styling paradigm (Tailwind, CSS Modules, Vanilla CSS, styled-components, etc.). Do not introduce a new CSS framework or build tool without explicit user confirmation.
43
43
  - UI Component Reusability: Primitive UI elements (buttons, inputs, cards, dialogs, badges) must have a single source of truth in the shared component directory (`components/` or `ui/`). Never recreate ad-hoc variants or duplicate JSX structures across individual pages. Extend existing components with props or variants instead of cloning.
44
44
  - Design Consistency: Consume shared design tokens, CSS variables, or theme configuration for colors, spacing, and border-radius. Do not hardcode arbitrary raw color hexes or inconsistent spacing that causes visual design drift between pages.
45
- - Data-fetching components must explicitly handle 3 states: loading, error (with user-facing toast/notification and retry option), and data. Never leave an unhandled error state.
45
+ - Action Feedback & Mutations: Any user-initiated mutation (form submit, delete, upload, toggle) must provide immediate pending feedback (disabled button, inline spinner) and a visible completion notification (toast or alert banner with retry). Never silently swallow mutation errors.
46
+ - Form Validation: Render field errors inline directly next to the affected input with `aria-describedby` and `aria-invalid="true"`. Never use floating toasts for individual form input validation.
47
+ - Data-Fetching State Quad: Data components must explicitly handle 4 states — loading skeleton/spinner, empty state (friendly message + call to action), error fallback (clear message + retry button), and populated data.
48
+ - Component Error Boundaries: Wrap major widgets, dashboards, and routes in localized Error Boundaries with fallback UI cards to prevent a single rendering crash from taking down the entire page.
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.
46
50
  - WCAG 2.2 AA accessibility floor. Responsive by default.
47
51
  - No placeholder, lorem, or TODO content in production UI.
48
52
 
@@ -54,9 +58,15 @@ Grounded in: WCAG 2.2 AA (accessibility), Fowler's Money Pattern (monetary types
54
58
 
55
59
  ## Resilience
56
60
 
57
- - Every outbound network call has a strict timeout.
61
+ - Every outbound network call has a strict timeout (client and server).
58
62
  - Retries use exponential backoff with jitter and max attempt limits.
59
- - Only retry idempotent operations.
60
- - Circuit breakers for unhealthy dependencies.
61
- - Graceful degradation on non-critical dependency failure.
63
+ - Only retry idempotent operations (GET, PUT, DELETE, or requests with `Idempotency-Key`).
64
+ - Dependency Fallback Strategy (Hard vs Soft):
65
+ - Hard dependencies (core workflow blocks without them): Fail fast, roll back transactions, return structured RFC 9457 error with actionable explanation.
66
+ - Soft dependencies (non-critical enhancements): Provide graceful fallbacks:
67
+ - *Static Fallback*: Return safe default values, static placeholders, or empty collections alih-alih melempar exception.
68
+ - *Stale Cache Fallback*: Serve last-known-good cached state (`stale-while-revalidate`) with an offline/stale indicator.
69
+ - *Degraded Mode*: Isolate and disable the failing peripheral widget while preserving core user journeys.
70
+ - Circuit breakers for unhealthy dependencies to fail fast and prevent thread/resource exhaustion.
71
+ - Offline Detection: Detect offline network status and notify users before initiating network requests that are guaranteed to fail.
62
72
 
@@ -6,6 +6,8 @@ description: >
6
6
 
7
7
  # Review Skill
8
8
 
9
+ Adversarial posture: Maintain neutral, unyielding technical scrutiny. Prioritize real production risks, regressions, and silent failures over courtesy or superficial compliments.
10
+
9
11
  Production-risk code review. Prioritize findings by severity.
10
12
 
11
13
  Grounded in: OWASP Risk Rating Methodology, Google Engineering Practices (code review guide), Clean Architecture (transport vs business layer separation).
@@ -21,10 +23,11 @@ Grounded in: OWASP Risk Rating Methodology, Google Engineering Practices (code r
21
23
  ## Finding Priority Order
22
24
 
23
25
  1. Correctness, data loss, security, privacy, auth, and permission risks.
24
- 2. Public contract drift: APIs, events, CLI behavior, data model, UI contract, docs.
25
- 3. Missing tests for changed behavior.
26
- 4. Architecture boundary drift and maintainability risk.
27
- 5. Performance and accessibility issues with concrete impact.
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.
28
31
 
29
32
  ## For Every Finding
30
33
 
@@ -37,7 +40,9 @@ Grounded in: OWASP Risk Rating Methodology, Google Engineering Practices (code r
37
40
  ### Correctness
38
41
  - Changed behavior matches the user request.
39
42
  - Existing behavior preserved unless user approved a change.
40
- - Edge cases, empty states, error paths handled.
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.
41
46
 
42
47
  ### Security
43
48
  - External input validated at trust boundaries.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentic-senior-core",
3
- "version": "6.11.1",
3
+ "version": "6.13.0",
4
4
  "description": "Universal AI coding rules. Write code like a staff engineer.",
5
5
  "author": "fatidaprilian",
6
6
  "license": "MIT",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryuenn3123/agentic-senior-core",
3
- "version": "6.11.1",
3
+ "version": "6.13.0",
4
4
  "type": "module",
5
5
  "description": "Agentic Senior Core: Universal AI coding rules and workflows. Write code like a staff engineer, not a junior.",
6
6
  "bin": {
package/plugin.yaml CHANGED
@@ -1,5 +1,5 @@
1
1
  name: agentic-senior-core
2
- version: 6.11.1
2
+ version: 6.13.0
3
3
  description: Universal AI coding rules. Write code like a staff engineer.
4
4
  author: fatidaprilian
5
5
  provides_hooks: