@vesviet/agent-skills 5.6.0 → 5.7.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/INDEX.md +5 -5
- package/README.md +1 -1
- package/VERSION +1 -1
- package/adapters/antigravity/a2a-config.template.yaml +1 -1
- package/adapters/antigravity/role-skill-index.json +12 -12
- package/adapters/claude/CLAUDE_ADAPTER.md +1 -1
- package/adapters/cursor/README.md +185 -185
- package/bin/agent-skills.mjs +17 -14
- package/core/contracts/README.md +1 -1
- package/core/contracts/schemas/api-contract-spec.json +191 -191
- package/core/contracts/schemas/data-pipeline-spec.json +1 -1
- package/core/contracts/schemas/design-tokens-spec.json +19 -0
- package/core/contracts/schemas/feature-ticket.json +1293 -1293
- package/core/contracts/schemas/pull-request-spec.json +338 -338
- package/core/contracts/schemas/references/detailed/01-solution-and-governance.md +19 -19
- package/core/contracts/schemas/references/detailed/02-engineering-delivery.md +93 -93
- package/core/contracts/schemas/references/detailed/04-finance-accounting-and-compliance.md +54 -54
- package/core/contracts/schemas/references/detailed/05-design-and-content.md +92 -92
- package/core/contracts/schemas/references/detailed/06-seo-and-publishing.md +48 -48
- package/core/contracts/schemas/references/detailed/07-a2a-protocol.md +85 -85
- package/core/contracts/schemas/security-audit.json +143 -12
- package/core/contracts/schemas/system-design-spec.json +9 -1
- package/core/contracts/schemas/test-report.json +530 -530
- package/core/contracts/schemas/ux-flow-spec.json +66 -0
- package/core/roles/ai-systems-engineer.md +31 -18
- package/core/roles/aws-engineer.md +33 -29
- package/core/roles/backend-developer.md +6 -4
- package/core/roles/content-manager.md +7 -7
- package/core/roles/data-engineer.md +39 -36
- package/core/roles/qa-engineer.md +18 -18
- package/core/roles/references/ai-systems-engineer-review-checklist.md +11 -3
- package/core/roles/references/aws-engineer-review-checklist.md +29 -16
- package/core/roles/references/business-analyst-responsibilities.md +207 -207
- package/core/roles/references/content-manager-governance-standards.md +2 -2
- package/core/roles/references/content-manager-review-checklist.md +7 -1
- package/core/roles/references/data-engineer-review-checklist.md +11 -3
- package/core/roles/references/frontend-developer-responsibilities.md +275 -275
- package/core/roles/references/qa-engineer-review-checklist.md +10 -5
- package/core/roles/references/security-engineer-review-checklist.md +8 -0
- package/core/roles/references/solution-architect-review-checklist.md +6 -1
- package/core/roles/references/system-engineer-review-checklist.md +11 -0
- package/core/roles/references/ui-ux-designer-review-checklist.md +12 -0
- package/core/roles/security-engineer.md +35 -5
- package/core/roles/solution-architect.md +7 -7
- package/core/roles/system-engineer.md +470 -465
- package/core/roles/ui-ux-designer.md +17 -3
- package/core/skills/agent/agent-memory-compaction/references/anchored-schema-and-compaction-algorithms.md +141 -141
- package/core/skills/agent/architect-mcp-server/SKILL.md +3 -3
- package/core/skills/agent/decompose-agentic-system/SKILL.md +1 -1
- package/core/skills/ai/deploy-vllm-inference/SKILL.md +14 -14
- package/core/skills/ai-agent/agent-evaluation/SKILL.md +5 -0
- package/core/skills/ai-agent/context-optimization/SKILL.md +9 -0
- package/core/skills/backend/add-api-endpoint/SKILL.md +1 -0
- package/core/skills/backend/add-event-handler/SKILL.md +1 -0
- package/core/skills/backend/add-service-client/SKILL.md +1 -0
- package/core/skills/backend/build-mcp-server/SKILL.md +101 -100
- package/core/skills/backend/implement-auth/SKILL.md +1 -0
- package/core/skills/backend/implement-structured-outputs/SKILL.md +95 -94
- package/core/skills/backend/optimize-postgres/SKILL.md +1 -0
- package/core/skills/backend/scaffold-new-service/SKILL.md +1 -0
- package/core/skills/business/elicit-requirements/SKILL.md +102 -102
- package/core/skills/business/elicit-requirements/references/elicitation-techniques-and-babok-criteria.md +60 -60
- package/core/skills/business/trace-requirements-impact/SKILL.md +97 -97
- package/core/skills/business/trace-requirements-impact/references/rtm-graph-and-prioritization-models.md +109 -109
- package/core/skills/business/write-use-cases/SKILL.md +106 -106
- package/core/skills/business/write-use-cases/references/cockburn-scoping-and-13-field-template.md +135 -135
- package/core/skills/content/audit-content/SKILL.md +3 -2
- package/core/skills/content/audit-content/references/information-gain-rubric.md +1 -1
- package/core/skills/content/design-content-strategy/SKILL.md +6 -5
- package/core/skills/content/design-content-strategy/references/information-gain-and-decay-triage.md +2 -2
- package/core/skills/content/optimize-seo/SKILL.md +6 -5
- package/core/skills/content/optimize-seo/references/geo-ai-citation-playbook.md +2 -2
- package/core/skills/content/optimize-seo/references/process-and-checklist.md +1 -1
- package/core/skills/content/repurpose-content/SKILL.md +4 -3
- package/core/skills/content/write-article/SKILL.md +6 -5
- package/core/skills/content/write-copy/SKILL.md +3 -2
- package/core/skills/document/pptx/SKILL.md +1 -0
- package/core/skills/document/pptx/scripts/add_slide.py +0 -0
- package/core/skills/document/pptx/scripts/clean.py +0 -0
- package/core/skills/document/pptx/scripts/thumbnail.py +0 -0
- package/core/skills/document/xlsx/scripts/recalc.py +0 -0
- package/core/skills/documentation/write-documentation/SKILL.md +143 -143
- package/core/skills/documentation/write-tech-radar/SKILL.md +149 -149
- package/core/skills/foundation/accessibility-review/SKILL.md +160 -160
- package/core/skills/foundation/design-review/SKILL.md +11 -1
- package/core/skills/foundation/design-ux-flow/SKILL.md +13 -1
- package/core/skills/foundation/performance-profiling/SKILL.md +3 -1
- package/core/skills/foundation/release-notes/SKILL.md +192 -192
- package/core/skills/foundation/webapp-server-runner/scripts/with_server.py +0 -0
- package/core/skills/foundation/write-product-brief/SKILL.md +160 -160
- package/core/skills/foundation/write-tests/SKILL.md +11 -10
- package/core/skills/frontend/anti-ui-slop-finish-gate/SKILL.md +5 -0
- package/core/skills/frontend/design-md-specification/SKILL.md +1 -0
- package/core/skills/frontend/design-system-engineering/SKILL.md +4 -2
- package/core/skills/meetings-analysis/analyze-business-requirements/SKILL.md +1 -1
- package/core/skills/platform/add-telemetry-instrumentation/SKILL.md +2 -1
- package/core/skills/platform/aws-infrastructure/SKILL.md +12 -11
- package/core/skills/platform/cloudflare-email-service/SKILL.md +166 -166
- package/core/skills/platform/cloudflare-email-service/references/routing.md +199 -199
- package/core/skills/platform/debug-runtime-platform/SKILL.md +1 -0
- package/core/skills/platform/debug-workers-edge/SKILL.md +111 -111
- package/core/skills/platform/sandbox-sdk/SKILL.md +183 -183
- package/core/skills/platform/setup-gpu-finops/SKILL.md +111 -107
- package/core/skills/platform/setup-llm-gateway/SKILL.md +110 -108
- package/core/skills/platform/supply-chain-security/SKILL.md +1 -0
- package/core/skills/platform/system-design/SKILL.md +7 -0
- package/core/skills/platform/turnstile-spin/SKILL.md +118 -118
- package/core/skills/platform/turnstile-spin/scripts/auth-probe.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/fetch-secret.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/persist-skill.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/validate.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/widget-create.sh +0 -0
- package/core/skills/platform/turnstile-spin/scripts/worker-deploy.sh +0 -0
- package/core/skills/platform/turnstile-spin/templates/worker/src/index.ts +199 -199
- package/core/skills/platform/turnstile-spin/templates/worker/wrangler.toml +31 -31
- package/core/skills/platform/web-perf/SKILL.md +151 -151
- package/core/skills/platform/workers-best-practices/references/rules.md +463 -463
- package/core/skills/product/build-story-map/SKILL.md +104 -104
- package/core/skills/product/build-story-map/references/story-mapping-and-cpm-scheduling.md +101 -101
- package/core/skills/product/define-product-strategy/SKILL.md +105 -105
- package/core/skills/product/define-product-strategy/references/strategy-frameworks-and-pr-faq.md +142 -142
- package/core/skills/product/model-saas-metrics/SKILL.md +104 -104
- package/core/skills/product/model-saas-metrics/references/saas-unit-economics-and-pricing.md +110 -110
- package/core/skills/product/prioritize-roadmap/SKILL.md +106 -106
- package/core/skills/product/prioritize-roadmap/references/prioritization-scoring-and-kill-criteria.md +105 -105
- package/core/skills/repo-ops/commit-code/SKILL.md +190 -190
- package/core/skills/repo-ops/commit-code/references/multi-repo-and-deployment.md +21 -21
- package/core/skills/repo-ops/navigate-service/SKILL.md +199 -199
- package/core/skills/repo-ops/review-code/references/process-and-format.md +100 -100
- package/core/skills/repo-ops/review-service/SKILL.md +186 -186
- package/core/skills/repo-ops/troubleshoot-service/SKILL.md +127 -127
- package/core/skills/repo-ops/troubleshoot-service/references/failure-modes-and-security.md +22 -22
- package/core/skills/repo-ops/troubleshoot-service/references/suggested-process.md +110 -110
- package/core/skills/security-data/build-data-pipeline/SKILL.md +15 -14
- package/core/skills/security-data/build-data-pipeline/references/producer-contracts-and-lakehouse.md +5 -5
- package/core/skills/security-data/database-maintenance/SKILL.md +1 -0
- package/core/skills/security-data/database-maintenance/references/relational-and-vector-maintenance.md +5 -5
- package/core/skills/security-data/manage-secrets/SKILL.md +3 -0
- package/core/skills/security-data/optimize-olap-database/SKILL.md +14 -13
- package/core/skills/security-data/optimize-olap-database/references/olap-database-guide.md +2 -2
- package/core/skills/security-data/prompt-injection-defense/SKILL.md +3 -0
- package/core/skills/security-data/query-analytical-engine/SKILL.md +8 -7
- package/core/skills/security-data/query-analytical-engine/references/analytical-query-guide.md +3 -3
- package/core/skills/security-data/security-audit/SKILL.md +126 -119
- package/core/workflows/add-new-feature.md +212 -212
- package/core/workflows/agent-a2a-delegation.md +142 -142
- package/core/workflows/bug-fix.md +147 -147
- package/core/workflows/build-deploy.md +208 -208
- package/core/workflows/code-review.md +137 -137
- package/core/workflows/curriculum-delivery.md +1 -1
- package/core/workflows/dependency-upgrade.md +193 -193
- package/core/workflows/feature-delivery.md +149 -149
- package/core/workflows/hotfix-production.md +172 -172
- package/core/workflows/qa-validation.md +231 -231
- package/core/workflows/refactoring.md +154 -154
- package/core/workflows/revert-deployment.md +147 -147
- package/core/workflows/security-incident-response.md +191 -191
- package/core/workflows/seo-content-lifecycle.md +91 -91
- package/core/workflows/service-review-release.md +223 -223
- package/core/workflows/setup-new-service.md +214 -214
- package/core/workflows/tech-repo-review.md +245 -245
- package/core/workflows/troubleshooting.md +241 -241
- package/overlays/astro-cloudflare/README.md +93 -93
- package/overlays/data-analyst-stack/README.md +109 -109
- package/overlays/data-analyst-stack/rules/metric-dashboard-templates.md +135 -135
- package/overlays/data-analyst-stack/rules/stack-conventions.md +80 -80
- package/overlays/ecommerce-microservices/README.md +65 -65
- package/overlays/go-microservices/README.md +78 -78
- package/overlays/go-microservices/rules/go-conventions.md +223 -223
- package/overlays/laravel-filament/README.md +90 -90
- package/overlays/laravel-filament/rules/laravel-conventions.md +220 -220
- package/overlays/laravel-filament/skills/develop-laravel-feature/SKILL.md +141 -141
- package/overlays/laravel-filament/workflows/deploy-laravel.md +133 -133
- package/overlays/obj-configurator/rules/obj-project-rules.md +111 -111
- package/overlays/obj-configurator/skills/develop-obj-feature/SKILL.md +71 -71
- package/overlays/r3f-stack/README.md +89 -89
- package/overlays/r3f-stack/rules/stub.md +43 -43
- package/overlays/r3f-stack/skills/debug-3d-scene/SKILL.md +166 -166
- package/overlays/r3f-stack/skills/integrate-r3f-three-legacy/SKILL.md +159 -159
- package/overlays/r3f-stack/skills/optimize-3d-assets/SKILL.md +128 -128
- package/overlays/seo-publishing/rules/site-mix-and-cannibalization.md +52 -52
- package/overlays/ui-design-system/rules/handoff-conventions.md +73 -73
- package/package.json +2 -2
- package/core/README.md +0 -53
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: commit-code
|
|
3
|
-
description: Validate and package a finished change into a clean commit by following repo-local validation, generation, release-note, and approval rules. Use when the user explicitly asks to prepare or create a commit.
|
|
4
|
-
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, run_dev_server, execute_command]
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Commit Code
|
|
8
|
-
|
|
9
|
-
Use this skill when a change is complete and needs to be prepared for commit in a safe, reviewable way.
|
|
10
|
-
|
|
11
|
-
This skill covers commit preparation and commit creation. It does not imply permission to push, tag, or publish a release.
|
|
12
|
-
|
|
13
|
-
## When to Use
|
|
14
|
-
|
|
15
|
-
- the user explicitly asks to prepare/create a commit
|
|
16
|
-
- packaging a finished change for delivery
|
|
17
|
-
- running repo-local validation + release-note rules
|
|
18
|
-
- applying approval rules before commit
|
|
19
|
-
|
|
20
|
-
## Core Rules
|
|
21
|
-
|
|
22
|
-
- do not create a commit unless the user or repo-local process explicitly allows that specific commit action
|
|
23
|
-
- do not push commits, create tags, or publish releases unless the user or repo-local process explicitly allows that specific action
|
|
24
|
-
- do not commit broken builds or knowingly failing verification
|
|
25
|
-
- do not hand-edit generated files unless the repo explicitly expects that
|
|
26
|
-
- remove local-only artifacts before committing
|
|
27
|
-
- follow the repo's source of truth for generated code, version metadata, and deployment configuration
|
|
28
|
-
- keep commits scoped to the intended change
|
|
29
|
-
- **commit signing**: enable GPG or SSH key signing (`git config commit.gpgsign true`) for identity verification; check repo `CONTRIBUTING.md` for whether DCO (`Signed-off-by:`) is required for IP provenance
|
|
30
|
-
- **git-blame-ignore-revs**: when an AI agent performs bulk reformatting or AI-assisted refactoring, add the resulting commit hash to `.git-blame-ignore-revs` so `git blame` continues to point to the human authors of business logic
|
|
31
|
-
- **semantic-release awareness**: Conventional Commits feed automated release tools (Semantic Release, Release Please) that bump SemVer and generate changelogs; warn that fully automated releases can produce low-quality changelogs — consider Changesets for human-curated bundling in monorepos
|
|
32
|
-
- treat every commit as a potential entry point for an attacker; never include internal hostnames, customer identifiers, or credential patterns in the diff or commit message (OWASP ASI03)
|
|
33
|
-
- run secret scanning on every staged change; reject any commit that contains a high-entropy match (OWASP ASI04)
|
|
34
|
-
- keep commit messages free of internal workflow labels, severity labels, or AI/agent wording; the commit is a user-visible artifact
|
|
35
|
-
|
|
36
|
-
## Output Contracts
|
|
37
|
-
|
|
38
|
-
When the commit is part of a coordinated multi-role delivery, emit:
|
|
39
|
-
|
|
40
|
-
- **`contracts/schemas/code-review-finding.json`** (adapted for the commit) capturing the diff scope, the validation runs, and any skipped checks. The receiving agent can then validate the commit against the review checklist.
|
|
41
|
-
- For human-readable reports, a markdown summary of the diff scope, validation results, and the user-approval timestamp.
|
|
42
|
-
|
|
43
|
-
Skip emission for single-commit local changes that do not cross a role boundary.
|
|
44
|
-
|
|
45
|
-
## Failure Modes
|
|
46
|
-
|
|
47
|
-
- **Commit without approval**: a commit is created without explicit user approval. Mitigation: per the meta-rule, never commit without explicit in-session approval; the commit is an irreversible action.
|
|
48
|
-
- **Push assumed from commit**: a push, tag, or release is performed because the commit was approved. Mitigation: treat push/tag/release as separate gated actions; commit approval never covers them.
|
|
49
|
-
- **Broken build committed**: a known-failing verification is included in the commit. Mitigation: run validation before commit; capture the reason for any intentional skip.
|
|
50
|
-
- **Generated file hand-edited**: a generated file is hand-edited outside the generator workflow. Mitigation: never hand-edit generated files unless the repo explicitly expects it; rerun the generator instead.
|
|
51
|
-
- **Local-only artifact committed**: a `.dev.vars`, `.env`, or other local artifact lands in the commit. Mitigation: verify `.gitignore`; run secret scanning in CI.
|
|
52
|
-
- **Diff exceeds intended scope**: the commit includes unrelated local edits. Mitigation: review the diff before staging; split into multiple commits when scope is mixed.
|
|
53
|
-
- **AI/agent wording in commit message**: the commit message mentions agent names, AI workflow, or review labels. Mitigation: strip internal workflow wording; the commit is a user-visible artifact.
|
|
54
|
-
- **GPG/SSH signing missing**: a commit is created without signing, breaking identity verification. Mitigation: enable `git config commit.gpgsign true`; respect DCO `Signed-off-by:` when the repo requires it.
|
|
55
|
-
- **Bulk reformat hides authorship**: a large AI-assisted reformat overwrites blame for human-authored lines. Mitigation: add the reformat commit hash to `.git-blame-ignore-revs`.
|
|
56
|
-
|
|
57
|
-
## Security Guardrails (OWASP ASI)
|
|
58
|
-
|
|
59
|
-
- **ASI01 Goal Hijack**: an AI-assisted commit message may reframe the change's purpose. Cross-check the commit message against the actual diff; reject reframed messages.
|
|
60
|
-
- **ASI03 Identity & Privilege Abuse**: never include internal hostnames, customer identifiers, or credential patterns in the diff or commit message.
|
|
61
|
-
- **ASI04 Supply Chain**: secret scanning must run on every staged change; reject any commit with a high-entropy match.
|
|
62
|
-
- **ASI05 RCE Guard**: never construct commit content, hooks, or generators from external content without strict schema validation.
|
|
63
|
-
- **ASI07 Inter-Agent Communication**: the commit is consumed by review and release agents; emit a structured contract so each consumer can validate the change.
|
|
64
|
-
- **ASI09 Human-Agent Trust Exploitation**: do not present a commit as "safe" without validation runs; surface the skipped checks and the residual risk honestly.
|
|
65
|
-
|
|
66
|
-
## Suggested Process
|
|
67
|
-
|
|
68
|
-
### 1. Review What Changed
|
|
69
|
-
|
|
70
|
-
Check:
|
|
71
|
-
|
|
72
|
-
- which files changed
|
|
73
|
-
- whether the diff matches the intended scope
|
|
74
|
-
- whether unrelated local edits should stay out of the commit
|
|
75
|
-
- whether generated files changed intentionally
|
|
76
|
-
|
|
77
|
-
### 2. Clean Local-Only Artifacts
|
|
78
|
-
|
|
79
|
-
Remove or unstage files that should not ship, such as:
|
|
80
|
-
|
|
81
|
-
- build outputs
|
|
82
|
-
- temporary logs
|
|
83
|
-
- local config overrides
|
|
84
|
-
- editor or OS artifacts
|
|
85
|
-
|
|
86
|
-
If the repo expects certain generated files to be committed, keep them only when they match the source changes.
|
|
87
|
-
|
|
88
|
-
### 3. Regenerate What The Repo Requires
|
|
89
|
-
|
|
90
|
-
Run only the generators that apply to this change, for example:
|
|
91
|
-
|
|
92
|
-
- API or schema generation
|
|
93
|
-
- dependency injection generation
|
|
94
|
-
- client or SDK generation
|
|
95
|
-
- code formatting or scaffolding steps
|
|
96
|
-
|
|
97
|
-
Use the repo's official commands instead of guessing.
|
|
98
|
-
|
|
99
|
-
### 4. Validate
|
|
100
|
-
|
|
101
|
-
Run the normal quality gates for the repo, such as:
|
|
102
|
-
|
|
103
|
-
- tests
|
|
104
|
-
- lint or static analysis
|
|
105
|
-
- build
|
|
106
|
-
- targeted checks for migrations, contracts, or packaging
|
|
107
|
-
|
|
108
|
-
If you intentionally skip a check, capture the reason explicitly.
|
|
109
|
-
|
|
110
|
-
### 5. Update User-Visible Metadata
|
|
111
|
-
|
|
112
|
-
Update what the repo expects, when applicable:
|
|
113
|
-
|
|
114
|
-
- changelog
|
|
115
|
-
- release notes
|
|
116
|
-
- migration notes
|
|
117
|
-
- README or operational docs
|
|
118
|
-
|
|
119
|
-
Do not include internal workflow wording in commit text or other user-visible artifacts.
|
|
120
|
-
|
|
121
|
-
### 6. Prepare The Commit Message
|
|
122
|
-
|
|
123
|
-
The commit message should:
|
|
124
|
-
|
|
125
|
-
- follow repo-local conventions first
|
|
126
|
-
- describe the actual change, not the process around it
|
|
127
|
-
- stay free of internal workflow labels or AI/agent wording
|
|
128
|
-
- stay scoped to the files being committed
|
|
129
|
-
|
|
130
|
-
If the repo uses structured commit formats, follow that format. Otherwise prefer a short, descriptive subject.
|
|
131
|
-
|
|
132
|
-
Examples:
|
|
133
|
-
|
|
134
|
-
- `add order history endpoint`
|
|
135
|
-
- `fix duplicate payment callback handling`
|
|
136
|
-
- `split pricing validation into separate module`
|
|
137
|
-
|
|
138
|
-
### 7. Commit
|
|
139
|
-
|
|
140
|
-
Before committing, confirm:
|
|
141
|
-
|
|
142
|
-
- validation is complete
|
|
143
|
-
- staged files are intentional
|
|
144
|
-
- user approval exists for the commit action
|
|
145
|
-
|
|
146
|
-
Then create the commit using the repo's normal workflow.
|
|
147
|
-
|
|
148
|
-
### 8. Handle Push Or Publish Separately
|
|
149
|
-
|
|
150
|
-
After the commit exists, treat these as separate gated actions:
|
|
151
|
-
|
|
152
|
-
- pushing a branch or commit
|
|
153
|
-
- creating a tag
|
|
154
|
-
- opening or publishing a release
|
|
155
|
-
- updating remote release metadata
|
|
156
|
-
|
|
157
|
-
Do not assume commit approval also covers any of these actions.
|
|
158
|
-
|
|
159
|
-
## Multi-Repo Or Shared Module Changes
|
|
160
|
-
|
|
161
|
-
Multi-repo or shared-module changes and deployment or release config
|
|
162
|
-
changes are documented in
|
|
163
|
-
[`references/multi-repo-and-deployment.md`](references/multi-repo-and-deployment.md).
|
|
164
|
-
|
|
165
|
-
## Checklist
|
|
166
|
-
|
|
167
|
-
- [ ] diff matches intended scope
|
|
168
|
-
- [ ] local-only artifacts removed
|
|
169
|
-
- [ ] required generation completed
|
|
170
|
-
- [ ] validation completed
|
|
171
|
-
- [ ] user-visible metadata updated when needed
|
|
172
|
-
- [ ] commit message follows repo conventions
|
|
173
|
-
- [ ] explicit approval exists for the commit action
|
|
174
|
-
- [ ] explicit approval exists for any push, tag, or release action
|
|
175
|
-
|
|
176
|
-
## Adaptation Notes
|
|
177
|
-
|
|
178
|
-
- not every repo uses structured commit types
|
|
179
|
-
- not every repo commits generated files
|
|
180
|
-
- validation may be full-repo or target-specific depending on the codebase
|
|
181
|
-
- release notes, version files, or deployment manifests may live in another repo
|
|
182
|
-
|
|
183
|
-
## Related Skills
|
|
184
|
-
|
|
185
|
-
- **review-code**: Check risky changes before committing
|
|
186
|
-
- **write-tests**: Add or update validation before delivery
|
|
187
|
-
- **review-service**: Confirm release readiness for broad changes
|
|
188
|
-
- **setup-deployment**: Validate deployment source-of-truth changes
|
|
189
|
-
- **manage-secrets**: Keep sensitive values out of committed artifacts
|
|
190
|
-
|
|
1
|
+
---
|
|
2
|
+
name: commit-code
|
|
3
|
+
description: Validate and package a finished change into a clean commit by following repo-local validation, generation, release-note, and approval rules. Use when the user explicitly asks to prepare or create a commit.
|
|
4
|
+
allowed-tools: [read_file, write_file, edit_file, create_file, search_code, run_tests, run_linter, run_build, run_dev_server, execute_command]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Commit Code
|
|
8
|
+
|
|
9
|
+
Use this skill when a change is complete and needs to be prepared for commit in a safe, reviewable way.
|
|
10
|
+
|
|
11
|
+
This skill covers commit preparation and commit creation. It does not imply permission to push, tag, or publish a release.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- the user explicitly asks to prepare/create a commit
|
|
16
|
+
- packaging a finished change for delivery
|
|
17
|
+
- running repo-local validation + release-note rules
|
|
18
|
+
- applying approval rules before commit
|
|
19
|
+
|
|
20
|
+
## Core Rules
|
|
21
|
+
|
|
22
|
+
- do not create a commit unless the user or repo-local process explicitly allows that specific commit action
|
|
23
|
+
- do not push commits, create tags, or publish releases unless the user or repo-local process explicitly allows that specific action
|
|
24
|
+
- do not commit broken builds or knowingly failing verification
|
|
25
|
+
- do not hand-edit generated files unless the repo explicitly expects that
|
|
26
|
+
- remove local-only artifacts before committing
|
|
27
|
+
- follow the repo's source of truth for generated code, version metadata, and deployment configuration
|
|
28
|
+
- keep commits scoped to the intended change
|
|
29
|
+
- **commit signing**: enable GPG or SSH key signing (`git config commit.gpgsign true`) for identity verification; check repo `CONTRIBUTING.md` for whether DCO (`Signed-off-by:`) is required for IP provenance
|
|
30
|
+
- **git-blame-ignore-revs**: when an AI agent performs bulk reformatting or AI-assisted refactoring, add the resulting commit hash to `.git-blame-ignore-revs` so `git blame` continues to point to the human authors of business logic
|
|
31
|
+
- **semantic-release awareness**: Conventional Commits feed automated release tools (Semantic Release, Release Please) that bump SemVer and generate changelogs; warn that fully automated releases can produce low-quality changelogs — consider Changesets for human-curated bundling in monorepos
|
|
32
|
+
- treat every commit as a potential entry point for an attacker; never include internal hostnames, customer identifiers, or credential patterns in the diff or commit message (OWASP ASI03)
|
|
33
|
+
- run secret scanning on every staged change; reject any commit that contains a high-entropy match (OWASP ASI04)
|
|
34
|
+
- keep commit messages free of internal workflow labels, severity labels, or AI/agent wording; the commit is a user-visible artifact
|
|
35
|
+
|
|
36
|
+
## Output Contracts
|
|
37
|
+
|
|
38
|
+
When the commit is part of a coordinated multi-role delivery, emit:
|
|
39
|
+
|
|
40
|
+
- **`contracts/schemas/code-review-finding.json`** (adapted for the commit) capturing the diff scope, the validation runs, and any skipped checks. The receiving agent can then validate the commit against the review checklist.
|
|
41
|
+
- For human-readable reports, a markdown summary of the diff scope, validation results, and the user-approval timestamp.
|
|
42
|
+
|
|
43
|
+
Skip emission for single-commit local changes that do not cross a role boundary.
|
|
44
|
+
|
|
45
|
+
## Failure Modes
|
|
46
|
+
|
|
47
|
+
- **Commit without approval**: a commit is created without explicit user approval. Mitigation: per the meta-rule, never commit without explicit in-session approval; the commit is an irreversible action.
|
|
48
|
+
- **Push assumed from commit**: a push, tag, or release is performed because the commit was approved. Mitigation: treat push/tag/release as separate gated actions; commit approval never covers them.
|
|
49
|
+
- **Broken build committed**: a known-failing verification is included in the commit. Mitigation: run validation before commit; capture the reason for any intentional skip.
|
|
50
|
+
- **Generated file hand-edited**: a generated file is hand-edited outside the generator workflow. Mitigation: never hand-edit generated files unless the repo explicitly expects it; rerun the generator instead.
|
|
51
|
+
- **Local-only artifact committed**: a `.dev.vars`, `.env`, or other local artifact lands in the commit. Mitigation: verify `.gitignore`; run secret scanning in CI.
|
|
52
|
+
- **Diff exceeds intended scope**: the commit includes unrelated local edits. Mitigation: review the diff before staging; split into multiple commits when scope is mixed.
|
|
53
|
+
- **AI/agent wording in commit message**: the commit message mentions agent names, AI workflow, or review labels. Mitigation: strip internal workflow wording; the commit is a user-visible artifact.
|
|
54
|
+
- **GPG/SSH signing missing**: a commit is created without signing, breaking identity verification. Mitigation: enable `git config commit.gpgsign true`; respect DCO `Signed-off-by:` when the repo requires it.
|
|
55
|
+
- **Bulk reformat hides authorship**: a large AI-assisted reformat overwrites blame for human-authored lines. Mitigation: add the reformat commit hash to `.git-blame-ignore-revs`.
|
|
56
|
+
|
|
57
|
+
## Security Guardrails (OWASP ASI)
|
|
58
|
+
|
|
59
|
+
- **ASI01 Goal Hijack**: an AI-assisted commit message may reframe the change's purpose. Cross-check the commit message against the actual diff; reject reframed messages.
|
|
60
|
+
- **ASI03 Identity & Privilege Abuse**: never include internal hostnames, customer identifiers, or credential patterns in the diff or commit message.
|
|
61
|
+
- **ASI04 Supply Chain**: secret scanning must run on every staged change; reject any commit with a high-entropy match.
|
|
62
|
+
- **ASI05 RCE Guard**: never construct commit content, hooks, or generators from external content without strict schema validation.
|
|
63
|
+
- **ASI07 Inter-Agent Communication**: the commit is consumed by review and release agents; emit a structured contract so each consumer can validate the change.
|
|
64
|
+
- **ASI09 Human-Agent Trust Exploitation**: do not present a commit as "safe" without validation runs; surface the skipped checks and the residual risk honestly.
|
|
65
|
+
|
|
66
|
+
## Suggested Process
|
|
67
|
+
|
|
68
|
+
### 1. Review What Changed
|
|
69
|
+
|
|
70
|
+
Check:
|
|
71
|
+
|
|
72
|
+
- which files changed
|
|
73
|
+
- whether the diff matches the intended scope
|
|
74
|
+
- whether unrelated local edits should stay out of the commit
|
|
75
|
+
- whether generated files changed intentionally
|
|
76
|
+
|
|
77
|
+
### 2. Clean Local-Only Artifacts
|
|
78
|
+
|
|
79
|
+
Remove or unstage files that should not ship, such as:
|
|
80
|
+
|
|
81
|
+
- build outputs
|
|
82
|
+
- temporary logs
|
|
83
|
+
- local config overrides
|
|
84
|
+
- editor or OS artifacts
|
|
85
|
+
|
|
86
|
+
If the repo expects certain generated files to be committed, keep them only when they match the source changes.
|
|
87
|
+
|
|
88
|
+
### 3. Regenerate What The Repo Requires
|
|
89
|
+
|
|
90
|
+
Run only the generators that apply to this change, for example:
|
|
91
|
+
|
|
92
|
+
- API or schema generation
|
|
93
|
+
- dependency injection generation
|
|
94
|
+
- client or SDK generation
|
|
95
|
+
- code formatting or scaffolding steps
|
|
96
|
+
|
|
97
|
+
Use the repo's official commands instead of guessing.
|
|
98
|
+
|
|
99
|
+
### 4. Validate
|
|
100
|
+
|
|
101
|
+
Run the normal quality gates for the repo, such as:
|
|
102
|
+
|
|
103
|
+
- tests
|
|
104
|
+
- lint or static analysis
|
|
105
|
+
- build
|
|
106
|
+
- targeted checks for migrations, contracts, or packaging
|
|
107
|
+
|
|
108
|
+
If you intentionally skip a check, capture the reason explicitly.
|
|
109
|
+
|
|
110
|
+
### 5. Update User-Visible Metadata
|
|
111
|
+
|
|
112
|
+
Update what the repo expects, when applicable:
|
|
113
|
+
|
|
114
|
+
- changelog
|
|
115
|
+
- release notes
|
|
116
|
+
- migration notes
|
|
117
|
+
- README or operational docs
|
|
118
|
+
|
|
119
|
+
Do not include internal workflow wording in commit text or other user-visible artifacts.
|
|
120
|
+
|
|
121
|
+
### 6. Prepare The Commit Message
|
|
122
|
+
|
|
123
|
+
The commit message should:
|
|
124
|
+
|
|
125
|
+
- follow repo-local conventions first
|
|
126
|
+
- describe the actual change, not the process around it
|
|
127
|
+
- stay free of internal workflow labels or AI/agent wording
|
|
128
|
+
- stay scoped to the files being committed
|
|
129
|
+
|
|
130
|
+
If the repo uses structured commit formats, follow that format. Otherwise prefer a short, descriptive subject.
|
|
131
|
+
|
|
132
|
+
Examples:
|
|
133
|
+
|
|
134
|
+
- `add order history endpoint`
|
|
135
|
+
- `fix duplicate payment callback handling`
|
|
136
|
+
- `split pricing validation into separate module`
|
|
137
|
+
|
|
138
|
+
### 7. Commit
|
|
139
|
+
|
|
140
|
+
Before committing, confirm:
|
|
141
|
+
|
|
142
|
+
- validation is complete
|
|
143
|
+
- staged files are intentional
|
|
144
|
+
- user approval exists for the commit action
|
|
145
|
+
|
|
146
|
+
Then create the commit using the repo's normal workflow.
|
|
147
|
+
|
|
148
|
+
### 8. Handle Push Or Publish Separately
|
|
149
|
+
|
|
150
|
+
After the commit exists, treat these as separate gated actions:
|
|
151
|
+
|
|
152
|
+
- pushing a branch or commit
|
|
153
|
+
- creating a tag
|
|
154
|
+
- opening or publishing a release
|
|
155
|
+
- updating remote release metadata
|
|
156
|
+
|
|
157
|
+
Do not assume commit approval also covers any of these actions.
|
|
158
|
+
|
|
159
|
+
## Multi-Repo Or Shared Module Changes
|
|
160
|
+
|
|
161
|
+
Multi-repo or shared-module changes and deployment or release config
|
|
162
|
+
changes are documented in
|
|
163
|
+
[`references/multi-repo-and-deployment.md`](references/multi-repo-and-deployment.md).
|
|
164
|
+
|
|
165
|
+
## Checklist
|
|
166
|
+
|
|
167
|
+
- [ ] diff matches intended scope
|
|
168
|
+
- [ ] local-only artifacts removed
|
|
169
|
+
- [ ] required generation completed
|
|
170
|
+
- [ ] validation completed
|
|
171
|
+
- [ ] user-visible metadata updated when needed
|
|
172
|
+
- [ ] commit message follows repo conventions
|
|
173
|
+
- [ ] explicit approval exists for the commit action
|
|
174
|
+
- [ ] explicit approval exists for any push, tag, or release action
|
|
175
|
+
|
|
176
|
+
## Adaptation Notes
|
|
177
|
+
|
|
178
|
+
- not every repo uses structured commit types
|
|
179
|
+
- not every repo commits generated files
|
|
180
|
+
- validation may be full-repo or target-specific depending on the codebase
|
|
181
|
+
- release notes, version files, or deployment manifests may live in another repo
|
|
182
|
+
|
|
183
|
+
## Related Skills
|
|
184
|
+
|
|
185
|
+
- **review-code**: Check risky changes before committing
|
|
186
|
+
- **write-tests**: Add or update validation before delivery
|
|
187
|
+
- **review-service**: Confirm release readiness for broad changes
|
|
188
|
+
- **setup-deployment**: Validate deployment source-of-truth changes
|
|
189
|
+
- **manage-secrets**: Keep sensitive values out of committed artifacts
|
|
190
|
+
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
# Commit Code — Multi-Repo and Deployment (Reference)
|
|
2
|
-
|
|
3
|
-
## Multi-Repo Or Shared Module Changes
|
|
4
|
-
|
|
5
|
-
When a change spans more than one repo or module:
|
|
6
|
-
|
|
7
|
-
1. identify the dependency order
|
|
8
|
-
2. validate and land the upstream change first when required
|
|
9
|
-
3. update downstream consumers to the correct version or revision
|
|
10
|
-
4. revalidate after the dependency update
|
|
11
|
-
5. keep each commit scoped to one repo or module boundary
|
|
12
|
-
|
|
13
|
-
## Deployment Or Release Config Changes
|
|
14
|
-
|
|
15
|
-
If deployment or release configuration changed:
|
|
16
|
-
|
|
17
|
-
- commit the source-of-truth config, not just a live runtime patch
|
|
18
|
-
- avoid release metadata edits that CI or the platform is supposed to own
|
|
19
|
-
- capture any rollout dependency or manual follow-up clearly
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
# Commit Code — Multi-Repo and Deployment (Reference)
|
|
2
|
+
|
|
3
|
+
## Multi-Repo Or Shared Module Changes
|
|
4
|
+
|
|
5
|
+
When a change spans more than one repo or module:
|
|
6
|
+
|
|
7
|
+
1. identify the dependency order
|
|
8
|
+
2. validate and land the upstream change first when required
|
|
9
|
+
3. update downstream consumers to the correct version or revision
|
|
10
|
+
4. revalidate after the dependency update
|
|
11
|
+
5. keep each commit scoped to one repo or module boundary
|
|
12
|
+
|
|
13
|
+
## Deployment Or Release Config Changes
|
|
14
|
+
|
|
15
|
+
If deployment or release configuration changed:
|
|
16
|
+
|
|
17
|
+
- commit the source-of-truth config, not just a live runtime patch
|
|
18
|
+
- avoid release metadata edits that CI or the platform is supposed to own
|
|
19
|
+
- capture any rollout dependency or manual follow-up clearly
|
|
20
|
+
|
|
21
|
+
|