-
Notifications
You must be signed in to change notification settings - Fork 0
Audit SDK against official Nequi specs: crash fixes, spec alignment, gift codes module #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
1a13a83
chore: update dependencies and schema version in configuration files
pulgueta 21c2175
fix(server): harden auth, request handling and error contract
pulgueta f3bf1da
fix(server): align endpoints and schemas with official API specs
pulgueta 6c969f6
feat(server): add gift codes (Códigos Plata) module
pulgueta 71e1587
chore(server): repair typecheck gate and ship CJS build with types
pulgueta 2bd5d79
chore: drop bun lockfile and refresh pnpm-lock
pulgueta 60325b5
docs(server): document new options, gift codes and error fields
pulgueta ca7f412
ci(workflows): use pnpm instead of bun
pulgueta 8cb45bd
chore: drop root workspaces field superseded by pnpm-workspace.yaml
pulgueta 7bd8644
chore(server): pin node engine to >=24 and annotate ignoreDeprecations
pulgueta b636bdc
fix(server): require documentType and documentNumber together in disp…
pulgueta 806578a
fix(lint): address biome warnings
pulgueta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| --- | ||
| description: Load Turborepo skill for creating workflows, tasks, and pipelines in monorepos. Use when users ask to "create a workflow", "make a task", "generate a pipeline", or set up build orchestration. | ||
| --- | ||
|
|
||
| Load the Turborepo skill and help with monorepo task orchestration: creating workflows, configuring tasks, setting up pipelines, and optimizing builds. | ||
|
|
||
| ## Workflow | ||
|
|
||
| ### Step 1: Load turborepo skill | ||
|
|
||
| ``` | ||
| skill({ name: 'turborepo' }) | ||
| ``` | ||
|
|
||
| ### Step 2: Identify task type from user request | ||
|
|
||
| Analyze $ARGUMENTS to determine: | ||
|
|
||
| - **Topic**: configuration, caching, filtering, environment, CI, or CLI | ||
| - **Task type**: new setup, debugging, optimization, or implementation | ||
|
|
||
| Use decision trees in SKILL.md to select the relevant reference files. | ||
|
|
||
| ### Step 3: Read relevant reference files | ||
|
|
||
| Based on task type, read from `references/<topic>/`: | ||
|
|
||
| | Task | Files to Read | | ||
| | -------------------- | ------------------------------------------------------- | | ||
| | Configure turbo.json | `configuration/RULE.md` + `configuration/tasks.md` | | ||
| | Debug cache issues | `caching/gotchas.md` | | ||
| | Set up remote cache | `caching/remote-cache.md` | | ||
| | Filter packages | `filtering/RULE.md` + `filtering/patterns.md` | | ||
| | Environment problems | `environment/gotchas.md` + `environment/modes.md` | | ||
| | Set up CI | `ci/RULE.md` + `ci/github-actions.md` or `ci/vercel.md` | | ||
| | CLI usage | `cli/commands.md` | | ||
|
|
||
| ### Step 4: Execute task | ||
|
|
||
| Apply Turborepo-specific patterns from references to complete the user's request. | ||
|
|
||
| **CRITICAL - When creating tasks/scripts/pipelines:** | ||
|
|
||
| 1. **Prefer package tasks over Root Tasks.** Root Tasks (`//#taskname`) are only for tasks that truly cannot exist in packages, such as Vitest Projects' `//#test`, repo-wide release scripts, or tooling that does not invoke `turbo` itself. | ||
| 2. Add scripts to each relevant package's `package.json` (e.g., `apps/web/package.json`, `packages/ui/package.json`) | ||
| 3. Register the task in root `turbo.json` | ||
| 4. Root `package.json` only contains `turbo run <task>` - never actual task logic, unless defining a valid Root Task exception | ||
|
|
||
| **Other things to verify:** | ||
|
|
||
| - `outputs` defined for cacheable tasks | ||
| - `dependsOn` uses correct syntax (`^task` vs `task`) | ||
| - Environment variables in `env` key | ||
| - `.env` files in `inputs` if used | ||
| - Use `turbo run` (not `turbo`) in package.json and CI | ||
|
|
||
| ### Step 5: Summarize | ||
|
|
||
| ``` | ||
| === Turborepo Task Complete === | ||
|
|
||
| Topic: <configuration|caching|filtering|environment|ci|cli> | ||
| Files referenced: <reference files consulted> | ||
|
|
||
| <brief summary of what was done> | ||
| ``` | ||
|
|
||
| <user-request> | ||
| $ARGUMENTS | ||
| </user-request> |
241 changes: 241 additions & 0 deletions
241
.agents/skills/turborepo/references/best-practices/RULE.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,241 @@ | ||
| # Monorepo Best Practices | ||
|
|
||
| Essential patterns for structuring and maintaining a healthy Turborepo monorepo. | ||
|
|
||
| ## Repository Structure | ||
|
|
||
| ### Standard Layout | ||
|
|
||
| ``` | ||
| my-monorepo/ | ||
| ├── apps/ # Application packages (deployable) | ||
| │ ├── web/ | ||
| │ ├── docs/ | ||
| │ └── api/ | ||
| ├── packages/ # Library packages (shared code) | ||
| │ ├── ui/ | ||
| │ ├── utils/ | ||
| │ └── config-*/ # Shared configs (eslint, typescript, etc.) | ||
| ├── package.json # Root package.json (minimal deps) | ||
| ├── turbo.json # Turborepo configuration | ||
| ├── pnpm-workspace.yaml # (pnpm) or workspaces in package.json | ||
| └── pnpm-lock.yaml # Lockfile (required) | ||
| ``` | ||
|
|
||
| ### Key Principles | ||
|
|
||
| 1. **`apps/` for deployables**: Next.js sites, APIs, CLIs - things that get deployed | ||
| 2. **`packages/` for libraries**: Shared code consumed by apps or other packages | ||
| 3. **One purpose per package**: Each package should do one thing well | ||
| 4. **No nested packages**: Don't put packages inside packages | ||
|
|
||
| ## Package Types | ||
|
|
||
| ### Application Packages (`apps/`) | ||
|
|
||
| - **Deployable**: These are the "endpoints" of your package graph | ||
| - **Not installed by other packages**: Apps shouldn't be dependencies of other packages | ||
| - **No shared code**: If code needs sharing, extract to `packages/` | ||
|
|
||
| ```json | ||
| // apps/web/package.json | ||
| { | ||
| "name": "web", | ||
| "private": true, | ||
| "dependencies": { | ||
| "@repo/ui": "workspace:*", | ||
| "next": "latest" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Library Packages (`packages/`) | ||
|
|
||
| - **Shared code**: Utilities, components, configs | ||
| - **Namespaced names**: Use `@repo/` or `@yourorg/` prefix | ||
| - **Clear exports**: Define what the package exposes | ||
|
|
||
| ```json | ||
| // packages/ui/package.json | ||
| { | ||
| "name": "@repo/ui", | ||
| "exports": { | ||
| "./button": "./src/button.tsx", | ||
| "./card": "./src/card.tsx" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## Package Compilation Strategies | ||
|
|
||
| ### Just-in-Time (Simplest) | ||
|
|
||
| Export TypeScript directly; let the app's bundler compile it. | ||
|
|
||
| ```json | ||
| { | ||
| "name": "@repo/ui", | ||
| "exports": { | ||
| "./button": "./src/button.tsx" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| **Pros**: Zero build config, instant changes | ||
| **Cons**: Can't cache builds, requires app bundler support | ||
|
|
||
| ### Compiled (Recommended for Libraries) | ||
|
|
||
| Package compiles itself with `tsc` or bundler. | ||
|
|
||
| ```json | ||
| { | ||
| "name": "@repo/ui", | ||
| "exports": { | ||
| "./button": { | ||
| "types": "./src/button.tsx", | ||
| "default": "./dist/button.js" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "build": "tsc" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| **Pros**: Cacheable by Turborepo, works everywhere | ||
| **Cons**: More configuration | ||
|
|
||
| ## Dependency Management | ||
|
|
||
| ### Install Where Used | ||
|
|
||
| Install dependencies in the package that uses them, not the root. | ||
|
|
||
| ```bash | ||
| # Good: Install in the package that needs it | ||
| pnpm add lodash --filter=@repo/utils | ||
|
|
||
| # Avoid: Installing everything at root | ||
| pnpm add lodash -w # Only for repo-level tools | ||
| ``` | ||
|
|
||
| ### Root Dependencies | ||
|
|
||
| Only these belong in root `package.json`: | ||
|
|
||
| - `turbo` - The build system | ||
| - `husky`, `lint-staged` - Git hooks | ||
| - Repository-level tooling | ||
|
|
||
| ### Internal Dependencies | ||
|
|
||
| Use workspace protocol for internal packages: | ||
|
|
||
| ```json | ||
| // pnpm/bun | ||
| { "@repo/ui": "workspace:*" } | ||
|
|
||
| // npm/yarn | ||
| { "@repo/ui": "*" } | ||
| ``` | ||
|
|
||
| ## Exports Best Practices | ||
|
|
||
| ### Use `exports` Field (Not `main`) | ||
|
|
||
| ```json | ||
| { | ||
| "exports": { | ||
| ".": "./src/index.ts", | ||
| "./button": "./src/button.tsx", | ||
| "./utils": "./src/utils.ts" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Avoid Barrel Files | ||
|
|
||
| Don't create `index.ts` files that re-export everything: | ||
|
|
||
| ```typescript | ||
| // BAD: packages/ui/src/index.ts | ||
| export * from './button'; | ||
| export * from './card'; | ||
| export * from './modal'; | ||
| // ... imports everything even if you need one thing | ||
|
|
||
| // GOOD: Direct exports in package.json | ||
| { | ||
| "exports": { | ||
| "./button": "./src/button.tsx", | ||
| "./card": "./src/card.tsx" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ### Namespace Your Packages | ||
|
|
||
| ```json | ||
| // Good | ||
| { "name": "@repo/ui" } | ||
| { "name": "@acme/utils" } | ||
|
|
||
| // Avoid (conflicts with npm registry) | ||
| { "name": "ui" } | ||
| { "name": "utils" } | ||
| ``` | ||
|
|
||
| ## Common Anti-Patterns | ||
|
|
||
| ### Accessing Files Across Package Boundaries | ||
|
|
||
| ```typescript | ||
| // BAD: Reaching into another package | ||
| import { Button } from "../../packages/ui/src/button"; | ||
|
|
||
| // GOOD: Install and import properly | ||
| import { Button } from "@repo/ui/button"; | ||
| ``` | ||
|
|
||
| ### Shared Code in Apps | ||
|
|
||
| ``` | ||
| // BAD | ||
| apps/ | ||
| web/ | ||
| shared/ # This should be a package! | ||
| utils.ts | ||
|
|
||
| // GOOD | ||
| packages/ | ||
| utils/ # Proper shared package | ||
| src/utils.ts | ||
| ``` | ||
|
|
||
| ### Too Many Root Dependencies | ||
|
|
||
| ```json | ||
| // BAD: Root has app dependencies | ||
| { | ||
| "dependencies": { | ||
| "react": "^18", | ||
| "next": "^14", | ||
| "lodash": "^4" | ||
| } | ||
| } | ||
|
|
||
| // GOOD: Root only has repo tools | ||
| { | ||
| "devDependencies": { | ||
| "turbo": "latest", | ||
| "husky": "latest" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| ## See Also | ||
|
|
||
| - [structure.md](./structure.md) - Detailed repository structure patterns | ||
| - [packages.md](./packages.md) - Creating and managing internal packages | ||
| - [dependencies.md](./dependencies.md) - Dependency management strategies | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.