@ryuenn3123/agentic-senior-core 2.5.22 → 3.0.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/init-project.md +5 -5
- package/.agent-context/prompts/refactor.md +2 -1
- package/.agent-context/prompts/review-code.md +3 -2
- package/.agent-context/review-checklists/pr-checklist.md +8 -1
- package/.agent-context/rules/architecture.md +11 -0
- package/.agent-context/rules/frontend-architecture.md +2 -2
- package/.agent-context/state/architecture-map.md +1 -1
- package/.agent-context/state/memory-continuity-benchmark.json +1 -1
- package/.agents/workflows/init-project.md +3 -3
- package/.agents/workflows/refactor.md +1 -1
- package/.agents/workflows/review-code.md +4 -5
- package/.cursorrules +27 -71
- package/.gemini/instructions.md +6 -7
- package/.github/copilot-instructions.md +5 -6
- package/.windsurfrules +27 -71
- package/AGENTS.md +7 -9
- package/CONTRIBUTING.md +18 -31
- package/README.md +21 -4
- package/bin/agentic-senior-core.js +0 -6
- package/lib/cli/commands/init.mjs +113 -650
- package/lib/cli/commands/launch.mjs +1 -23
- package/lib/cli/commands/rollback.mjs +1 -1
- package/lib/cli/commands/upgrade.mjs +1 -23
- package/lib/cli/compiler.mjs +77 -72
- package/lib/cli/constants.mjs +84 -26
- package/lib/cli/init-architecture-flow.mjs +231 -0
- package/lib/cli/init-detection-flow.mjs +123 -0
- package/lib/cli/init-options.mjs +344 -0
- package/lib/cli/init-selection.mjs +100 -0
- package/lib/cli/preflight.mjs +1 -1
- package/lib/cli/profile-packs.mjs +15 -1
- package/lib/cli/project-scaffolder.mjs +18 -154
- package/lib/cli/utils.mjs +16 -12
- package/mcp.json +19 -19
- package/package.json +5 -2
- package/scripts/context-triggered-audit.mjs +18 -18
- package/scripts/documentation-boundary-audit.mjs +92 -5
- package/scripts/forbidden-content-check.mjs +1 -1
- package/scripts/frontend-usability-audit.mjs +21 -28
- package/scripts/governance-weekly-report.mjs +29 -15
- package/scripts/llm-judge.mjs +2 -5
- package/scripts/mcp-server.mjs +389 -5
- package/scripts/release-gate.mjs +121 -145
- package/scripts/sync-thin-adapters.mjs +161 -0
- package/scripts/v3-purge-audit.mjs +231 -0
- package/scripts/validate-evidence-bundle.mjs +1 -1
- package/scripts/validate.mjs +224 -272
- package/.agent-context/blueprints/api-nextjs.md +0 -184
- package/.agent-context/blueprints/aspnet-api.md +0 -247
- package/.agent-context/blueprints/ci-github-actions.md +0 -226
- package/.agent-context/blueprints/ci-gitlab.md +0 -200
- package/.agent-context/blueprints/fastapi-service.md +0 -210
- package/.agent-context/blueprints/go-service.md +0 -217
- package/.agent-context/blueprints/graphql-grpc-api.md +0 -51
- package/.agent-context/blueprints/infrastructure-as-code.md +0 -62
- package/.agent-context/blueprints/kubernetes-manifests.md +0 -76
- package/.agent-context/blueprints/laravel-api.md +0 -233
- package/.agent-context/blueprints/mobile-app.md +0 -91
- package/.agent-context/blueprints/nestjs-logic.md +0 -247
- package/.agent-context/blueprints/observability.md +0 -227
- package/.agent-context/blueprints/spring-boot-api.md +0 -218
- package/.agent-context/profiles/platform.md +0 -13
- package/.agent-context/profiles/regulated.md +0 -13
- package/.agent-context/profiles/startup.md +0 -13
- package/.agent-context/review-checklists/frontend-excellence-rubric.md +0 -73
- package/.agent-context/review-checklists/frontend-skill-parity.md +0 -29
- package/.agent-context/review-checklists/frontend-usability.md +0 -35
- package/.agent-context/review-checklists/marketplace-acceptance.md +0 -60
- package/.agent-context/review-checklists/performance-audit.md +0 -71
- package/.agent-context/review-checklists/release-operations.md +0 -33
- package/.agent-context/review-checklists/security-audit.md +0 -119
- package/.agent-context/skills/README.md +0 -63
- package/.agent-context/skills/backend/README.md +0 -68
- package/.agent-context/skills/backend/architecture.md +0 -361
- package/.agent-context/skills/backend/compatibility-manifest.json +0 -8
- package/.agent-context/skills/backend/data-access.md +0 -231
- package/.agent-context/skills/backend/errors.md +0 -138
- package/.agent-context/skills/backend/validation.md +0 -117
- package/.agent-context/skills/backend.md +0 -29
- package/.agent-context/skills/cli/.evidence/compatibility-manifest.json +0 -5
- package/.agent-context/skills/cli/.evidence/sbom-excerpt.json +0 -10
- package/.agent-context/skills/cli/.evidence/test-report.json +0 -8
- package/.agent-context/skills/cli/CHANGELOG.md +0 -6
- package/.agent-context/skills/cli/README.md +0 -56
- package/.agent-context/skills/cli/compatibility-manifest.json +0 -8
- package/.agent-context/skills/cli/init.md +0 -38
- package/.agent-context/skills/cli/output.md +0 -36
- package/.agent-context/skills/cli/package.json +0 -5
- package/.agent-context/skills/cli/safety-telemetry.md +0 -39
- package/.agent-context/skills/cli/tests/.gitkeep +0 -1
- package/.agent-context/skills/cli/upgrade.md +0 -38
- package/.agent-context/skills/cli.md +0 -32
- package/.agent-context/skills/distribution/.evidence/compatibility-manifest.json +0 -9
- package/.agent-context/skills/distribution/.evidence/sbom-excerpt.json +0 -6
- package/.agent-context/skills/distribution/.evidence/test-report.json +0 -8
- package/.agent-context/skills/distribution/CHANGELOG.md +0 -7
- package/.agent-context/skills/distribution/README.md +0 -27
- package/.agent-context/skills/distribution/compatibility-manifest.json +0 -8
- package/.agent-context/skills/distribution/compatibility.md +0 -32
- package/.agent-context/skills/distribution/package.json +0 -5
- package/.agent-context/skills/distribution/provenance-attestation.md +0 -47
- package/.agent-context/skills/distribution/publish.md +0 -37
- package/.agent-context/skills/distribution/rollback.md +0 -32
- package/.agent-context/skills/distribution/tests/.gitkeep +0 -1
- package/.agent-context/skills/distribution.md +0 -32
- package/.agent-context/skills/frontend/.evidence/compatibility-manifest.json +0 -9
- package/.agent-context/skills/frontend/.evidence/sbom-excerpt.json +0 -6
- package/.agent-context/skills/frontend/.evidence/test-report.json +0 -8
- package/.agent-context/skills/frontend/CHANGELOG.md +0 -7
- package/.agent-context/skills/frontend/README.md +0 -50
- package/.agent-context/skills/frontend/accessibility.md +0 -107
- package/.agent-context/skills/frontend/compatibility-manifest.json +0 -8
- package/.agent-context/skills/frontend/conversion-clarity.md +0 -51
- package/.agent-context/skills/frontend/motion.md +0 -67
- package/.agent-context/skills/frontend/package.json +0 -5
- package/.agent-context/skills/frontend/performance.md +0 -63
- package/.agent-context/skills/frontend/responsive-delivery.md +0 -41
- package/.agent-context/skills/frontend/tests/.gitkeep +0 -1
- package/.agent-context/skills/frontend/ui-architecture.md +0 -128
- package/.agent-context/skills/frontend.md +0 -40
- package/.agent-context/skills/fullstack/.evidence/compatibility-manifest.json +0 -9
- package/.agent-context/skills/fullstack/.evidence/sbom-excerpt.json +0 -6
- package/.agent-context/skills/fullstack/.evidence/test-report.json +0 -8
- package/.agent-context/skills/fullstack/CHANGELOG.md +0 -7
- package/.agent-context/skills/fullstack/README.md +0 -27
- package/.agent-context/skills/fullstack/compatibility-manifest.json +0 -8
- package/.agent-context/skills/fullstack/contracts.md +0 -53
- package/.agent-context/skills/fullstack/end-to-end.md +0 -42
- package/.agent-context/skills/fullstack/feature-slicing.md +0 -65
- package/.agent-context/skills/fullstack/package.json +0 -5
- package/.agent-context/skills/fullstack/release-coordination.md +0 -51
- package/.agent-context/skills/fullstack/tests/.gitkeep +0 -1
- package/.agent-context/skills/fullstack.md +0 -30
- package/.agent-context/skills/index.json +0 -107
- package/.agent-context/skills/review-quality/.evidence/compatibility-manifest.json +0 -9
- package/.agent-context/skills/review-quality/.evidence/sbom-excerpt.json +0 -6
- package/.agent-context/skills/review-quality/.evidence/test-report.json +0 -8
- package/.agent-context/skills/review-quality/CHANGELOG.md +0 -7
- package/.agent-context/skills/review-quality/README.md +0 -27
- package/.agent-context/skills/review-quality/benchmark.md +0 -30
- package/.agent-context/skills/review-quality/compatibility-manifest.json +0 -8
- package/.agent-context/skills/review-quality/package.json +0 -5
- package/.agent-context/skills/review-quality/planning.md +0 -38
- package/.agent-context/skills/review-quality/release-decision.md +0 -49
- package/.agent-context/skills/review-quality/security.md +0 -34
- package/.agent-context/skills/review-quality/tests/.gitkeep +0 -1
- package/.agent-context/skills/review-quality.md +0 -34
- package/.agent-context/stacks/csharp.md +0 -149
- package/.agent-context/stacks/flutter.md +0 -16
- package/.agent-context/stacks/go.md +0 -181
- package/.agent-context/stacks/java.md +0 -135
- package/.agent-context/stacks/php.md +0 -192
- package/.agent-context/stacks/python.md +0 -153
- package/.agent-context/stacks/react-native.md +0 -16
- package/.agent-context/stacks/ruby.md +0 -80
- package/.agent-context/stacks/rust.md +0 -86
- package/.agent-context/stacks/typescript.md +0 -317
- package/.agent-context/state/skill-platform.json +0 -38
- package/lib/cli/skill-selector.mjs +0 -232
- package/lib/cli/templates/api-contract.md.id.tmpl +0 -143
- package/lib/cli/templates/api-contract.md.tmpl +0 -143
- package/lib/cli/templates/architecture-decision-record.md.id.tmpl +0 -106
- package/lib/cli/templates/architecture-decision-record.md.tmpl +0 -145
- package/lib/cli/templates/database-schema.md.id.tmpl +0 -74
- package/lib/cli/templates/database-schema.md.tmpl +0 -74
- package/lib/cli/templates/flow-overview.md.id.tmpl +0 -118
- package/lib/cli/templates/flow-overview.md.tmpl +0 -131
- package/lib/cli/templates/project-brief.md.id.tmpl +0 -55
- package/lib/cli/templates/project-brief.md.tmpl +0 -79
- package/scripts/init-project.ps1 +0 -105
- package/scripts/init-project.sh +0 -131
- package/scripts/skill-tier-policy.mjs +0 -76
- package/scripts/trust-scorer.mjs +0 -119
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Benchmarking
|
|
2
|
-
|
|
3
|
-
Tier: ADVANCE
|
|
4
|
-
|
|
5
|
-
Benchmarking should guide release decisions with measurable evidence rather than anecdotal impressions.
|
|
6
|
-
|
|
7
|
-
## Benchmark Inputs
|
|
8
|
-
|
|
9
|
-
- Baseline benchmark snapshot.
|
|
10
|
-
- Current candidate benchmark output.
|
|
11
|
-
- Threshold policy for acceptable deltas.
|
|
12
|
-
|
|
13
|
-
## Evaluation Rules
|
|
14
|
-
|
|
15
|
-
- Treat regressions above threshold as release blockers.
|
|
16
|
-
- Require owner assignment for all negative deltas.
|
|
17
|
-
- Re-run benchmark after remediation to verify recovery.
|
|
18
|
-
|
|
19
|
-
## Reporting Standard
|
|
20
|
-
|
|
21
|
-
- Include benchmark summary in release bundle.
|
|
22
|
-
- Keep machine-readable JSON output for automation.
|
|
23
|
-
- Track trend over time, not only single-run status.
|
|
24
|
-
|
|
25
|
-
## Review Checklist
|
|
26
|
-
|
|
27
|
-
- [ ] Baseline and current benchmark are comparable.
|
|
28
|
-
- [ ] Threshold policy is applied consistently.
|
|
29
|
-
- [ ] Regressions have owner and due date.
|
|
30
|
-
- [ ] Reports are archived for audit trail.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Planning
|
|
2
|
-
|
|
3
|
-
Tier: EXPERT
|
|
4
|
-
|
|
5
|
-
Planning quality determines implementation quality. Non-trivial work should start with a scoped, testable plan.
|
|
6
|
-
|
|
7
|
-
## Planning Standard
|
|
8
|
-
|
|
9
|
-
- Define objective, scope, and non-goals.
|
|
10
|
-
- Identify architecture boundaries affected.
|
|
11
|
-
- Document risk, rollback, and validation strategy.
|
|
12
|
-
- Break work into reviewable increments.
|
|
13
|
-
|
|
14
|
-
## Required Plan Artifacts
|
|
15
|
-
|
|
16
|
-
- Implementation steps with expected output.
|
|
17
|
-
- File impact map.
|
|
18
|
-
- Test strategy and acceptance criteria.
|
|
19
|
-
- Migration notes if behavior changes.
|
|
20
|
-
|
|
21
|
-
## Scope Control
|
|
22
|
-
|
|
23
|
-
- Avoid unrelated refactors in feature commits.
|
|
24
|
-
- Split high-risk work into isolated checkpoints.
|
|
25
|
-
- Preserve public API compatibility unless explicitly versioned.
|
|
26
|
-
|
|
27
|
-
## Evidence Discipline
|
|
28
|
-
|
|
29
|
-
- Attach command output for validation and test evidence.
|
|
30
|
-
- Keep assumption logs explicit so reviewers can challenge unknowns early.
|
|
31
|
-
- Ensure rollback path is documented before implementation starts.
|
|
32
|
-
|
|
33
|
-
## Review Checklist
|
|
34
|
-
|
|
35
|
-
- [ ] Plan includes explicit success criteria.
|
|
36
|
-
- [ ] Risks and mitigations are documented.
|
|
37
|
-
- [ ] Validation commands are defined.
|
|
38
|
-
- [ ] Scope remains aligned with original objective.
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
# Release Decisioning
|
|
2
|
-
|
|
3
|
-
Tier: EXPERT
|
|
4
|
-
|
|
5
|
-
Release decisioning converts technical signals into explicit ship, hold, or rollback recommendations with ownership.
|
|
6
|
-
|
|
7
|
-
## Decision Inputs
|
|
8
|
-
|
|
9
|
-
Use a standardized input set for every release review:
|
|
10
|
-
|
|
11
|
-
- Validation and test status.
|
|
12
|
-
- Release gate and forbidden-content status.
|
|
13
|
-
- Benchmark and quality trend posture.
|
|
14
|
-
- Security and architecture findings.
|
|
15
|
-
- Trust-tier posture for required skill domains.
|
|
16
|
-
|
|
17
|
-
## Decision Outcomes
|
|
18
|
-
|
|
19
|
-
Each review must conclude with one outcome:
|
|
20
|
-
|
|
21
|
-
- Ship: all mandatory gates pass and no unresolved critical findings.
|
|
22
|
-
- Hold: one or more blockers remain unresolved.
|
|
23
|
-
- Rollback: post-release signal confirms unacceptable risk or regression.
|
|
24
|
-
|
|
25
|
-
## Blocker Policy
|
|
26
|
-
|
|
27
|
-
A blocker record needs:
|
|
28
|
-
|
|
29
|
-
- Title and category.
|
|
30
|
-
- Owner and deadline.
|
|
31
|
-
- User impact statement.
|
|
32
|
-
- Mitigation and validation command.
|
|
33
|
-
|
|
34
|
-
No blocker should remain in implicit or undocumented state.
|
|
35
|
-
|
|
36
|
-
## Escalation Rules
|
|
37
|
-
|
|
38
|
-
Escalate to maintainers immediately when:
|
|
39
|
-
|
|
40
|
-
- Critical security issue is detected.
|
|
41
|
-
- Gate output becomes inconsistent across environments.
|
|
42
|
-
- Rollback readiness cannot be proven.
|
|
43
|
-
|
|
44
|
-
## Review Checklist
|
|
45
|
-
|
|
46
|
-
- [ ] Decision outcome is explicit (ship/hold/rollback).
|
|
47
|
-
- [ ] Blockers include owner and due date.
|
|
48
|
-
- [ ] Validation evidence is attached to decision log.
|
|
49
|
-
- [ ] Escalation happened for critical unresolved risks.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Security
|
|
2
|
-
|
|
3
|
-
Tier: EXPERT
|
|
4
|
-
|
|
5
|
-
Security review is a release gate. Critical vulnerabilities must halt feature rollout until resolved.
|
|
6
|
-
|
|
7
|
-
## Security Halt Policy
|
|
8
|
-
|
|
9
|
-
Immediately block release when any of the following are present:
|
|
10
|
-
- Hardcoded credentials or tokens.
|
|
11
|
-
- Injection vulnerabilities (SQL/command/template).
|
|
12
|
-
- Authentication or authorization bypass.
|
|
13
|
-
- Unvalidated external input entering privileged paths.
|
|
14
|
-
|
|
15
|
-
## Boundary Safeguards
|
|
16
|
-
|
|
17
|
-
- Validate external input at transport boundary.
|
|
18
|
-
- Enforce parameterized queries.
|
|
19
|
-
- Limit privilege scope for runtime credentials.
|
|
20
|
-
- Keep secrets in approved secret stores.
|
|
21
|
-
|
|
22
|
-
## Review Expectations
|
|
23
|
-
|
|
24
|
-
- Threat model relevant attack surfaces.
|
|
25
|
-
- Verify dependency vulnerability posture.
|
|
26
|
-
- Confirm error messages do not leak sensitive internals.
|
|
27
|
-
- Confirm audit logs exist for security-sensitive actions.
|
|
28
|
-
|
|
29
|
-
## Review Checklist
|
|
30
|
-
|
|
31
|
-
- [ ] No critical vulnerability remains open.
|
|
32
|
-
- [ ] Input and output boundaries are validated.
|
|
33
|
-
- [ ] Secret handling follows policy.
|
|
34
|
-
- [ ] Least-privilege access is enforced.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Review-quality skill test fixtures placeholder
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
# Review Quality Skill Pack
|
|
2
|
-
|
|
3
|
-
Default tier: `expert`
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
Turn code review, planning, and benchmark output into explicit quality decisions.
|
|
7
|
-
|
|
8
|
-
## In Scope
|
|
9
|
-
- Plan-first workflows
|
|
10
|
-
- Reviewer self-critique
|
|
11
|
-
- Benchmark interpretation
|
|
12
|
-
- Security and architecture audits
|
|
13
|
-
- Evidence-driven approval
|
|
14
|
-
- Explicit release decisions with blocker tracking and ownership
|
|
15
|
-
|
|
16
|
-
## Must-Have Checks
|
|
17
|
-
- Every rejection includes a reason and a fix
|
|
18
|
-
- Every approval includes evidence
|
|
19
|
-
- Benchmark deltas are explicit
|
|
20
|
-
- Security findings stop release when critical
|
|
21
|
-
- Release readiness verdict includes blockers, owner, and due date
|
|
22
|
-
- Formal review artifacts use plain, human-first language and avoid AI cliches
|
|
23
|
-
- No emoji in formal review output, release notes, and governance summaries
|
|
24
|
-
- Claims include measurable evidence with source and timestamp
|
|
25
|
-
|
|
26
|
-
## Evidence
|
|
27
|
-
- PR review report
|
|
28
|
-
- Security audit output
|
|
29
|
-
- Benchmark report
|
|
30
|
-
- Approval or rejection rationale
|
|
31
|
-
- Weekly governance report and release readiness summary
|
|
32
|
-
|
|
33
|
-
## Fallback
|
|
34
|
-
- Standard mode can be used only for low-risk maintenance and still requires written evidence.
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
# C# / .NET Stack Profile — Modern C#, Minimal Ceremony
|
|
2
|
-
|
|
3
|
-
> C# has evolved massively. Use the modern features.
|
|
4
|
-
> If your code looks like it's from 2015, it's wrong.
|
|
5
|
-
|
|
6
|
-
## Language Version: C# 14+ / .NET 10 LTS
|
|
7
|
-
|
|
8
|
-
.NET 10 is the latest LTS release (November 2025, 3 years support). C# 14 ships with .NET 10. Use modern features: records, primary constructors, extension members, nullable reference types.
|
|
9
|
-
|
|
10
|
-
### Nullable Reference Types (Mandatory)
|
|
11
|
-
```xml
|
|
12
|
-
<!-- In .csproj — ALWAYS enabled -->
|
|
13
|
-
<PropertyGroup>
|
|
14
|
-
<Nullable>enable</Nullable>
|
|
15
|
-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
|
16
|
-
</PropertyGroup>
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
### Records for DTOs and Value Objects
|
|
20
|
-
```csharp
|
|
21
|
-
// BANNED: Mutable class with manual properties
|
|
22
|
-
public class UserDto {
|
|
23
|
-
public string Name { get; set; }
|
|
24
|
-
public string Email { get; set; }
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// REQUIRED: Immutable record
|
|
28
|
-
public record CreateUserRequest(string Name, string Email, int Age);
|
|
29
|
-
public record UserResponse(Guid Id, string Name, string Email, DateTime CreatedAt);
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
### Primary Constructors (C# 12+)
|
|
33
|
-
```csharp
|
|
34
|
-
// Clean dependency injection
|
|
35
|
-
public class UserService(IUserRepository userRepository, ILogger<UserService> logger)
|
|
36
|
-
{
|
|
37
|
-
public async Task<UserResponse> CreateAsync(CreateUserRequest request)
|
|
38
|
-
{
|
|
39
|
-
logger.LogInformation("Creating user {Email}", request.Email);
|
|
40
|
-
var user = await userRepository.CreateAsync(request);
|
|
41
|
-
return user.ToResponse();
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Validation at Boundaries
|
|
49
|
-
|
|
50
|
-
### Minimal API with FluentValidation
|
|
51
|
-
```csharp
|
|
52
|
-
public class CreateUserValidator : AbstractValidator<CreateUserRequest>
|
|
53
|
-
{
|
|
54
|
-
public CreateUserValidator()
|
|
55
|
-
{
|
|
56
|
-
RuleFor(x => x.Name).NotEmpty().MaximumLength(100);
|
|
57
|
-
RuleFor(x => x.Email).NotEmpty().EmailAddress();
|
|
58
|
-
RuleFor(x => x.Age).InclusiveBetween(13, 150);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
app.MapPost("/users", async (CreateUserRequest request, IValidator<CreateUserRequest> validator,
|
|
63
|
-
UserService userService) =>
|
|
64
|
-
{
|
|
65
|
-
var validation = await validator.ValidateAsync(request);
|
|
66
|
-
if (!validation.IsValid)
|
|
67
|
-
return Results.ValidationProblem(validation.ToDictionary());
|
|
68
|
-
|
|
69
|
-
var user = await userService.CreateAsync(request);
|
|
70
|
-
return Results.Created($"/users/{user.Id}", user);
|
|
71
|
-
});
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Project Structure
|
|
77
|
-
|
|
78
|
-
```
|
|
79
|
-
ProjectName/
|
|
80
|
-
├── src/
|
|
81
|
-
│ ├── ProjectName.Api/ # Presentation/Transport layer
|
|
82
|
-
│ │ ├── Program.cs # Entry point + DI setup
|
|
83
|
-
│ │ ├── Endpoints/
|
|
84
|
-
│ │ │ ├── UserEndpoints.cs # Minimal API route definitions
|
|
85
|
-
│ │ │ └── OrderEndpoints.cs
|
|
86
|
-
│ │ ├── Middleware/
|
|
87
|
-
│ │ │ └── ExceptionMiddleware.cs
|
|
88
|
-
│ │ └── appsettings.json
|
|
89
|
-
│ │
|
|
90
|
-
│ ├── ProjectName.Application/ # Business logic layer
|
|
91
|
-
│ │ ├── Users/
|
|
92
|
-
│ │ │ ├── UserService.cs
|
|
93
|
-
│ │ │ ├── CreateUserRequest.cs # DTOs / records
|
|
94
|
-
│ │ │ └── UserResponse.cs
|
|
95
|
-
│ │ └── Common/
|
|
96
|
-
│ │ ├── AppError.cs
|
|
97
|
-
│ │ └── IUnitOfWork.cs
|
|
98
|
-
│ │
|
|
99
|
-
│ ├── ProjectName.Domain/ # Domain entities (no dependencies)
|
|
100
|
-
│ │ ├── Entities/
|
|
101
|
-
│ │ │ └── User.cs
|
|
102
|
-
│ │ └── Interfaces/
|
|
103
|
-
│ │ └── IUserRepository.cs # Repository contracts
|
|
104
|
-
│ │
|
|
105
|
-
│ └── ProjectName.Infrastructure/ # Data access, external services
|
|
106
|
-
│ ├── Persistence/
|
|
107
|
-
│ │ ├── AppDbContext.cs # EF Core DbContext
|
|
108
|
-
│ │ └── UserRepository.cs # Repository implementation
|
|
109
|
-
│ ├── Migrations/
|
|
110
|
-
│ └── DependencyInjection.cs # Extension methods for DI
|
|
111
|
-
│
|
|
112
|
-
└── tests/
|
|
113
|
-
├── ProjectName.UnitTests/
|
|
114
|
-
└── ProjectName.IntegrationTests/
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
---
|
|
118
|
-
|
|
119
|
-
## Preferred Libraries
|
|
120
|
-
|
|
121
|
-
| Need | Library | Why |
|
|
122
|
-
|------|---------|-----|
|
|
123
|
-
| Framework | ASP.NET Core 10 Minimal APIs | LTS, lightweight, OpenAPI 3.1, passkey auth |
|
|
124
|
-
| ORM | EF Core 10 | LINQ, migrations, vector search, JSON types |
|
|
125
|
-
| Validation | FluentValidation | Expressive, testable, separates concerns |
|
|
126
|
-
| Testing | xUnit + NSubstitute + Testcontainers | Industry standard for .NET |
|
|
127
|
-
| Logging | Serilog + structured sinks | Best structured logging for .NET |
|
|
128
|
-
| API docs | Swashbuckle / NSwag | OpenAPI auto-generation |
|
|
129
|
-
| Mapping | Mapster or manual extension methods | Mapster faster than AutoMapper |
|
|
130
|
-
| HTTP client | `IHttpClientFactory` | Pooled, resilient, built-in |
|
|
131
|
-
| Configuration | Options pattern + `IOptions<T>` | Type-safe, validated config |
|
|
132
|
-
| Auth | ASP.NET Core Identity / JWT / Passkeys | Built-in passkey support in .NET 10 |
|
|
133
|
-
| Cloud-native | .NET Aspire | Orchestration, observability, service defaults |
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Banned Patterns
|
|
138
|
-
|
|
139
|
-
| Pattern | Why | Alternative |
|
|
140
|
-
|---------|-----|-------------|
|
|
141
|
-
| `Nullable` disabled | NRE everywhere | Always `<Nullable>enable</Nullable>` |
|
|
142
|
-
| `dynamic` type | No compile-time safety | Generics or strong types |
|
|
143
|
-
| Service Locator | Hidden dependencies | Constructor injection |
|
|
144
|
-
| `async void` | Unhandled exceptions crash the app | `async Task` always |
|
|
145
|
-
| `string.Format` for SQL | SQL injection | EF Core LINQ or parameterized |
|
|
146
|
-
| AutoMapper overuse | Magic mapping hides bugs | Manual mapping or Mapster |
|
|
147
|
-
| Throw in constructor | Breaks DI container | Factory methods or validation |
|
|
148
|
-
| `static` classes for services | Untestable, no DI | Interface + DI registration |
|
|
149
|
-
| Controllers with business logic | Layer leak | Thin controllers, services layer |
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Flutter Stack
|
|
2
|
-
|
|
3
|
-
Use this stack for cross-platform mobile applications built with Flutter.
|
|
4
|
-
|
|
5
|
-
## Core Guidance
|
|
6
|
-
|
|
7
|
-
- Keep presentation widgets small and move state orchestration into dedicated controllers or services.
|
|
8
|
-
- Separate platform channels, navigation, and business rules from widget composition.
|
|
9
|
-
- Validate API payloads at the boundary and avoid spreading transport concerns into UI code.
|
|
10
|
-
- Optimize build and release flows early because mobile packaging regressions are costly.
|
|
11
|
-
|
|
12
|
-
## Recommended Pairings
|
|
13
|
-
|
|
14
|
-
- `mobile-app` blueprint for the starter architecture.
|
|
15
|
-
- `frontend` skill domain for interface composition and interaction design.
|
|
16
|
-
- `fullstack` skill domain when the product includes backend coordination.
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# Go Stack Profile — Simple, Explicit, Fast
|
|
2
|
-
|
|
3
|
-
> Go's superpower is simplicity. Don't fight it.
|
|
4
|
-
> No magic, no abstractions for the sake of abstractions.
|
|
5
|
-
|
|
6
|
-
## Core Principles
|
|
7
|
-
|
|
8
|
-
1. **Accept interfaces, return structs** — keep APIs flexible, implementations concrete
|
|
9
|
-
2. **Errors are values** — handle them explicitly, don't panic
|
|
10
|
-
3. **Stdlib first** — Go's standard library is excellent, use it before reaching for packages
|
|
11
|
-
4. **Small interfaces** — 1-2 methods max. `io.Reader` has one method for a reason
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Error Handling (The Go Way)
|
|
16
|
-
|
|
17
|
-
### Rule: Always Check Errors, Never Ignore
|
|
18
|
-
|
|
19
|
-
```go
|
|
20
|
-
// BANNED: Ignoring errors
|
|
21
|
-
result, _ := doSomething()
|
|
22
|
-
json.Unmarshal(data, &out) // Error silently ignored
|
|
23
|
-
|
|
24
|
-
// REQUIRED: Handle every error
|
|
25
|
-
result, err := doSomething()
|
|
26
|
-
if err != nil {
|
|
27
|
-
return fmt.Errorf("failed to do something: %w", err)
|
|
28
|
-
}
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### Wrapping Errors for Context
|
|
32
|
-
```go
|
|
33
|
-
// BANNED: Bare error return
|
|
34
|
-
if err != nil {
|
|
35
|
-
return err // Caller has no idea where this came from
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// REQUIRED: Wrap with context using %w
|
|
39
|
-
if err != nil {
|
|
40
|
-
return fmt.Errorf("creating user %q: %w", req.Email, err)
|
|
41
|
-
}
|
|
42
|
-
// Produces: "creating user "jane@example.com": duplicate key value"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### Custom Error Types
|
|
46
|
-
```go
|
|
47
|
-
type NotFoundError struct {
|
|
48
|
-
Resource string
|
|
49
|
-
ID string
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
func (e *NotFoundError) Error() string {
|
|
53
|
-
return fmt.Sprintf("%s not found: %s", e.Resource, e.ID)
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Check with errors.As
|
|
57
|
-
var notFound *NotFoundError
|
|
58
|
-
if errors.As(err, ¬Found) {
|
|
59
|
-
http.Error(w, notFound.Error(), http.StatusNotFound)
|
|
60
|
-
}
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## Project Structure
|
|
66
|
-
|
|
67
|
-
```
|
|
68
|
-
project-name/
|
|
69
|
-
├── cmd/
|
|
70
|
-
│ └── server/
|
|
71
|
-
│ └── main.go # Entry point
|
|
72
|
-
│
|
|
73
|
-
├── internal/ # Private application code
|
|
74
|
-
│ ├── user/
|
|
75
|
-
│ │ ├── handler.go # HTTP handlers (transport)
|
|
76
|
-
│ │ ├── service.go # Business logic
|
|
77
|
-
│ │ ├── repository.go # Data access
|
|
78
|
-
│ │ ├── model.go # Domain types
|
|
79
|
-
│ │ └── user_test.go # Tests alongside code
|
|
80
|
-
│ │
|
|
81
|
-
│ ├── order/
|
|
82
|
-
│ │ └── ...
|
|
83
|
-
│ │
|
|
84
|
-
│ └── platform/ # Cross-cutting infrastructure
|
|
85
|
-
│ ├── config/
|
|
86
|
-
│ │ └── config.go # Env-validated configuration
|
|
87
|
-
│ ├── database/
|
|
88
|
-
│ │ └── postgres.go # DB connection setup
|
|
89
|
-
│ ├── logger/
|
|
90
|
-
│ │ └── logger.go # Structured logging (slog)
|
|
91
|
-
│ └── middleware/
|
|
92
|
-
│ ├── auth.go
|
|
93
|
-
│ └── logging.go
|
|
94
|
-
│
|
|
95
|
-
├── api/ # API definitions (OpenAPI, proto)
|
|
96
|
-
│ └── openapi.yaml
|
|
97
|
-
│
|
|
98
|
-
├── go.mod
|
|
99
|
-
├── go.sum
|
|
100
|
-
├── Makefile # Build/test/lint commands
|
|
101
|
-
└── Dockerfile
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Key Rule: `internal/` is Private
|
|
105
|
-
Everything in `internal/` is invisible to external importers. This is Go's built-in encapsulation. Use it.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Interface Design
|
|
110
|
-
|
|
111
|
-
```go
|
|
112
|
-
// BANNED: Large interfaces
|
|
113
|
-
type UserService interface {
|
|
114
|
-
Create(ctx context.Context, req CreateUserReq) (*User, error)
|
|
115
|
-
Update(ctx context.Context, id string, req UpdateUserReq) (*User, error)
|
|
116
|
-
Delete(ctx context.Context, id string) error
|
|
117
|
-
GetByID(ctx context.Context, id string) (*User, error)
|
|
118
|
-
GetByEmail(ctx context.Context, email string) (*User, error)
|
|
119
|
-
ListAll(ctx context.Context) ([]*User, error)
|
|
120
|
-
// 10 more methods...
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// REQUIRED: Small, focused interfaces (1-3 methods)
|
|
124
|
-
type UserCreator interface {
|
|
125
|
-
Create(ctx context.Context, req CreateUserReq) (*User, error)
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
type UserFinder interface {
|
|
129
|
-
GetByID(ctx context.Context, id string) (*User, error)
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**Rule:** Define interfaces where they are CONSUMED, not where they are implemented.
|
|
134
|
-
|
|
135
|
-
---
|
|
136
|
-
|
|
137
|
-
## Context Usage
|
|
138
|
-
|
|
139
|
-
```go
|
|
140
|
-
// REQUIRED: First parameter is always context.Context
|
|
141
|
-
func (s *UserService) Create(ctx context.Context, req CreateUserReq) (*User, error) {
|
|
142
|
-
// Pass context to all downstream calls
|
|
143
|
-
user, err := s.repo.Insert(ctx, req)
|
|
144
|
-
// ...
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
// BANNED: context.Background() deep inside application code
|
|
148
|
-
// Use it ONLY at the entry point (main, HTTP handler setup, test setup)
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
---
|
|
152
|
-
|
|
153
|
-
## Preferred Libraries
|
|
154
|
-
|
|
155
|
-
| Need | Library | Why |
|
|
156
|
-
|------|---------|-----|
|
|
157
|
-
| HTTP router | `net/http` (Go 1.22+) / `chi` | Stdlib router is now excellent |
|
|
158
|
-
| Logging | `log/slog` (stdlib) | Structured, leveled, built-in since Go 1.21 |
|
|
159
|
-
| Configuration | `caarlos0/env` + struct tags | Simple, typed env parsing |
|
|
160
|
-
| Database | `database/sql` + `pgx` / `sqlc` | `sqlc` generates type-safe Go from SQL |
|
|
161
|
-
| Migration | `golang-migrate/migrate` | SQL-based, driver-agnostic |
|
|
162
|
-
| Testing | stdlib `testing` + `testify` | `testify` for assertions only |
|
|
163
|
-
| Validation | `go-playground/validator` | Struct tag validation |
|
|
164
|
-
| HTTP client | `net/http` (stdlib) | Sufficient for most needs |
|
|
165
|
-
| JSON | `encoding/json` (stdlib) / `json-iterator` | Stdlib first |
|
|
166
|
-
| API docs | `swaggo/swag` | Auto-generates OpenAPI from comments |
|
|
167
|
-
|
|
168
|
-
---
|
|
169
|
-
|
|
170
|
-
## Banned Patterns
|
|
171
|
-
|
|
172
|
-
| Pattern | Why | Alternative |
|
|
173
|
-
|---------|-----|-------------|
|
|
174
|
-
| `_ = err` or ignoring error | Silent failures | Always handle `err` |
|
|
175
|
-
| `panic()` in library code | Crashes the program | Return errors |
|
|
176
|
-
| `init()` functions | Hidden side effects, hard to test | Explicit initialization |
|
|
177
|
-
| Global mutable state | Concurrency bugs, untestable | Dependency injection |
|
|
178
|
-
| `interface{}` / `any` everywhere | No type safety | Generics (Go 1.18+) or specific types |
|
|
179
|
-
| ORM magic (GORM) | Hidden queries, N+1 traps | `sqlc` or raw `database/sql` |
|
|
180
|
-
| Huge packages | Violates SRP | Split into focused packages |
|
|
181
|
-
| Shared `utils` package | Kitchen sink, circular deps | Domain-specific helpers |
|
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
# Java Stack Profile — Enterprise Without the Bloat
|
|
2
|
-
|
|
3
|
-
> Java can be clean. It just needs discipline.
|
|
4
|
-
> Stop writing 200-line classes for a 10-line operation.
|
|
5
|
-
|
|
6
|
-
## Language Version: Java 25+ (LTS)
|
|
7
|
-
|
|
8
|
-
Java 25 is the latest LTS release (September 2025, supported until 2033). Use modern Java features aggressively. Do not write pre-Java 21 style code.
|
|
9
|
-
|
|
10
|
-
### Records Over POJOs
|
|
11
|
-
```java
|
|
12
|
-
// BANNED: 80-line POJO with getters, setters, equals, hashCode
|
|
13
|
-
public class UserDto {
|
|
14
|
-
private String name;
|
|
15
|
-
private String email;
|
|
16
|
-
public String getName() { return name; }
|
|
17
|
-
public void setName(String name) { this.name = name; }
|
|
18
|
-
// ... 60 more lines of boilerplate
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// REQUIRED: Record (immutable, auto-generates equals/hashCode/toString)
|
|
22
|
-
public record UserDto(String name, String email) {}
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
### Sealed Classes for Domain Variants
|
|
26
|
-
```java
|
|
27
|
-
// Model fixed set of states or outcomes
|
|
28
|
-
public sealed interface PaymentResult
|
|
29
|
-
permits PaymentResult.Success, PaymentResult.Failed, PaymentResult.Pending {
|
|
30
|
-
|
|
31
|
-
record Success(String transactionId, BigDecimal amount) implements PaymentResult {}
|
|
32
|
-
record Failed(String reason, String errorCode) implements PaymentResult {}
|
|
33
|
-
record Pending(String retryAfter) implements PaymentResult {}
|
|
34
|
-
}
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Pattern Matching
|
|
38
|
-
```java
|
|
39
|
-
// Use switch expressions with pattern matching (Java 21)
|
|
40
|
-
return switch (result) {
|
|
41
|
-
case Success s -> ResponseEntity.ok(s);
|
|
42
|
-
case Failed f -> ResponseEntity.badRequest().body(f.reason());
|
|
43
|
-
case Pending p -> ResponseEntity.accepted().body(p);
|
|
44
|
-
};
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Validation at Boundaries: Jakarta Bean Validation
|
|
50
|
-
|
|
51
|
-
```java
|
|
52
|
-
public record CreateUserRequest(
|
|
53
|
-
@NotBlank @Size(max = 100) String name,
|
|
54
|
-
@NotBlank @Email String email,
|
|
55
|
-
@Min(13) @Max(150) int age
|
|
56
|
-
) {}
|
|
57
|
-
|
|
58
|
-
@PostMapping("/users")
|
|
59
|
-
public ResponseEntity<UserResponse> createUser(@Valid @RequestBody CreateUserRequest request) {
|
|
60
|
-
// request is validated by the framework before reaching this method
|
|
61
|
-
return ResponseEntity.status(201).body(userService.create(request));
|
|
62
|
-
}
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
## Project Structure (Spring Boot 4)
|
|
68
|
-
|
|
69
|
-
```
|
|
70
|
-
project-name/
|
|
71
|
-
├── src/main/java/com/example/project/
|
|
72
|
-
│ ├── Application.java # Entry point
|
|
73
|
-
│ │
|
|
74
|
-
│ ├── modules/
|
|
75
|
-
│ │ ├── user/
|
|
76
|
-
│ │ │ ├── UserController.java # Transport (REST)
|
|
77
|
-
│ │ │ ├── UserService.java # Business logic
|
|
78
|
-
│ │ │ ├── UserRepository.java # Data access (Spring Data)
|
|
79
|
-
│ │ │ ├── dto/
|
|
80
|
-
│ │ │ │ ├── CreateUserRequest.java # Input validation (record)
|
|
81
|
-
│ │ │ │ └── UserResponse.java # Output (record)
|
|
82
|
-
│ │ │ ├── entity/
|
|
83
|
-
│ │ │ │ └── UserEntity.java # JPA entity
|
|
84
|
-
│ │ │ └── exception/
|
|
85
|
-
│ │ │ └── UserNotFoundException.java
|
|
86
|
-
│ │ └── order/
|
|
87
|
-
│ │ └── ...
|
|
88
|
-
│ │
|
|
89
|
-
│ └── shared/
|
|
90
|
-
│ ├── config/ # Configuration classes
|
|
91
|
-
│ ├── exception/
|
|
92
|
-
│ │ └── GlobalExceptionHandler.java # @ControllerAdvice
|
|
93
|
-
│ ├── security/ # Security config
|
|
94
|
-
│ └── util/ # Cross-cutting utilities
|
|
95
|
-
│
|
|
96
|
-
├── src/main/resources/
|
|
97
|
-
│ ├── application.yml
|
|
98
|
-
│ └── db/migration/ # Flyway migrations
|
|
99
|
-
│
|
|
100
|
-
└── src/test/java/com/example/project/
|
|
101
|
-
└── modules/user/
|
|
102
|
-
└── UserServiceTest.java
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
---
|
|
106
|
-
|
|
107
|
-
## Preferred Libraries
|
|
108
|
-
|
|
109
|
-
| Need | Library | Why |
|
|
110
|
-
|------|---------|-----|
|
|
111
|
-
| Framework | Spring Boot 4.x (Spring Framework 7) | Industry standard, virtual threads native support |
|
|
112
|
-
| Validation | Jakarta Bean Validation | Built into Spring Boot |
|
|
113
|
-
| ORM | Spring Data JPA / Hibernate | Standard, powerful |
|
|
114
|
-
| Migration | Flyway | SQL-based, version controlled |
|
|
115
|
-
| Mapping | MapStruct | Compile-time, type-safe DTO mapping |
|
|
116
|
-
| Testing | JUnit 5 + Mockito + Testcontainers | Standard stack |
|
|
117
|
-
| HTTP client | Spring RestClient / WebClient | RestClient (sync, new in Boot 4), WebClient (reactive) |
|
|
118
|
-
| Logging | SLF4J + Logback (or Log4j2) | Standard, structured JSON output |
|
|
119
|
-
| Build | Gradle (Kotlin DSL) or Maven | Gradle preferred for modern projects |
|
|
120
|
-
| API docs | springdoc-openapi | Auto-generates OpenAPI from code |
|
|
121
|
-
|
|
122
|
-
---
|
|
123
|
-
|
|
124
|
-
## Banned Patterns
|
|
125
|
-
|
|
126
|
-
| Pattern | Why | Alternative |
|
|
127
|
-
|---------|-----|-------------|
|
|
128
|
-
| Raw `String` for IDs | No type safety | `UUID` or typed ID wrapper |
|
|
129
|
-
| `null` returns | NullPointerException bait | `Optional<T>` for query results |
|
|
130
|
-
| Checked Exception abuse | Forces catch-or-throw chains | Unchecked `RuntimeException` subclasses |
|
|
131
|
-
| Field injection (`@Autowired`) | Hidden deps, untestable | Constructor injection |
|
|
132
|
-
| `System.out.println` | Not structured, not configurable | SLF4J logger |
|
|
133
|
-
| Deep class hierarchies | Fragile, hard to reason | Composition + interfaces |
|
|
134
|
-
| God services (500+ lines) | Violates SRP | Split into focused services |
|
|
135
|
-
| `@Transactional` on controller | Layer leak | Only on service methods |
|