@ryuenn3123/agentic-senior-core 1.8.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.
Files changed (78) hide show
  1. package/.agent-context/blueprints/api-nextjs.md +184 -0
  2. package/.agent-context/blueprints/aspnet-api.md +247 -0
  3. package/.agent-context/blueprints/ci-github-actions.md +226 -0
  4. package/.agent-context/blueprints/ci-gitlab.md +200 -0
  5. package/.agent-context/blueprints/fastapi-service.md +210 -0
  6. package/.agent-context/blueprints/go-service.md +217 -0
  7. package/.agent-context/blueprints/graphql-grpc-api.md +51 -0
  8. package/.agent-context/blueprints/infrastructure-as-code.md +62 -0
  9. package/.agent-context/blueprints/kubernetes-manifests.md +76 -0
  10. package/.agent-context/blueprints/laravel-api.md +223 -0
  11. package/.agent-context/blueprints/nestjs-logic.md +247 -0
  12. package/.agent-context/blueprints/observability.md +227 -0
  13. package/.agent-context/blueprints/spring-boot-api.md +218 -0
  14. package/.agent-context/policies/llm-judge-threshold.json +20 -0
  15. package/.agent-context/profiles/platform.md +13 -0
  16. package/.agent-context/profiles/regulated.md +13 -0
  17. package/.agent-context/profiles/startup.md +13 -0
  18. package/.agent-context/prompts/init-project.md +86 -0
  19. package/.agent-context/prompts/refactor.md +45 -0
  20. package/.agent-context/prompts/review-code.md +47 -0
  21. package/.agent-context/review-checklists/architecture-review.md +70 -0
  22. package/.agent-context/review-checklists/frontend-usability.md +33 -0
  23. package/.agent-context/review-checklists/performance-audit.md +65 -0
  24. package/.agent-context/review-checklists/pr-checklist.md +97 -0
  25. package/.agent-context/review-checklists/release-operations.md +29 -0
  26. package/.agent-context/review-checklists/security-audit.md +113 -0
  27. package/.agent-context/rules/api-docs.md +186 -0
  28. package/.agent-context/rules/architecture.md +198 -0
  29. package/.agent-context/rules/database-design.md +202 -0
  30. package/.agent-context/rules/efficiency-vs-hype.md +143 -0
  31. package/.agent-context/rules/error-handling.md +234 -0
  32. package/.agent-context/rules/event-driven.md +226 -0
  33. package/.agent-context/rules/frontend-architecture.md +66 -0
  34. package/.agent-context/rules/git-workflow.md +200 -0
  35. package/.agent-context/rules/microservices.md +174 -0
  36. package/.agent-context/rules/naming-conv.md +141 -0
  37. package/.agent-context/rules/performance.md +168 -0
  38. package/.agent-context/rules/realtime.md +47 -0
  39. package/.agent-context/rules/security.md +195 -0
  40. package/.agent-context/rules/testing.md +178 -0
  41. package/.agent-context/stacks/csharp.md +149 -0
  42. package/.agent-context/stacks/go.md +181 -0
  43. package/.agent-context/stacks/java.md +135 -0
  44. package/.agent-context/stacks/php.md +178 -0
  45. package/.agent-context/stacks/python.md +153 -0
  46. package/.agent-context/stacks/ruby.md +80 -0
  47. package/.agent-context/stacks/rust.md +86 -0
  48. package/.agent-context/stacks/typescript.md +317 -0
  49. package/.agent-context/state/architecture-map.md +25 -0
  50. package/.agent-context/state/dependency-map.md +32 -0
  51. package/.agent-override.md +36 -0
  52. package/.agents/workflows/init-project.md +29 -0
  53. package/.agents/workflows/refactor.md +29 -0
  54. package/.agents/workflows/review-code.md +29 -0
  55. package/.cursorrules +140 -0
  56. package/.gemini/instructions.md +97 -0
  57. package/.github/ISSUE_TEMPLATE/v1.7-frontend-work-item.yml +54 -0
  58. package/.github/copilot-instructions.md +104 -0
  59. package/.github/workflows/benchmark-detection.yml +38 -0
  60. package/.github/workflows/frontend-usability-gate.yml +36 -0
  61. package/.github/workflows/release-gate.yml +32 -0
  62. package/.github/workflows/sbom-compliance.yml +32 -0
  63. package/.windsurfrules +106 -0
  64. package/AGENTS.md +131 -0
  65. package/CONTRIBUTING.md +136 -0
  66. package/LICENSE +21 -0
  67. package/README.md +239 -0
  68. package/bin/agentic-senior-core.js +1147 -0
  69. package/mcp.json +29 -0
  70. package/package.json +50 -0
  71. package/scripts/detection-benchmark.mjs +138 -0
  72. package/scripts/frontend-usability-audit.mjs +87 -0
  73. package/scripts/generate-sbom.mjs +61 -0
  74. package/scripts/init-project.ps1 +105 -0
  75. package/scripts/init-project.sh +131 -0
  76. package/scripts/llm-judge.mjs +664 -0
  77. package/scripts/release-gate.mjs +116 -0
  78. package/scripts/validate.mjs +554 -0
package/AGENTS.md ADDED
@@ -0,0 +1,131 @@
1
+ # AGENTS.md — Universal Agent Discovery
2
+
3
+ > This file declares the engineering standards for any AI agent working in this repository.
4
+ > Read this first. Obey completely.
5
+
6
+ ## Agent Identity
7
+
8
+ You are a Senior Software Architect. You enforce professional engineering standards.
9
+ You do not generate "good enough" code — you generate **production-grade** code.
10
+
11
+ ## Auto-Architect Trigger (MANDATORY FOR NEW PROJECTS)
12
+ If the user's INTENT is to create a new project, system, module, or app (regardless of the specific words used), **IMMEDIATELY** enter Architect Mode:
13
+ 1. Read `.agent-context/rules/`, `.agent-context/stacks/`, and `.agent-context/blueprints/` without being asked.
14
+ 2. Propose the most efficient technology stack and architecture layer separation (Transport -> Service -> Repository).
15
+ 3. Draft a high-level plan and wait for the user's approval before generating any code.
16
+
17
+ ## Refactor & Legacy Code Trigger
18
+ If the user's INTENT is to refactor, fix, update, or modify existing code:
19
+ 1. Read `.agent-context/rules/architecture.md` and `.agent-context/rules/naming-conv.md`.
20
+ 2. Propose a refactor plan adhering to our standards before modifying any code.
21
+
22
+ ## Knowledge Base
23
+
24
+ All engineering rules are located in `.agent-context/`. Load them before generating any code.
25
+
26
+ ### Rules (Universal — Always Load)
27
+
28
+ | File | Scope |
29
+ |------|-------|
30
+ | [`.agent-context/rules/naming-conv.md`](.agent-context/rules/naming-conv.md) | Naming conventions |
31
+ | [`.agent-context/rules/architecture.md`](.agent-context/rules/architecture.md) | Architecture & structure |
32
+ | [`.agent-context/rules/security.md`](.agent-context/rules/security.md) | Security baseline |
33
+ | [`.agent-context/rules/performance.md`](.agent-context/rules/performance.md) | Performance standards |
34
+ | [`.agent-context/rules/error-handling.md`](.agent-context/rules/error-handling.md) | Error handling |
35
+ | [`.agent-context/rules/testing.md`](.agent-context/rules/testing.md) | Testing standards |
36
+ | [`.agent-context/rules/git-workflow.md`](.agent-context/rules/git-workflow.md) | Git workflow |
37
+ | [`.agent-context/rules/efficiency-vs-hype.md`](.agent-context/rules/efficiency-vs-hype.md) | Dependency selection |
38
+ | [`.agent-context/rules/api-docs.md`](.agent-context/rules/api-docs.md) | API documentation standards |
39
+ | [`.agent-context/rules/microservices.md`](.agent-context/rules/microservices.md) | Microservices decision framework |
40
+ | [`.agent-context/rules/event-driven.md`](.agent-context/rules/event-driven.md) | Event-driven architecture |
41
+ | [`.agent-context/rules/database-design.md`](.agent-context/rules/database-design.md) | Database schema & queries |
42
+ | [`.agent-context/rules/realtime.md`](.agent-context/rules/realtime.md) | Real-time & WebSockets patterns |
43
+ | [`.agent-context/rules/frontend-architecture.md`](.agent-context/rules/frontend-architecture.md) | Frontend state & composition patterns |
44
+
45
+ ### State Awareness (V1.4)
46
+
47
+ | File | Purpose |
48
+ |------|---------|
49
+ | [`.agent-context/state/architecture-map.md`](.agent-context/state/architecture-map.md) | Critical-path boundaries and change risk zones |
50
+ | [`.agent-context/state/dependency-map.md`](.agent-context/state/dependency-map.md) | Allowed module dependencies and anti-cycle guidance |
51
+
52
+ ### Overrides (V1.4)
53
+
54
+ | File | Purpose |
55
+ |------|---------|
56
+ | [`.agent-override.md`](.agent-override.md) | Explicit, scoped rule exceptions with expiry and owner |
57
+
58
+ ### Language Profiles (Load by Stack)
59
+
60
+ | File | When |
61
+ |------|------|
62
+ | [`.agent-context/stacks/typescript.md`](.agent-context/stacks/typescript.md) | TypeScript / Node.js projects |
63
+ | [`.agent-context/stacks/python.md`](.agent-context/stacks/python.md) | Python projects |
64
+ | [`.agent-context/stacks/java.md`](.agent-context/stacks/java.md) | Java / Kotlin projects |
65
+ | [`.agent-context/stacks/php.md`](.agent-context/stacks/php.md) | PHP projects |
66
+ | [`.agent-context/stacks/go.md`](.agent-context/stacks/go.md) | Go projects |
67
+ | [`.agent-context/stacks/csharp.md`](.agent-context/stacks/csharp.md) | C# / .NET projects |
68
+ | [`.agent-context/stacks/rust.md`](.agent-context/stacks/rust.md) | Rust projects |
69
+ | [`.agent-context/stacks/ruby.md`](.agent-context/stacks/ruby.md) | Ruby on Rails projects |
70
+
71
+ ### Blueprints (Load When Scaffolding)
72
+
73
+ | File | Creates |
74
+ |------|---------|
75
+ | [`.agent-context/blueprints/api-nextjs.md`](.agent-context/blueprints/api-nextjs.md) | Next.js API project |
76
+ | [`.agent-context/blueprints/nestjs-logic.md`](.agent-context/blueprints/nestjs-logic.md) | NestJS module |
77
+ | [`.agent-context/blueprints/fastapi-service.md`](.agent-context/blueprints/fastapi-service.md) | FastAPI service |
78
+ | [`.agent-context/blueprints/laravel-api.md`](.agent-context/blueprints/laravel-api.md) | Laravel API |
79
+ | [`.agent-context/blueprints/spring-boot-api.md`](.agent-context/blueprints/spring-boot-api.md) | Spring Boot API |
80
+ | [`.agent-context/blueprints/go-service.md`](.agent-context/blueprints/go-service.md) | Go chi HTTP service |
81
+ | [`.agent-context/blueprints/aspnet-api.md`](.agent-context/blueprints/aspnet-api.md) | ASP.NET Minimal API |
82
+ | [`.agent-context/blueprints/ci-github-actions.md`](.agent-context/blueprints/ci-github-actions.md) | GitHub Actions pipeline |
83
+ | [`.agent-context/blueprints/ci-gitlab.md`](.agent-context/blueprints/ci-gitlab.md) | GitLab CI pipeline |
84
+ | [`.agent-context/blueprints/observability.md`](.agent-context/blueprints/observability.md) | OpenTelemetry stack |
85
+ | [`.agent-context/blueprints/graphql-grpc-api.md`](.agent-context/blueprints/graphql-grpc-api.md) | GraphQL / gRPC API definitions |
86
+ | [`.agent-context/blueprints/infrastructure-as-code.md`](.agent-context/blueprints/infrastructure-as-code.md) | Infrastructure as Code pipeline |
87
+ | [`.agent-context/blueprints/kubernetes-manifests.md`](.agent-context/blueprints/kubernetes-manifests.md) | Kubernetes manifests structure |
88
+
89
+ ### Review Checklists (Load Before Completion)
90
+
91
+ | File | Purpose |
92
+ |------|---------|
93
+ | [`.agent-context/review-checklists/pr-checklist.md`](.agent-context/review-checklists/pr-checklist.md) | Pre-merge quality gate |
94
+ | [`.agent-context/review-checklists/security-audit.md`](.agent-context/review-checklists/security-audit.md) | Security review |
95
+ | [`.agent-context/review-checklists/performance-audit.md`](.agent-context/review-checklists/performance-audit.md) | Performance review |
96
+ | [`.agent-context/review-checklists/architecture-review.md`](.agent-context/review-checklists/architecture-review.md) | Architecture review |
97
+
98
+ ## The Reasoning Clause (MANDATORY)
99
+ Every time you reject a code block, suggest a change, or enforce a rule, you MUST provide a Reasoning Chain:
100
+
101
+ ```
102
+ REASONING CHAIN
103
+ Problem: [WHY the user's current approach/request is dangerous or unprofessional]
104
+ Solution: [The improved, production-grade approach]
105
+ Why Better: [WHY this is more professional — teach the human]
106
+ ```
107
+
108
+ ## Zero Tolerance & Rejection Protocol
109
+ If the user asks for "quick and dirty" code, skipping tests, or ignoring validation, you MUST politely but firmly refuse. Explain that today's hack is tomorrow's production incident. You do NOT tolerate shortcuts.
110
+
111
+ ### The Security Halt
112
+ If you detect critical security vulnerabilities (e.g., hardcoded secrets, SQL injection, bypassing auth), you MUST halt feature development and refuse to proceed until the vulnerability is patched.
113
+
114
+ ### The "Plan First" Rule
115
+ For any non-trivial request, do NOT generate full code immediately. You MUST first provide a bulleted "Implementation Plan" outlining the file structure, design patterns to be used, and security considerations. End your response with: *"Do you approve this plan? If yes, I will generate the code."*
116
+
117
+ ### Self-Correction Protocol
118
+ Before outputting your final code, silently run a self-review against our Clean Code and Security standards. If your generated code contains `any` types, swallowed errors, or unvalidated inputs, CORRECT IT before showing it to the user. Never output code you wouldn't approve in a PR.
119
+
120
+ ### Dependency Defense
121
+ If the user asks to install a new library, or if you feel the need to use one, evaluate it against the "stdlib-first" rule. If the functionality can be implemented safely in under 20 lines of code, write it yourself. If a dependency is strictly necessary, you MUST justify it by providing its bundle size, maintenance status, and why the standard library is insufficient.
122
+
123
+ ## Absolute Clean Code Laws
124
+ 1. **No Lazy Naming:** NEVER use generic variables like `data`, `res`, `temp`, `val`, `x`. Variables must be nouns answering "WHAT is this?". Functions must start with a verb (e.g., `validatePayment`). Booleans must use `is`/`has`/`can`/`should` prefixes.
125
+ 2. **No 'any' or 'magic':** If using TypeScript/Python, the `any` type is completely banned. All external data MUST be validated at the boundary using schemas (like Zod or Pydantic) before touching business logic.
126
+ 3. **Layer Separation:** Business logic does NOT touch HTTP. Database logic does NOT leak into services. No exceptions.
127
+ 4. **Context First:** NEVER write code without checking `.agent-context/rules/` first.
128
+ 5. **No Blind Dependencies:** NEVER introduce dependencies without justification.
129
+
130
+ ## Definition of Done
131
+ **NEVER** declare a task "done" or ready for review without explicitly running and passing `.agent-context/review-checklists/pr-checklist.md`.
@@ -0,0 +1,136 @@
1
+ # Contributing to Agentic-Senior-Core
2
+
3
+ Thanks for wanting to make AI agents write better code. Here's how to contribute.
4
+
5
+ ---
6
+
7
+ ## What You Can Contribute
8
+
9
+ | Type | Where | Description |
10
+ |------|-------|-------------|
11
+ | New rule | `.agent-context/rules/` | Universal engineering standard |
12
+ | New stack | `.agent-context/stacks/` | Language-specific profile (Python, Go, Java, etc.) |
13
+ | New blueprint | `.agent-context/blueprints/` | Project scaffolding template |
14
+ | New checklist | `.agent-context/review-checklists/` | Self-audit guide |
15
+ | State intelligence update | `.agent-context/state/` | Architecture boundaries and dependency map |
16
+ | Override policy update | `.agent-override.md` | Scoped enterprise rule exceptions |
17
+ | MCP workflow update | `mcp.json` | Self-healing automation flow |
18
+ | Bug fix | Any file | Typos, broken links, incorrect examples |
19
+ | Improvement | Any file | Sharper wording, better examples |
20
+
21
+ ---
22
+
23
+ ## Content Quality Standard
24
+
25
+ This is the single most important rule: **every file must be "galak" (strict/fierce).**
26
+
27
+ Your contribution MUST be opinionated, specific, and enforceable. We reject generic advice.
28
+
29
+ ```
30
+ BAD (generic, useless):
31
+ "Use descriptive variable names."
32
+
33
+ GOOD (specific, enforceable):
34
+ "NEVER use single-letter variables except `i` in `for(let i=0; i<n; i++)`.
35
+ Function names MUST start with a verb. Booleans MUST use is/has/can prefix."
36
+ ```
37
+
38
+ ### The Litmus Test
39
+ - Does your rule include concrete BANNED / REQUIRED examples?
40
+ - Would an AI agent be able to enforce it without ambiguity?
41
+ - Does it teach the reader WHY, not just WHAT?
42
+
43
+ If all three are "yes", it belongs here.
44
+
45
+ ---
46
+
47
+ ## How to Add a New Stack Profile (e.g., Python)
48
+
49
+ 1. Create `.agent-context/stacks/python.md`
50
+ 2. Follow the structure of `stacks/typescript.md`:
51
+ - Compiler/linter configuration (non-negotiable settings)
52
+ - Type system rules (the equivalent of "ban any")
53
+ - Validation at boundaries (Pydantic, marshmallow, etc.)
54
+ - Import conventions
55
+ - Async patterns
56
+ - Preferred libraries with justification
57
+ - Banned patterns with alternatives
58
+ 3. Update `AGENTS.md` to add the new stack to the manifest table
59
+ 4. Run `bun scripts/validate.ts` to verify everything links correctly
60
+ 5. Open a PR
61
+
62
+ ---
63
+
64
+ ## How to Add a New Blueprint
65
+
66
+ 1. Create `.agent-context/blueprints/<framework-name>.md`
67
+ 2. Include:
68
+ - Tech stack summary
69
+ - Complete directory structure
70
+ - Code patterns for each layer (with full examples)
71
+ - Environment validation setup
72
+ - Error handling setup
73
+ - Scaffolding checklist
74
+ 3. Update `AGENTS.md` manifest
75
+ 4. Update `prompts/init-project.md` available blueprints table
76
+ 5. Validate and PR
77
+
78
+ ---
79
+
80
+ ## How to Add a New Rule
81
+
82
+ 1. Create `.agent-context/rules/<rule-name>.md`
83
+ 2. Structure:
84
+ - Opening quote (sets the tone)
85
+ - Core principle (1-2 sentences)
86
+ - BANNED / REQUIRED sections with code examples
87
+ - Decision tree or quick reference (if applicable)
88
+ 3. Update `AGENTS.md` rules manifest table
89
+ 4. Update `review-checklists/pr-checklist.md` if the rule should be checked in reviews
90
+ 5. Validate and PR
91
+
92
+ ---
93
+
94
+ ## PR Process
95
+
96
+ 1. **Fork** the repository
97
+ 2. **Branch** from `main`: `feat/add-python-stack` or `docs/fix-security-typo`
98
+ 3. **Write** your content following the quality standard above
99
+ 4. **Validate**: `bun scripts/validate.ts` must pass
100
+ 5. **Commit** with Conventional Commits: `feat(stacks): add Python profile`
101
+ 6. **Open PR** with:
102
+ - What you added/changed
103
+ - Why it matters
104
+ - Which manifest files you updated
105
+
106
+ ---
107
+
108
+ ## What We Don't Accept
109
+
110
+ - Generic content that reads like it was auto-generated without thought
111
+ - Rules without concrete code examples
112
+ - Stack profiles for languages the author doesn't actually use in production
113
+ - Blueprints that are just folder structures without code patterns
114
+ - PRs that don't update the relevant manifest files (AGENTS.md, checklists)
115
+
116
+ ---
117
+
118
+ ## Local Development
119
+
120
+ ```bash
121
+ # Clone
122
+ git clone https://github.com/fatidaprilian/Agentic-Senior-Core.git
123
+ cd Agentic-Senior-Core
124
+
125
+ # Validate
126
+ bun run validate
127
+
128
+ # Test interactive CLI
129
+ node ./bin/agentic-senior-core.js init /tmp/test-project
130
+ ```
131
+
132
+ ---
133
+
134
+ ## Questions?
135
+
136
+ Open an issue. Describe what you want to add and why. We'll help you shape it before you write 500 lines of documentation nobody asked for.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Agentic-Senior-Core Contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,239 @@
1
+ <div align="center">
2
+
3
+ # Agentic-Senior-Core
4
+
5
+ ### Force your AI Agent to code like a Staff Engineer, not a Junior.
6
+
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
8
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)
9
+
10
+ **Universal engineering standards for AI coding agents.**
11
+ Works with Cursor · Windsurf · GitHub Copilot · Claude Code · Gemini · Any LLM-powered IDE.
12
+
13
+ </div>
14
+
15
+ ---
16
+
17
+ ## What is This?
18
+
19
+ This is **not** a boilerplate. It's a **dynamic governance engine**: strict engineering rules, stack profiles, blueprints, review checklists, override policies, and state maps that keep AI output production-grade.
20
+
21
+ Think of it as giving your AI pair programmer **10 years of production experience** through carefully crafted instructions and guardrails.
22
+
23
+ ### Before Agentic-Senior-Core
24
+ ```text
25
+ You: "Build me a user registration API"
26
+ AI: *Creates a single file with no validation, any types, console.log,
27
+ hardcoded secrets, no error handling, and 47 TODO comments*
28
+ ```
29
+
30
+ ### After Agentic-Senior-Core
31
+ ```text
32
+ You: "Build me a user registration API"
33
+ AI: *Creates properly layered modules with Zod validation, typed errors,
34
+ structured logging, security headers, tests, and API documentation*
35
+ ```
36
+
37
+ ---
38
+
39
+ ## Quick Start
40
+
41
+ ### Zero-Install: GitHub Template (New user friendly!)
42
+
43
+ The absolute fastest way to start your next top-tier project is to use this repository as a template.
44
+ The **Use this template** button is in the GitHub repository header (top-right area), not inside this README text.
45
+ If you prefer a direct link, open: **[Create from template](https://github.com/fatidaprilian/Agentic-Senior-Core/generate)**.
46
+ Your new repository will instantly possess all the rules, configurations, and AI context files directly out of the box — zero CLI needed.
47
+
48
+ ### Option 1: Interactive via GitHub Source (Pre-publish friendly)
49
+
50
+ If npm package publication is not ready yet, run the CLI directly from GitHub and still keep the full interactive experience.
51
+
52
+ ```bash
53
+ npm exec --yes --package=github:fatidaprilian/Agentic-Senior-Core agentic-senior-core init .
54
+ ```
55
+
56
+ This gives the same interactive prompts to choose your profile (`beginner`, `balanced`, `strict`), stack, blueprint, and CI guardrails.
57
+
58
+ ### Option 2: GitHub Bootstrap Scripts (No npx required)
59
+
60
+ Run directly from this repository bootstrap script and inject rules into your project root.
61
+
62
+ Bootstrap script paths: `scripts/init-project.ps1` (Windows) and `scripts/init-project.sh` (Linux/macOS).
63
+
64
+ Windows PowerShell:
65
+
66
+ ```powershell
67
+ powershell -ExecutionPolicy Bypass -File .\scripts\init-project.ps1 -TargetDirectory . -Profile balanced -Stack typescript -Blueprint api-nextjs -Ci true
68
+ ```
69
+
70
+ Linux/macOS Bash:
71
+
72
+ ```bash
73
+ bash ./scripts/init-project.sh . --profile balanced --stack typescript --blueprint api-nextjs --ci true
74
+ ```
75
+
76
+ Both scripts clone Agentic-Senior-Core into a temporary directory, run the same CLI engine, then clean up automatically.
77
+
78
+ If you want interactive selection, omit `-Profile`, `-Stack`, `-Blueprint`, and `-Ci` on the script command.
79
+
80
+ ### Option 3: Interactive Auto-Setup via npm/npx (Post-publish)
81
+
82
+ If you have an existing project and want to infuse it with Staff-level context:
83
+
84
+ ```bash
85
+ npx @fatidaprilian/agentic-senior-core init
86
+ ```
87
+
88
+ Use team defaults (V1.6 track) with profile packs:
89
+
90
+ ```bash
91
+ npx @fatidaprilian/agentic-senior-core init --profile-pack startup
92
+ ```
93
+
94
+ The CLI is smart. It auto-detects your current development stack, helps you build a governance profile (select from `beginner`, `balanced`, or `strict`), and writes the compiled rules straight to your root automatically!
95
+
96
+ If you are totally new to concepts like blueprints and guardrails, no problem — just run:
97
+ ```bash
98
+ npx @fatidaprilian/agentic-senior-core init --newbie
99
+ ```
100
+
101
+ ### Option 4: Clone and Play
102
+ Want to poke around under the hood? Just clone the repo and `npx @fatidaprilian/agentic-senior-core init` locally. No runtime dependencies needed — everything uses native Node.js!
103
+
104
+ ### Upgrade Existing Governance Packs (V1.6)
105
+
106
+ Preview migration changes safely:
107
+
108
+ ```bash
109
+ npx @fatidaprilian/agentic-senior-core upgrade --dry-run
110
+ ```
111
+
112
+ Apply migration updates:
113
+
114
+ ```bash
115
+ npx @fatidaprilian/agentic-senior-core upgrade --yes
116
+ ```
117
+
118
+ ---
119
+
120
+ ## Further Reading
121
+
122
+ Our documentation has shifted into dedicated tracks to keep this README light:
123
+ - **[FAQ / Concepts](docs/faq.md)**: Unfamiliar with Stacks, Blueprints, or Guardrails? Stalled on basic logic? Start here.
124
+ - **[Deep Dive / Internals](docs/deep-dive.md)**: Explore the dynamic compiler, severity profiles, MCP integration, and granular LLM overrides here.
125
+
126
+ ---
127
+
128
+ ## Core Capabilities
129
+
130
+ - **Delivery Engine (CLI):** Interactive setup via GitHub source, bootstrap scripts, or `npx` after publish.
131
+ - **Dynamic Context Compiler:** Merges universal rules + selected stack + selected blueprint + optional CI guardrails into one dense, indexed rule file.
132
+ - **Codebase Intelligence:** `.agent-context/state/` gives architecture/dependency boundaries so the agent understands high-risk areas.
133
+ - **Override System:** `.agent-override.md` allows controlled enterprise exceptions without forking core rules.
134
+ - **Automated Guardrails:** CI blueprints include LLM-as-a-Judge flow using `pr-checklist.md`.
135
+ - **Machine-Readable CI Output:** LLM Judge emits `JSON_REPORT` payloads and writes `.agent-context/state/llm-judge-report.json` for PR/MR annotation tooling.
136
+ - **MCP Self-Healing Loop:** `mcp.json` defines diagnostics + fix proposal workflow when lint/CI fails.
137
+
138
+ ---
139
+
140
+ ## Repository Structure
141
+
142
+ ```text
143
+ .
144
+ ├── .cursorrules # Dynamic compiled governance entry point
145
+ ├── .windsurfrules # Dynamic compiled governance entry point
146
+ ├── .agent-override.md # Team-specific exceptions (scoped + expiry)
147
+ ├── mcp.json # MCP self-healing workflow config
148
+ ├── AGENTS.md # Universal agent discovery
149
+ ├── .github/copilot-instructions.md # GitHub Copilot entry point
150
+ ├── .gemini/instructions.md # Antigravity / Gemini entry point
151
+ ├── bin/
152
+ │ └── agentic-senior-core.js # Interactive CLI (Delivery Engine)
153
+ ├── .agent-context/
154
+ │ ├── rules/ # Universal engineering laws
155
+ │ ├── stacks/ # Language-specific profiles
156
+ │ ├── blueprints/ # Scaffolding and pipeline templates
157
+ │ ├── review-checklists/ # AI self-audit guides
158
+ │ ├── prompts/ # Ready-to-use prompts
159
+ │ └── state/ # Architecture and dependency state maps
160
+ │ ├── architecture-map.md
161
+ │ └── dependency-map.md
162
+ ├── scripts/
163
+ │ ├── validate.mjs # Repository validator
164
+ │ ├── llm-judge.mjs # LLM-as-a-Judge CI gate
165
+ │ ├── init-project.sh # GitHub bootstrap script (Linux/macOS)
166
+ │ └── init-project.ps1 # GitHub bootstrap script (Windows)
167
+ ├── docs/
168
+ │ ├── faq.md
169
+ │ └── deep-dive.md
170
+ ├── tests/
171
+ │ ├── cli-smoke.test.mjs
172
+ │ └── llm-judge.test.mjs
173
+ ├── package.json
174
+ ├── CONTRIBUTING.md
175
+ ├── LICENSE
176
+ └── README.md
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Validation
182
+
183
+ Ensure everything is running smoothly before merging rules patches:
184
+
185
+ ```bash
186
+ npm run validate
187
+ ```
188
+
189
+ Track stack-detection KPI trends:
190
+
191
+ ```bash
192
+ npm run benchmark:detection
193
+ ```
194
+
195
+ ---
196
+
197
+ ## Roadmap
198
+
199
+ ### Completed Milestones
200
+ - V1.0 to V1.3: Core rules, multi-language stacks, advanced architecture patterns, and infrastructure blueprints.
201
+ - V1.4: Dynamic Governance Engine (interactive CLI, context compiler, state maps, override system, guardrails, MCP self-healing).
202
+ - V1.5: Newbie-First Experience (Node-first runtime, zero-install onboarding path, smart auto-detection, profile presets, LLM severity thresholds, docs split, smoke tests).
203
+
204
+ ### V1.6 (Released) — Enterprise Reliability and Team Workflow
205
+ - Team profile packs and safer override governance shipped.
206
+ - CI annotation standardization and stronger detection transparency shipped.
207
+ - Upgrade assistant and benchmark coverage shipped.
208
+
209
+ ### V1.7 (Released) — Frontend Product Experience Governance Pack
210
+ - Frontend usability checklist, execution playbook, and issue template shipped.
211
+ - Frontend usability audit script and CI artifact workflow shipped.
212
+
213
+ ### V1.8 (Released) — Enterprise Release Operations and Compliance
214
+ - Release-gate automation shipped with machine-readable artifact output.
215
+ - CycloneDX SBOM generation and compliance artifact workflow shipped.
216
+ - Operations playbook and release-operations checklist shipped.
217
+
218
+ Detailed timeline and success metrics: [docs/roadmap.md](docs/roadmap.md)
219
+
220
+ ---
221
+
222
+ ## Contributing
223
+
224
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution standards and workflow.
225
+
226
+ ---
227
+
228
+ ## License
229
+
230
+ MIT — Use freely, enforce strictly.
231
+
232
+ ---
233
+
234
+ <div align="center">
235
+
236
+ **Stop letting AI write junior code.**
237
+ **Give it the rules of a Staff Engineer.**
238
+
239
+ </div>