Skip to content

chore: apply AI Golden Path (L1→L3)#82

Open
huandrey wants to merge 1 commit into
masterfrom
ai-setup
Open

chore: apply AI Golden Path (L1→L3)#82
huandrey wants to merge 1 commit into
masterfrom
ai-setup

Conversation

@huandrey

Copy link
Copy Markdown

Summary

  • Adds AGENTS.md with library-specific posture (published npm library, public API contract discipline, Releasy-gated releases)
  • Adds .agents/rules/ with three rules: baseline stack (00), Jest 22 test discipline (10), and API breaking-change classification (20)
  • Adds .agents/commands/ for SDD Lite and SDD Full bootstrap workflows
  • Vendors specification and implementing skills from vtex/vtex-agent-skills
  • Adds .specify/memory/constitution.md with permanent, non-negotiable repo rules
  • Adds specs/README.md and docs/scope_of_work/README.md
  • Updates .gitignore to exclude ephemeral SDD artifacts

Compliance level

L1 → L2 → L3

Test plan

  • AGENTS.md loads correctly in Claude Code (/help)
  • .claude/rules, .claude/skills, .claude/commands symlinks resolve
  • /specification "<task>" generates a spec in specs/
  • /implementing "specs/<name>.md" runs the TDD loop
  • Ephemeral artifacts (plan.md, tasks.md, analysis.md) are gitignored

Brings @vtex/delivery-packages to AI Compliance Level 3 by adding the
artifacts that orient AI agents and new engineers around this library's
constraints.

L1 — AGENTS.md + CLAUDE.md symlink + .agents/ and .claude/ structure
L2 — .specify/memory/constitution.md + spec-kit configs
L3 — Vendored vtex-agent-skills (specification, implementing)

Library-specific adaptations:
- Constitution and rules emphasize public-API discipline: every export
  from src/index.js is a contract with downstream consumers
- A dedicated rule (20-api-discipline.md) classifies breaking vs
  non-breaking changes and documents the deprecation path
- Test rule documents the tests/ folder convention (not colocated) and
  the shared fixtures (Order.json, mockGenerator.js)
- Commands flag the rare cases where SDD Full applies (public API
  changes, dependency upgrades, cross-consumer breakages)
- Husky escape hatches (lint-not-beta, test-not-beta) documented

Stack documented:
- Rollup 0.56 producing CJS + ESM dist outputs
- Babel 6 with modules:false for production ESM emission
- Jest 22 + ESLint 4 + Prettier
- Husky 1 for pre-push gating
- Single runtime dep: @vtex/estimate-calculator
- Releases managed by Releasy (_releasy.json)

Aligned with the spec-kit cleanup convention from
vtex/portal-ui#115 / vtex/vcs.checkout-ui#1634 / vtex/checkout-confirmation-ui#187.
@sonar-workflows

Copy link
Copy Markdown

Failed Quality Gate failed

  • 116 New Issues (is greater than 0)
  • 20.30% Duplicated Lines (%) on New Code (is greater than 3.00%)
  • 0.00% Security Hotspots Reviewed on New Code (is less than 100.00%)

Project ID: delivery-packages

View in SonarQube

@Lurian Lurian left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, só deixeis dois comentários sobre symlinks faltando

Comment thread .agents/README.md
| Tool | Reads from | Mechanism |
|---|---|---|
| Claude Code | `.claude/skills`, `.claude/commands`, `.claude/rules` | Symlinks → `../.agents/*` |
| Cursor | `.cursor/rules/` | Symlink → `../.agents/rules` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O README documenta que Cursor lê as rules de .cursor/rules/ via symlink, mas esse arquivo não foi criado no PR.

Sem ele, agentes usando Cursor não terão as rules de 00-, 10- e 20- auto-attached nas conversas.

Sugestão de follow-up:

mkdir -p .cursor && ln -s ../.agents/rules .cursor/rules

Comment thread .agents/README.md
|---|---|---|
| Claude Code | `.claude/skills`, `.claude/commands`, `.claude/rules` | Symlinks → `../.agents/*` |
| Cursor | `.cursor/rules/` | Symlink → `../.agents/rules` |
| Copilot | `.github/copilot-instructions.md` | Symlink → `../AGENTS.md` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

O README documenta que Copilot lê de .github/copilot-instructions.md (symlink para AGENTS.md), mas o arquivo não foi criado.

Sugestão de follow-up:

mkdir -p .github && ln -s ../AGENTS.md .github/copilot-instructions.md

@lucvysk

lucvysk commented May 15, 2026

Copy link
Copy Markdown

Revisar o sonar também

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants