@ryuenn3123/agentic-senior-core 4.1.0 → 4.2.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/.agent-context/prompts/compact-natural-mode.md +100 -0
- package/.agent-context/prompts/init-project.md +1 -0
- package/.agent-context/prompts/refactor.md +1 -0
- package/.agent-context/review-checklists/pr-checklist.md +1 -0
- package/.agent-context/rules/architecture.md +10 -0
- package/.agent-context/rules/naming-conv.md +6 -3
- package/AGENTS.md +5 -7
- package/README.md +95 -117
- package/benchmarks/README.md +40 -0
- package/benchmarks/compact-natural-mode/fixtures.mjs +359 -0
- package/benchmarks/compact-natural-mode/scorer.mjs +331 -0
- package/benchmarks/runtime-token-saver/fixtures.mjs +613 -0
- package/bin/agentic-senior-core.js +6 -0
- package/bin/ascx.js +23 -0
- package/lib/cli/adaptive-context/catalog.mjs +428 -0
- package/lib/cli/adaptive-context/file-signals.mjs +100 -0
- package/lib/cli/adaptive-context/implications.mjs +44 -0
- package/lib/cli/adaptive-context.mjs +365 -0
- package/lib/cli/ascx/adapters/git-diff.mjs +223 -0
- package/lib/cli/ascx/adapters/git-status.mjs +145 -0
- package/lib/cli/ascx/adapters/npm-test.mjs +120 -0
- package/lib/cli/ascx/fixture-evaluator.mjs +180 -0
- package/lib/cli/ascx/formatter.mjs +46 -0
- package/lib/cli/ascx/lexer.mjs +113 -0
- package/lib/cli/ascx/runtime.mjs +188 -0
- package/lib/cli/ascx/tee-writer.mjs +38 -0
- package/lib/cli/ascx/token-estimate.mjs +15 -0
- package/lib/cli/commands/context.mjs +140 -0
- package/lib/cli/commands/init.mjs +2 -1
- package/lib/cli/commands/optimize.mjs +143 -2
- package/lib/cli/commands/upgrade.mjs +2 -0
- package/lib/cli/compiler.mjs +9 -0
- package/lib/cli/token-optimization.mjs +161 -6
- package/lib/cli/utils.mjs +15 -1
- package/package.json +10 -3
- package/scripts/adaptive-context/fixtures.mjs +188 -0
- package/scripts/adaptive-context-benchmark.mjs +9 -0
- package/scripts/ascx-runtime-token-saver-benchmark.mjs +9 -0
- package/scripts/compact-natural-mode-benchmark.mjs +9 -0
- package/scripts/validate/config.mjs +1 -0
- package/scripts/validate.mjs +2 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Compact Natural Mode
|
|
2
|
+
|
|
3
|
+
Status: active default response contract.
|
|
4
|
+
|
|
5
|
+
Use this prompt for final user-facing replies after the task-specific rule, prompt, checklist, and validation work is complete.
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
Write the smallest complete answer that still lets the next developer act correctly.
|
|
10
|
+
|
|
11
|
+
Compact means high signal. It does not mean broken grammar, dialect, clipped fragments, or hiding evidence.
|
|
12
|
+
|
|
13
|
+
## Always Remove
|
|
14
|
+
|
|
15
|
+
- greetings, affirmations, and repeated restatements
|
|
16
|
+
- narration about what you are about to do
|
|
17
|
+
- generic closing offers
|
|
18
|
+
- padding paragraphs that add no new technical content
|
|
19
|
+
- repeated summaries of the same decision
|
|
20
|
+
|
|
21
|
+
## Always Preserve
|
|
22
|
+
|
|
23
|
+
- exact commands
|
|
24
|
+
- exact file paths and line numbers
|
|
25
|
+
- exact error messages, assertions, exit codes, and stack-trace highlights
|
|
26
|
+
- validation status, including tests not run
|
|
27
|
+
- assumptions, scope qualifiers, blockers, risks, and next actions
|
|
28
|
+
- destructive-operation warnings
|
|
29
|
+
- breaking changes and migration notes
|
|
30
|
+
|
|
31
|
+
## Task Shapes
|
|
32
|
+
|
|
33
|
+
Use natural prose inside these shapes. Omit fields that do not apply, except safety fields.
|
|
34
|
+
|
|
35
|
+
Debug/root cause:
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Root Cause: <one sentence>
|
|
39
|
+
Evidence: <exact error, command output, or file:line>
|
|
40
|
+
Fix: <exact command or code direction>
|
|
41
|
+
Next: <verification step>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Test failure:
|
|
45
|
+
|
|
46
|
+
```text
|
|
47
|
+
Failed: <test name>
|
|
48
|
+
Expected/Got: <value> / <value>
|
|
49
|
+
At: <file:line>
|
|
50
|
+
Evidence: <exact assertion or root error>
|
|
51
|
+
Fix direction: <one sentence>
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Code review finding:
|
|
55
|
+
|
|
56
|
+
```text
|
|
57
|
+
[critical|warn|nit] <file>:<line> - <concern>. <requested change>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Implementation/refactor summary:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
Changed: <what changed>
|
|
64
|
+
Reason: <why>
|
|
65
|
+
Behavior: <changed, unchanged, or not verified>
|
|
66
|
+
Validation: <what ran or was not run>
|
|
67
|
+
Risk: <only if relevant>
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Destructive command:
|
|
71
|
+
|
|
72
|
+
```text
|
|
73
|
+
WARNING: <what this destroys and whether it is reversible>
|
|
74
|
+
Command: <exact command>
|
|
75
|
+
Precondition: <what must be true before running>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Security finding:
|
|
79
|
+
|
|
80
|
+
```text
|
|
81
|
+
Severity: <critical|high|medium|low>
|
|
82
|
+
Class: <vulnerability class>
|
|
83
|
+
Location: <file:line>
|
|
84
|
+
Impact: <who or what is affected>
|
|
85
|
+
Evidence: <exact code, behavior, or command output>
|
|
86
|
+
Remediation: <specific fix direction>
|
|
87
|
+
Validation: <how to prove it is fixed>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Planning/architecture may be longer. Keep decision, rationale, alternatives, tradeoffs, assumptions, and open questions visible.
|
|
91
|
+
|
|
92
|
+
## Second-Pass Check
|
|
93
|
+
|
|
94
|
+
Before finalizing:
|
|
95
|
+
|
|
96
|
+
1. Remove any sentence that adds no new technical content.
|
|
97
|
+
2. Confirm mandatory evidence atoms remain exact.
|
|
98
|
+
3. Confirm assumptions and validation gaps are visible.
|
|
99
|
+
4. Confirm the answer has a decision or next action when the user asked for one.
|
|
100
|
+
5. Confirm the tone is natural professional writing.
|
|
@@ -46,6 +46,7 @@ If the user specifies a framework, runtime, or architecture constraint, the agen
|
|
|
46
46
|
- Set up configuration, validation, error handling, observability, health checks, and persistence only when they fit the approved runtime and project scope.
|
|
47
47
|
- Every file must follow [naming conventions](../rules/naming-conv.md).
|
|
48
48
|
- Every module must follow [architecture.md](../rules/architecture.md).
|
|
49
|
+
- New code must pass the natural implementation pass in [architecture.md](../rules/architecture.md): start with the simplest correct flow, add complexity only when the requirement or repo evidence needs it, and do not add files or layers for small tasks.
|
|
49
50
|
- Every dependency must be justified per [efficiency-vs-hype.md](../rules/efficiency-vs-hype.md).
|
|
50
51
|
- Use official framework setup commands or canonical starter flows when they produce newer, better-supported dependency defaults than manual package assembly.
|
|
51
52
|
- Do not assemble a framework project from scratch by habit when official setup commands create the supported structure. Manual assembly is allowed only for tiny prototypes, educational demos, unusual repo constraints, or a documented architecture reason.
|
|
@@ -20,6 +20,7 @@ Before editing:
|
|
|
20
20
|
Refactor rules:
|
|
21
21
|
- Improve clarity, boundaries, naming, validation, error handling, tests, and docs.
|
|
22
22
|
- Prioritize maintainability over compressed one-liners.
|
|
23
|
+
- Apply the natural implementation pass from architecture.md: keep the main flow traceable, use early returns where they reduce nesting, and avoid helper chains that only make the code look abstract.
|
|
23
24
|
- Do not choose a stack, framework, library, or topology from offline assumptions.
|
|
24
25
|
- Keep module boundaries explicit and project-specific.
|
|
25
26
|
- Split large files when the split makes the flow easier to understand.
|
|
@@ -27,6 +27,7 @@ Run this before declaring a task done. Apply only the sections relevant to the c
|
|
|
27
27
|
- [ ] No premature abstraction (base classes/util layers created only after repeated stable patterns)
|
|
28
28
|
- [ ] Readability over brevity for maintainability
|
|
29
29
|
- [ ] Complexity budget was applied: equivalent behavior uses fewer moving parts without losing validation, error handling, fallbacks, accessibility, tests, or security boundaries.
|
|
30
|
+
- [ ] Natural implementation pass was applied: the main flow is traceable, names are domain-specific, helpers carry real meaning, and compact code did not hide safeguards.
|
|
30
31
|
- [ ] Controllers, route handlers, and transport adapters do not contain business policy, raw queries, or cross-resource orchestration.
|
|
31
32
|
- [ ] Services or use cases own business flow, transaction boundaries, and mutation safety.
|
|
32
33
|
- [ ] Repositories or adapters own persistence/external IO details without hiding business decisions.
|
|
@@ -143,3 +143,13 @@ keywords:
|
|
|
143
143
|
1. Import through a module's public API instead of reaching into internal files.
|
|
144
144
|
2. Keep contracts explicit at boundaries between modules.
|
|
145
145
|
3. If a new developer cannot find the full flow of a feature in one clear area, the structure is too diffuse.
|
|
146
|
+
|
|
147
|
+
## ARCH-013: Natural Implementation Pass
|
|
148
|
+
|
|
149
|
+
1. Treat "human-readable" code as code that a maintainer can trace, test, and change safely. Do not optimize for looking hand-written at the expense of behavior.
|
|
150
|
+
2. Write new code and refactors as a clear sequence of intent: validate the input, name the domain state, perform the operation, then return or report the outcome.
|
|
151
|
+
3. Prefer early returns for invalid, empty, or unauthorized paths when they reduce nesting and make the happy path easier to follow.
|
|
152
|
+
4. Keep functions focused on one responsibility, but do not create tiny helper chains unless the helper names a real domain condition, removes repeated logic, or makes the main flow easier to read.
|
|
153
|
+
5. Avoid dense one-liners, nested ternaries, speculative classes, factories, interfaces, design patterns, and extra layers when direct code preserves the same guarantees.
|
|
154
|
+
6. Match the local project style before introducing a new pattern. Do not make code generic enough to fit any product.
|
|
155
|
+
7. Run a final naturalness pass before completion: domain names are specific, booleans expose state or permission, comments explain why only, edge cases are explicit, and simplification did not remove validation, error handling, fallbacks, accessibility, tests, security boundaries, or observability.
|
|
@@ -27,6 +27,9 @@ Use the target language and framework conventions. Do not invent a naming style
|
|
|
27
27
|
3. Reject names that require reading the implementation to understand the value.
|
|
28
28
|
4. Keep file and directory naming styles consistent inside the same feature unless a framework reason requires mixed styles.
|
|
29
29
|
5. Reject booleans, units, and side-effect functions whose names hide what they represent or change.
|
|
30
|
-
6.
|
|
31
|
-
7.
|
|
32
|
-
8.
|
|
30
|
+
6. Name collections as collections when the language convention supports it.
|
|
31
|
+
7. Name side-effect functions with an action plus the domain outcome they change.
|
|
32
|
+
8. Avoid broad function names that describe activity without domain intent.
|
|
33
|
+
9. Inline comments must explain why, not what.
|
|
34
|
+
10. Put a one-line rationale near non-obvious choices that deserve explanation, such as retry strategy, index column order, denormalized field, intentional swallow with named recovery, or magic constant tied to an external system.
|
|
35
|
+
11. Treat comments that paraphrase the code as noise.
|
package/AGENTS.md
CHANGED
|
@@ -18,7 +18,7 @@ Write instructions as imperative gates:
|
|
|
18
18
|
- Add validation when a rule can drift.
|
|
19
19
|
|
|
20
20
|
## Bootstrap Receipt
|
|
21
|
-
For non-trivial coding, review, planning, or governance work, emit a concise Bootstrap Receipt before implementation output or file edits:
|
|
21
|
+
For non-trivial coding, review, planning, or governance work, run `agentic-senior-core context` first if available, or `npx @ryuenn3123/agentic-senior-core context` when only the package is available, then emit a concise Bootstrap Receipt before implementation output or file edits:
|
|
22
22
|
- `loaded_files`: files actually read
|
|
23
23
|
- `selected_rules`: files selected for this scope and why
|
|
24
24
|
- `skipped_rules`: out-of-scope categories left unloaded
|
|
@@ -28,7 +28,7 @@ For non-trivial coding, review, planning, or governance work, emit a concise Boo
|
|
|
28
28
|
Keep it short. Do not load every rule just to fill it out.
|
|
29
29
|
|
|
30
30
|
## Command Economy
|
|
31
|
-
Avoid repeated command output. Do not rerun broad inspections unless edits changed the result. Prefer targeted reads,
|
|
31
|
+
Avoid repeated command output. Do not rerun broad inspections unless edits changed the result. Prefer targeted reads, concise diffs, and `ascx git status` / `ascx git diff` / `ascx npm test` when available; use raw commands for pipes, redirects, or unsupported commands.
|
|
32
32
|
|
|
33
33
|
## Layer Index
|
|
34
34
|
### Layer 1: Rules (21 Files) [SCOPE-RESOLVED]
|
|
@@ -67,9 +67,8 @@ Execution Contracts are dynamic execution contracts from prompts, review checkli
|
|
|
67
67
|
|
|
68
68
|
### Layer 5: Prompts
|
|
69
69
|
|
|
70
|
-
Location: `.agent-context/prompts/`.
|
|
71
|
-
|
|
72
|
-
Load the matching prompt only:
|
|
70
|
+
Location: `.agent-context/prompts/`. Load the matching prompt only, plus `compact-natural-mode.md` as the default final-response contract:
|
|
71
|
+
- `compact-natural-mode.md` -> final response shape, evidence preservation, and compact natural prose
|
|
73
72
|
- `init-project.md` -> create, build, new project, scaffold
|
|
74
73
|
- `refactor.md` -> refactor, improve, clean up, fix
|
|
75
74
|
- `review-code.md` -> review, audit, check, analyze
|
|
@@ -159,7 +158,6 @@ Action: one-line bounded next step
|
|
|
159
158
|
Use valid rule IDs only; do not quote full rule prose, expose hidden chain-of-thought, or require the block for trivial replies.
|
|
160
159
|
|
|
161
160
|
## Definition of Done
|
|
162
|
-
|
|
163
161
|
Never claim done without:
|
|
164
162
|
1. Relevant rules applied.
|
|
165
163
|
2. PR and architecture checklists considered.
|
|
@@ -177,4 +175,4 @@ Verify reachability when relevant: Layer 1 Rules, Layer 2 Runtime Decision Signa
|
|
|
177
175
|
- Before PR: run review checklists.
|
|
178
176
|
- Before deploy: check policy thresholds.
|
|
179
177
|
- Before major refactor: read `architecture-map.md`.
|
|
180
|
-
- Before UI implementation: confirm valid style context, design contract, and required docs.
|
|
178
|
+
- Before UI implementation: confirm valid style context, design contract, and required docs.
|
package/README.md
CHANGED
|
@@ -7,93 +7,89 @@
|
|
|
7
7
|
[](LICENSE)
|
|
8
8
|
[](CONTRIBUTING.md)
|
|
9
9
|
|
|
10
|
-
**Production-grade Rules Engine
|
|
10
|
+
**Production-grade Rules Engine for AI coding agents.**
|
|
11
11
|
Works with Cursor, Windsurf, GitHub Copilot, Claude Code, Gemini, and other LLM-powered IDE workflows.
|
|
12
12
|
|
|
13
|
-
Current package version: 4.1.0. Last published version before this release: 4.0.3.
|
|
14
|
-
|
|
15
|
-
Highlights:
|
|
16
|
-
- Uses `AGENTS.md` as the canonical instruction entrypoint.
|
|
17
|
-
- Keeps Claude Code and Gemini bridges as native `@AGENTS.md` imports.
|
|
18
|
-
- Loads detailed rules lazily from `.agent-context/` by task scope.
|
|
19
|
-
- Keeps MCP workspace files opt-in through `--mcp-template`.
|
|
20
|
-
|
|
21
13
|
</div>
|
|
22
14
|
|
|
23
15
|
---
|
|
24
16
|
|
|
25
|
-
##
|
|
17
|
+
## Install
|
|
26
18
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
The rules in this pack are written as invariants, outcomes, and freshness criteria, not as named patterns, library prescriptions, or magic-number thresholds. A migration rule says "DDL expected to hold a lock longer than the service's acceptable request-latency threshold must use an online migration mechanism", not "use pgroll for tables larger than ten million rows". A resilience rule says "fail fast when a dependency is unhealthy and shed load before shared resources are exhausted", not "implement a circuit breaker using library X". The intent is that each rule continues to tell a future maintainer the right thing to do across at least three years of framework and tooling churn. Where a rule cites a specific tool name or numeric threshold, the citation block at the bottom of the rule carries a freshness anchor and (in the next release) a `last_validated` date so the next maintainer knows when the technology references were last cross-checked against current practice.
|
|
32
|
-
|
|
33
|
-
---
|
|
19
|
+
```bash
|
|
20
|
+
npx @ryuenn3123/agentic-senior-core init
|
|
21
|
+
```
|
|
34
22
|
|
|
35
|
-
|
|
23
|
+
Initializes `AGENTS.md`, native import bridges, checklists, policies, state files, and the lazy `.agent-context/` rule library. Token optimization and Compact Natural Mode are enabled by default.
|
|
36
24
|
|
|
37
|
-
|
|
25
|
+
Options:
|
|
26
|
+
- Add `--mcp-template` to generate VS Code MCP workspace config.
|
|
27
|
+
- Default init keeps MCP files opt-in.
|
|
28
|
+
- Add `--no-token-optimize` only when you do not want ASCX command guidance enabled.
|
|
29
|
+
- Local backup snapshots are written under `.agentic-backup/` and excluded from version control.
|
|
38
30
|
|
|
39
|
-
|
|
40
|
-
- `resilience.md` (`RES-*`) — explicit timeouts and deadline propagation, idempotency-required retries, dependency isolation, fail-fast as outcome (not named pattern), explicit graceful degradation, observable backpressure.
|
|
41
|
-
- `migrations.md` (`MIG-*`) — expand-contract / parallel-change for live data, deploy-ordering invariant, lock-posture rule keyed to the service's own latency budget, idempotent resumable backfills, mandatory risk fields per migration ticket.
|
|
42
|
-
- `background-jobs.md` (`JOB-*`) — job-shape selection (scheduled vs queued vs stream vs one-shot), per-job ownership and runbook, job-level idempotency, lease/checkpoint/graceful-shutdown for long jobs, poison-message and dead-letter discipline, UTC schedules, jittered fan-out, explicit backpressure.
|
|
43
|
-
- `config-and-flags.md` (`CFG-*`) — configuration sources and startup validation, secret handling, four-way feature-flag taxonomy (release / kill switch / experiment / entitlement) with per-flag owner and expiry, safe defaults on flag-service outage, no-branch-on-environment rule.
|
|
44
|
-
- `api-versioning.md` (`VER-*`) — single versioning strategy per surface, breaking-vs-non-breaking definitions, deprecation discipline (in-band signal via RFC 9745 / RFC 8594 where adopted, plus migration guide and telemetry), explicit support windows, additive evolution as default, CI-blocking compatibility checks.
|
|
31
|
+
## Upgrade
|
|
45
32
|
|
|
46
|
-
|
|
33
|
+
```bash
|
|
34
|
+
npx @ryuenn3123/agentic-senior-core upgrade --dry-run
|
|
35
|
+
npx @ryuenn3123/agentic-senior-core upgrade --yes
|
|
36
|
+
```
|
|
47
37
|
|
|
48
|
-
|
|
49
|
-
- `security.md` — SEC-003 authn vs authz, SEC-004 memory-hard credential storage, SEC-005 cryptographically verifiable service-to-service identity.
|
|
50
|
-
- `database-design.md` — DATA-003 money and time (no floating-point money, UTC for real-world moments), DATA-004 concurrency and write conflicts.
|
|
51
|
-
- `api-docs.md` — API-005 cross-reference to the new versioning rule, API-012 idempotency as a runtime invariant (not just a documentation field).
|
|
38
|
+
Preview changes with `--dry-run`, then apply with `--yes`. Upgrade prunes obsolete managed files by default; use `--no-prune` to keep them. User-owned files without Agentic markers are never overwritten.
|
|
52
39
|
|
|
53
|
-
|
|
40
|
+
---
|
|
54
41
|
|
|
55
|
-
##
|
|
42
|
+
## Core Commands
|
|
56
43
|
|
|
57
|
-
|
|
44
|
+
| Command | Purpose |
|
|
45
|
+
|---------|---------|
|
|
46
|
+
| `agentic-senior-core init` | Initialize the compact project guidance pack and native agent entrypoints |
|
|
47
|
+
| `agentic-senior-core upgrade --dry-run` | Preview managed-surface upgrades |
|
|
48
|
+
| `agentic-senior-core context "<request>" --json --file src/app/page.tsx` | Resolve request labels, rules, prompts, docs, file signals, budget status, and fallback status |
|
|
49
|
+
| `ascx git status` | Run `git status` through the local evidence-preserving output wrapper |
|
|
50
|
+
| `ascx git diff` | Run `git diff` through the local evidence-preserving diff summary wrapper |
|
|
51
|
+
| `ascx npm test` | Run `npm test` through the local evidence-preserving output wrapper |
|
|
52
|
+
| `asc optimize status` | Check ASCX runtime token saver readiness |
|
|
53
|
+
| `asc optimize doctor` | Diagnose ASCX availability, tee write safety, and compression conflicts |
|
|
54
|
+
| `agentic-senior-core optimize --show` | Show token optimization state |
|
|
55
|
+
| `agentic-senior-core mcp` | Start local MCP stdio runtime |
|
|
56
|
+
| `npm run clean:local` | Remove ignored local reports, backups, benchmarks, and active-memory state |
|
|
58
57
|
|
|
59
|
-
|
|
60
|
-
- A three-layer prompt caching contract (D4 in `docs/architecture/decisions-foundation.md`) is now enforced by `npm run audit:cache-layer-contract`.
|
|
61
|
-
- A provider-free anti-halu benchmark is included (`benchmarks/anti-halu/`); pass rate and citation validity are reproducible locally.
|
|
62
|
-
- Caching numbers are scoped per integration. The 89.31% Anthropic warm-cache effective reduction reported in `benchmarks/results/cache-phase-2-2026-05-16.json` applies to direct provider API and Claude Code SDK programmatic mode only. IDE wrapper integrations (Cursor, Windsurf, Codex CLI, Kiro) receive prefix stability without a measurable per-pack saving. See `docs/integration-playbook.md` for the per-tool matrix and `docs/benchmark-reference.md` for the required reporting JSON shape.
|
|
58
|
+
`ascx` currently compresses only `git status`, `git diff`, and `npm test`. Other commands, pipes, redirects, and unsupported shell shapes pass through without compression. Compressed output includes a structured footer with command, exit code, filter name, estimated token reduction, and a raw tee path when safety requires it.
|
|
63
59
|
|
|
60
|
+
`asc` is a short alias for the main `agentic-senior-core` CLI. The doctor does not probe localhost services in this phase; `9router` status remains `not-checked`.
|
|
64
61
|
|
|
65
|
-
|
|
62
|
+
---
|
|
66
63
|
|
|
64
|
+
## What It Does
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
npx @ryuenn3123/agentic-senior-core init
|
|
70
|
-
```
|
|
66
|
+
A coding agent that has read every framework tutorial still ships junior-grade work because nothing in its training tells it which trade-off matters in your codebase. This pack is a small set of plain-language rules an agent loads only when the work scope calls for them. The rules are written as invariants and bad habits to reject, not as opinions about which framework is fashionable. You install it with one command, revert with a backup, and it does not depend on any IDE or LLM provider.
|
|
71
67
|
|
|
72
|
-
|
|
68
|
+
### How It Works
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
1. Agent reads `AGENTS.md` at the start of each session.
|
|
71
|
+
2. `AGENTS.md` instructs the agent to run the Adaptive Context resolver, which selects only the rules, prompts, and docs relevant to the current task.
|
|
72
|
+
3. For shell commands, the agent uses `ascx` wrappers that compress noisy output while preserving debugging evidence (exit codes, file paths, line numbers, root errors, truncation markers, and raw tee paths).
|
|
73
|
+
4. For final replies, the agent applies `.agent-context/prompts/compact-natural-mode.md` so answers stay concise without losing commands, paths, errors, assumptions, validation status, risks, or next actions.
|
|
74
|
+
5. Detailed rules live under `.agent-context/rules/` and load by scope: 21 rule files covering architecture, security, performance, testing, database, API, frontend, Docker, observability, resilience, migrations, background jobs, configuration, and versioning.
|
|
75
75
|
|
|
76
|
-
|
|
77
|
-
- MCP workspace files are disabled by default. Add `--mcp-template` when you want starter IDE MCP configuration files.
|
|
78
|
-
- When project docs are scaffolded, `docs/doc-index.md` is used as the compact map for deeper docs so agents can read the right files without scanning every Markdown file.
|
|
79
|
-
- Local backup snapshots are written under `.agentic-backup/`; init and upgrade ensure that folder is ignored by the target repository.
|
|
80
|
-
- Package scope is `@ryuenn3123`; the GitHub repository owner is `fatidaprilian`.
|
|
76
|
+
### Instruction Entrypoints
|
|
81
77
|
|
|
82
|
-
|
|
78
|
+
The canonical installed source is `AGENTS.md`.
|
|
83
79
|
|
|
84
|
-
|
|
80
|
+
Default init and upgrade keep the project root compact:
|
|
81
|
+
- `AGENTS.md`
|
|
82
|
+
- `CLAUDE.md`
|
|
83
|
+
- `GEMINI.md`
|
|
84
|
+
- `.agent-context/`
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
`CLAUDE.md` and `GEMINI.md` are native import bridges that load `AGENTS.md`. Detailed rules, prompts, checklists, policies, and state stay under `.agent-context/` and load by task scope.
|
|
87
87
|
|
|
88
|
-
|
|
88
|
+
Deprecated legacy files (`.instructions.md`, `.agent-instructions.md`, `.cursorrules`, `.windsurfrules`, tool-specific rule directories) are no longer generated. Upgrade prunes Agentic-managed copies while preserving user-owned files.
|
|
89
89
|
|
|
90
|
-
-
|
|
91
|
-
- Fresh projects: ask the LLM agent to recommend the stack and design approach from current evidence instead of silently choosing a hardcoded framework.
|
|
92
|
-
- No visual reference provided: synthesize one modern conceptual anchor first, then derive typography, spacing, morphology, motion, and responsive behavior from that anchor.
|
|
93
|
-
- Modern UI claims: research current-year libraries and patterns when relevant; 2026 work should use 2026 evidence, and future years should update automatically through agent research.
|
|
94
|
-
- Anti-generic rule: avoid safe dashboard shells, admin panels, card grids, scale-only mobile layouts, and static no-motion interfaces unless the product context explicitly justifies them.
|
|
90
|
+
### Long-Term Stability
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
Rules are written as invariants, outcomes, and freshness criteria, not as named patterns, library prescriptions, or magic-number thresholds. Where a rule cites a specific tool or threshold, the citation block carries a freshness anchor so the next maintainer knows when the technology references were last validated.
|
|
97
93
|
|
|
98
94
|
---
|
|
99
95
|
|
|
@@ -115,64 +111,40 @@ If you see `Property $schema is not allowed`, keep `.vscode/mcp.json` without `$
|
|
|
115
111
|
|
|
116
112
|
---
|
|
117
113
|
|
|
118
|
-
##
|
|
114
|
+
## Design Direction
|
|
119
115
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
| `agentic-senior-core upgrade --dry-run` | Preview managed-surface upgrades |
|
|
124
|
-
| `agentic-senior-core optimize --show` | Show token optimization state |
|
|
125
|
-
| `npm run clean:local` | Remove ignored local reports, backups, benchmarks, and active-memory state |
|
|
126
|
-
| `agentic-senior-core mcp` | Start local MCP stdio runtime |
|
|
116
|
+
For UI, UX, layout, screen, Tailwind, frontend, or redesign work, the pack routes agents through a research dossier prompt and design bootstrap before code changes. The flow synthesizes a conceptual anchor, derives typography, spacing, morphology, motion, and responsive behavior, and carries a 90-day freshness gate with an anti-repeat ledger to avoid recycling the same visual direction. Existing projects read the real repository and docs first; fresh projects ask the agent to recommend the stack from current evidence instead of hardcoding a framework.
|
|
117
|
+
|
|
118
|
+
See [docs/doc-index.md](docs/doc-index.md) for the full doc routing map.
|
|
127
119
|
|
|
128
120
|
---
|
|
129
121
|
|
|
130
|
-
##
|
|
122
|
+
## What's New
|
|
131
123
|
|
|
132
|
-
|
|
133
|
-
npx @ryuenn3123/agentic-senior-core upgrade --dry-run
|
|
134
|
-
npx @ryuenn3123/agentic-senior-core upgrade --yes
|
|
135
|
-
```
|
|
124
|
+
### v4.2
|
|
136
125
|
|
|
137
|
-
|
|
126
|
+
Adds `ascx` command wrapper to optimize token usage via high-signal adapters for `git status`, `git diff`, and `npm test` alongside the `Compact Natural Mode` response compression contract to reduce token overhead while retaining high-fidelity reasoning.
|
|
138
127
|
|
|
139
|
-
|
|
140
|
-
Use `--no-prune` if you want to keep legacy managed files.
|
|
128
|
+
### v4.1
|
|
141
129
|
|
|
142
|
-
|
|
130
|
+
Adds six backend rule files (`OBS-*`, `RES-*`, `MIG-*`, `JOB-*`, `CFG-*`, `VER-*`) and targeted refinements to `frontend-architecture.md`, `security.md`, `database-design.md`, and `api-docs.md`. See [CHANGELOG.md](CHANGELOG.md) for the full list.
|
|
143
131
|
|
|
144
|
-
|
|
132
|
+
### v4.0
|
|
145
133
|
|
|
146
|
-
|
|
134
|
+
Numbered Markdown rules with stable section IDs, bounded reflection, provider-free anti-halu benchmark, three-layer prompt caching contract, and per-integration caching scope enforcement. Caching numbers are scoped per integration; IDE wrapper integrations receive prefix stability without a measurable per-pack saving. See [docs/benchmark-reference.md](docs/benchmark-reference.md) for the reporting format and [CHANGELOG.md](CHANGELOG.md) for details.
|
|
147
135
|
|
|
148
|
-
|
|
149
|
-
- `AGENTS.md`
|
|
150
|
-
- `CLAUDE.md`
|
|
151
|
-
- `GEMINI.md`
|
|
152
|
-
- `.agent-context/`
|
|
153
|
-
|
|
154
|
-
`CLAUDE.md` and `GEMINI.md` are native import bridges that load `AGENTS.md`. Detailed rules, prompts, checklists, policies, and state stay under `.agent-context/` and load by task scope.
|
|
155
|
-
|
|
156
|
-
Deprecated legacy files such as `.instructions.md`, `.agent-instructions.md`, `.cursorrules`, `.windsurfrules`, `.agent-override.md`, tool-specific rule directories, and copied Copilot/Gemini instruction folders are no longer generated by default. Upgrade prunes Agentic-managed copies while preserving user-owned files without Agentic markers.
|
|
136
|
+
Current package version: 4.2.0. Last published version: 4.0.3.
|
|
157
137
|
|
|
158
138
|
---
|
|
159
139
|
|
|
160
|
-
##
|
|
161
|
-
|
|
162
|
-
| Canonical Term | Developer-Facing Alias | Usage Rule |
|
|
163
|
-
|----------------|------------------------|------------|
|
|
164
|
-
| Federated Governance | Federated Rules Operations | Use canonical term in formal policy artifacts. |
|
|
165
|
-
| Governance Engine | Rules Engine | Use alias in onboarding and day-to-day developer docs. |
|
|
166
|
-
| Guardrails | Quality Checks | Use alias in implementation guidance and quickstart docs. |
|
|
167
|
-
|
|
168
|
-
Rule: on first mention in developer-facing docs, include canonical term in parentheses.
|
|
169
|
-
|
|
170
|
-
Examples:
|
|
171
|
-
- `Federated Rules Operations (Federated Governance)`
|
|
172
|
-
- `Rules Engine (Governance Engine)`
|
|
173
|
-
- `quality checks (guardrails)`
|
|
140
|
+
## Validation
|
|
174
141
|
|
|
175
|
-
|
|
142
|
+
```bash
|
|
143
|
+
npm run validate
|
|
144
|
+
npm test
|
|
145
|
+
npm run gate:release
|
|
146
|
+
npm run benchmark:ascx
|
|
147
|
+
```
|
|
176
148
|
|
|
177
149
|
---
|
|
178
150
|
|
|
@@ -180,26 +152,16 @@ Compliance boundary: formal policy and audit artifacts must keep canonical termi
|
|
|
180
152
|
|
|
181
153
|
- FAQ: docs/faq.md
|
|
182
154
|
- Deep dive internals: docs/deep-dive.md
|
|
183
|
-
-
|
|
155
|
+
- Deep analysis and roadmap: docs/deep-analysis-and-roadmap-backlog.md
|
|
184
156
|
- Integration playbook: docs/integration-playbook.md
|
|
185
157
|
- Benchmark and stack reference: docs/benchmark-reference.md
|
|
186
|
-
-
|
|
187
|
-
|
|
188
|
-
---
|
|
189
|
-
|
|
190
|
-
## Validation
|
|
191
|
-
|
|
192
|
-
```bash
|
|
193
|
-
npm run validate
|
|
194
|
-
npm test
|
|
195
|
-
npm run gate:release
|
|
196
|
-
```
|
|
158
|
+
- Project history: docs/archive/HISTORY.md
|
|
197
159
|
|
|
198
160
|
---
|
|
199
161
|
|
|
200
162
|
## Release and npm Publish Flow
|
|
201
163
|
|
|
202
|
-
This repository publishes to npm
|
|
164
|
+
This repository publishes to npm through GitHub Actions on push to `main`.
|
|
203
165
|
|
|
204
166
|
Release checklist:
|
|
205
167
|
|
|
@@ -209,10 +171,26 @@ Release checklist:
|
|
|
209
171
|
4. Commit with a Conventional Commit message.
|
|
210
172
|
5. Push to `origin/main`.
|
|
211
173
|
|
|
212
|
-
|
|
174
|
+
Package scope: `@ryuenn3123`. GitHub owner: `fatidaprilian`.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Terminology Mapping (Final)
|
|
179
|
+
|
|
180
|
+
| Canonical Term | Developer-Facing Alias | Usage Rule |
|
|
181
|
+
|----------------|------------------------|------------|
|
|
182
|
+
| Federated Governance | Federated Rules Operations | Use canonical term in formal policy artifacts. |
|
|
183
|
+
| Governance Engine | Rules Engine | Use alias in onboarding and day-to-day developer docs. |
|
|
184
|
+
| Guardrails | Quality Checks | Use alias in implementation guidance and quickstart docs. |
|
|
185
|
+
|
|
186
|
+
Rule: on first mention in developer-facing docs, include canonical term in parentheses.
|
|
213
187
|
|
|
214
|
-
|
|
215
|
-
-
|
|
188
|
+
Examples:
|
|
189
|
+
- `Federated Rules Operations (Federated Governance)`
|
|
190
|
+
- `Rules Engine (Governance Engine)`
|
|
191
|
+
- `quality checks (guardrails)`
|
|
192
|
+
|
|
193
|
+
Compliance boundary: formal policy and audit artifacts must keep canonical terminology for operational traceability.
|
|
216
194
|
|
|
217
195
|
---
|
|
218
196
|
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Benchmarks
|
|
2
|
+
|
|
3
|
+
Reproducible measurement suites untuk repo ini. Setiap release publish hasil benchmark di `benchmarks/results/{name}-{date}.json` supaya klaim bisa diverifikasi.
|
|
4
|
+
|
|
5
|
+
## Folder Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
benchmarks/
|
|
9
|
+
├── token-usage/ Token measurement per provider untuk rules pack delivery
|
|
10
|
+
├── results/ Output JSON yang dipublish per release (tracked di git)
|
|
11
|
+
└── README.md
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Active Benchmarks
|
|
15
|
+
|
|
16
|
+
| Suite | Folder | Status | Output |
|
|
17
|
+
|-------|--------|--------|--------|
|
|
18
|
+
| Token usage baseline | `token-usage/` | Phase 0 (in progress) | `results/baseline-{YYYY-MM-DD}.json` |
|
|
19
|
+
|
|
20
|
+
## Running Benchmarks
|
|
21
|
+
|
|
22
|
+
Setiap suite punya README sendiri di sub-folder. Lihat `token-usage/README.md` untuk instruksi spesifik.
|
|
23
|
+
|
|
24
|
+
## Reproducibility Requirements
|
|
25
|
+
|
|
26
|
+
1. Node version: lihat `package.json#engines` (jika ada) atau gunakan Node 22 LTS minimum.
|
|
27
|
+
2. Tidak boleh tambah dependency runtime ke core (`package.json#dependencies`). Benchmark hanya boleh pakai `devDependencies`.
|
|
28
|
+
3. Output JSON harus deterministic — jika ada nilai yang berubah antar run (timestamp, host info), pisahkan ke field metadata terpisah.
|
|
29
|
+
4. Setiap result file harus include schema version + timestamp + tooling version supaya hasil lama tetap interpretable.
|
|
30
|
+
|
|
31
|
+
## Result Files Convention
|
|
32
|
+
|
|
33
|
+
- Tracked di git (`benchmarks/results/*.json` whitelisted di `.gitignore`).
|
|
34
|
+
- Naming: `{suite-name}-{YYYY-MM-DD}.json` atau `{suite-name}-{semver}.json`.
|
|
35
|
+
- Tidak boleh berisi raw API response yang bisa expose secrets atau data user.
|
|
36
|
+
- Latest baseline per suite is referenced from `docs/archive/phase-2-outcome.md` and the live decision authority in `docs/architecture/decisions-foundation.md`.
|
|
37
|
+
|
|
38
|
+
## Why This Exists
|
|
39
|
+
|
|
40
|
+
Klaim seperti "hemat 40% token" atau "rule adherence +14pt" tanpa data reproducible = marketing. Suite di folder ini = comparator wajib untuk setiap claim di README atau release notes.
|