@miranda0808/maya-codex 0.1.0 → 0.1.2
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/README.md +21 -2
- package/package.json +2 -1
- package/payload/.agents/skills/maya-consult/SKILL.md +32 -0
- package/payload/.agents/skills/maya-consult/agents/openai.yaml +4 -0
- package/payload/.agents/skills/maya-task/SKILL.md +42 -0
- package/payload/.agents/skills/maya-task/agents/openai.yaml +4 -0
- package/payload/.agents/skills/product/SKILL.md +63 -0
- package/payload/.agents/skills/product/agents/openai.yaml +4 -0
- package/payload/.env.example +9 -0
- package/payload/.maya/modes/consult.md +3 -2
- package/payload/.maya/modes/task.md +2 -1
- package/payload/MAYA.md +14 -8
- package/payload/commands/maya-consult.md +4 -1
- package/payload/commands/maya-task.md +3 -0
- package/payload/tools/meta/README.md +58 -55
- package/payload/tools/meta/meta-fetch.ps1 +404 -323
- package/payload/tools/meta/meta-fetch.test.ps1 +94 -38
- package/vendor/shared-installer/manifests/codex-files.json +1 -1
- package/vendor/shared-installer/manifests/common-files.json +14 -13
- package/vendor/shared-installer/src/fs.js +136 -105
- package/vendor/shared-installer/src/install.js +168 -157
- package/vendor/shared-installer/templates/codex/AGENTS.md +10 -5
package/README.md
CHANGED
|
@@ -14,13 +14,23 @@ npx @miranda0808/maya-codex init --target ../some-project
|
|
|
14
14
|
## What It Installs
|
|
15
15
|
|
|
16
16
|
- portable `AGENTS.md`
|
|
17
|
-
- `
|
|
17
|
+
- `.env.example`
|
|
18
|
+
- `.gitignore` entries for `.env` and `.env.local`
|
|
19
|
+
- `commands/` compatibility docs
|
|
18
20
|
- `.maya/`
|
|
19
21
|
- `templates/`
|
|
20
22
|
- `campaigns/README.md`
|
|
21
23
|
- `research/README.md`
|
|
22
24
|
- `tools/`
|
|
23
|
-
- `.
|
|
25
|
+
- `.agents/skills/` including `/maya-consult`, `/maya-task`, and `/product`
|
|
26
|
+
|
|
27
|
+
## Secrets
|
|
28
|
+
|
|
29
|
+
After install, copy `.env.example` to `.env` or `.env.local` in the target repo.
|
|
30
|
+
|
|
31
|
+
- `.env.local` overrides `.env` when both exist.
|
|
32
|
+
- Maya keeps `.env` and `.env.local` out of git by adding them to `.gitignore`.
|
|
33
|
+
- The Meta boundary auto-loads `META_ACCESS_TOKEN` and `META_AD_ACCOUNT_ID` from those files for each invocation.
|
|
24
34
|
|
|
25
35
|
## Options
|
|
26
36
|
|
|
@@ -28,3 +38,12 @@ npx @miranda0808/maya-codex init --target ../some-project
|
|
|
28
38
|
- `--force` overwrites files Maya previously installed.
|
|
29
39
|
- `--target <path>` installs into a different existing directory.
|
|
30
40
|
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
## Codex Entry Skills
|
|
44
|
+
|
|
45
|
+
After install, Codex App should surface these repo-local Maya entrypoints from `.agents/skills/`:
|
|
46
|
+
|
|
47
|
+
- `/maya-consult`
|
|
48
|
+
- `/maya-task`
|
|
49
|
+
- `/product`
|
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maya-consult
|
|
3
|
+
description: Enter Maya consult mode for advisory, lower-cost marketing help in this repo.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Maya Consult
|
|
9
|
+
|
|
10
|
+
Load `MAYA.md`, `MAYA-CATALOG.md`, `MAYA-DEPENDENCIES.md`, and `.maya/modes/consult.md`, then operate in Maya consult mode only until Justin explicitly escalates to task mode.
|
|
11
|
+
|
|
12
|
+
## Response Marker
|
|
13
|
+
|
|
14
|
+
Every major Maya response in this workflow should begin with `Mode: consult`.
|
|
15
|
+
|
|
16
|
+
## Consult Workflow
|
|
17
|
+
|
|
18
|
+
1. Confirm that consult mode is the active Maya mode, begin major responses with `Mode: consult`, and keep the interaction advisory by default.
|
|
19
|
+
2. Read `PRODUCT.md` directly when it exists and is relevant to Justin's question.
|
|
20
|
+
3. If `PRODUCT.md` is missing, continue when possible, but clearly say the advice is not brand-calibrated and point Justin to `/product` for future brand-calibrated work.
|
|
21
|
+
4. Load only the selected reference docs, catalog entries, dependency notes, prior outputs, or research artifacts needed to answer the current advisory request.
|
|
22
|
+
5. Answer with advice, trade-offs, comparisons, recommendations, or suggested plans that fit consult mode.
|
|
23
|
+
6. Create lightweight briefs or notes only when Justin explicitly asks for an advisory artifact.
|
|
24
|
+
7. If execution would be more appropriate, tell Justin the work needs to move to `/maya-task`, explain that task mode requires `PRODUCT.md`, a proposed chain, and approval before execution, and stop short of starting that workflow yourself.
|
|
25
|
+
|
|
26
|
+
## Default Prohibitions
|
|
27
|
+
|
|
28
|
+
- Do not create or update `campaigns/<campaign-id>/STATE.md`.
|
|
29
|
+
- Do not create specialist task packets.
|
|
30
|
+
- Do not start multi-step specialist execution or planner or executor work.
|
|
31
|
+
- Do not invoke API-backed operational work, including the Meta boundary.
|
|
32
|
+
- Do not silently escalate into task mode.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: maya-task
|
|
3
|
+
description: Enter Maya task mode for approval-gated, multi-step marketing execution in this repo.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Maya Task
|
|
9
|
+
|
|
10
|
+
Load `MAYA.md`, `MAYA-CATALOG.md`, `MAYA-DEPENDENCIES.md`, `.maya/modes/task.md`, `.maya/planner.md`, `.maya/executor.md`, `.maya/researcher.md`, `.maya/meta-api-agent.md`, `.maya/templates/plan.md`, `.maya/templates/state.md`, and `.maya/templates/task-packet.md`, then stay in Maya task mode and follow this workflow.
|
|
11
|
+
|
|
12
|
+
## Response Marker
|
|
13
|
+
|
|
14
|
+
Every major Maya response in this workflow should begin with `Mode: task`.
|
|
15
|
+
|
|
16
|
+
## Planning Phase
|
|
17
|
+
|
|
18
|
+
1. Validate that task mode is allowed to proceed.
|
|
19
|
+
2. If `PRODUCT.md` is missing, block immediately, tell Justin task mode cannot continue, and point him to `/product`.
|
|
20
|
+
3. If the request is too vague for safe planning, ask for the smallest missing detail and stop until Justin answers.
|
|
21
|
+
4. Normalize the request into a campaign or workstream id for campaign-local artifact paths.
|
|
22
|
+
5. Read `MAYA-CATALOG.md` and `MAYA-DEPENDENCIES.md` to propose the specialist chain, dependency order, expected outputs, and any context-specific deviations.
|
|
23
|
+
6. Create or update a draft `campaigns/<campaign-id>/PLAN.md` with approval status set to `awaiting approval`.
|
|
24
|
+
7. Record packet-first specialist context expectations in that draft, including whether any downstream step requires explicit direct `PRODUCT.md` read approval.
|
|
25
|
+
8. Show Justin an approval summary derived from the draft plan, including the campaign id, proposed chain, dependencies, expected outputs, warnings, and any pending direct-read approvals.
|
|
26
|
+
9. Stop until approval before any executor kickoff or specialist execution begins.
|
|
27
|
+
|
|
28
|
+
## Executor Loop After Approval
|
|
29
|
+
|
|
30
|
+
1. After Justin approves the proposed chain, create or update `campaigns/<campaign-id>/STATE.md`.
|
|
31
|
+
2. Resume from the existing approved `campaigns/<campaign-id>/PLAN.md` and `campaigns/<campaign-id>/STATE.md` when a campaign already exists instead of replanning by default.
|
|
32
|
+
3. Record the latest approved chain, approval status, handoff verification status, current packet id, current packet status, next approved pending task, resume point, and next action in state.
|
|
33
|
+
4. Select the next approved pending task from state only when the approved chain in `PLAN.md` still matches the real work and no reapproval trigger is active.
|
|
34
|
+
5. Create or load exactly one approved `campaigns/<campaign-id>/task-packets/<task-id>.md` for that task and package the approved `PRODUCT.md` slices into the packet.
|
|
35
|
+
6. Run only that packet's assigned specialist through the executor contract and do not continue into downstream work in the same jump.
|
|
36
|
+
7. Verify the packet's done criteria and expected output path before the executor may mark the task complete.
|
|
37
|
+
8. Record output locations, verification results, downstream readiness, and any blocker in `campaigns/<campaign-id>/STATE.md` before the executor may create the next approved packet.
|
|
38
|
+
9. Stop if verification fails, record the blocker, and do not advance the chain.
|
|
39
|
+
10. Stop immediately if a required upstream artifact or handoff packet is missing, and record the stop reason in `campaigns/<campaign-id>/STATE.md`.
|
|
40
|
+
11. Stop and return to Justin for approval when the approved chain no longer matches reality, when downstream scope changes, or when a new specialist or broader direct `PRODUCT.md` read is needed.
|
|
41
|
+
12. Stop cleanly when the plan is complete and mark state so the next action is review or closeout rather than another packet.
|
|
42
|
+
13. Route any Meta-backed step only through `tools/meta/meta-fetch.ps1` and preserve cache metadata requirements from `tools/meta/meta-cache-schema.md`.
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: product
|
|
3
|
+
description: Create or update `PRODUCT.md` through a guided interview for this repo.
|
|
4
|
+
metadata:
|
|
5
|
+
version: 1.0.0
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Product
|
|
9
|
+
|
|
10
|
+
Check whether `PRODUCT.md` already exists.
|
|
11
|
+
|
|
12
|
+
If `PRODUCT.md` exists:
|
|
13
|
+
- load it
|
|
14
|
+
- summarize what it already captures
|
|
15
|
+
- identify missing, weak, or outdated sections
|
|
16
|
+
- interview Justin only for gaps, corrections, and updates before rewriting it
|
|
17
|
+
|
|
18
|
+
If `PRODUCT.md` does not exist:
|
|
19
|
+
- start a guided interview to create it from scratch
|
|
20
|
+
- ask one question at a time
|
|
21
|
+
- prioritize completeness over speed
|
|
22
|
+
|
|
23
|
+
## Workflow Rules
|
|
24
|
+
|
|
25
|
+
- stay focused on creating or updating `PRODUCT.md`
|
|
26
|
+
- do not enter Maya consult mode or Maya task mode
|
|
27
|
+
- do not start specialist chains, execution planning, or API-backed work
|
|
28
|
+
- use repo evidence when helpful, but confirm important assumptions with Justin before finalizing them
|
|
29
|
+
- after each major section, summarize back what you captured and confirm it
|
|
30
|
+
- if a section is unknown, explicitly mark it as `TBD` instead of silently skipping it
|
|
31
|
+
- do not write `.agents/product-marketing-context.md`; this skill writes directly to `PRODUCT.md`
|
|
32
|
+
|
|
33
|
+
## Required `PRODUCT.md` Sections
|
|
34
|
+
|
|
35
|
+
- Product Overview
|
|
36
|
+
- Audience And ICP
|
|
37
|
+
- Use Cases And Jobs To Be Done
|
|
38
|
+
- Pain Points
|
|
39
|
+
- Alternatives And Competitors
|
|
40
|
+
- Differentiation
|
|
41
|
+
- Objections And Anti-Personas
|
|
42
|
+
- Messaging Pillars And Claims
|
|
43
|
+
- Customer Language
|
|
44
|
+
- Brand Voice
|
|
45
|
+
- Proof Points
|
|
46
|
+
- Offers And Conversion Goals
|
|
47
|
+
- Examples, Dos, And Don'ts
|
|
48
|
+
|
|
49
|
+
## Interview Guidance
|
|
50
|
+
|
|
51
|
+
- ask one question at a time
|
|
52
|
+
- push for verbatim customer language when possible
|
|
53
|
+
- ask for examples when an answer is too abstract
|
|
54
|
+
- prefer exact claims, objections, proof points, and phrases over polished but vague summaries
|
|
55
|
+
- do not finalize `PRODUCT.md` until the required sections are either captured or explicitly marked `TBD`
|
|
56
|
+
|
|
57
|
+
## When Enough Information Is Gathered
|
|
58
|
+
|
|
59
|
+
- draft or update `PRODUCT.md`
|
|
60
|
+
- show Justin the result
|
|
61
|
+
- ask what needs correcting or expanding
|
|
62
|
+
- refine it until Justin is satisfied
|
|
63
|
+
- save the final version to `PRODUCT.md`
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Copy this file to `.env` or `.env.local` in the Maya workspace.
|
|
2
|
+
# `.env.local` overrides `.env` when both exist.
|
|
3
|
+
# Local environment only. Do not commit real secrets.
|
|
4
|
+
META_ACCESS_TOKEN=
|
|
5
|
+
META_AD_ACCOUNT_ID=
|
|
6
|
+
|
|
7
|
+
# Add other imported tool credentials only when you start using them.
|
|
8
|
+
# RESEND_API_KEY=
|
|
9
|
+
# GA4_ACCESS_TOKEN=
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Consult mode is Maya's advisory path for Justin.
|
|
6
6
|
|
|
7
7
|
Expected entrypoint:
|
|
8
|
-
- `/maya
|
|
8
|
+
- `/maya-consult`
|
|
9
9
|
|
|
10
10
|
## Mode Ownership
|
|
11
11
|
|
|
@@ -57,7 +57,8 @@ Escalation from consult mode to task mode must be explicit.
|
|
|
57
57
|
|
|
58
58
|
Before switching, Maya should:
|
|
59
59
|
- say that the work is moving from advisory mode to execution mode
|
|
60
|
-
- point Justin to `/maya
|
|
60
|
+
- point Justin to `/maya-task` as the execution entrypoint
|
|
61
61
|
- explain that task mode requires `PRODUCT.md`, a proposed chain, and approval before execution
|
|
62
62
|
|
|
63
63
|
Consult mode may suggest a task-mode chain, but it must not run that chain on its own authority.
|
|
64
|
+
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
Task mode is Maya's approval-gated execution path for Justin.
|
|
6
6
|
|
|
7
7
|
Expected entrypoint:
|
|
8
|
-
- `/maya
|
|
8
|
+
- `/maya-task`
|
|
9
9
|
|
|
10
10
|
## Mode Ownership
|
|
11
11
|
|
|
@@ -95,3 +95,4 @@ Before each downstream step:
|
|
|
95
95
|
Missing approval, missing artifacts, or unsafe boundary usage stop the chain with a clear error.
|
|
96
96
|
|
|
97
97
|
New or changed downstream steps require a return to Justin for approval before task mode continues.
|
|
98
|
+
|
package/payload/MAYA.md
CHANGED
|
@@ -15,8 +15,8 @@ Maya:
|
|
|
15
15
|
|
|
16
16
|
Canonical Maya entrypoints:
|
|
17
17
|
|
|
18
|
-
- `/maya
|
|
19
|
-
- `/maya
|
|
18
|
+
- `/maya-consult`
|
|
19
|
+
- `/maya-task`
|
|
20
20
|
|
|
21
21
|
Related repo command:
|
|
22
22
|
|
|
@@ -24,16 +24,16 @@ Related repo command:
|
|
|
24
24
|
|
|
25
25
|
Command layer ownership:
|
|
26
26
|
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
- `.maya/modes/consult.md` and `.maya/modes/task.md` define detailed behavior after
|
|
27
|
+
- repo-local skills in `.agents/skills/` are Maya's Codex entrypoints and own explicit mode entry
|
|
28
|
+
- `.agents/skills/maya-consult/` implements `/maya-consult`
|
|
29
|
+
- `.agents/skills/maya-task/` implements `/maya-task`
|
|
30
|
+
- `commands/` remains compatibility and documentation, while `.maya/modes/consult.md` and `.maya/modes/task.md` define detailed behavior after entry
|
|
31
31
|
- orchestrators and specialists never decide mode on their own authority
|
|
32
32
|
|
|
33
33
|
Command behavior:
|
|
34
34
|
|
|
35
|
-
- `/maya
|
|
36
|
-
- `/maya
|
|
35
|
+
- `/maya-consult` enters consult mode directly
|
|
36
|
+
- `/maya-task` enters task mode directly
|
|
37
37
|
- every major Maya response echoes the active mode
|
|
38
38
|
- escalation from consult mode to task mode is explicit only
|
|
39
39
|
|
|
@@ -149,3 +149,9 @@ Role rule:
|
|
|
149
149
|
- specialists produce
|
|
150
150
|
- specialists use approved `TASK-PACKET.md` inputs first and never self-chain
|
|
151
151
|
- the executor owns baton passing between approved steps
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
@@ -3,6 +3,8 @@ description: Enter Maya consult mode
|
|
|
3
3
|
disable-model-invocation: true
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Compatibility note: the Codex-visible entrypoint is `/maya-consult`; keep this command file only as a compatibility or documentation shim.
|
|
7
|
+
|
|
6
8
|
Load `MAYA.md`, `MAYA-CATALOG.md`, `MAYA-DEPENDENCIES.md`, and `.maya/modes/consult.md`, then operate in Maya consult mode only until Justin explicitly escalates to task mode.
|
|
7
9
|
|
|
8
10
|
## Response Marker
|
|
@@ -17,7 +19,7 @@ Every major Maya response in this workflow should begin with `Mode: consult`.
|
|
|
17
19
|
4. Load only the selected reference docs, catalog entries, dependency notes, prior outputs, or research artifacts needed to answer the current advisory request.
|
|
18
20
|
5. Answer with advice, trade-offs, comparisons, recommendations, or suggested plans that fit consult mode.
|
|
19
21
|
6. Create lightweight briefs or notes only when Justin explicitly asks for an advisory artifact.
|
|
20
|
-
7. If execution would be more appropriate, tell Justin the work needs to move to `/maya
|
|
22
|
+
7. If execution would be more appropriate, tell Justin the work needs to move to `/maya-task`, explain that task mode requires `PRODUCT.md`, a proposed chain, and approval before execution, and stop short of starting that workflow yourself.
|
|
21
23
|
|
|
22
24
|
## Default Prohibitions
|
|
23
25
|
|
|
@@ -26,3 +28,4 @@ Every major Maya response in this workflow should begin with `Mode: consult`.
|
|
|
26
28
|
- Do not start multi-step specialist execution or planner or executor work.
|
|
27
29
|
- Do not invoke API-backed operational work, including the Meta boundary.
|
|
28
30
|
- Do not silently escalate into task mode.
|
|
31
|
+
|
|
@@ -3,6 +3,8 @@ description: Enter Maya task mode
|
|
|
3
3
|
disable-model-invocation: true
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
Compatibility note: the Codex-visible entrypoint is `/maya-task`; keep this command file only as a compatibility or documentation shim.
|
|
7
|
+
|
|
6
8
|
Load `MAYA.md`, `MAYA-CATALOG.md`, `MAYA-DEPENDENCIES.md`, `.maya/modes/task.md`, `.maya/planner.md`, `.maya/executor.md`, `.maya/researcher.md`, `.maya/meta-api-agent.md`, `.maya/templates/plan.md`, `.maya/templates/state.md`, and `.maya/templates/task-packet.md`, then stay in Maya task mode and follow this workflow.
|
|
7
9
|
|
|
8
10
|
## Response Marker
|
|
@@ -36,3 +38,4 @@ Every major Maya response in this workflow should begin with `Mode: task`.
|
|
|
36
38
|
11. Stop and return to Justin for approval when the approved chain no longer matches reality, when downstream scope changes, or when a new specialist or broader direct `PRODUCT.md` read is needed.
|
|
37
39
|
12. Stop cleanly when the plan is complete and mark state so the next action is review or closeout rather than another packet.
|
|
38
40
|
13. Route any Meta-backed step only through `tools/meta/meta-fetch.ps1` and preserve cache metadata requirements from `tools/meta/meta-cache-schema.md`.
|
|
41
|
+
|
|
@@ -1,55 +1,58 @@
|
|
|
1
|
-
# Meta Tool Maintenance
|
|
2
|
-
|
|
3
|
-
## Source
|
|
4
|
-
|
|
5
|
-
- Vendored from the upstream `marketingskills` repository: [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills)
|
|
6
|
-
- Local CLI file: `tools/clis/meta-ads.js`
|
|
7
|
-
- Approved Maya boundary: `tools/meta/meta-fetch.ps1`
|
|
8
|
-
- Current local API base in the vendored file: `https://graph.facebook.com/v18.0`
|
|
9
|
-
|
|
10
|
-
## Usage Boundary
|
|
11
|
-
|
|
12
|
-
- Agents should prefer `tools/meta/meta-fetch.ps1` for Meta reads.
|
|
13
|
-
- `meta-fetch.ps1` is the Maya-owned boundary for validation, read-only allowlisting, output sanitization, and cache writes.
|
|
14
|
-
- Keep secrets in environment variables
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.ps1'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
1
|
+
# Meta Tool Maintenance
|
|
2
|
+
|
|
3
|
+
## Source
|
|
4
|
+
|
|
5
|
+
- Vendored from the upstream `marketingskills` repository: [coreyhaines31/marketingskills](https://github.com/coreyhaines31/marketingskills)
|
|
6
|
+
- Local CLI file: `tools/clis/meta-ads.js`
|
|
7
|
+
- Approved Maya boundary: `tools/meta/meta-fetch.ps1`
|
|
8
|
+
- Current local API base in the vendored file: `https://graph.facebook.com/v18.0`
|
|
9
|
+
|
|
10
|
+
## Usage Boundary
|
|
11
|
+
|
|
12
|
+
- Agents should prefer `tools/meta/meta-fetch.ps1` for Meta reads.
|
|
13
|
+
- `meta-fetch.ps1` is the Maya-owned boundary for validation, read-only allowlisting, output sanitization, env-file resolution, and cache writes.
|
|
14
|
+
- Keep real secrets in repo-local `.env` or `.env.local`, or in already-loaded environment variables.
|
|
15
|
+
- `meta-fetch.ps1` resolves `.env` first, then `.env.local`, while preserving explicitly set process env values.
|
|
16
|
+
- Do not place raw tokens, headers, or unsafe debug output in prompts, logs, state files, or cache files.
|
|
17
|
+
|
|
18
|
+
## Maintenance Policy
|
|
19
|
+
|
|
20
|
+
- Treat `tools/clis/meta-ads.js` as vendored upstream code.
|
|
21
|
+
- Do not hand-maintain feature changes in the vendored file unless there is an urgent local fix.
|
|
22
|
+
- When the tool stops working, Meta deprecates an API version, or we need a newer endpoint or field, check the exact upstream tool first.
|
|
23
|
+
- Prefer replacing the local vendored file from upstream over accumulating local drift.
|
|
24
|
+
|
|
25
|
+
## Update Triggers
|
|
26
|
+
|
|
27
|
+
Review the upstream `meta-ads.js` when any of the following happens:
|
|
28
|
+
|
|
29
|
+
- Meta returns version deprecation or unsupported endpoint errors.
|
|
30
|
+
- Expected fields disappear or response shapes change.
|
|
31
|
+
- We need a newer Graph API version than the one pinned in the vendored file.
|
|
32
|
+
- The upstream `marketingskills` repo updates the same tool.
|
|
33
|
+
|
|
34
|
+
## Safe Update Workflow
|
|
35
|
+
|
|
36
|
+
1. Compare the local `tools/clis/meta-ads.js` with the upstream `meta-ads.js` in `coreyhaines31/marketingskills`.
|
|
37
|
+
2. Prefer a clean vendor refresh instead of manually mixing old and new logic.
|
|
38
|
+
3. Re-run dry-run and read-only verification commands after updating.
|
|
39
|
+
4. Keep any future Maya-specific safety behavior in wrappers under `tools/meta/`, not inside the vendored CLI unless strictly necessary.
|
|
40
|
+
|
|
41
|
+
## Verification After A Bump
|
|
42
|
+
|
|
43
|
+
Run at minimum:
|
|
44
|
+
|
|
45
|
+
```powershell
|
|
46
|
+
node --check 'tools/clis/meta-ads.js'
|
|
47
|
+
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.test.ps1'
|
|
48
|
+
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.ps1' -Resource campaigns -Action list -DryRun
|
|
49
|
+
powershell -ExecutionPolicy Bypass -File 'tools/meta/meta-fetch.ps1' -Resource campaigns -Action insights -Id 123 -DatePreset last_30d -DryRun
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Confirm:
|
|
53
|
+
|
|
54
|
+
- syntax still passes
|
|
55
|
+
- dry-run masks authorization data
|
|
56
|
+
- `.env` and `.env.local` resolution works without leaking tokens
|
|
57
|
+
- command structure still matches expected usage
|
|
58
|
+
- no local secrets are written to files, prompts, logs, or outputs
|