@ryuenn3123/agentic-senior-core 3.0.40 → 3.0.42
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/bootstrap-design.md +8 -9
- package/.agent-context/prompts/init-project.md +1 -1
- package/.agent-context/review-checklists/pr-checklist.md +2 -0
- package/.agent-context/rules/frontend-architecture.md +4 -0
- package/.agent-context/state/README.md +1 -3
- package/.agent-context/state/benchmark-reproducibility.json +4 -4
- package/.cursor/rules/agentic-senior-core.mdc +1 -1
- package/.cursorrules +1 -1
- package/.gemini/instructions.md +1 -1
- package/.github/copilot-instructions.md +1 -1
- package/.github/instructions/agentic-senior-core.instructions.md +1 -1
- package/.instructions.md +1 -0
- package/.windsurf/rules/agentic-senior-core.md +1 -1
- package/.windsurfrules +1 -1
- package/AGENTS.md +1 -1
- package/CLAUDE.md +1 -1
- package/CONTRIBUTING.md +7 -1
- package/GEMINI.md +1 -1
- package/README.md +1 -1
- package/lib/cli/backup.mjs +1 -3
- package/lib/cli/commands/init.mjs +1 -1
- package/lib/cli/constants.mjs +5 -3
- package/lib/cli/rollback.mjs +1 -2
- package/lib/cli/utils/managed-surface.mjs +4 -4
- package/lib/cli/utils.mjs +33 -11
- package/mcp.json +39 -24
- package/package.json +2 -4
- package/scripts/benchmark-evidence-bundle.mjs +8 -16
- package/scripts/benchmark-intelligence.mjs +14 -121
- package/scripts/benchmark-writer-judge-matrix.mjs +2 -6
- package/scripts/bump-version.mjs +3 -3
- package/scripts/clean-local-artifacts.mjs +1 -0
- package/scripts/docs-quality-drift-report.mjs +1 -1
- package/scripts/frontend-usability-audit.mjs +4 -4
- package/scripts/mcp-server/constants.mjs +4 -0
- package/scripts/release-gate/static-checks.mjs +0 -1
- package/scripts/validate/config.mjs +2 -2
- package/scripts/validate.mjs +8 -84
- package/.agent-context/state/benchmark-watchlist.json +0 -19
- package/.agent-context/state/stack-research-snapshot.json +0 -112
- package/.github/ISSUE_TEMPLATE/v1.7-frontend-work-item.yml +0 -54
|
@@ -9,7 +9,6 @@ Create or refine:
|
|
|
9
9
|
This contract is a decision scaffold, not a style preset. We guide the agent; we do not pick the final style, stack, framework, palette, typography, layout paradigm, or animation library offline.
|
|
10
10
|
|
|
11
11
|
## Authority
|
|
12
|
-
|
|
13
12
|
- Treat `.agent-context/` and current project docs as technical authority.
|
|
14
13
|
- Treat `README.md` as overview, install, and user-facing context only. Do not use it as coding, architecture, or design authority when `.agent-context/` gives a stricter rule.
|
|
15
14
|
- Use current repo evidence, product copy, route names, component names, user goals, and existing constraints as the source of truth.
|
|
@@ -18,7 +17,6 @@ This contract is a decision scaffold, not a style preset. We guide the agent; we
|
|
|
18
17
|
- Before choosing a new UI, animation, scroll, 3D, canvas, chart, icon, styling, or component library, research current official docs.
|
|
19
18
|
|
|
20
19
|
## Required Order
|
|
21
|
-
|
|
22
20
|
1. Read `AGENTS.md`, this prompt, `../rules/frontend-architecture.md`, current UI code, current project docs, and existing design docs.
|
|
23
21
|
2. Refine existing `docs/DESIGN.md` and `docs/design-intent.json`; do not replace them blindly.
|
|
24
22
|
3. If either design doc is missing, create it before UI implementation.
|
|
@@ -27,7 +25,6 @@ This contract is a decision scaffold, not a style preset. We guide the agent; we
|
|
|
27
25
|
6. Keep both design docs synchronized after implementation.
|
|
28
26
|
|
|
29
27
|
## Creative Commitment Gate
|
|
30
|
-
|
|
31
28
|
Before broad compliance review or UI implementation, record an agent-chosen visual direction in both design docs:
|
|
32
29
|
- one concrete real-world anchor reference
|
|
33
30
|
- one signature motion behavior more specific than "smooth"
|
|
@@ -37,7 +34,6 @@ Before broad compliance review or UI implementation, record an agent-chosen visu
|
|
|
37
34
|
Reject generic anchors. Do not accept "modern", "clean", "premium", "expressive", "minimal", or "bold" as the anchor. Name a material, instrument, artifact class, architectural system, editorial genre, cinematic behavior, exhibition system, scientific apparatus, or industrial mechanism.
|
|
38
35
|
|
|
39
36
|
## Dynamic Avant-Garde Anchor Engine
|
|
40
|
-
|
|
41
37
|
If no current-task research or visual reference exists, activate the Dynamic Avant-Garde Anchor Engine before coding.
|
|
42
38
|
|
|
43
39
|
Rules:
|
|
@@ -50,7 +46,6 @@ Rules:
|
|
|
50
46
|
- Use reduced-motion fallbacks instead of suppressing motion.
|
|
51
47
|
|
|
52
48
|
## Creative Ambition Floor
|
|
53
|
-
|
|
54
49
|
Before UI code, record:
|
|
55
50
|
- one product-derived palette move
|
|
56
51
|
- one signature motion, spatial, or interaction behavior
|
|
@@ -59,8 +54,14 @@ Before UI code, record:
|
|
|
59
54
|
|
|
60
55
|
Do not ship AI-safe UI. Record exact drift signals in `reviewRubric`; at minimum reject decorative grid wallpaper, default line backgrounds, soft glow backgrounds, generic abstract marks, and first-output composition with only local copy swapped in when they have no product function.
|
|
61
56
|
|
|
62
|
-
##
|
|
57
|
+
## Brave Redesign Default
|
|
58
|
+
For UI design work, the agent owns the ambition decision. For broad screens, redesigns, or new visual systems, treat expressive motion, spatial hierarchy, distinctive composition, and product-specific interaction as the baseline even when the user did not say "rich". Do not reduce the request to a safer version of the existing UI, a static implementation, or a component-kit rearrangement because research or dependency selection feels inconvenient.
|
|
63
59
|
|
|
60
|
+
If the expressive path needs a new motion, 3D, canvas, scroll, or interaction library and web search is available, perform the official-doc research and record the decision. If web search is unavailable, use already-present dependencies or native browser capabilities while preserving the intended ambition, then mark library verification as pending.
|
|
61
|
+
|
|
62
|
+
Only downshift ambition after naming the concrete blocker: product fit, content density, performance budget, accessibility, device support, package conflict, security risk, or missing runtime capability. Pair every downshift with a replacement interaction quality that still changes composition, hierarchy, feedback, or memorability.
|
|
63
|
+
|
|
64
|
+
## AI Color and Template Residue Audit
|
|
64
65
|
AI color drift happens when a palette uses safe defaults before product meaning.
|
|
65
66
|
|
|
66
67
|
Complete the AI color audit before coding:
|
|
@@ -72,7 +73,6 @@ Complete the AI color audit before coding:
|
|
|
72
73
|
Cream, slate, monochrome, purple-blue gradients, cyber-neon terminals, pale editorial surfaces, soft glow atmospheres, and dark control rooms are autopilot risks, not banned palettes.
|
|
73
74
|
|
|
74
75
|
## Motion and 3D Courage Rule
|
|
75
|
-
|
|
76
76
|
Motion, 3D, canvas, WebGL, scroll choreography, and modern animation libraries are first-class UI options when they improve understanding, exploration, feedback, hierarchy, memorability, or confidence.
|
|
77
77
|
|
|
78
78
|
Use modern, expressive interaction when it improves hierarchy, feedback, confidence, or memorability.
|
|
@@ -82,7 +82,6 @@ If rich motion or spatial UI is omitted, record the product, content-density, pe
|
|
|
82
82
|
If 3D or canvas is used, record product role, interaction model, fallback path, runtime/library choice, loading state, keyboard path, and reduced-motion behavior.
|
|
83
83
|
|
|
84
84
|
## Token Derivation Audit
|
|
85
|
-
|
|
86
85
|
Before implementation, `docs/design-intent.json` must include top-level `derivedTokenLogic`:
|
|
87
86
|
- `anchorReference`
|
|
88
87
|
- `colorDerivationSource`
|
|
@@ -94,7 +93,6 @@ Before implementation, `docs/design-intent.json` must include top-level `derived
|
|
|
94
93
|
Every token must trace to `anchorReference`. If the rationale is "looks good", "common practice", "modern default", or "framework default", revise the token before code.
|
|
95
94
|
|
|
96
95
|
## Library Research Protocol
|
|
97
|
-
|
|
98
96
|
If web search is available:
|
|
99
97
|
- Verify each new UI-related library against current official docs.
|
|
100
98
|
- Record source URL, fetched date, stable compatible version, purpose, risk, and fallback in `libraryDecisions[]`.
|
|
@@ -115,6 +113,7 @@ When the user says "redesign from zero", "redesain dari 0", "ulang dari 0", or "
|
|
|
115
113
|
- Add `visualResetStrategy`.
|
|
116
114
|
- Reset composition, hierarchy, palette/typography, motion or interaction, and responsive information architecture.
|
|
117
115
|
- Do not ship a palette swap, dark-mode flip, or same hero with new colors.
|
|
116
|
+
- Run the redesign regression test: if the result preserves the old hero structure, navigation grammar, card rhythm, motion density, image framing, or primary interaction model without explicit user-approved continuity, revise before implementation is considered complete.
|
|
118
117
|
|
|
119
118
|
## Responsive Recomposition Plan
|
|
120
119
|
|
|
@@ -7,7 +7,7 @@ This prompt boots a repository with strict AI coding guidance context.
|
|
|
7
7
|
When a new project is created or initialized, the agent must automatically:
|
|
8
8
|
1. Read [AGENTS.md](../../AGENTS.md) to understand the canonical bootstrap chain and active entrypoints.
|
|
9
9
|
2. Resolve the smallest relevant rule set from [.agent-context/rules/](../rules/) instead of scanning the whole directory by default.
|
|
10
|
-
3. Review dynamic runtime signals from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json),
|
|
10
|
+
3. Review dynamic runtime signals from [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), repository evidence, task constraints, and live official documentation when runtime or ecosystem facts matter.
|
|
11
11
|
4. If Docker or Compose is in scope, load [docker-runtime.md](../rules/docker-runtime.md) and verify the latest official Docker guidance before authoring container assets.
|
|
12
12
|
5. For unresolved framework or package setup, recommend the latest stable compatible dependency set and official framework setup flow from live official documentation before coding unless a documented compatibility constraint blocks it.
|
|
13
13
|
|
|
@@ -79,6 +79,8 @@ Run this before declaring a task done. Apply only the sections relevant to the c
|
|
|
79
79
|
- [ ] Responsive behavior recomposes content and priority, not only shrinking desktop layout.
|
|
80
80
|
- [ ] Accessibility hard requirements are preserved: keyboard access, focus visibility, contrast, target size, status feedback, and no color-only meaning.
|
|
81
81
|
- [ ] Motion is treated as part of the design language for modern UI work, with reduced-motion and performance safeguards instead of defaulting to static screens.
|
|
82
|
+
- [ ] Broad redesigns pass the old-design regression test: the result is not the previous composition with animation, depth, media, or interaction density removed.
|
|
83
|
+
- [ ] UI work records an agent-chosen ambition level; broad screens and redesigns researched an expressive path first, and any downshift names a concrete blocker plus replacement interaction quality.
|
|
82
84
|
|
|
83
85
|
## 8. Dependencies And Runtime
|
|
84
86
|
|
|
@@ -43,6 +43,8 @@ For new screens or broad redesigns, make at least three at-a-glance product-spec
|
|
|
43
43
|
|
|
44
44
|
Use the rename test: if the UI can be renamed to another product category without changing composition, palette, iconography, and motion language, revise before implementation is considered complete.
|
|
45
45
|
|
|
46
|
+
Use the old-design regression test for broad redesigns: if the UI reads as the previous design with fewer details, removed animation, simplified sections, or a new palette on the same composition, revise before implementation is considered complete.
|
|
47
|
+
|
|
46
48
|
Background lines, grids, scanlines, noise, glows, blobs, abstract logos, and decorative geometry are invalid as wallpaper. Do not use grid or line backgrounds as first-output filler. Use them only for a named product function such as alignment, crop guidance, map/route orientation, timeline reading, measurement, status, or motion continuity.
|
|
47
49
|
|
|
48
50
|
## Dynamic Anchor Gate
|
|
@@ -64,6 +66,7 @@ If the user gives no current-task visual research or reference:
|
|
|
64
66
|
- Do not default to dark slate, cream/beige/tan, purple-blue gradients, monochrome palettes, cyber-neon terminals, or uniform card surfaces without product evidence.
|
|
65
67
|
- Treat motion, 3D, WebGL, canvas, scroll choreography, and animation libraries as first-class options.
|
|
66
68
|
- Omit rich motion or spatial UI only after naming the product-fit reason and the replacement interaction quality.
|
|
69
|
+
- For new screens or broad redesigns, research the expressive implementation path instead of defaulting to static native CSS. Use native or already-installed tools only when they can still deliver the chosen ambition, or when a concrete blocker is documented.
|
|
67
70
|
- Keep reduced-motion, keyboard, loading, performance, mobile, and non-3D fallbacks explicit.
|
|
68
71
|
|
|
69
72
|
## Zero-Based Redesign
|
|
@@ -74,6 +77,7 @@ If the user asks for a redesign from zero:
|
|
|
74
77
|
- Rewrite or materially update both design docs before coding.
|
|
75
78
|
- Change primary composition, content hierarchy, interaction model, and responsive information architecture.
|
|
76
79
|
- Reject palette swaps, dark-mode flips, and restyled heroes.
|
|
80
|
+
- Reject implementations that remove animation, media, depth, or interaction density merely to reduce complexity when the request calls for a more distinctive experience.
|
|
77
81
|
|
|
78
82
|
## Responsive Mutation
|
|
79
83
|
|
|
@@ -8,11 +8,9 @@ Tracked seed/config artifacts:
|
|
|
8
8
|
- `benchmark-comparison-schema.json`
|
|
9
9
|
- `benchmark-reproducibility.json`
|
|
10
10
|
- `benchmark-thresholds.json`
|
|
11
|
-
- `benchmark-watchlist.json`
|
|
12
11
|
- `benchmark-writer-judge-config.json`
|
|
13
12
|
- `memory-adapter-contract.json`
|
|
14
13
|
- `memory-schema-v1.json`
|
|
15
|
-
- `stack-research-snapshot.json`
|
|
16
14
|
|
|
17
15
|
Tracked operational artifact:
|
|
18
16
|
- `onboarding-report.json` stays tracked in this repository because internal audits read it as the current repository onboarding state. In installed projects, `init` and `upgrade` regenerate this file.
|
|
@@ -23,4 +21,4 @@ Local-only/generated artifacts:
|
|
|
23
21
|
- `llm-judge-report.json`
|
|
24
22
|
- benchmark, trend, weekly governance, and quality report outputs
|
|
25
23
|
|
|
26
|
-
Do not treat generated reports as current project truth. Rerun the matching `npm run benchmark:*`, `npm run report:*`, or `npm run audit:*` command when fresh evidence is needed.
|
|
24
|
+
Do not treat generated reports or archived research as current project truth. Rerun the matching `npm run benchmark:*`, `npm run report:*`, or `npm run audit:*` command when fresh evidence is needed.
|
|
@@ -59,12 +59,12 @@
|
|
|
59
59
|
"inputReferences": [
|
|
60
60
|
"scripts/release-gate.mjs",
|
|
61
61
|
"scripts/benchmark-intelligence.mjs",
|
|
62
|
-
"
|
|
62
|
+
"scripts/benchmark-gate.mjs"
|
|
63
63
|
],
|
|
64
64
|
"expectedSignals": [
|
|
65
65
|
"release readiness",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
66
|
+
"static external watchlist retirement",
|
|
67
|
+
"no stale benchmark research dependency"
|
|
68
68
|
],
|
|
69
69
|
"primaryCommand": "npm run benchmark:intelligence"
|
|
70
70
|
}
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"rerunInstructions": [
|
|
73
73
|
"Run npm run benchmark:detection to regenerate detection benchmark output.",
|
|
74
74
|
"Run npm run benchmark:gate to validate benchmark anti-regression thresholds.",
|
|
75
|
-
"Run npm run benchmark:intelligence to
|
|
75
|
+
"Run npm run benchmark:intelligence to confirm static external benchmark watchlists stay retired.",
|
|
76
76
|
"Run npm run benchmark:bundle to emit a reproducible benchmark evidence bundle.",
|
|
77
77
|
"Run npm run benchmark:writer-judge to emit writer-judge side-by-side matrix output."
|
|
78
78
|
],
|
|
@@ -7,7 +7,7 @@ alwaysApply: true
|
|
|
7
7
|
|
|
8
8
|
Adapter Mode: thin
|
|
9
9
|
Adapter Source: .instructions.md
|
|
10
|
-
Canonical Snapshot SHA256:
|
|
10
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
11
11
|
|
|
12
12
|
This repository is governed by a strict instruction contract.
|
|
13
13
|
Use [.instructions.md](../../.instructions.md) as the canonical policy source.
|
package/.cursorrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .cursorrules - Legacy Thin Adapter
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.42
|
|
4
4
|
Adapter Mode: legacy-thin
|
|
5
5
|
Adapter Source: .agent-instructions.md when present; fallback .instructions.md
|
|
6
6
|
Canonical baseline: .instructions.md
|
package/.gemini/instructions.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
6
6
|
|
|
7
7
|
This repository is governed by a strict instruction contract.
|
|
8
8
|
Use [.instructions.md](../.instructions.md) as the canonical policy source.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
6
6
|
|
|
7
7
|
This repository is governed by a strict instruction contract.
|
|
8
8
|
Use [.instructions.md](../.instructions.md) as the canonical policy source.
|
|
@@ -6,7 +6,7 @@ applyTo: "**"
|
|
|
6
6
|
|
|
7
7
|
Adapter Mode: thin
|
|
8
8
|
Adapter Source: .instructions.md
|
|
9
|
-
Canonical Snapshot SHA256:
|
|
9
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
10
10
|
|
|
11
11
|
This repository is governed by a strict instruction contract.
|
|
12
12
|
Use [.instructions.md](../../.instructions.md) as the canonical policy source.
|
package/.instructions.md
CHANGED
|
@@ -147,6 +147,7 @@ Trigger: ui, ux, layout, screen, tailwind, frontend, redesign.
|
|
|
147
147
|
5. Ensure `docs/design-intent.json` includes `conceptualAnchor.anchorReference`, top-level `derivedTokenLogic`, `libraryResearchStatus`, `libraryDecisions[]`, and motion/palette decisions.
|
|
148
148
|
6. Generate or refine `docs/DESIGN.md` plus `docs/design-intent.json` before UI implementation.
|
|
149
149
|
7. Keep context isolated; do not eagerly load unrelated backend-only rules.
|
|
150
|
+
8. In UI Design Mode, choose the ambition level proactively. For broad screens or redesigns, treat expressive motion, spatial hierarchy, distinctive composition, and product-specific interaction as the baseline even when the user did not say "rich"; quiet or static surfaces require a concrete product, performance, accessibility, device, or dependency reason.
|
|
150
151
|
|
|
151
152
|
## Reasoning Chain
|
|
152
153
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
6
6
|
|
|
7
7
|
This repository is governed by a strict instruction contract.
|
|
8
8
|
Use [.instructions.md](../../.instructions.md) as the canonical policy source.
|
package/.windsurfrules
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# .windsurfrules - Legacy Thin Adapter
|
|
2
2
|
|
|
3
|
-
Generated by Agentic-Senior-Core CLI v3.0.
|
|
3
|
+
Generated by Agentic-Senior-Core CLI v3.0.42
|
|
4
4
|
Adapter Mode: legacy-thin
|
|
5
5
|
Adapter Source: .agent-instructions.md when present; fallback .instructions.md
|
|
6
6
|
Canonical baseline: .instructions.md
|
package/AGENTS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
6
6
|
|
|
7
7
|
This repository is governed by a strict instruction contract.
|
|
8
8
|
Use [.instructions.md](.instructions.md) as the canonical policy source.
|
package/CLAUDE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
6
6
|
|
|
7
7
|
This repository is governed by a strict instruction contract.
|
|
8
8
|
Use [.instructions.md](.instructions.md) as the canonical policy source.
|
package/CONTRIBUTING.md
CHANGED
|
@@ -88,7 +88,6 @@ If all three are "yes", it belongs here.
|
|
|
88
88
|
- Generic content that reads like it was auto-generated without thought
|
|
89
89
|
- Rules without concrete enforcement boundaries
|
|
90
90
|
- Stack profiles for languages the author doesn't actually use in production
|
|
91
|
-
- Blueprints that are just folder structures without code patterns
|
|
92
91
|
- PRs that don't update the relevant source files, generated adapters, and checklists
|
|
93
92
|
|
|
94
93
|
---
|
|
@@ -97,6 +96,13 @@ If all three are "yes", it belongs here.
|
|
|
97
96
|
|
|
98
97
|
The npm package is published under `@ryuenn3123`, while the GitHub repository is hosted under `fatidaprilian`.
|
|
99
98
|
|
|
99
|
+
### Architecture Boundaries
|
|
100
|
+
|
|
101
|
+
When contributing code to the CLI or the maintenance tools, respect the boundary between `lib/` and `scripts/`:
|
|
102
|
+
|
|
103
|
+
- **`lib/`**: Contains the core CLI application logic. These files are executed by the package binary but are **never** copied into target user workspaces.
|
|
104
|
+
- **`scripts/`**: Contains standalone tools (like validators, audits, and benchmarks) AND the MCP server (`scripts/mcp-server.mjs`). Code here must not depend on `lib/` because some scripts (like the MCP server) are copied directly to target workspaces where `lib/` does not exist.
|
|
105
|
+
|
|
100
106
|
```bash
|
|
101
107
|
# Clone
|
|
102
108
|
git clone https://github.com/fatidaprilian/Agentic-Senior-Core.git
|
package/GEMINI.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Adapter Mode: thin
|
|
4
4
|
Adapter Source: .instructions.md
|
|
5
|
-
Canonical Snapshot SHA256:
|
|
5
|
+
Canonical Snapshot SHA256: 91efb30348194cff4f7a820caabeb60cd7ca59dea3982a7d3991c7b18991d225
|
|
6
6
|
|
|
7
7
|
This repository is governed by a strict instruction contract.
|
|
8
8
|
Use [.instructions.md](.instructions.md) as the canonical policy source.
|
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ Full mapping reference: docs/terminology-mapping.md
|
|
|
131
131
|
|
|
132
132
|
- FAQ: docs/faq.md
|
|
133
133
|
- Deep dive internals: docs/deep-dive.md
|
|
134
|
-
- V2 upgrade playbook: docs/v2-upgrade-playbook.md
|
|
134
|
+
- Archived V2 upgrade playbook: docs/archive/v2-upgrade-playbook.md
|
|
135
135
|
- Integration playbook: docs/integration-playbook.md
|
|
136
136
|
- Benchmark and stack reference: docs/benchmark-reference.md
|
|
137
137
|
- Terminology mapping reference: docs/terminology-mapping.md
|
package/lib/cli/backup.mjs
CHANGED
|
@@ -2,9 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import crypto from 'node:crypto';
|
|
4
4
|
import { pathExists, ensureDirectory } from './utils.mjs';
|
|
5
|
-
import { entryPointFiles } from './constants.mjs';
|
|
6
|
-
|
|
7
|
-
const BACKUP_DIR_NAME = '.agentic-backup';
|
|
5
|
+
import { entryPointFiles, BACKUP_DIR_NAME } from './constants.mjs';
|
|
8
6
|
|
|
9
7
|
/**
|
|
10
8
|
* Calculates a SHA-256 hash of a file's contents.
|
|
@@ -81,7 +81,7 @@ import {
|
|
|
81
81
|
resolveSilentCiGuardrailsDefault,
|
|
82
82
|
} from './init/setup-decisions.mjs';
|
|
83
83
|
|
|
84
|
-
export {
|
|
84
|
+
export { REPOSITORY_ROOT } from '../constants.mjs';
|
|
85
85
|
export {
|
|
86
86
|
parseInitArguments,
|
|
87
87
|
normalizeRuntimeEnvironmentKey,
|
package/lib/cli/constants.mjs
CHANGED
|
@@ -9,10 +9,10 @@ import { fileURLToPath } from 'node:url';
|
|
|
9
9
|
const currentFilePath = fileURLToPath(import.meta.url);
|
|
10
10
|
const currentDirectoryPath = dirname(currentFilePath);
|
|
11
11
|
|
|
12
|
-
export const
|
|
13
|
-
export const PACKAGE_JSON_PATH = join(
|
|
12
|
+
export const REPOSITORY_ROOT = resolve(currentDirectoryPath, '..', '..');
|
|
13
|
+
export const PACKAGE_JSON_PATH = join(REPOSITORY_ROOT, 'package.json');
|
|
14
14
|
export const CLI_VERSION = JSON.parse(readFileSync(PACKAGE_JSON_PATH, 'utf8')).version;
|
|
15
|
-
export const AGENT_CONTEXT_DIR = join(
|
|
15
|
+
export const AGENT_CONTEXT_DIR = join(REPOSITORY_ROOT, '.agent-context');
|
|
16
16
|
export const POLICY_FILE_NAME = 'llm-judge-threshold.json';
|
|
17
17
|
|
|
18
18
|
export const ALLOWED_SEVERITY_LEVELS = new Set(['critical', 'high', 'medium', 'low']);
|
|
@@ -140,3 +140,5 @@ export const entryPointFiles = [
|
|
|
140
140
|
];
|
|
141
141
|
|
|
142
142
|
export const directoryCopies = ['.agent-context', '.gemini', '.agents'];
|
|
143
|
+
|
|
144
|
+
export const BACKUP_DIR_NAME = '.agentic-backup';
|
package/lib/cli/rollback.mjs
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import fs from 'node:fs/promises';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { pathExists, ensureDirectory } from './utils.mjs';
|
|
4
|
-
|
|
5
|
-
const BACKUP_DIR_NAME = '.agentic-backup';
|
|
4
|
+
import { BACKUP_DIR_NAME } from './constants.mjs';
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Performs a rollback of a target directory using the backup manifest.
|
|
@@ -2,7 +2,7 @@ import fs from 'node:fs/promises';
|
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
|
|
4
4
|
import {
|
|
5
|
-
|
|
5
|
+
REPOSITORY_ROOT,
|
|
6
6
|
entryPointFiles,
|
|
7
7
|
directoryCopies,
|
|
8
8
|
} from '../constants.mjs';
|
|
@@ -102,7 +102,7 @@ async function buildManagedSourceManifest(options = {}) {
|
|
|
102
102
|
const sourceDirectories = new Set();
|
|
103
103
|
|
|
104
104
|
for (const sourceDirectoryName of directoryCopies) {
|
|
105
|
-
const sourceDirectoryPath = path.join(
|
|
105
|
+
const sourceDirectoryPath = path.join(REPOSITORY_ROOT, sourceDirectoryName);
|
|
106
106
|
const sourceTreeEntries = await collectRelativeTreeEntries(sourceDirectoryPath, sourceDirectoryName);
|
|
107
107
|
|
|
108
108
|
for (const sourceFilePath of sourceTreeEntries.files) {
|
|
@@ -115,7 +115,7 @@ async function buildManagedSourceManifest(options = {}) {
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
for (const entryPointFileName of entryPointFiles) {
|
|
118
|
-
const sourceFilePath = path.join(
|
|
118
|
+
const sourceFilePath = path.join(REPOSITORY_ROOT, entryPointFileName);
|
|
119
119
|
if (!(await pathExists(sourceFilePath))) {
|
|
120
120
|
continue;
|
|
121
121
|
}
|
|
@@ -123,7 +123,7 @@ async function buildManagedSourceManifest(options = {}) {
|
|
|
123
123
|
sourceFiles.add(toPosixRelativePath(entryPointFileName));
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
const optionalManagedEntries = await collectOptionalManagedEntries(
|
|
126
|
+
const optionalManagedEntries = await collectOptionalManagedEntries(REPOSITORY_ROOT, options);
|
|
127
127
|
for (const sourceFilePath of optionalManagedEntries.files) {
|
|
128
128
|
sourceFiles.add(sourceFilePath);
|
|
129
129
|
}
|
package/lib/cli/utils.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import path from 'node:path';
|
|
|
7
7
|
import os from 'node:os';
|
|
8
8
|
|
|
9
9
|
import {
|
|
10
|
-
|
|
10
|
+
REPOSITORY_ROOT,
|
|
11
11
|
ALLOWED_SEVERITY_LEVELS,
|
|
12
12
|
PROFILE_PRESETS,
|
|
13
13
|
INIT_PRESETS,
|
|
@@ -144,14 +144,14 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
144
144
|
const preservedFiles = [];
|
|
145
145
|
|
|
146
146
|
for (const sourceDirectoryName of directoryCopies) {
|
|
147
|
-
const sourceDirectoryPath = path.join(
|
|
147
|
+
const sourceDirectoryPath = path.join(REPOSITORY_ROOT, sourceDirectoryName);
|
|
148
148
|
if (!(await pathExists(sourceDirectoryPath))) {
|
|
149
149
|
continue;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
const sourceTree = await collectRelativeTreeEntries(sourceDirectoryPath, sourceDirectoryName);
|
|
153
153
|
for (const relativeFilePath of sourceTree.files) {
|
|
154
|
-
const sourcePath = path.join(
|
|
154
|
+
const sourcePath = path.join(REPOSITORY_ROOT, ...relativeFilePath.split('/'));
|
|
155
155
|
const targetPath = path.join(resolvedTargetDirectoryPath, ...relativeFilePath.split('/'));
|
|
156
156
|
const syncResult = await syncFile(sourcePath, targetPath, {
|
|
157
157
|
preserveUserOwned: sourceDirectoryName === '.gemini',
|
|
@@ -165,7 +165,7 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
for (const entryPointFileName of entryPointFiles) {
|
|
168
|
-
const sourceFilePath = path.join(
|
|
168
|
+
const sourceFilePath = path.join(REPOSITORY_ROOT, entryPointFileName);
|
|
169
169
|
const targetFilePath = path.join(resolvedTargetDirectoryPath, entryPointFileName);
|
|
170
170
|
|
|
171
171
|
if (!(await pathExists(sourceFilePath))) {
|
|
@@ -211,13 +211,13 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
211
211
|
const projectName = path.basename(resolvedTargetDirectoryPath);
|
|
212
212
|
const mcpArgs = ['./scripts/mcp-server.mjs'];
|
|
213
213
|
|
|
214
|
-
const sourceMcpServerPath = path.join(
|
|
214
|
+
const sourceMcpServerPath = path.join(REPOSITORY_ROOT, 'scripts', 'mcp-server.mjs');
|
|
215
215
|
const targetMcpServerPath = path.join(resolvedTargetDirectoryPath, 'scripts', 'mcp-server.mjs');
|
|
216
216
|
const mcpServerSync = await syncFile(sourceMcpServerPath, targetMcpServerPath);
|
|
217
217
|
if (mcpServerSync.status === 'created') createdFiles.push('scripts/mcp-server.mjs');
|
|
218
218
|
else if (mcpServerSync.status === 'updated') updatedFiles.push('scripts/mcp-server.mjs');
|
|
219
219
|
|
|
220
|
-
const sourceMcpHelpersDirectoryPath = path.join(
|
|
220
|
+
const sourceMcpHelpersDirectoryPath = path.join(REPOSITORY_ROOT, 'scripts', 'mcp-server');
|
|
221
221
|
if (await pathExists(sourceMcpHelpersDirectoryPath)) {
|
|
222
222
|
const mcpHelperTreeEntries = await collectRelativeTreeEntries(
|
|
223
223
|
sourceMcpHelpersDirectoryPath,
|
|
@@ -225,7 +225,7 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
225
225
|
);
|
|
226
226
|
|
|
227
227
|
for (const relativeHelperFilePath of mcpHelperTreeEntries.files) {
|
|
228
|
-
const sourceHelperFilePath = path.join(
|
|
228
|
+
const sourceHelperFilePath = path.join(REPOSITORY_ROOT, ...relativeHelperFilePath.split('/'));
|
|
229
229
|
const targetHelperFilePath = path.join(resolvedTargetDirectoryPath, ...relativeHelperFilePath.split('/'));
|
|
230
230
|
const helperSyncResult = await syncFile(sourceHelperFilePath, targetHelperFilePath);
|
|
231
231
|
|
|
@@ -303,8 +303,13 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
303
303
|
try {
|
|
304
304
|
const globalGeminiDir = path.join(os.homedir(), '.gemini', 'antigravity');
|
|
305
305
|
const globalGeminiMcpPath = path.join(globalGeminiDir, 'mcp_config.json');
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
const targetMcpServerScript = path.join(resolvedTargetDirectoryPath, 'scripts', 'mcp-server.mjs');
|
|
307
|
+
|
|
308
|
+
// Only inject if the MCP server script will actually exist at the target.
|
|
309
|
+
// When the script is missing, Antigravity blocks all chat instead of degrading gracefully.
|
|
310
|
+
const targetHasMcpServer = await pathExists(targetMcpServerScript);
|
|
311
|
+
|
|
312
|
+
if (targetHasMcpServer && await pathExists(globalGeminiDir)) {
|
|
308
313
|
let geminiConfig = { mcpServers: {} };
|
|
309
314
|
if (await pathExists(globalGeminiMcpPath)) {
|
|
310
315
|
const content = await fs.readFile(globalGeminiMcpPath, 'utf8');
|
|
@@ -313,7 +318,20 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
313
318
|
}
|
|
314
319
|
}
|
|
315
320
|
if (!geminiConfig.mcpServers) geminiConfig.mcpServers = {};
|
|
316
|
-
|
|
321
|
+
|
|
322
|
+
// Prune stale agentic-senior-core entries whose workspace no longer exists
|
|
323
|
+
let configChanged = false;
|
|
324
|
+
for (const serverName of Object.keys(geminiConfig.mcpServers)) {
|
|
325
|
+
if (!serverName.startsWith('agentic-senior-core-')) continue;
|
|
326
|
+
const serverEntry = geminiConfig.mcpServers[serverName];
|
|
327
|
+
if (!serverEntry?.cwd) continue;
|
|
328
|
+
const staleMcpScript = path.join(serverEntry.cwd, 'scripts', 'mcp-server.mjs');
|
|
329
|
+
if (!(await pathExists(staleMcpScript))) {
|
|
330
|
+
delete geminiConfig.mcpServers[serverName];
|
|
331
|
+
configChanged = true;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
317
335
|
const safeProjectName = projectName.replace(/[^a-zA-Z0-9_-]/g, '-');
|
|
318
336
|
const uniqueServerName = `agentic-senior-core-${safeProjectName}`;
|
|
319
337
|
const templateServer = {
|
|
@@ -324,7 +342,11 @@ export async function copyGovernanceAssetsToTarget(
|
|
|
324
342
|
|
|
325
343
|
if (JSON.stringify(geminiConfig.mcpServers[uniqueServerName]) !== JSON.stringify(templateServer)) {
|
|
326
344
|
geminiConfig.mcpServers[uniqueServerName] = templateServer;
|
|
327
|
-
|
|
345
|
+
configChanged = true;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
if (configChanged) {
|
|
349
|
+
await fs.writeFile(globalGeminiMcpPath, JSON.stringify(geminiConfig, null, 2) + '\n', 'utf8');
|
|
328
350
|
}
|
|
329
351
|
}
|
|
330
352
|
} catch { /* Ignore global injection errors */ }
|
package/mcp.json
CHANGED
|
@@ -13,31 +13,44 @@
|
|
|
13
13
|
},
|
|
14
14
|
"stack-strategies": {
|
|
15
15
|
"path": "dynamic",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"autoLoad": true,
|
|
17
|
+
"type": "virtual"
|
|
18
18
|
},
|
|
19
19
|
"architecture-playbooks": {
|
|
20
20
|
"path": "dynamic",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"autoLoad": true,
|
|
22
|
+
"type": "virtual"
|
|
23
23
|
},
|
|
24
24
|
"execution-contracts": {
|
|
25
25
|
"path": "dynamic",
|
|
26
|
-
"count": 0,
|
|
27
26
|
"autoLoad": true,
|
|
28
|
-
"sources": [
|
|
27
|
+
"sources": [
|
|
28
|
+
"prompts",
|
|
29
|
+
"review-checklists",
|
|
30
|
+
"policies"
|
|
31
|
+
],
|
|
32
|
+
"type": "virtual"
|
|
29
33
|
},
|
|
30
34
|
"prompts": {
|
|
31
35
|
"path": ".agent-context/prompts",
|
|
32
36
|
"count": 4,
|
|
33
37
|
"autoLoad": true,
|
|
34
|
-
"templates": [
|
|
38
|
+
"templates": [
|
|
39
|
+
"init-project",
|
|
40
|
+
"bootstrap-design",
|
|
41
|
+
"refactor",
|
|
42
|
+
"review-code"
|
|
43
|
+
]
|
|
35
44
|
},
|
|
36
45
|
"governance-modes": {
|
|
37
46
|
"path": "dynamic",
|
|
38
|
-
"count": 0,
|
|
39
47
|
"autoLoad": true,
|
|
40
|
-
"governance": [
|
|
48
|
+
"governance": [
|
|
49
|
+
"platform",
|
|
50
|
+
"regulated",
|
|
51
|
+
"startup"
|
|
52
|
+
],
|
|
53
|
+
"type": "virtual"
|
|
41
54
|
},
|
|
42
55
|
"state": {
|
|
43
56
|
"path": ".agent-context/state",
|
|
@@ -53,25 +66,24 @@
|
|
|
53
66
|
"path": "docs",
|
|
54
67
|
"count": 0,
|
|
55
68
|
"autoLoad": false,
|
|
56
|
-
"sources": [
|
|
69
|
+
"sources": [
|
|
70
|
+
"project-brief",
|
|
71
|
+
"architecture-decision-record",
|
|
72
|
+
"flow-overview",
|
|
73
|
+
"api-contract",
|
|
74
|
+
"database-schema",
|
|
75
|
+
"DESIGN",
|
|
76
|
+
"design-intent"
|
|
77
|
+
]
|
|
57
78
|
}
|
|
58
79
|
}
|
|
59
80
|
},
|
|
60
|
-
"servers": {
|
|
61
|
-
"lint": {
|
|
62
|
-
"command": "node",
|
|
63
|
-
"args": ["./scripts/validate.mjs"],
|
|
64
|
-
"transport": "stdio"
|
|
65
|
-
},
|
|
66
|
-
"test": {
|
|
67
|
-
"command": "node",
|
|
68
|
-
"args": ["--test", "./tests/cli-smoke.test.mjs", "./tests/llm-judge.test.mjs"],
|
|
69
|
-
"transport": "stdio"
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
81
|
"workflows": {
|
|
73
82
|
"self-heal-on-failure": {
|
|
74
|
-
"trigger": [
|
|
83
|
+
"trigger": [
|
|
84
|
+
"ci.failure",
|
|
85
|
+
"lint.failure"
|
|
86
|
+
],
|
|
75
87
|
"steps": [
|
|
76
88
|
"collect_logs",
|
|
77
89
|
"map_violation_to_rule",
|
|
@@ -80,7 +92,10 @@
|
|
|
80
92
|
]
|
|
81
93
|
},
|
|
82
94
|
"full-knowledge-injection": {
|
|
83
|
-
"trigger": [
|
|
95
|
+
"trigger": [
|
|
96
|
+
"workspace.initialize",
|
|
97
|
+
"agent.start"
|
|
98
|
+
],
|
|
84
99
|
"steps": [
|
|
85
100
|
"resolve_scope_first",
|
|
86
101
|
"inject_relevant_rules",
|