claude-code-arcane 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +5 -4
- package/agents/ecommerce/ecommerce-architect.md +60 -0
- package/dist/cli.js +2 -0
- package/docs/SKILLS-CATALOG.md +25 -2
- package/docs/USER-GUIDE.md +2 -2
- package/docs/coding-standards.md +26 -0
- package/package.json +2 -1
- package/profiles/ecommerce.yaml +48 -0
- package/profiles/job-hunt.yaml +12 -2
- package/rules/drafter-reviewer.md +39 -0
- package/skills/cart-checkout/SKILL.md +85 -0
- package/skills/cart-checkout/references/checkout-flow-spec.md +50 -0
- package/skills/cold-outreach/SKILL.md +10 -10
- package/skills/cold-outreach/references/recruiter-playbook.md +5 -5
- package/skills/commerce-analytics/SKILL.md +85 -0
- package/skills/commerce-analytics/references/ga4-ecommerce-events.md +63 -0
- package/skills/commerce-analytics/scripts/ga4_ecommerce_validate.py +134 -0
- package/skills/commerce-data-model/SKILL.md +84 -0
- package/skills/commerce-data-model/references/data-model-spec.md +79 -0
- package/skills/cover-letter/SKILL.md +8 -8
- package/skills/cv-ats-export/SKILL.md +19 -6
- package/skills/cv-ats-export/scripts/cv_export.py +49 -4
- package/skills/cv-ats-export/scripts/verify_pdf.py +90 -0
- package/skills/cv-tailor/SKILL.md +7 -7
- package/skills/cv-tailor/references/ats-keywords.md +9 -9
- package/skills/interview-prep/SKILL.md +7 -7
- package/skills/interview-prep/references/star-framework.md +10 -10
- package/skills/inventory-stock/SKILL.md +86 -0
- package/skills/inventory-stock/scripts/restock_forecast.py +173 -0
- package/skills/job-aplicar/SKILL.md +88 -0
- package/skills/job-hunt/SKILL.md +20 -13
- package/skills/job-hunt/references/templates/Aplicacion.md +6 -2
- package/skills/job-hunt/references/templates/CV Custom.md +1 -1
- package/skills/job-hunt/references/templates/Contacto.md +1 -1
- package/skills/job-hunt/references/templates/Dashboard.md +19 -15
- package/skills/job-hunt/references/templates/Perfil.md +2 -2
- package/skills/job-outcome/SKILL.md +55 -0
- package/skills/job-scrape/SKILL.md +95 -0
- package/skills/job-scrape/references/dedup-playbook.md +25 -0
- package/skills/job-scrape/references/getonbrd-cli.md +62 -0
- package/skills/job-scrape/references/getonbrd-urls.md +37 -0
- package/skills/job-scrape/references/linkedin-cli.md +64 -0
- package/skills/job-scrape/references/linkedin-urls.md +42 -0
- package/skills/job-scrape/references/seen_jobs.schema.json +68 -0
- package/skills/job-scrape/scripts/getonbrd_search.py +501 -0
- package/skills/job-scrape/scripts/linkedin_search.py +428 -0
- package/skills/job-search/SKILL.md +22 -19
- package/skills/job-search/references/scoring-rubric.md +8 -8
- package/skills/job-upskill/SKILL.md +58 -0
- package/skills/linkedin-optimize/SKILL.md +5 -5
- package/skills/master-profile/SKILL.md +17 -17
- package/skills/merchant-feed/SKILL.md +85 -0
- package/skills/merchant-feed/references/feed-attribute-map.md +47 -0
- package/skills/merchant-feed/scripts/feed_validate.py +140 -0
- package/skills/network-map/SKILL.md +7 -7
- package/skills/order-lifecycle/SKILL.md +86 -0
- package/skills/order-lifecycle/references/order-state-machine.md +53 -0
- package/skills/payments-architecture/SKILL.md +80 -0
- package/skills/personal-brand/SKILL.md +10 -10
- package/skills/personal-brand/references/post-pillars.md +14 -14
- package/skills/portfolio-site/SKILL.md +11 -11
- package/skills/product-listing/SKILL.md +84 -0
- package/skills/promotions-discounts/SKILL.md +80 -0
- package/skills/shipping-tax/SKILL.md +85 -0
- package/skills/storefront-architecture/SKILL.md +80 -0
- package/skills/subscription-billing/SKILL.md +81 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: master-profile
|
|
3
|
-
description: "Build and maintain the master professional profile
|
|
3
|
+
description: "Build and maintain the master professional profile - the single source of truth (experience, skills with levels, projects, education, references, bios) that every CV, LinkedIn profile and portfolio derives from. Triggers: perfil maestro, master resume, cronologia laboral, single source of truth CV, mi experiencia profesional."
|
|
4
4
|
argument-hint: "[build | update | derive <role>]"
|
|
5
5
|
category: "career"
|
|
6
6
|
user-invocable: true
|
|
7
7
|
allowed-tools: Read, Glob, Grep, Write, Edit
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Master Profile
|
|
10
|
+
# Master Profile - Single Source of Truth
|
|
11
11
|
|
|
12
12
|
Construís y mantenés el **perfil maestro**: el documento del que derivan todos los CVs, el LinkedIn y el portfolio. La regla de oro: **si algo cambia, se cambia acá primero** y de acá se sincroniza al resto.
|
|
13
13
|
|
|
@@ -21,32 +21,32 @@ Mantener N CVs sincronizados a mano es la causa #1 de errores (fechas que no coi
|
|
|
21
21
|
|
|
22
22
|
Generá el archivo con estas secciones (todas las que apliquen):
|
|
23
23
|
|
|
24
|
-
1. **Personal info**
|
|
25
|
-
2. **Bios**
|
|
26
|
-
3. **Work experience** (más reciente primero)
|
|
27
|
-
4. **Education**
|
|
28
|
-
5. **Certifications**
|
|
29
|
-
6. **Skills consolidados con nivel**
|
|
30
|
-
7. **Projects**
|
|
31
|
-
8. **Achievements / highlights**
|
|
32
|
-
9. **Languages**
|
|
33
|
-
10. **References**
|
|
24
|
+
1. **Personal info** - nombre, display name, headline actual, ubicación, email público vs personal, teléfono, LinkedIn, GitHub, portfolio. (El email *público* puede diferir del personal.)
|
|
25
|
+
2. **Bios** - tres largos: corto (hero/one-liner), medio (2-3 oraciones para "About"), largo (about page completo).
|
|
26
|
+
3. **Work experience** (más reciente primero) - por cada rol: empresa, período, ubicación/modalidad, producto, stack, manager/referencia, y **bullets de logros con número→contexto→resultado**.
|
|
27
|
+
4. **Education** - institución, período, foco.
|
|
28
|
+
5. **Certifications** - nombre, año, estado (completo/in progress).
|
|
29
|
+
6. **Skills consolidados con nivel** - agrupados (lenguajes, frameworks, infra, tooling) con nivel (Expert/Advanced/Proficient/…) y opcionalmente % para el portfolio.
|
|
30
|
+
7. **Projects** - tech, rol, highlights, link en vivo.
|
|
31
|
+
8. **Achievements / highlights** - premios, showcases, hitos.
|
|
32
|
+
9. **Languages** - idioma + nivel.
|
|
33
|
+
10. **References** - nombre, rol, relación, contacto.
|
|
34
34
|
|
|
35
35
|
## Modos
|
|
36
36
|
|
|
37
|
-
### `build`
|
|
37
|
+
### `build` - Crear el maestro desde cero
|
|
38
38
|
1. Si no existe el workspace, sugerir `/job-hunt setup` primero.
|
|
39
|
-
2. Recolectar info por sección
|
|
39
|
+
2. Recolectar info por sección - preferí **entrevistar al usuario por bloques** (no un cuestionario gigante). Empezá por experiencia y skills.
|
|
40
40
|
3. Para cada logro, empujar a la forma **cuantificable**: "¿qué número podés ponerle? ¿comparado con qué? ¿qué resultado tuvo?". Un bullet sin métrica es una oportunidad perdida.
|
|
41
41
|
4. Escribir `01-Perfiles/Perfil Maestro.md`.
|
|
42
42
|
5. Sugerir derivar el primer perfil por rol: `/master-profile derive <role>`.
|
|
43
43
|
|
|
44
|
-
### `update`
|
|
44
|
+
### `update` - Mantener al día
|
|
45
45
|
1. Leer el maestro actual.
|
|
46
46
|
2. Aplicar el cambio (nuevo rol, nuevo logro, ascenso, proyecto).
|
|
47
47
|
3. **Avisar qué derivados quedan desactualizados** (CVs por rol, LinkedIn, portfolio) y ofrecer re-derivarlos.
|
|
48
48
|
|
|
49
|
-
### `derive <role>`
|
|
49
|
+
### `derive <role>` - Vista por rol
|
|
50
50
|
1. Leer el maestro.
|
|
51
51
|
2. Crear/actualizar `01-Perfiles/<Role>.md` con el template `Perfil` (ver `Templates/Perfil.md`): filtrar y reordenar la experiencia/skills/proyectos hacia ese rol, definir keywords objetivo, score mínimo y mercado.
|
|
52
52
|
3. Este perfil por rol es el `perfil_base` que después usa `/cv-tailor`.
|
|
@@ -61,7 +61,7 @@ Generá el archivo con estas secciones (todas las que apliquen):
|
|
|
61
61
|
## Reglas
|
|
62
62
|
|
|
63
63
|
- Una sola fuente de verdad: no dejar que un CV por rol "evolucione" por fuera del maestro.
|
|
64
|
-
- No inventar logros ni métricas
|
|
64
|
+
- No inventar logros ni métricas - si el usuario no tiene el número, marcarlo como pendiente, no fabricarlo.
|
|
65
65
|
- Separar email público de personal; no exponer datos sensibles en archivos que vayan a un remoto.
|
|
66
66
|
|
|
67
67
|
## Handoff
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: merchant-feed
|
|
3
|
+
description: "Build and validate product feeds for shopping channels — Google Merchant Center and Meta Catalog — including required/recommended attributes, attribute mapping, and feed validation. Includes a feed validator/generator script. Triggers: building a product feed, fixing feed disapprovals, mapping catalog to feed attributes."
|
|
4
|
+
argument-hint: "[validate | generate | map]"
|
|
5
|
+
category: "ecommerce"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
allowed-tools: Read, Glob, Grep, Bash
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Merchant Feed
|
|
11
|
+
|
|
12
|
+
Shopping ads and free listings live or die on feed quality. A clean, complete feed gets products approved and surfaced; a sloppy one gets disapprovals. Map your catalog to channel attributes and validate before upload — platform-agnostic.
|
|
13
|
+
|
|
14
|
+
## Before Starting
|
|
15
|
+
|
|
16
|
+
Gather: target channel (Google Merchant / Meta Catalog), source of truth (DB export, CSV, platform), product categories, and goal (validate an existing feed, generate one, or map catalog → feed attributes).
|
|
17
|
+
|
|
18
|
+
## How This Skill Works
|
|
19
|
+
|
|
20
|
+
| Mode | Trigger | Output |
|
|
21
|
+
|------|---------|--------|
|
|
22
|
+
| **Validate** | `validate` | Pass/fail report against required attributes |
|
|
23
|
+
| **Generate** | `generate` | Feed emitted from a source CSV |
|
|
24
|
+
| **Map** | `map` | Catalog field → feed attribute mapping |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Phase 1 — Required Attributes
|
|
29
|
+
|
|
30
|
+
Google Merchant / Meta share a common core. Required for every item:
|
|
31
|
+
|
|
32
|
+
| Attribute | Notes |
|
|
33
|
+
|-----------|-------|
|
|
34
|
+
| `id` | Stable, unique per variant (use SKU) |
|
|
35
|
+
| `title` | Front-load product; ≤150 chars; match landing page |
|
|
36
|
+
| `description` | Plain, accurate; no promo text/caps |
|
|
37
|
+
| `link` | Canonical PDP URL |
|
|
38
|
+
| `image_link` | Main image, meets resolution minimums |
|
|
39
|
+
| `availability` | in_stock / out_of_stock / preorder |
|
|
40
|
+
| `price` | With currency; must match landing page exactly |
|
|
41
|
+
| `brand` | Required unless exempt category |
|
|
42
|
+
| `gtin` / `mpn` | Required where a GTIN exists — improves matching |
|
|
43
|
+
| `condition` | new / refurbished / used |
|
|
44
|
+
|
|
45
|
+
**Rule:** Feed price and availability must **exactly match** the live PDP, or the item is disapproved and the account is penalized.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Phase 2 — Validate / Generate
|
|
50
|
+
|
|
51
|
+
Run the validator on a CSV export:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
python skills/merchant-feed/scripts/feed_validate.py # demo data
|
|
55
|
+
python skills/merchant-feed/scripts/feed_validate.py feed.csv
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
It checks every row for required attributes, flags missing/empty values, validates `availability`/`condition` enums and price+currency format, and reports a per-row and summary verdict. For the full attribute reference and category-specific requirements, see [references/feed-attribute-map.md](references/feed-attribute-map.md).
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Phase 3 — Recommended Attributes & Quality
|
|
63
|
+
|
|
64
|
+
Beyond required, these lift performance: `google_product_category`, `product_type`, `item_group_id` (links variants), `color`, `size`, `gender`, `age_group`, `sale_price`, `shipping`, `gtin`. Use `item_group_id` so variants cluster correctly — without it, variants compete as separate products.
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
## Output Artifacts
|
|
69
|
+
|
|
70
|
+
| Request | Output |
|
|
71
|
+
|---------|--------|
|
|
72
|
+
| Validate | Per-row + summary PASS / FAIL report |
|
|
73
|
+
| Generate | Channel-ready feed file |
|
|
74
|
+
| Map | Catalog → feed attribute mapping table |
|
|
75
|
+
|
|
76
|
+
A feed is **READY** when every item has all required attributes, price/availability match the PDP, variants share an `item_group_id`, and GTINs are present where they exist.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## Related Skills
|
|
81
|
+
|
|
82
|
+
- **commerce-data-model**: the catalog entities mapped into feed attributes.
|
|
83
|
+
- **product-listing**: titles/descriptions reused between PDP and feed.
|
|
84
|
+
- **shipping-tax**: shipping attribute values in the feed.
|
|
85
|
+
- **schema-markup**: Product structured data complements the feed for organic.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Product Feed — Attribute Reference & Catalog Mapping
|
|
2
|
+
|
|
3
|
+
Maps the commerce data model to Google Merchant / Meta Catalog feed attributes. The `feed_validate.py` script enforces the required core.
|
|
4
|
+
|
|
5
|
+
## Required attributes (every item)
|
|
6
|
+
| Feed attribute | Source (data model) | Rule |
|
|
7
|
+
|----------------|---------------------|------|
|
|
8
|
+
| id | variant.sku | Stable, unique per variant |
|
|
9
|
+
| title | product.title (+ variant) | Front-load product; ≤150 chars; match PDP |
|
|
10
|
+
| description | product.description | Plain, accurate; no promo/ALL CAPS |
|
|
11
|
+
| link | product URL | Canonical, absolute https |
|
|
12
|
+
| image_link | main image | Absolute https; meets resolution min |
|
|
13
|
+
| availability | variant stock | in_stock / out_of_stock / preorder / backorder |
|
|
14
|
+
| price | variant.price | `"21.00 USD"` — matches PDP exactly |
|
|
15
|
+
| brand | product.brand | Required unless exempt category |
|
|
16
|
+
| condition | — | new / refurbished / used |
|
|
17
|
+
|
|
18
|
+
## Strongly recommended
|
|
19
|
+
| Feed attribute | Source | Why |
|
|
20
|
+
|----------------|--------|-----|
|
|
21
|
+
| gtin | variant.barcode | Improves matching / eligibility |
|
|
22
|
+
| mpn | variant.mpn | Fallback when no GTIN |
|
|
23
|
+
| item_group_id | product.id | Clusters variants (else they compete) |
|
|
24
|
+
| google_product_category | category map | Taxonomy alignment |
|
|
25
|
+
| product_type | primary_category | Your own taxonomy |
|
|
26
|
+
| color / size / gender / age_group | attributes | Apparel facets |
|
|
27
|
+
| sale_price | compare_at logic | Promo pricing |
|
|
28
|
+
| shipping | shipping-tax rules | Overrides account settings |
|
|
29
|
+
|
|
30
|
+
## Hard rules (disapproval triggers)
|
|
31
|
+
- Feed **price + availability must match the live PDP** exactly.
|
|
32
|
+
- No promotional text in `title`/`description` (no "Free shipping!", no emojis/caps).
|
|
33
|
+
- `image_link` must resolve and meet the channel's minimum resolution.
|
|
34
|
+
- Variants without a shared `item_group_id` are treated as separate products.
|
|
35
|
+
|
|
36
|
+
## Worked example (CSV row)
|
|
37
|
+
```csv
|
|
38
|
+
id,title,description,link,image_link,availability,price,brand,condition,gtin,item_group_id
|
|
39
|
+
ACME-TEE-RED-M,"Acme Cotton Tee — Red, Medium","Soft 100% cotton crew-neck tee.",https://shop.example.com/p/acme-tee-red-m,https://shop.example.com/img/acme-tee-red-m.jpg,in_stock,21.00 USD,Acme,new,0123456789012,ACME-TEE
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Verdict: READY when
|
|
43
|
+
- [ ] All required attributes present and non-empty
|
|
44
|
+
- [ ] price/availability match PDP
|
|
45
|
+
- [ ] valid availability + condition enums
|
|
46
|
+
- [ ] price formatted `amount ISO-currency`
|
|
47
|
+
- [ ] variants share item_group_id; GTIN present where it exists
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"""
|
|
2
|
+
feed_validate.py — Validate a product feed CSV against Google Merchant /
|
|
3
|
+
Meta Catalog requirements (the shared required-attribute core).
|
|
4
|
+
|
|
5
|
+
Checks every row for required attributes, empty values, valid enums
|
|
6
|
+
(availability, condition), and price+currency formatting. Reports a per-row
|
|
7
|
+
and summary verdict. No external dependencies; cross-platform.
|
|
8
|
+
|
|
9
|
+
Usage:
|
|
10
|
+
python feed_validate.py # built-in demo feed
|
|
11
|
+
python feed_validate.py feed.csv # validate your feed
|
|
12
|
+
python feed_validate.py feed.csv --strict # treat recommended as required
|
|
13
|
+
|
|
14
|
+
CSV header (required attributes):
|
|
15
|
+
id,title,description,link,image_link,availability,price,brand,condition
|
|
16
|
+
Recommended columns (warn if absent/empty): gtin, mpn, item_group_id,
|
|
17
|
+
google_product_category, sale_price
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import argparse
|
|
21
|
+
import csv
|
|
22
|
+
import re
|
|
23
|
+
import sys
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
REQUIRED = ["id", "title", "description", "link", "image_link",
|
|
27
|
+
"availability", "price", "brand", "condition"]
|
|
28
|
+
RECOMMENDED = ["gtin", "mpn", "item_group_id", "google_product_category"]
|
|
29
|
+
|
|
30
|
+
AVAILABILITY = {"in_stock", "out_of_stock", "preorder", "backorder"}
|
|
31
|
+
CONDITION = {"new", "refurbished", "used"}
|
|
32
|
+
# e.g. "21.00 USD" / "9.99 EUR"
|
|
33
|
+
PRICE_RE = re.compile(r"^\d+(\.\d{1,2})?\s+[A-Z]{3}$")
|
|
34
|
+
URL_RE = re.compile(r"^https?://", re.IGNORECASE)
|
|
35
|
+
TITLE_MAX = 150
|
|
36
|
+
DESC_MAX = 5000
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
DEMO_FEED = [
|
|
40
|
+
{"id": "ACME-TEE-RED-M", "title": "Acme Cotton Tee — Red, Medium",
|
|
41
|
+
"description": "Soft 100% cotton crew-neck tee.", "link": "https://shop.example.com/p/acme-tee-red-m",
|
|
42
|
+
"image_link": "https://shop.example.com/img/acme-tee-red-m.jpg", "availability": "in_stock",
|
|
43
|
+
"price": "21.00 USD", "brand": "Acme", "condition": "new",
|
|
44
|
+
"gtin": "0123456789012", "item_group_id": "ACME-TEE"},
|
|
45
|
+
# broken row: bad availability, bad price, missing brand, non-url image
|
|
46
|
+
{"id": "ACME-MUG-BLUE", "title": "Acme Mug", "description": "",
|
|
47
|
+
"link": "https://shop.example.com/p/acme-mug", "image_link": "acme-mug.jpg",
|
|
48
|
+
"availability": "available", "price": "9.99", "brand": "", "condition": "brand-new"},
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def validate_row(row, idx, strict):
|
|
53
|
+
errors = []
|
|
54
|
+
warnings = []
|
|
55
|
+
|
|
56
|
+
for attr in REQUIRED:
|
|
57
|
+
if not (row.get(attr) or "").strip():
|
|
58
|
+
errors.append(f"missing required '{attr}'")
|
|
59
|
+
|
|
60
|
+
avail = (row.get("availability") or "").strip().lower()
|
|
61
|
+
if avail and avail not in AVAILABILITY:
|
|
62
|
+
errors.append(f"availability '{avail}' not in {sorted(AVAILABILITY)}")
|
|
63
|
+
|
|
64
|
+
cond = (row.get("condition") or "").strip().lower()
|
|
65
|
+
if cond and cond not in CONDITION:
|
|
66
|
+
errors.append(f"condition '{cond}' not in {sorted(CONDITION)}")
|
|
67
|
+
|
|
68
|
+
price = (row.get("price") or "").strip()
|
|
69
|
+
if price and not PRICE_RE.match(price):
|
|
70
|
+
errors.append(f"price '{price}' must be like '21.00 USD' (amount + ISO currency)")
|
|
71
|
+
|
|
72
|
+
for url_attr in ("link", "image_link"):
|
|
73
|
+
val = (row.get(url_attr) or "").strip()
|
|
74
|
+
if val and not URL_RE.match(val):
|
|
75
|
+
errors.append(f"{url_attr} '{val}' must be an absolute http(s) URL")
|
|
76
|
+
|
|
77
|
+
title = (row.get("title") or "").strip()
|
|
78
|
+
if len(title) > TITLE_MAX:
|
|
79
|
+
warnings.append(f"title > {TITLE_MAX} chars ({len(title)})")
|
|
80
|
+
if len(row.get("description") or "") > DESC_MAX:
|
|
81
|
+
warnings.append(f"description > {DESC_MAX} chars")
|
|
82
|
+
|
|
83
|
+
has_id_link = bool((row.get("item_group_id") or "").strip())
|
|
84
|
+
if not has_id_link:
|
|
85
|
+
warnings.append("no item_group_id (variants won't cluster)")
|
|
86
|
+
if not (row.get("gtin") or "").strip() and not (row.get("mpn") or "").strip():
|
|
87
|
+
warnings.append("no gtin/mpn (weakens product matching)")
|
|
88
|
+
|
|
89
|
+
if strict:
|
|
90
|
+
errors.extend(f"(strict) {w}" for w in warnings)
|
|
91
|
+
warnings = []
|
|
92
|
+
return errors, warnings
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
def main():
|
|
96
|
+
ap = argparse.ArgumentParser(description="Validate a Google/Meta product feed CSV.")
|
|
97
|
+
ap.add_argument("csv", nargs="?", help="feed CSV. Omit for demo data.")
|
|
98
|
+
ap.add_argument("--strict", action="store_true", help="treat recommended issues as failures")
|
|
99
|
+
args = ap.parse_args()
|
|
100
|
+
|
|
101
|
+
if args.csv:
|
|
102
|
+
try:
|
|
103
|
+
with open(args.csv, newline="", encoding="utf-8") as f:
|
|
104
|
+
rows = list(csv.DictReader(f))
|
|
105
|
+
except OSError as e:
|
|
106
|
+
print(f"[ERROR] cannot read {args.csv}: {e}")
|
|
107
|
+
sys.exit(1)
|
|
108
|
+
else:
|
|
109
|
+
print("[INFO] No CSV given - using built-in demo feed.\n")
|
|
110
|
+
rows = DEMO_FEED
|
|
111
|
+
|
|
112
|
+
if not rows:
|
|
113
|
+
print("[ERROR] feed is empty.")
|
|
114
|
+
sys.exit(1)
|
|
115
|
+
|
|
116
|
+
failed = 0
|
|
117
|
+
for idx, row in enumerate(rows):
|
|
118
|
+
errors, warnings = validate_row(row, idx, args.strict)
|
|
119
|
+
rid = row.get("id") or f"row{idx}"
|
|
120
|
+
if errors:
|
|
121
|
+
failed += 1
|
|
122
|
+
print(f"FAIL {rid}")
|
|
123
|
+
for e in errors:
|
|
124
|
+
print(f" - {e}")
|
|
125
|
+
for w in warnings:
|
|
126
|
+
print(f" ~ {w}")
|
|
127
|
+
else:
|
|
128
|
+
print(f"PASS {rid}")
|
|
129
|
+
for w in warnings:
|
|
130
|
+
print(f" ~ {w}")
|
|
131
|
+
|
|
132
|
+
print()
|
|
133
|
+
passed = len(rows) - failed
|
|
134
|
+
verdict = "READY" if failed == 0 else "NOT-READY"
|
|
135
|
+
print(f"{verdict}: {passed}/{len(rows)} items pass required-attribute checks.")
|
|
136
|
+
sys.exit(0 if failed == 0 else 1)
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
if __name__ == "__main__":
|
|
140
|
+
main()
|
|
@@ -7,7 +7,7 @@ user-invocable: true
|
|
|
7
7
|
allowed-tools: Read, Glob, Grep, Bash, Write, Edit
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
-
# Network Map
|
|
10
|
+
# Network Map - Inteligencia de contactos para warm intros
|
|
11
11
|
|
|
12
12
|
Convertís el **export de conexiones de LinkedIn** en inteligencia accionable: dado un target company, quién de tu red 1er-grado trabaja (o trabajó) ahí, quién puede darte un warm intro, y un mensaje custom por contacto. Reemplaza a LinkedIn Premium para esto: solo necesitás tu propio export + Claude.
|
|
13
13
|
|
|
@@ -20,9 +20,9 @@ En LinkedIn → **Settings → Data Privacy → Get a copy of your data → Down
|
|
|
20
20
|
## Qué produce
|
|
21
21
|
|
|
22
22
|
Dado un target company:
|
|
23
|
-
1. **1er-grado en la empresa**
|
|
24
|
-
2. **Paths de warm intro**
|
|
25
|
-
3. **Mensaje por contacto**
|
|
23
|
+
1. **1er-grado en la empresa** - contactos tuyos que trabajan ahí ahora (match por `Company`).
|
|
24
|
+
2. **Paths de warm intro** - contactos 1er-grado que probablemente conozcan gente del target (ej. ex-empleados de la empresa, gente del mismo rubro/rol) y podrían presentarte. *Nota honesta:* el export solo tiene tus 1er-grado; el verdadero 2do-grado (las conexiones de ellos) no está en el archivo. Lo que hacemos es **inferir** buenos candidatos a intro desde tus 1er-grado (empleo actual/pasado en el target, overlap de empresa/rol), no leer la red de cada uno.
|
|
25
|
+
3. **Mensaje por contacto** - template custom según historia compartida (misma empresa pasada, mismo rubro, conexión vieja vs reciente).
|
|
26
26
|
|
|
27
27
|
## El motor
|
|
28
28
|
|
|
@@ -40,10 +40,10 @@ Devuelve nombre, posición, empresa, URL del perfil y fecha de conexión. Vos (C
|
|
|
40
40
|
|
|
41
41
|
## Modos
|
|
42
42
|
|
|
43
|
-
### `import <path>`
|
|
43
|
+
### `import <path>` - Registrar el export
|
|
44
44
|
Copiar/referenciar `Connections.csv` en `05-Contactos/`, verificar que parsea (corré el script con `--top-companies`), y reportar tamaño de la red + top empresas.
|
|
45
45
|
|
|
46
|
-
### `[company]`
|
|
46
|
+
### `[company]` - Mapear una empresa
|
|
47
47
|
1. Correr el script filtrando por la empresa.
|
|
48
48
|
2. Clasificar: 1er-grado actuales en la empresa vs candidatos a warm-intro (ex-empleados / mismo rubro).
|
|
49
49
|
3. Priorizar por relevancia (seniority/rol vs tu objetivo) y calidez (conexión reciente, historia compartida).
|
|
@@ -53,7 +53,7 @@ Copiar/referenciar `Connections.csv` en `05-Contactos/`, verificar que parsea (c
|
|
|
53
53
|
## Reglas
|
|
54
54
|
|
|
55
55
|
- Data de terceros: tratamiento local, nunca a un remoto sin confirmación; respetá privacidad.
|
|
56
|
-
- No inventar relaciones ni 2do-grado que el export no soporta
|
|
56
|
+
- No inventar relaciones ni 2do-grado que el export no soporta - sé explícito sobre qué es dato y qué es inferencia.
|
|
57
57
|
- Calidad sobre cantidad: 5 contactos bien elegidos > 50 mensajes genéricos.
|
|
58
58
|
|
|
59
59
|
## Handoff
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: order-lifecycle
|
|
3
|
+
description: "Design the order lifecycle — order state machine, fulfillment workflow, returns/RMA, refunds, cancellations, and order events/webhooks. Platform-agnostic state and event modeling. Triggers: designing order states, modeling returns/refunds, defining order events."
|
|
4
|
+
argument-hint: "[design | states | returns]"
|
|
5
|
+
category: "ecommerce"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
allowed-tools: Read, Glob, Grep, Write, Edit
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Order Lifecycle
|
|
11
|
+
|
|
12
|
+
An order is a long-lived state machine touched by payments, inventory, shipping, and support. Model its states, transitions, and events explicitly so nothing silently gets stuck — independent of platform.
|
|
13
|
+
|
|
14
|
+
> **Note:** This skill may create or modify files in your project (a state-machine spec). It will ask before writing.
|
|
15
|
+
|
|
16
|
+
## Before Starting
|
|
17
|
+
|
|
18
|
+
Gather: fulfillment model (single vs split/partial shipments), payment capture timing (auth-then-capture vs immediate), returns policy, and goal (design the full lifecycle, define the state machine, or model returns/refunds).
|
|
19
|
+
|
|
20
|
+
## How This Skill Works
|
|
21
|
+
|
|
22
|
+
| Mode | Trigger | Output |
|
|
23
|
+
|------|---------|--------|
|
|
24
|
+
| **Design** | `design` | End-to-end lifecycle + events |
|
|
25
|
+
| **States** | `states` | Formal state machine: states, transitions, guards |
|
|
26
|
+
| **Returns** | `returns` | RMA + refund flow and states |
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## Phase 1 — The State Machine
|
|
31
|
+
|
|
32
|
+
Separate **order status** from **payment status** and **fulfillment status** — collapsing them into one field is the most common modeling mistake.
|
|
33
|
+
|
|
34
|
+
| Dimension | States |
|
|
35
|
+
|-----------|--------|
|
|
36
|
+
| **Order** | pending → confirmed → in_progress → completed / cancelled |
|
|
37
|
+
| **Payment** | pending → authorized → paid → partially_refunded → refunded / failed |
|
|
38
|
+
| **Fulfillment** | unfulfilled → partially_fulfilled → fulfilled → returned |
|
|
39
|
+
|
|
40
|
+
Each transition has a **guard** (e.g. cannot fulfill before payment authorized) and emits an **event**.
|
|
41
|
+
|
|
42
|
+
For the full transition table, guards, and partial-shipment handling, see [references/order-state-machine.md](references/order-state-machine.md).
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Phase 2 — Events & Webhooks
|
|
47
|
+
|
|
48
|
+
Every transition emits a durable, ordered event: `order.created`, `order.paid`, `order.fulfilled`, `order.cancelled`, `order.refunded`, `return.requested`, `return.received`.
|
|
49
|
+
|
|
50
|
+
- Events are **append-only** — never mutate history; the current state is a projection.
|
|
51
|
+
- Outbound webhooks must be **idempotent and retried** with signatures (hand off to `payments-architecture` for the reliability pattern).
|
|
52
|
+
- Carry an idempotency key from order placement through fulfillment.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Phase 3 — Returns & Refunds
|
|
57
|
+
|
|
58
|
+
Flow: `return.requested → approved → label_sent → in_transit → received → inspected → refunded/rejected`.
|
|
59
|
+
|
|
60
|
+
| Concern | Rule |
|
|
61
|
+
|---------|------|
|
|
62
|
+
| Restock | Only on `received + inspected` pass, back to `available` |
|
|
63
|
+
| Refund | Full / partial / store-credit; never exceed captured amount |
|
|
64
|
+
| Window | Enforce return-window guard at request time |
|
|
65
|
+
| Partial | Per line-item, not whole-order, for split fulfillment |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Output Artifacts
|
|
70
|
+
|
|
71
|
+
| Request | Output |
|
|
72
|
+
|---------|--------|
|
|
73
|
+
| Design | Lifecycle diagram + event catalog |
|
|
74
|
+
| States | State/transition/guard table (the spec) |
|
|
75
|
+
| Returns | RMA flow + refund rules |
|
|
76
|
+
|
|
77
|
+
A lifecycle design is **COMPLETE** when order/payment/fulfillment statuses are independent, every transition has a guard and an event, and refunds/restocks are gated on inspection.
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Related Skills
|
|
82
|
+
|
|
83
|
+
- **payments-architecture**: capture/refund and webhook reliability for order events.
|
|
84
|
+
- **inventory-stock**: reservations released and stock decremented per fulfillment.
|
|
85
|
+
- **cart-checkout**: hands the placed order into this lifecycle.
|
|
86
|
+
- **commerce-analytics**: order events feed funnel and revenue metrics.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Order State Machine — Transitions, Guards & Events
|
|
2
|
+
|
|
3
|
+
Three independent dimensions. Keep them separate; the overall order status is a projection, not a stored mega-enum.
|
|
4
|
+
|
|
5
|
+
## Order status
|
|
6
|
+
| From | To | Guard | Event |
|
|
7
|
+
|------|----|-------|-------|
|
|
8
|
+
| (start) | pending | order placed | `order.created` |
|
|
9
|
+
| pending | confirmed | payment authorized | `order.confirmed` |
|
|
10
|
+
| confirmed | in_progress | fulfillment started | `order.processing` |
|
|
11
|
+
| in_progress | completed | all items fulfilled | `order.completed` |
|
|
12
|
+
| pending/confirmed | cancelled | not yet shipped | `order.cancelled` |
|
|
13
|
+
|
|
14
|
+
## Payment status
|
|
15
|
+
| From | To | Guard | Event |
|
|
16
|
+
|------|----|-------|-------|
|
|
17
|
+
| pending | authorized | auth succeeded | `payment.authorized` |
|
|
18
|
+
| authorized | paid | captured | `payment.captured` |
|
|
19
|
+
| paid | partially_refunded | refund < captured | `payment.refunded` |
|
|
20
|
+
| paid | refunded | refund == captured | `payment.refunded` |
|
|
21
|
+
| pending/authorized | failed | gateway decline | `payment.failed` |
|
|
22
|
+
|
|
23
|
+
## Fulfillment status
|
|
24
|
+
| From | To | Guard | Event |
|
|
25
|
+
|------|----|-------|-------|
|
|
26
|
+
| unfulfilled | partially_fulfilled | some lines shipped | `fulfillment.partial` |
|
|
27
|
+
| partially_fulfilled | fulfilled | all lines shipped | `fulfillment.completed` |
|
|
28
|
+
| fulfilled | returned | RMA received | `return.received` |
|
|
29
|
+
|
|
30
|
+
## Cross-dimension guards (the important rules)
|
|
31
|
+
- Cannot transition fulfillment past `unfulfilled` until payment is `authorized` (or `paid`, per capture policy).
|
|
32
|
+
- Cannot `cancel` once any line is `fulfilled` — use returns instead.
|
|
33
|
+
- Capture timing: auth at placement, capture at first fulfillment (auth/capture model) OR capture immediately (decide once).
|
|
34
|
+
|
|
35
|
+
## Returns / RMA sub-flow
|
|
36
|
+
`return.requested → approved → label_sent → in_transit → received → inspected → (refunded | rejected)`
|
|
37
|
+
|
|
38
|
+
| Concern | Rule |
|
|
39
|
+
|---------|------|
|
|
40
|
+
| Window | Guard `requested` against return-window from delivery date |
|
|
41
|
+
| Restock | Only on `inspected` pass → quantity back to `available` |
|
|
42
|
+
| Refund | ≤ captured amount; full / partial / store-credit |
|
|
43
|
+
| Partial | Per line item for split fulfillment |
|
|
44
|
+
|
|
45
|
+
## Events are append-only
|
|
46
|
+
Persist every event with: id, order_id, type, payload, timestamp, idempotency_key. Current state = fold over events. Outbound webhooks must be signed, deduplicated, and retried (see `payments-architecture`).
|
|
47
|
+
|
|
48
|
+
## Verdict: COMPLETE when
|
|
49
|
+
- [ ] Order / payment / fulfillment statuses are independent fields
|
|
50
|
+
- [ ] Every transition has a guard and emits an event
|
|
51
|
+
- [ ] Cancel blocked after fulfillment; returns handle post-ship
|
|
52
|
+
- [ ] Restock gated on inspection; refunds capped at captured amount
|
|
53
|
+
- [ ] Events are append-only with idempotency keys
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: payments-architecture
|
|
3
|
+
description: "Design payment architecture independent of any single processor — gateway selection, payment intents, idempotency, webhook reliability, reconciliation, PCI scope, fraud, and refunds. Complements processor-specific skills. Triggers: choosing a PSP, designing webhook handling, reducing PCI scope, reconciling payments."
|
|
4
|
+
argument-hint: "[design | webhooks | audit]"
|
|
5
|
+
category: "ecommerce"
|
|
6
|
+
user-invocable: true
|
|
7
|
+
allowed-tools: Read, Glob, Grep
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Payments Architecture
|
|
11
|
+
|
|
12
|
+
The payment layer must never double-charge, never lose a webhook, and never widen PCI scope. This skill designs the processor-agnostic architecture; processor-specific implementation (e.g. Stripe) is a handoff.
|
|
13
|
+
|
|
14
|
+
## Before Starting
|
|
15
|
+
|
|
16
|
+
Gather: markets/currencies, payment methods (cards, wallets, local methods), capture model (immediate vs auth/capture), subscription needs, and goal (design the architecture, harden webhooks, or audit an existing integration).
|
|
17
|
+
|
|
18
|
+
## How This Skill Works
|
|
19
|
+
|
|
20
|
+
| Mode | Trigger | Output |
|
|
21
|
+
|------|---------|--------|
|
|
22
|
+
| **Design** | `design` | Gateway choice + payment flow + PCI strategy |
|
|
23
|
+
| **Webhooks** | `webhooks` | Reliable, idempotent webhook handling design |
|
|
24
|
+
| **Audit** | `audit` | Risk review of an existing integration |
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Phase 1 — Flow & Idempotency
|
|
29
|
+
|
|
30
|
+
Use the **payment intent** model regardless of processor: create intent → confirm → succeeded/failed, with status mirrored onto the order.
|
|
31
|
+
|
|
32
|
+
| Principle | Why |
|
|
33
|
+
|-----------|-----|
|
|
34
|
+
| **Idempotency keys** on every create/charge | A retried request must not double-charge |
|
|
35
|
+
| **Server-authoritative amounts** | Never trust client-sent totals; re-price server-side |
|
|
36
|
+
| **Auth then capture** (where supported) | Capture at fulfillment, not at order placement |
|
|
37
|
+
| **Money as integer minor units** | No floats for currency, ever |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Phase 2 — Webhook Reliability
|
|
42
|
+
|
|
43
|
+
Webhooks are the source of truth for async payment outcomes — treat them as unreliable transport:
|
|
44
|
+
|
|
45
|
+
1. **Verify the signature** before doing anything.
|
|
46
|
+
2. **Deduplicate** by event id (idempotent processing) — providers redeliver.
|
|
47
|
+
3. **Persist then process** — store the raw event, ack fast (2xx), process out of band.
|
|
48
|
+
4. **Tolerate out-of-order** delivery; reconcile against current state, don't assume sequence.
|
|
49
|
+
5. **Reconcile** daily against the processor's ledger to catch missed events.
|
|
50
|
+
|
|
51
|
+
For the persist-ack-process pattern, retry/backoff, and reconciliation report design, apply the principles above and hand processor specifics to `stripe-integration-expert`.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Phase 3 — PCI Scope & Fraud
|
|
56
|
+
|
|
57
|
+
- **Minimize PCI scope:** use hosted fields / tokenization so raw PAN never touches your servers (SAQ A). Never log card data.
|
|
58
|
+
- **Fraud:** combine processor risk signals with velocity checks, AVS/CVV, and 3-D Secure for high-risk; balance friction vs chargebacks.
|
|
59
|
+
- **Refunds:** never exceed captured amount; support partial; emit `payment.refunded` to the order lifecycle.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Output Artifacts
|
|
64
|
+
|
|
65
|
+
| Request | Output |
|
|
66
|
+
|---------|--------|
|
|
67
|
+
| Design | Gateway selection + intent flow + PCI scope plan |
|
|
68
|
+
| Webhooks | Idempotent handler design + reconciliation plan |
|
|
69
|
+
| Audit | Findings: SECURE / CONCERNS / FAIL per area |
|
|
70
|
+
|
|
71
|
+
A payment architecture is **SECURE** when charges are idempotent, amounts are server-authoritative, webhooks are signature-verified and deduplicated, money is integer minor units, and PCI scope is minimized.
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Related Skills
|
|
76
|
+
|
|
77
|
+
- **stripe-integration-expert**: processor-specific implementation once this architecture is set.
|
|
78
|
+
- **cart-checkout**: invokes the payment step.
|
|
79
|
+
- **order-lifecycle**: consumes payment events (paid, refunded).
|
|
80
|
+
- **subscription-billing**: recurring charges build on this layer.
|