@ryuenn3123/agentic-senior-core 4.4.0 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/agentic-senior-core/plugin.json +3 -0
- package/.agents/plugins/agentic-senior-core/rules/agentic-senior-core.md +131 -0
- package/.agents/plugins/agentic-senior-core/skills/asc/SKILL.md +16 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-audit/SKILL.md +28 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-refactor/SKILL.md +35 -0
- package/.agents/plugins/agentic-senior-core/skills/asc-review/SKILL.md +54 -0
- package/.agents/rules/agentic-senior-core.md +131 -0
- package/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +17 -0
- package/.clinerules/agentic-senior-core.md +94 -0
- package/.codex-plugin/plugin.json +24 -0
- package/.cursor/rules/agentic-senior-core.mdc +99 -0
- package/.devin-plugin/plugin.json +13 -0
- package/.github/copilot-instructions.md +94 -0
- package/.github/plugin/marketplace.json +20 -0
- package/.github/plugin/plugin.json +16 -0
- package/.kiro/steering/agentic-senior-core.md +94 -0
- package/.openclaw/skills/asc/SKILL.md +23 -0
- package/.openclaw/skills/asc-audit/SKILL.md +28 -0
- package/.openclaw/skills/asc-review/SKILL.md +54 -0
- package/.opencode/plugins/agentic-senior-core.mjs +31 -0
- package/.windsurf/rules/agentic-senior-core.md +94 -0
- package/AGENTS.md +126 -127
- package/CONTRIBUTING.md +93 -63
- package/README.md +190 -110
- package/__init__.py +61 -0
- package/bin/agentic-senior-core.js +42 -41
- package/commands/asc-audit.md +1 -0
- package/commands/asc-audit.toml +2 -0
- package/commands/asc-help.md +9 -0
- package/commands/asc-help.toml +2 -0
- package/commands/asc-refactor.md +1 -0
- package/commands/asc-refactor.toml +2 -0
- package/commands/asc-review.md +1 -0
- package/commands/asc-review.toml +2 -0
- package/gemini-extension.json +10 -0
- package/hooks/copilot-hooks.json +21 -0
- package/hooks/hooks.json +31 -0
- package/hooks/session-start.js +36 -0
- package/hooks/subagent-start.js +38 -0
- package/lib/cli/commands/adapter.mjs +109 -0
- package/lib/cli/commands/clean.mjs +63 -0
- package/lib/cli/commands/status.mjs +94 -0
- package/package.json +43 -60
- package/plugin.yaml +16 -0
- package/scripts/uninstall.js +38 -0
- package/skills/asc/SKILL.md +16 -0
- package/skills/asc-audit/SKILL.md +28 -0
- package/skills/asc-refactor/SKILL.md +35 -0
- package/skills/asc-review/SKILL.md +54 -0
- package/.agent-context/policies/llm-judge-threshold.json +0 -29
- package/.agent-context/prompts/bootstrap-design.md +0 -63
- package/.agent-context/prompts/compact-natural-mode.md +0 -100
- package/.agent-context/prompts/init-project.md +0 -60
- package/.agent-context/prompts/refactor.md +0 -38
- package/.agent-context/prompts/review-code.md +0 -31
- package/.agent-context/review-checklists/architecture-review.md +0 -57
- package/.agent-context/review-checklists/pr-checklist.md +0 -134
- package/.agent-context/rules/api-docs.md +0 -24
- package/.agent-context/rules/api-versioning.md +0 -16
- package/.agent-context/rules/architecture.md +0 -38
- package/.agent-context/rules/background-jobs.md +0 -17
- package/.agent-context/rules/config-and-flags.md +0 -16
- package/.agent-context/rules/database-design.md +0 -18
- package/.agent-context/rules/docker-runtime.md +0 -17
- package/.agent-context/rules/error-handling.md +0 -16
- package/.agent-context/rules/event-driven.md +0 -16
- package/.agent-context/rules/frontend-architecture.md +0 -54
- package/.agent-context/rules/microservices.md +0 -16
- package/.agent-context/rules/migrations.md +0 -16
- package/.agent-context/rules/observability.md +0 -16
- package/.agent-context/rules/performance.md +0 -16
- package/.agent-context/rules/realtime.md +0 -16
- package/.agent-context/rules/resilience.md +0 -18
- package/.agent-context/rules/security.md +0 -18
- package/.agent-context/rules/testing.md +0 -16
- package/.agent-context/state/README.md +0 -25
- package/.agent-context/state/architecture-map.md +0 -40
- package/.agent-context/state/benchmark-comparison-schema.json +0 -181
- package/.agent-context/state/benchmark-reproducibility.json +0 -87
- package/.agent-context/state/benchmark-thresholds.json +0 -10
- package/.agent-context/state/benchmark-writer-judge-config.json +0 -58
- package/.agent-context/state/dependency-map.md +0 -41
- package/.agent-context/state/memory-adapter-contract.json +0 -52
- package/.agent-context/state/memory-schema-v1.json +0 -88
- package/GEMINI.md +0 -1
- package/benchmarks/README.md +0 -60
- package/benchmarks/compact-natural-mode/fixtures.mjs +0 -359
- package/benchmarks/compact-natural-mode/scorer.mjs +0 -331
- package/benchmarks/runtime-token-saver/fixtures.mjs +0 -836
- package/lib/cli/adaptive-context/catalog.mjs +0 -394
- package/lib/cli/adaptive-context/file-signals.mjs +0 -100
- package/lib/cli/adaptive-context/implications.mjs +0 -44
- package/lib/cli/adaptive-context.mjs +0 -151
- package/lib/cli/audits/typography-palette-anti-repeat/color-utils.mjs +0 -156
- package/lib/cli/audits/typography-palette-anti-repeat/file-scanner.mjs +0 -103
- package/lib/cli/audits/typography-palette-anti-repeat/typography-utils.mjs +0 -70
- package/lib/cli/backup.mjs +0 -210
- package/lib/cli/commands/context.mjs +0 -140
- package/lib/cli/commands/init/project-context.mjs +0 -60
- package/lib/cli/commands/init/runtime-environment.mjs +0 -59
- package/lib/cli/commands/init/setup-decisions.mjs +0 -83
- package/lib/cli/commands/init.mjs +0 -654
- package/lib/cli/commands/launch.mjs +0 -76
- package/lib/cli/commands/optimize.mjs +0 -284
- package/lib/cli/commands/rollback.mjs +0 -64
- package/lib/cli/commands/upgrade/token-optimization-state.mjs +0 -51
- package/lib/cli/commands/upgrade.mjs +0 -451
- package/lib/cli/compiler.mjs +0 -187
- package/lib/cli/constants.mjs +0 -136
- package/lib/cli/detector/constants.mjs +0 -135
- package/lib/cli/detector/design-evidence/collector.mjs +0 -256
- package/lib/cli/detector/design-evidence/constants.mjs +0 -39
- package/lib/cli/detector/design-evidence/file-traversal.mjs +0 -83
- package/lib/cli/detector/design-evidence/structured-attribute-evidence.mjs +0 -117
- package/lib/cli/detector/design-evidence/summary.mjs +0 -109
- package/lib/cli/detector/design-evidence/utility-helpers.mjs +0 -122
- package/lib/cli/detector/design-evidence.mjs +0 -25
- package/lib/cli/detector/stack-detection.mjs +0 -243
- package/lib/cli/detector/ui-signals.mjs +0 -150
- package/lib/cli/detector/workspace-scan.mjs +0 -177
- package/lib/cli/detector.mjs +0 -23
- package/lib/cli/init-detection-flow.mjs +0 -48
- package/lib/cli/init-options.mjs +0 -237
- package/lib/cli/init-selection.mjs +0 -29
- package/lib/cli/memory-continuity.mjs +0 -537
- package/lib/cli/preflight.mjs +0 -76
- package/lib/cli/project-scaffolder/constants.mjs +0 -69
- package/lib/cli/project-scaffolder/discovery.mjs +0 -272
- package/lib/cli/project-scaffolder/prompt-builders.mjs +0 -171
- package/lib/cli/project-scaffolder/storage.mjs +0 -144
- package/lib/cli/project-scaffolder/ui-scope-detection.mjs +0 -36
- package/lib/cli/project-scaffolder.mjs +0 -29
- package/lib/cli/rollback.mjs +0 -66
- package/lib/cli/token-optimization.mjs +0 -401
- package/lib/cli/utils/filesystem.mjs +0 -81
- package/lib/cli/utils/managed-surface.mjs +0 -280
- package/lib/cli/utils/prompting.mjs +0 -44
- package/lib/cli/utils.mjs +0 -479
- package/mcp.json +0 -134
- package/scripts/adaptive-context/fixtures.mjs +0 -183
- package/scripts/adaptive-context-benchmark.mjs +0 -9
- package/scripts/ascx-runtime-token-saver-benchmark.mjs +0 -9
- package/scripts/benchmark-evidence-bundle.mjs +0 -645
- package/scripts/benchmark-gate.mjs +0 -121
- package/scripts/benchmark-intelligence.mjs +0 -33
- package/scripts/benchmark-writer-judge-matrix.mjs +0 -379
- package/scripts/build-release-benchmark-bundle.mjs +0 -202
- package/scripts/bump-version.mjs +0 -103
- package/scripts/clean-local-artifacts.mjs +0 -78
- package/scripts/compact-natural-mode-benchmark.mjs +0 -9
- package/scripts/context-triggered-audit.mjs +0 -391
- package/scripts/detection-benchmark.mjs +0 -127
- package/scripts/docs-quality-drift-report.mjs +0 -358
- package/scripts/documentation-boundary-audit.mjs +0 -305
- package/scripts/explain-on-demand-audit.mjs +0 -427
- package/scripts/forbidden-content-check.mjs +0 -123
- package/scripts/frontend-usability-audit.mjs +0 -243
- package/scripts/generate-sbom.mjs +0 -61
- package/scripts/governance-weekly-report.mjs +0 -466
- package/scripts/llm-judge/checklist-loader.mjs +0 -45
- package/scripts/llm-judge/constants.mjs +0 -66
- package/scripts/llm-judge/diff-collection.mjs +0 -74
- package/scripts/llm-judge/prompting.mjs +0 -78
- package/scripts/llm-judge/providers.mjs +0 -111
- package/scripts/llm-judge/verdict.mjs +0 -134
- package/scripts/llm-judge.mjs +0 -200
- package/scripts/memory-continuity-benchmark.mjs +0 -322
- package/scripts/quality-trend-report.mjs +0 -289
- package/scripts/release-gate/audit-checks.mjs +0 -441
- package/scripts/release-gate/constants.mjs +0 -53
- package/scripts/release-gate/runtime.mjs +0 -63
- package/scripts/release-gate/static-checks.mjs +0 -182
- package/scripts/release-gate.mjs +0 -42
- package/scripts/rules-guardian-audit.mjs +0 -580
- package/scripts/single-source-lazy-loading-audit.mjs +0 -449
- package/scripts/sync-thin-adapters.mjs +0 -72
- package/scripts/token-optimization-benchmark.mjs +0 -252
- package/scripts/ui-design-judge/constants.mjs +0 -13
- package/scripts/ui-design-judge/design-execution-summary.mjs +0 -81
- package/scripts/ui-design-judge/git-input.mjs +0 -134
- package/scripts/ui-design-judge/prompting.mjs +0 -52
- package/scripts/ui-design-judge/providers.mjs +0 -102
- package/scripts/ui-design-judge/reporting.mjs +0 -183
- package/scripts/ui-design-judge/rubric-calibration.mjs +0 -214
- package/scripts/ui-design-judge/rubric-goldset.json +0 -188
- package/scripts/ui-design-judge.mjs +0 -319
- package/scripts/ui-rubric-calibration.mjs +0 -35
- package/scripts/validate/audits/cache-layer-contract.mjs +0 -230
- package/scripts/validate/audits/caching-scope-hygiene.mjs +0 -235
- package/scripts/validate/audits/file-size.mjs +0 -158
- package/scripts/validate/audits/reflection-citations.mjs +0 -130
- package/scripts/validate/audits/release-bundle.mjs +0 -135
- package/scripts/validate/audits/rule-id-uniqueness.mjs +0 -278
- package/scripts/validate/config.mjs +0 -501
- package/scripts/validate/coverage-checks.mjs +0 -446
- package/scripts/validate/file-structure.mjs +0 -158
- package/scripts/validate/markdown-content.mjs +0 -109
- package/scripts/validate/project-metadata.mjs +0 -166
- package/scripts/validate/utils.mjs +0 -52
- package/scripts/validate.mjs +0 -267
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Review Skill
|
|
2
|
+
|
|
3
|
+
Production-risk code review. Prioritize findings by severity.
|
|
4
|
+
|
|
5
|
+
## Before Reviewing
|
|
6
|
+
|
|
7
|
+
1. Read the changed files and understand the scope.
|
|
8
|
+
2. For UI changes, check accessibility and design consistency.
|
|
9
|
+
3. For API changes, check contract stability and documentation sync.
|
|
10
|
+
|
|
11
|
+
## Finding Priority Order
|
|
12
|
+
|
|
13
|
+
1. Correctness, data loss, security, privacy, auth, and permission risks.
|
|
14
|
+
2. Public contract drift: APIs, events, CLI behavior, data model, UI contract, docs.
|
|
15
|
+
3. Missing tests for changed behavior.
|
|
16
|
+
4. Architecture boundary drift and maintainability risk.
|
|
17
|
+
5. Performance and accessibility issues with concrete impact.
|
|
18
|
+
|
|
19
|
+
## For Every Finding
|
|
20
|
+
|
|
21
|
+
- Include file and line reference.
|
|
22
|
+
- Explain the real risk.
|
|
23
|
+
- Propose the smallest safe fix.
|
|
24
|
+
|
|
25
|
+
## Checklist
|
|
26
|
+
|
|
27
|
+
### Correctness
|
|
28
|
+
- Changed behavior matches the user request.
|
|
29
|
+
- Existing behavior preserved unless user approved a change.
|
|
30
|
+
- Edge cases, empty states, error paths handled.
|
|
31
|
+
|
|
32
|
+
### Security
|
|
33
|
+
- External input validated at trust boundaries.
|
|
34
|
+
- Secrets, tokens, credentials not committed or logged.
|
|
35
|
+
- Authorization enforced at a trusted boundary.
|
|
36
|
+
- Error responses do not leak internals.
|
|
37
|
+
|
|
38
|
+
### Architecture
|
|
39
|
+
- Layer boundaries clear. Controllers do not hold business logic.
|
|
40
|
+
- No premature abstraction. No clever hacks.
|
|
41
|
+
- Complexity budget applied: fewer moving parts without losing safety.
|
|
42
|
+
|
|
43
|
+
### Testing
|
|
44
|
+
- Changed behavior has appropriate tests.
|
|
45
|
+
- Tests assert behavior and contracts, not implementation trivia.
|
|
46
|
+
- Critical flows include failure-path coverage.
|
|
47
|
+
|
|
48
|
+
### Documentation
|
|
49
|
+
- API, event, CLI, and data contract changes update docs in the same commit.
|
|
50
|
+
- Root README exists and stays current.
|
|
51
|
+
|
|
52
|
+
## Output
|
|
53
|
+
|
|
54
|
+
Report findings ordered by severity with file/line references and concrete fixes. If no findings, say so explicitly and name any residual risk.
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"selectedProfile": "beginner",
|
|
3
|
-
"profileThresholds": {
|
|
4
|
-
"beginner": {
|
|
5
|
-
"blockingSeverities": [
|
|
6
|
-
"critical"
|
|
7
|
-
],
|
|
8
|
-
"failOnMalformedResponse": false,
|
|
9
|
-
"failOnProviderError": false
|
|
10
|
-
},
|
|
11
|
-
"balanced": {
|
|
12
|
-
"blockingSeverities": [
|
|
13
|
-
"critical",
|
|
14
|
-
"high"
|
|
15
|
-
],
|
|
16
|
-
"failOnMalformedResponse": true,
|
|
17
|
-
"failOnProviderError": false
|
|
18
|
-
},
|
|
19
|
-
"strict": {
|
|
20
|
-
"blockingSeverities": [
|
|
21
|
-
"critical",
|
|
22
|
-
"high",
|
|
23
|
-
"medium"
|
|
24
|
-
],
|
|
25
|
-
"failOnMalformedResponse": true,
|
|
26
|
-
"failOnProviderError": true
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
# Design Direction Prompt
|
|
2
|
-
|
|
3
|
-
Use this prompt for UI, UX, frontend layout, screen, or redesign work. Create or refine `docs/DESIGN.md` before writing UI code.
|
|
4
|
-
|
|
5
|
-
## Authority
|
|
6
|
-
|
|
7
|
-
- Use current repo evidence, project docs, and `.agent-context/` as style context.
|
|
8
|
-
- Do not copy layout rhythm, palette, component skin, or brand posture from external references without explicit user approval.
|
|
9
|
-
- WCAG 2.2 AA is the hard compliance floor.
|
|
10
|
-
- When generating any UI component that renders or accepts user data, explicitly state in the prompt: "ensure all user-supplied input is sanitized, all status indicators have non-color alternatives, and all interactive elements have visible focus states."
|
|
11
|
-
- Before choosing a new UI library, research current official docs.
|
|
12
|
-
|
|
13
|
-
## Design Direction Process
|
|
14
|
-
|
|
15
|
-
1. **Name Your Defaults**: Name three temptations (e.g. SaaS admin default, AI-startup landing) and why they flatten this product. Derive your search direction by rejecting them.
|
|
16
|
-
2. **Choose an Anchor**: Run `npx -y getdesign@latest list` to browse proven brand references. Pick one whose spatial rhythm fits this product. Run `npx -y getdesign@latest add <brand>` to read the full reference — use it to derive token values, then discard it. Output DESIGN.md stays under 400 tokens. Do not use generic quality words ("clean", "modern").
|
|
17
|
-
3. **Creative Commitments**: Choose distinctive typography, dominant colors with sharp accents, and one signature motion behavior. Create depth rather than flat card stacks.
|
|
18
|
-
4. **Previous Directions**: If `docs/DESIGN.md` contains previous directions, treat them as a blocklist. The new anchor must differ in conceptual family, hierarchy, and motion.
|
|
19
|
-
|
|
20
|
-
## Redesign Protocol
|
|
21
|
-
|
|
22
|
-
When the user says "redesign from zero": treat existing UI as behavioral evidence only. Rewrite design docs. Change primary composition, hierarchy, interaction model, and responsive architecture. Do not ship a palette swap.
|
|
23
|
-
|
|
24
|
-
## Output Format
|
|
25
|
-
|
|
26
|
-
`docs/DESIGN.md` must be a compact token file under 400 tokens. Rationale stays in working memory.
|
|
27
|
-
|
|
28
|
-
Required sections (in this order, no additions):
|
|
29
|
-
|
|
30
|
-
### Anchor
|
|
31
|
-
One sentence: the interaction anchor and what mechanic is borrowed.
|
|
32
|
-
|
|
33
|
-
### Tokens
|
|
34
|
-
- **Typography**: font families (display, body, mono), scale base and ratio, scale method
|
|
35
|
-
- **Colors**: OKLCH primitives with semantic role mapping (primary, secondary, surface, error, success)
|
|
36
|
-
- **Spacing**: base unit, scale
|
|
37
|
-
- **Radius**: small, medium, large values
|
|
38
|
-
- **Shadow**: elevation levels
|
|
39
|
-
- **Motion**: duration, easing, reduced-motion fallback
|
|
40
|
-
|
|
41
|
-
### Constraints
|
|
42
|
-
- WCAG 2.2 AA floor
|
|
43
|
-
- Up to 3 product-specific anti-patterns
|
|
44
|
-
|
|
45
|
-
### Previous Directions
|
|
46
|
-
Anchors used in prior iterations (blocklist for redesign). Start empty for fresh projects.
|
|
47
|
-
|
|
48
|
-
## Required Validation Gates
|
|
49
|
-
|
|
50
|
-
Only three gates. Do not add more:
|
|
51
|
-
1. Anchor exists and is specific.
|
|
52
|
-
2. Token values are derived from the anchor.
|
|
53
|
-
3. WCAG 2.2 AA compliance floor is met.
|
|
54
|
-
|
|
55
|
-
## Pre-Commit Critique
|
|
56
|
-
|
|
57
|
-
Before committing any UI output, answer:
|
|
58
|
-
|
|
59
|
-
1. Rename test: if the product name changed to an unrelated category, would this UI still look identical? Yes = too generic, reset anchor.
|
|
60
|
-
2. Token drift test: does any color, font, or spacing in the output contradict the DESIGN.md token definitions? Yes = align before commit.
|
|
61
|
-
3. Security test: is user-controlled data rendered unsanitized, or does any status depend on color alone? Yes = fix before merge.
|
|
62
|
-
|
|
63
|
-
Max 3 revision cycles. If unresolved, reset the anchor entirely.
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
# Compact Natural Mode
|
|
2
|
-
|
|
3
|
-
Status: active default response contract.
|
|
4
|
-
|
|
5
|
-
Use this prompt for final user-facing replies after the task-specific rule, prompt, checklist, and validation work is complete.
|
|
6
|
-
|
|
7
|
-
## Purpose
|
|
8
|
-
|
|
9
|
-
Write the smallest complete answer that still lets the next developer act correctly.
|
|
10
|
-
|
|
11
|
-
Compact means high signal. It does not mean broken grammar, dialect, clipped fragments, or hiding evidence.
|
|
12
|
-
|
|
13
|
-
## Always Remove
|
|
14
|
-
|
|
15
|
-
- greetings, affirmations, and repeated restatements
|
|
16
|
-
- narration about what you are about to do
|
|
17
|
-
- generic closing offers
|
|
18
|
-
- padding paragraphs that add no new technical content
|
|
19
|
-
- repeated summaries of the same decision
|
|
20
|
-
|
|
21
|
-
## Always Preserve
|
|
22
|
-
|
|
23
|
-
- exact commands
|
|
24
|
-
- exact file paths and line numbers
|
|
25
|
-
- exact error messages, assertions, exit codes, and stack-trace highlights
|
|
26
|
-
- validation status, including tests not run
|
|
27
|
-
- assumptions, scope qualifiers, blockers, risks, and next actions
|
|
28
|
-
- destructive-operation warnings
|
|
29
|
-
- breaking changes and migration notes
|
|
30
|
-
|
|
31
|
-
## Task Shapes
|
|
32
|
-
|
|
33
|
-
Use natural prose inside these shapes. Omit fields that do not apply, except safety fields.
|
|
34
|
-
|
|
35
|
-
Debug/root cause:
|
|
36
|
-
|
|
37
|
-
```text
|
|
38
|
-
Root Cause: <one sentence>
|
|
39
|
-
Evidence: <exact error, command output, or file:line>
|
|
40
|
-
Fix: <exact command or code direction>
|
|
41
|
-
Next: <verification step>
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Test failure:
|
|
45
|
-
|
|
46
|
-
```text
|
|
47
|
-
Failed: <test name>
|
|
48
|
-
Expected/Got: <value> / <value>
|
|
49
|
-
At: <file:line>
|
|
50
|
-
Evidence: <exact assertion or root error>
|
|
51
|
-
Fix direction: <one sentence>
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Code review finding:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
[critical|warn|nit] <file>:<line> - <concern>. <requested change>
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Implementation/refactor summary:
|
|
61
|
-
|
|
62
|
-
```text
|
|
63
|
-
Changed: <what changed>
|
|
64
|
-
Reason: <why>
|
|
65
|
-
Behavior: <changed, unchanged, or not verified>
|
|
66
|
-
Validation: <what ran or was not run>
|
|
67
|
-
Risk: <only if relevant>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Destructive command:
|
|
71
|
-
|
|
72
|
-
```text
|
|
73
|
-
WARNING: <what this destroys and whether it is reversible>
|
|
74
|
-
Command: <exact command>
|
|
75
|
-
Precondition: <what must be true before running>
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Security finding:
|
|
79
|
-
|
|
80
|
-
```text
|
|
81
|
-
Severity: <critical|high|medium|low>
|
|
82
|
-
Class: <vulnerability class>
|
|
83
|
-
Location: <file:line>
|
|
84
|
-
Impact: <who or what is affected>
|
|
85
|
-
Evidence: <exact code, behavior, or command output>
|
|
86
|
-
Remediation: <specific fix direction>
|
|
87
|
-
Validation: <how to prove it is fixed>
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Planning/architecture may be longer. Keep decision, rationale, alternatives, tradeoffs, assumptions, and open questions visible.
|
|
91
|
-
|
|
92
|
-
## Second-Pass Check
|
|
93
|
-
|
|
94
|
-
Before finalizing:
|
|
95
|
-
|
|
96
|
-
1. Remove any sentence that adds no new technical content.
|
|
97
|
-
2. Confirm mandatory evidence atoms remain exact.
|
|
98
|
-
3. Confirm assumptions and validation gaps are visible.
|
|
99
|
-
4. Confirm the answer has a decision or next action when the user asked for one.
|
|
100
|
-
5. Confirm the tone is natural professional writing.
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# Project Initialization Prompts
|
|
2
|
-
|
|
3
|
-
This prompt boots a repository with strict AI coding guidance context.
|
|
4
|
-
|
|
5
|
-
## System Directives (Auto Execution)
|
|
6
|
-
|
|
7
|
-
When a new project is created or initialized, the agent must automatically:
|
|
8
|
-
1. Read [AGENTS.md](../../AGENTS.md) to understand the canonical bootstrap chain and active entrypoints.
|
|
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), repository evidence, task constraints, and live official documentation when runtime or ecosystem facts matter.
|
|
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. Materialize the selected development/production assets rather than stopping at prose.
|
|
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
|
-
6. Do not default fresh web projects to Next.js, Tailwind-only styling, shadcn/ui, Vite, or any framework by habit, and do not avoid them because of this guard when they are the strongest fit. Treat explicit user constraints as constraints; otherwise compare project needs, runtime boundaries, hosting, data flow, team workflow, and official setup guidance before recommending.
|
|
14
|
-
|
|
15
|
-
## Required Planning Mode
|
|
16
|
-
|
|
17
|
-
If the user describes a project or feature, the agent must:
|
|
18
|
-
1. Before drafting docs from a thin or ambiguous brief, ask the smallest useful set of clarifying questions needed to make delivery goals, edge cases, constraints, must-have capabilities, and non-goals explicit. If the user wants a draft anyway, document assumptions and wait for approval before coding.
|
|
19
|
-
2. If the user already named a stack or framework, treat it as an explicit constraint. If not, produce a short evidence-backed recommendation from the brief, repo evidence, and live official documentation before coding. Include at least one plausible alternative when the default-looking option is Next.js, Tailwind-only styling, shadcn/ui, or another familiar web stack.
|
|
20
|
-
3. For existing projects, inspect real files first. Do not derive product name, description, runtime, architecture, or design direction from the folder name alone.
|
|
21
|
-
4. Draft a high-level structure plan plus the docs/bootstrap artifacts that must exist before coding.
|
|
22
|
-
5. Wait for user approval before scaffolding the project.
|
|
23
|
-
|
|
24
|
-
## Documentation-First Requests
|
|
25
|
-
|
|
26
|
-
If the user asks to create, complete, fix, or review project docs, documentation, dokumen, `docs/*`, architecture docs, flow docs, API docs, or "lengkapkan docs", treat the request as documentation-first.
|
|
27
|
-
|
|
28
|
-
The agent must:
|
|
29
|
-
1. Materialize or refine required project docs before implementation: root `README.md` for every fresh or existing project; `docs/doc-index.md` whenever `docs/` exists; `docs/project-brief.md`; `docs/architecture-decision-record.md`; `docs/flow-overview.md`; `docs/api-contract.md` when APIs, firmware endpoints, CLI commands, or web application flows exist; `docs/database-schema.md` when persistent data exists; and `docs/DESIGN.md` for UI scope.
|
|
30
|
-
2. Write formal project docs in English by default unless the user explicitly asks for another documentation language.
|
|
31
|
-
3. Keep `docs/doc-index.md` short. Use it as the read-routing map with document path, purpose, reads-when triggers, status, and last-updated date. Do not duplicate the docs it points to.
|
|
32
|
-
4. Keep `README.md` public and developer friendly even for private projects: explain what the project is, who it is for, how to set it up, how to run the core workflow, how to configure it, and where deeper docs live. Do not put internal agent notes, private reasoning, secrets, or governance policy in the README.
|
|
33
|
-
5. Keep documentation alive. When project behavior, setup, architecture, public contracts, data shape, deployment, or UI scope changes, update the matching docs in the same change.
|
|
34
|
-
6. Avoid documentation sprawl. Add a new docs file only when the topic is stable, long enough to outgrow the README or core docs, or owned by a separate workflow such as hardware setup, deployment, troubleshooting, or testing validation.
|
|
35
|
-
7. Add PRD, SRS, technical-design, or separate ERD only when evidence triggers them. Use PRD for product roadmap/user-story ownership, SRS for contractual or multi-stakeholder acceptance criteria, technical-design for non-trivial architecture decisions, and a separate ERD only when `docs/database-schema.md` cannot stay readable with an embedded diagram.
|
|
36
|
-
8. Stop after docs when the user only asked for docs. Do not write application, firmware, or UI code until the user explicitly asks for implementation or approves the implementation plan.
|
|
37
|
-
|
|
38
|
-
## Direct Constraint Mode
|
|
39
|
-
|
|
40
|
-
If the user specifies a framework, runtime, or architecture constraint, the agent must:
|
|
41
|
-
1. Read [AGENTS.md](../../AGENTS.md) for role context.
|
|
42
|
-
2. Resolve only the rules required by the explicit constraint and scope. Do not read unrelated backend, frontend, or DevOps rules by habit.
|
|
43
|
-
3. Reference [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [AGENTS.md](../../AGENTS.md), and the relevant `.agent-context/` files for runtime evidence and any explicit constraints already applied to this project.
|
|
44
|
-
4. Scaffold the initial project structure only after runtime and architecture decisions are explicit:
|
|
45
|
-
- Create only the directories and files justified by the approved structure.
|
|
46
|
-
- Set up configuration, validation, error handling, observability, health checks, and persistence only when they fit the approved runtime and project scope.
|
|
47
|
-
- Every module must follow [architecture.md](../rules/architecture.md).
|
|
48
|
-
- New code must pass the natural implementation pass in [architecture.md](../rules/architecture.md): start with the simplest correct flow, add complexity only when the requirement or repo evidence needs it, and do not add files or layers for small tasks.
|
|
49
|
-
- Use official framework setup commands or canonical starter flows when they produce newer, better-supported dependency defaults than manual package assembly.
|
|
50
|
-
- Do not assemble a framework project from scratch by habit when official setup commands create the supported structure. Manual assembly is allowed only for tiny prototypes, educational demos, unusual repo constraints, or a documented architecture reason.
|
|
51
|
-
- If containerization is selected, Docker assets must follow [docker-runtime.md](../rules/docker-runtime.md) and the latest official Docker docs instead of stale blog-era patterns. Selected Docker lanes require files and runbooks, not docs-only acknowledgment.
|
|
52
|
-
|
|
53
|
-
## Runtime and Architecture Reference
|
|
54
|
-
|
|
55
|
-
See [.agent-context/state/onboarding-report.json](../state/onboarding-report.json), [AGENTS.md](../../AGENTS.md), and the relevant `.agent-context/` files for the latest shipped runtime evidence, explicit constraints, and agent-decision status.
|
|
56
|
-
|
|
57
|
-
## UI/UX Bootstrap
|
|
58
|
-
|
|
59
|
-
When a user requests frontend or UI/UX design, the agent must automatically execute the [bootstrap-design.md](./bootstrap-design.md) prompt to synthesize a dynamic markdown design contract (`docs/DESIGN.md`).
|
|
60
|
-
Keep UI-only requests context-isolated: load [bootstrap-design.md](./bootstrap-design.md) and [frontend-architecture.md](../rules/frontend-architecture.md) first, and do not eagerly load backend-only rules unless the task explicitly crosses backend boundaries.
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
# Prompt: Refactor Code
|
|
2
|
-
|
|
3
|
-
Use this when code needs cleanup, splitting, or safer structure without changing user-visible behavior.
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
Refactor the target code while preserving existing behavior.
|
|
7
|
-
|
|
8
|
-
Before editing:
|
|
9
|
-
1. Read AGENTS.md and the smallest relevant rules from .agent-context/rules/.
|
|
10
|
-
2. Inspect the real repo conventions before introducing a new structure.
|
|
11
|
-
3. If required project docs are missing, stop and bootstrap or update docs first.
|
|
12
|
-
4. If the change touches UI, load .agent-context/prompts/bootstrap-design.md and .agent-context/rules/frontend-architecture.md before editing.
|
|
13
|
-
5. If the change touches a dependency, framework, Docker, runtime, or ecosystem claim, verify current official docs before choosing.
|
|
14
|
-
6. Enforce Universal SOP hard gate: stop implementation if root `README.md` is missing, if `docs/doc-index.md` is missing while `docs/` exists, if `docs/project-brief.md` is missing, if `docs/architecture-decision-record.md` is missing, if `docs/flow-overview.md` is missing, if `docs/database-schema.md` is missing while the project uses persistent data, if `docs/api-contract.md` is missing while the project exposes API or web application flows, or for UI scope if `docs/DESIGN.md` is missing.
|
|
15
|
-
7. Enforce backend universal principles: no clever hacks, no premature abstraction, readability over brevity.
|
|
16
|
-
8. For backend/API scope, enforce layered boundaries, zero-trust input validation, safe centralized error responses, bounded list reads, transaction safety for multi-write mutations, idempotency for sensitive mutations, and behavior-focused API tests.
|
|
17
|
-
9. Backend/API governance is global and stack-agnostic. Do not create stack-specific adapters or framework-specific rule branches; apply the global rules through the framework already present in the target project.
|
|
18
|
-
10. Enforce the complexity budget: choose fewer moving parts only when behavior, safety, clarity, and maintainability stay intact.
|
|
19
|
-
|
|
20
|
-
Refactor rules:
|
|
21
|
-
- Improve clarity, boundaries, naming, validation, error handling, tests, and docs.
|
|
22
|
-
- Prioritize maintainability over compressed one-liners.
|
|
23
|
-
- Apply the natural implementation pass from architecture.md: keep the main flow traceable, use early returns where they reduce nesting, and avoid helper chains that only make the code look abstract.
|
|
24
|
-
- Do not choose a stack, framework, library, or topology from offline assumptions.
|
|
25
|
-
- Keep module boundaries explicit and project-specific.
|
|
26
|
-
- Split large files when the split makes the flow easier to understand.
|
|
27
|
-
- Do not introduce abstractions before the repeated pattern is real.
|
|
28
|
-
- Remove code that does not carry behavior, safety, clarity, maintainability, or test value.
|
|
29
|
-
- Prefer the shorter implementation only when it keeps the same guarantees.
|
|
30
|
-
- Run a final simplification pass before completion.
|
|
31
|
-
- Update tests and docs whenever behavior contracts, public APIs, data shape, or UI contracts change.
|
|
32
|
-
- When fixing a bug: append one sentence to the nearest relevant doc (`docs/flow-overview.md` or `docs/architecture-decision-record.md`) naming the root cause and how to prevent recurrence.
|
|
33
|
-
|
|
34
|
-
For every meaningful change, explain:
|
|
35
|
-
- what risk or friction existed
|
|
36
|
-
- what changed
|
|
37
|
-
- why the new shape is safer or easier to maintain
|
|
38
|
-
```
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# Prompt: Review Code
|
|
2
|
-
|
|
3
|
-
Use this when reviewing current changes, a pull request, or a focused file set.
|
|
4
|
-
|
|
5
|
-
```text
|
|
6
|
-
Review the code with a production-risk mindset.
|
|
7
|
-
|
|
8
|
-
Before reviewing:
|
|
9
|
-
1. Read AGENTS.md.
|
|
10
|
-
2. Read .agent-context/review-checklists/pr-checklist.md.
|
|
11
|
-
3. Read .agent-context/review-checklists/architecture-review.md only when architecture or boundaries changed.
|
|
12
|
-
4. Load only the rules relevant to the changed scope.
|
|
13
|
-
5. For UI changes, load .agent-context/prompts/bootstrap-design.md, .agent-context/rules/frontend-architecture.md, and docs/DESIGN.md when present.
|
|
14
|
-
6. Enforce Universal SOP hard gate: block coding flow when required project docs are missing (root `README.md`; `docs/doc-index.md` when `docs/` exists; `docs/project-brief.md`; `docs/architecture-decision-record.md`; `docs/flow-overview.md`; `docs/database-schema.md` when persistent data exists; `docs/api-contract.md` when API or web application flows exist; and for UI scope `docs/DESIGN.md`).
|
|
15
|
-
7. Enforce single-source and lazy-loading policy: canonical rule source must be explicitly enforced, global domain governance must load lazily based on touched scope, and conflicting duplicate rule instructions must not appear during normal flow.
|
|
16
|
-
|
|
17
|
-
Prioritize findings in this order:
|
|
18
|
-
1. Correctness, data loss, security, privacy, auth, and permission risks.
|
|
19
|
-
2. Public contract drift: APIs, events, CLI behavior, data model, UI contract, docs.
|
|
20
|
-
3. Missing tests for changed behavior.
|
|
21
|
-
4. Architecture boundary drift and maintainability risk.
|
|
22
|
-
5. Performance and accessibility issues with concrete impact.
|
|
23
|
-
|
|
24
|
-
For every finding:
|
|
25
|
-
- include file and line
|
|
26
|
-
- explain the real risk
|
|
27
|
-
- reference the rule or contract only when it materially supports the finding
|
|
28
|
-
- propose the smallest safe fix
|
|
29
|
-
|
|
30
|
-
Do not create stack-specific governance concerns. Use project framework details only for concrete implementation risks proven by changed code, docs, or current official documentation.
|
|
31
|
-
```
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
# Architecture Review Checklist
|
|
2
|
-
|
|
3
|
-
Use this when module structure, feature shape, public contracts, topology, or refactoring are in scope.
|
|
4
|
-
|
|
5
|
-
## Boundary Review
|
|
6
|
-
|
|
7
|
-
- [ ] The changed code has clear transport, application, domain, and infrastructure boundaries where those layers exist.
|
|
8
|
-
- [ ] Business policy is not hidden in transport handlers, UI adapters, database queries, framework glue, or generated code.
|
|
9
|
-
- [ ] Controllers and route handlers only translate protocol input/output, enforce edge checks, and delegate business flow.
|
|
10
|
-
- [ ] Service or use-case code owns orchestration, transactions, state transitions, and idempotency decisions.
|
|
11
|
-
- [ ] Repository or adapter code owns persistence and external IO details without hiding product policy in queries.
|
|
12
|
-
- [ ] Global backend/API governance is used directly; no stack-specific adapter or framework-specific rule fork was introduced.
|
|
13
|
-
- [ ] Internal models do not leak across public API, event, CLI, library, or UI contracts without a deliberate mapping.
|
|
14
|
-
- [ ] Modules import through public entrypoints instead of deep internal paths.
|
|
15
|
-
- [ ] Circular dependencies are absent or explicitly removed.
|
|
16
|
-
|
|
17
|
-
## Structure Review
|
|
18
|
-
|
|
19
|
-
## Backend Universal Principles
|
|
20
|
-
|
|
21
|
-
- [ ] No clever hacks in backend and shared core modules
|
|
22
|
-
- [ ] No premature abstraction (base classes/util layers created only after repeated stable patterns)
|
|
23
|
-
- [ ] Readability over brevity for maintainability
|
|
24
|
-
- [ ] The project structure follows existing repo conventions unless a change was approved.
|
|
25
|
-
- [ ] New structure is feature/domain-oriented when that improves discoverability.
|
|
26
|
-
- [ ] Large files or modules are split around real responsibilities, not arbitrary layers.
|
|
27
|
-
- [ ] Shared code is genuinely shared and not domain-specific behavior disguised as utility.
|
|
28
|
-
- [ ] Names describe product meaning, not generic plumbing.
|
|
29
|
-
|
|
30
|
-
## Topology Review
|
|
31
|
-
|
|
32
|
-
- [ ] Monolith remains acceptable when boundaries, team size, consistency needs, and operations favor one deployable.
|
|
33
|
-
- [ ] Service extraction is backed by current evidence: ownership, scaling, compliance, fault isolation, or deploy cadence.
|
|
34
|
-
- [ ] Service boundaries define ownership, contract, data boundary, observability, timeouts, retry, and recovery behavior.
|
|
35
|
-
- [ ] Event or realtime architecture is justified by product need, not trend pressure.
|
|
36
|
-
|
|
37
|
-
## Contract Review
|
|
38
|
-
|
|
39
|
-
- [ ] API, event, CLI, library, data, and UI contracts are documented before or alongside implementation.
|
|
40
|
-
- [ ] Schema and validation strategy matches the project’s chosen runtime and official docs.
|
|
41
|
-
- [ ] Error contracts are safe, stable, and do not leak internals.
|
|
42
|
-
- [ ] List endpoints have bounded pagination, limits, or streaming behavior documented.
|
|
43
|
-
- [ ] Sensitive mutations have documented idempotency, retry, and duplicate-submit behavior.
|
|
44
|
-
- [ ] Error contracts document stable codes, safe trace or correlation identifiers, and any Problem Details-style fields when exposed.
|
|
45
|
-
- [ ] Async/event contracts document retry, ordering, duplicate handling, and dead-letter or recovery behavior.
|
|
46
|
-
- [ ] Migration and rollback plans exist for risky data or public contract changes.
|
|
47
|
-
|
|
48
|
-
## Operational Review
|
|
49
|
-
|
|
50
|
-
- [ ] Critical flows have tests at the right level.
|
|
51
|
-
- [ ] Observability, logging, and health checks match the project’s runtime and risk level.
|
|
52
|
-
- [ ] Security assumptions are documented and enforced at trust boundaries.
|
|
53
|
-
- [ ] Performance-sensitive paths avoid avoidable repeated work, unbounded lists, and hidden blocking operations.
|
|
54
|
-
- [ ] Relational reads avoid N+1 patterns or include an explicit query-shape rationale.
|
|
55
|
-
- [ ] Multi-table or cross-resource writes are transactional or include a documented compensating recovery path.
|
|
56
|
-
- [ ] Dual-write database plus message flows use an outbox or equivalent atomicity and replay strategy.
|
|
57
|
-
- [ ] Cross-service consistency avoids default two-phase commit and defines saga, compensation, or recovery behavior when needed.
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# PR Checklist - Quality Gate
|
|
2
|
-
|
|
3
|
-
Run this before declaring a task done. Apply only the sections relevant to the changed scope, but do not skip correctness, security, testing, or docs checks when the change touches them.
|
|
4
|
-
|
|
5
|
-
## 1. Repo Context
|
|
6
|
-
|
|
7
|
-
- [ ] The agent read `AGENTS.md` and the smallest relevant rule set.
|
|
8
|
-
- [ ] For non-trivial coding, review, planning, or governance work, the agent produced a Bootstrap Receipt with loaded files, selected rules, skipped rules, unreachable files, and validation plan before implementation output.
|
|
9
|
-
- [ ] Risky actions used the AGENTS.md Bounded Reflection block with valid rule IDs, one-line rationale, and no copied rule prose or hidden chain-of-thought.
|
|
10
|
-
- [ ] Existing project context came from real files, docs, package metadata, and changed code, not folder name alone.
|
|
11
|
-
- [ ] Runtime, framework, library, topology, and design choices are explicit user constraints or agent recommendations from current evidence.
|
|
12
|
-
- [ ] No offline default stack, blueprint, vendor, or visual style was treated as authoritative.
|
|
13
|
-
|
|
14
|
-
## 2. Correctness
|
|
15
|
-
|
|
16
|
-
- [ ] The changed behavior matches the user request.
|
|
17
|
-
- [ ] Existing behavior is preserved unless the user approved a behavior change.
|
|
18
|
-
- [ ] Edge cases, empty states, error paths, and rollback/recovery paths are handled.
|
|
19
|
-
- [ ] Public contracts remain stable or are versioned and documented.
|
|
20
|
-
|
|
21
|
-
## 3. Architecture
|
|
22
|
-
### 2. Architecture (→ rules/architecture.md)
|
|
23
|
-
- [ ] Layer and module boundaries are clear for the project’s chosen structure.
|
|
24
|
-
- [ ] No clever hacks in backend and shared core modules
|
|
25
|
-
- [ ] No premature abstraction (base classes/util layers created only after repeated stable patterns)
|
|
26
|
-
- [ ] Readability over brevity for maintainability
|
|
27
|
-
- [ ] Complexity budget was applied: equivalent behavior uses fewer moving parts without losing validation, error handling, fallbacks, accessibility, tests, or security boundaries.
|
|
28
|
-
- [ ] Natural implementation pass was applied: the main flow is traceable, names are domain-specific, helpers carry real meaning, and compact code did not hide safeguards.
|
|
29
|
-
- [ ] Controllers, route handlers, and transport adapters do not contain business policy, raw queries, or cross-resource orchestration.
|
|
30
|
-
- [ ] Services or use cases own business flow, transaction boundaries, and mutation safety.
|
|
31
|
-
- [ ] Repositories or adapters own persistence/external IO details without hiding business decisions.
|
|
32
|
-
- [ ] Backend/API governance was applied through global domain rules, not stack-specific adapters or framework-only branches.
|
|
33
|
-
- [ ] Code is grouped by feature/domain where that improves maintainability.
|
|
34
|
-
- [ ] Cross-module access uses public contracts instead of internal file reach-through.
|
|
35
|
-
- [ ] Files above roughly 1000 lines were split or explicitly justified.
|
|
36
|
-
- [ ] Monolith/service split decisions are evidence-backed, not fashion-driven.
|
|
37
|
-
|
|
38
|
-
## 4. Security And Privacy
|
|
39
|
-
|
|
40
|
-
- [ ] External input is validated at trust boundaries using the project’s chosen validation approach.
|
|
41
|
-
- [ ] Body, query, params, headers, cookies, uploads, webhooks, and job payloads are treated as untrusted until validated and normalized.
|
|
42
|
-
- [ ] Secrets, tokens, credentials, and private data are not committed or logged.
|
|
43
|
-
- [ ] Authorization is enforced at a trusted boundary.
|
|
44
|
-
- [ ] Error responses and logs do not leak internals.
|
|
45
|
-
- [ ] Least privilege, resource-level authorization, and secret handling are preserved where sensitive data or privileged actions are touched.
|
|
46
|
-
- [ ] Dependency or platform security claims are based on current official docs or repo evidence.
|
|
47
|
-
|
|
48
|
-
## 5. Testing
|
|
49
|
-
|
|
50
|
-
- [ ] Changed behavior has appropriate tests at the smallest useful level.
|
|
51
|
-
- [ ] API changes cover validation, authorization, documented error shape, pagination defaults, and empty states where relevant.
|
|
52
|
-
- [ ] Sensitive mutations include idempotency or duplicate-submit coverage where duplicate side effects would be harmful.
|
|
53
|
-
- [ ] Tests assert behavior and contracts, not implementation trivia.
|
|
54
|
-
- [ ] Critical flows include failure-path coverage.
|
|
55
|
-
- [ ] Test fixtures are readable and do not hide the behavior under test.
|
|
56
|
-
|
|
57
|
-
## 6. Docs And Contracts
|
|
58
|
-
|
|
59
|
-
### 10. Documentation
|
|
60
|
-
|
|
61
|
-
- [ ] Scope applied: This applies to documentation, release notes, onboarding text, review summaries, and agent-facing explanations
|
|
62
|
-
- [ ] Style scope review is advisory and does not block merge when API docs are synced in the same commit and contract details are correct
|
|
63
|
-
- [ ] Required docs exist before implementation: public and developer root README; project brief; architecture decision; flow overview; API/public contract when relevant; data model when relevant; and UI design contract when relevant.
|
|
64
|
-
- [ ] `docs/doc-index.md` exists whenever `docs/` exists and acts as a compact read-routing map instead of duplicating requirements or architecture.
|
|
65
|
-
- [ ] For docs-only or docs-first requests, implementation code was not changed unless the user explicitly asked for it or approved an implementation plan.
|
|
66
|
-
- [ ] Formal project docs use English by default unless the user requested another language or existing docs established one.
|
|
67
|
-
- [ ] Docs cover feature plan, architecture rationale, public contracts, data model, UI/design, security assumptions, testing strategy, delivery flow, and next validation actions where relevant.
|
|
68
|
-
- [ ] API, event, CLI, library, data, and UI contract changes update docs in the same scope.
|
|
69
|
-
- [ ] Public surface changes fail review if documentation updates are missing or stale in the same scope
|
|
70
|
-
- [ ] Documentation checks stay boundary-aware and only enforce touched scopes
|
|
71
|
-
- [ ] Facts, assumptions, and next actions are separated when context is incomplete.
|
|
72
|
-
- [ ] No emoji in formal documentation or review summaries
|
|
73
|
-
- [ ] Documentation uses plain English and avoids AI cliches
|
|
74
|
-
- [ ] Root README is public and developer friendly, even for private projects, and does not contain secrets, internal agent notes, private reasoning, or governance policy dumps.
|
|
75
|
-
- [ ] Documentation grows with the project: README and matching docs were updated when setup, runtime, architecture, public contracts, data shape, deployment, validation, or UI scope changed.
|
|
76
|
-
- [ ] Documentation file count stayed intentional: new docs files were added only for stable, distinct, or long workflows.
|
|
77
|
-
- [ ] PRD, SRS, technical-design, or separate ERD files were added only when project evidence justified a distinct document.
|
|
78
|
-
|
|
79
|
-
## 7. UI And Accessibility
|
|
80
|
-
|
|
81
|
-
- [ ] UI work follows `docs/DESIGN.md`.
|
|
82
|
-
- [ ] Visual direction is project-specific and not a template/default component-kit habit.
|
|
83
|
-
- [ ] UI work includes a Motion/Palette Decision, and product categories were treated as heuristics rather than style presets.
|
|
84
|
-
- [ ] Responsive behavior recomposes content and priority, not only shrinking desktop layout.
|
|
85
|
-
- [ ] Accessibility hard requirements are preserved: keyboard access, focus visibility, contrast, target size, status feedback, and no color-only meaning.
|
|
86
|
-
- [ ] 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.
|
|
87
|
-
- [ ] Broad redesigns pass the old-design regression test: the result is not the previous composition with animation, depth, media, or interaction density removed.
|
|
88
|
-
- [ ] 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.
|
|
89
|
-
- [ ] UI foundation choices are dynamic and product-fit; no shadcn, native-only, Tailwind-only, or component-kit default was selected by habit or avoided from dependency fear.
|
|
90
|
-
- [ ] Design intent separates locked outcomes from flexible expression; candidate signature moves, exact token primitives, literal anchor artifacts, and component-kit skins were not treated as permanent requirements without evidence or user approval.
|
|
91
|
-
|
|
92
|
-
## 8. Dependencies And Runtime
|
|
93
|
-
|
|
94
|
-
- [ ] New dependencies are justified by capability, maintenance health, bundle/runtime cost, and current official docs.
|
|
95
|
-
- [ ] Dependency avoidance was not treated as a default virtue; lightweight maintained libraries were considered when they improve correctness, accessibility, UX, maintainability, or delivery speed.
|
|
96
|
-
- [ ] Official setup flows are preferred when they produce better-supported current defaults.
|
|
97
|
-
- [ ] Docker, framework, package, and ecosystem claims were checked live when they could be stale.
|
|
98
|
-
- [ ] Token optimization and memory continuity defaults remain enabled unless the user explicitly opts out.
|
|
99
|
-
- [ ] If `.agent-context/state/active-memory.json` exists and the task made material project progress, the agent refreshed it directly before completion and preserved privacy/user-owned entries.
|
|
100
|
-
|
|
101
|
-
## 9. State And Governance
|
|
102
|
-
|
|
103
|
-
### 9.1 Context-Triggered Audit Mode
|
|
104
|
-
|
|
105
|
-
- [ ] Strict audit mode activates automatically on review and PR-intent workflows
|
|
106
|
-
- [ ] Small edits avoid heavy checks by default unless strict mode is explicitly requested
|
|
107
|
-
- [ ] User can always force strict audit mode manually
|
|
108
|
-
- [ ] Session handoff includes active architecture contract summary.
|
|
109
|
-
- [ ] Drift detection warns before direction changes.
|
|
110
|
-
- [ ] Direction changes require explicit user confirmation.
|
|
111
|
-
- [ ] Default responses avoid unnecessary state-file internals.
|
|
112
|
-
- [ ] State internals are exposed only on explicit request.
|
|
113
|
-
- [ ] Diagnostic mode can explain relevant state decisions when needed.
|
|
114
|
-
- [ ] Canonical rule source is explicitly defined and enforced
|
|
115
|
-
- [ ] Global domain governance is loaded lazily based on touched scope
|
|
116
|
-
- [ ] No conflicting duplicate rule instructions during normal flow
|
|
117
|
-
- [ ] Canonical rule source is explicit and duplicate/conflicting instructions are avoided.
|
|
118
|
-
|
|
119
|
-
### 15. Universal SOP Consolidation
|
|
120
|
-
|
|
121
|
-
- [ ] `.agent-context/rules/` remains the default guidance source for implementation and review.
|
|
122
|
-
- [ ] Security and testing requirements remain mandatory after static template purge.
|
|
123
|
-
- [ ] Coding flow is blocked if `docs/project-brief.md` is missing
|
|
124
|
-
- [ ] Coding flow is blocked if `docs/architecture-decision-record.md` (or `docs/Architecture-Decision-Record.md`) is missing
|
|
125
|
-
- [ ] Coding flow is blocked if root `README.md` is missing
|
|
126
|
-
- [ ] Coding flow is blocked if `docs/doc-index.md` is missing while `docs/` exists
|
|
127
|
-
- [ ] Coding flow is blocked if `docs/flow-overview.md` is missing
|
|
128
|
-
- [ ] Coding flow is blocked if `docs/database-schema.md` is missing while the project uses persistent data
|
|
129
|
-
- [ ] Coding flow is blocked if `docs/api-contract.md` is missing while the project exposes API or web application flows
|
|
130
|
-
- [ ] UI implementation flow is blocked if `docs/DESIGN.md` is missing
|
|
131
|
-
|
|
132
|
-
## Verdict
|
|
133
|
-
|
|
134
|
-
Report findings first, ordered by severity, with file/line references and concrete fixes. If no findings exist, say that explicitly and name any residual risk.
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id_prefix: API
|
|
3
|
-
domain: api-docs
|
|
4
|
-
priority: high
|
|
5
|
-
scope: backend
|
|
6
|
-
applies_to: [backend, fullstack]
|
|
7
|
-
keywords: [api-docs, api, contract, documentation]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# API Contract Boundary
|
|
11
|
-
|
|
12
|
-
## API-001: Execution Rules
|
|
13
|
-
1. Sync docs in the same commit when changing API, CLI, or schema.
|
|
14
|
-
2. Root README.md is mandatory. Keep it overview-level. No secrets.
|
|
15
|
-
3. Keep `docs/doc-index.md` as the routing map.
|
|
16
|
-
4. Use OpenAPI 3.1 for HTTP APIs by default.
|
|
17
|
-
5. Idempotency is mandatory for side-effect mutations (POST/PUT/PATCH).
|
|
18
|
-
6. Use Mermaid.js natively for all diagrams. No PlantUML/D2.
|
|
19
|
-
|
|
20
|
-
## API-002: Human Writing & Anti-Slop (Mandatory)
|
|
21
|
-
1. NO EMOJI in any formal documentation, code, or review summaries. This is absolute.
|
|
22
|
-
2. Use plain English and avoid generic AI cliches ("AI slop") in generated docs.
|
|
23
|
-
3. Keep code clean and efficient. Do not write convoluted/long code if a shorter, efficient solution exists without losing functionality.
|
|
24
|
-
4. Keep documentation short, clear, and directly actionable.
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
id_prefix: VER
|
|
3
|
-
domain: api-versioning
|
|
4
|
-
priority: medium
|
|
5
|
-
scope: backend
|
|
6
|
-
applies_to: [backend, fullstack]
|
|
7
|
-
keywords: [api-versioning, versioning, deprecation]
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
# API Versioning Boundary
|
|
11
|
-
|
|
12
|
-
## VER-001: Execution Rules
|
|
13
|
-
1. Never introduce breaking changes without versioning.
|
|
14
|
-
2. Maintain backward compatibility.
|
|
15
|
-
3. Use header-based or URL-path versioning explicitly.
|
|
16
|
-
4. Document deprecation windows before sunsetting endpoints.
|