@refactco/refact-os 1.5.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 +60 -0
- package/LICENSE +21 -0
- package/README.md +162 -0
- package/bin/refact-os.js +154 -0
- package/lib/adapters.js +302 -0
- package/lib/company.js +76 -0
- package/lib/frontmatter.js +30 -0
- package/lib/migrate.js +116 -0
- package/lib/project-utils.js +179 -0
- package/lib/refact-config.js +324 -0
- package/lib/scaffold.js +329 -0
- package/lib/validate.js +145 -0
- package/package.json +46 -0
- package/templates/base/AGENTS.md +9 -0
- package/templates/base/CLAUDE.md +3 -0
- package/templates/base/README.md +54 -0
- package/templates/base/agent/AGENTS.md +60 -0
- package/templates/base/agent/CLAUDE.md +7 -0
- package/templates/base/agent/claude-hooks.json +32 -0
- package/templates/base/agent/hooks/claude-sync-transcript.py +236 -0
- package/templates/base/agent/hooks/preflight-metadata.mjs +202 -0
- package/templates/base/agent/hooks/send-transcript-to-remote-server.py +238 -0
- package/templates/base/agent/hooks/sync-chat-transcript.py +188 -0
- package/templates/base/agent/hooks.json +29 -0
- package/templates/base/agent/scripts/import-project-chat-history.py +196 -0
- package/templates/base/agent/scripts/sync-asana.mjs +408 -0
- package/templates/base/agent/skills/adopt/SKILL.md +46 -0
- package/templates/base/agent/skills/close-ticket/SKILL.md +31 -0
- package/templates/base/agent/skills/extract-learnings/SKILL.md +90 -0
- package/templates/base/agent/skills/git-it/SKILL.md +138 -0
- package/templates/base/agent/skills/import-chat-history/SKILL.md +85 -0
- package/templates/base/agent/skills/ingest-input/SKILL.md +43 -0
- package/templates/base/agent/skills/open-ticket/SKILL.md +36 -0
- package/templates/base/agent/skills/process-docs/SKILL.md +69 -0
- package/templates/base/agent/skills/project-status/SKILL.md +35 -0
- package/templates/base/agent/skills/project-status/scripts/scan-status.mjs +153 -0
- package/templates/base/agent/skills/refact/SKILL.md +139 -0
- package/templates/base/agent/skills/setup-project/SKILL.md +140 -0
- package/templates/base/agent/skills/sync-asana/SKILL.md +106 -0
- package/templates/base/agent/skills/update-canonical-record/SKILL.md +28 -0
- package/templates/base/agent/skills/update-package/SKILL.md +51 -0
- package/templates/base/docs/context/project.md +30 -0
- package/templates/base/docs/decisions.md +22 -0
- package/templates/base/docs/index.md +31 -0
- package/templates/base/docs/sources/raw/.gitkeep +0 -0
- package/templates/base/docs/task/.gitkeep +0 -0
- package/templates/base/env.example +14 -0
- package/templates/base/gitignore +34 -0
- package/templates/overlays/client/agent/skills/create-deliverable/SKILL.md +29 -0
- package/templates/overlays/client/docs/deliverables/.gitkeep +0 -0
- package/templates/overlays/code/agent/skills/add-codebase/SKILL.md +239 -0
- package/templates/overlays/code/agent/skills/code-development/SKILL.md +58 -0
- package/templates/overlays/code/agent/skills/code-development/references/gitflow.md +144 -0
- package/templates/overlays/nextjs/agent/skills/nextjs-dev/SKILL.md +93 -0
- package/templates/overlays/nextjs/agent/skills/setup-netlify-deploy/SKILL.md +143 -0
- package/templates/overlays/nextjs/agent/skills/setup-nextjs-app/SKILL.md +118 -0
- package/templates/overlays/nextjs/agent/skills/setup-vercel-deploy/SKILL.md +116 -0
- package/templates/overlays/wordpress/agent/skills/install-wp-skills/SKILL.md +130 -0
- package/templates/overlays/wordpress/agent/skills/setup-kinsta-deploy/SKILL.md +201 -0
- package/templates/overlays/wordpress/agent/skills/wp-env/SKILL.md +478 -0
- package/templates/overlays/wordpress/wp-cli.yml.example +46 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refact
|
|
3
|
+
description: Single entrypoint skill for refact-os project operations. Use when the user invokes /refact with an action like updating the package, importing chat history, or running project-type setup flows.
|
|
4
|
+
pattern: orchestrator
|
|
5
|
+
when_to_use: The user types /refact <action> — init, update the package, get chat history, process docs, status, git it, install wp skills, add codebase, sync asana, setup kinsta, wp-env operations, setup nextjs app, setup vercel deploy, or setup netlify deploy.
|
|
6
|
+
when_not_to_use: For code changes (use code-development) or for capturing a learning (use extract-learnings).
|
|
7
|
+
disable-model-invocation: true
|
|
8
|
+
next_skills:
|
|
9
|
+
- setup-project
|
|
10
|
+
- update-package
|
|
11
|
+
- import-chat-history
|
|
12
|
+
- process-docs
|
|
13
|
+
- project-status
|
|
14
|
+
- git-it
|
|
15
|
+
- sync-asana
|
|
16
|
+
sub_agents: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Refact Skill
|
|
20
|
+
|
|
21
|
+
Use this skill as a command router for `/refact ...` requests.
|
|
22
|
+
|
|
23
|
+
## Preflight: required scaffold metadata
|
|
24
|
+
|
|
25
|
+
Every `/refact ...` invocation passes through the `preflight-metadata` Cursor hook (registered on `beforeSubmitPrompt` in `.cursor/hooks.json`). The hook reads `.refact-os.json` at the project root and checks that every **required** field is present. Optional fields never block — the hook ignores them whether they are set, `null`, or absent.
|
|
26
|
+
|
|
27
|
+
Fields (kept in sync between `lib/refact-config.js` in the package and `.cursor/hooks/preflight-metadata.mjs` in the project):
|
|
28
|
+
|
|
29
|
+
| Path | Required | Notes |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| `stack` | yes | Object keyed by project type — **its keys are the type list** (`wordpress`, `nextjs`, `blank`); at least one. Each entry holds `hosting`, `runtime`, and `environments` (per-env `url` / `branch` / optional `ssh`). There is no separate `projectType`/`projectTypes`. |
|
|
32
|
+
| `asana.projectId` | no (optional) | Numeric ID from `https://app.asana.com/0/<id>/...`. The gate never blocks on it — set it (or run `/refact sync asana`) when you start using Asana; otherwise leave it unset or `null`. |
|
|
33
|
+
|
|
34
|
+
If the hook detects a missing **required** field it blocks the prompt and returns a message listing them. When that happens:
|
|
35
|
+
|
|
36
|
+
1. Ask the user for each missing value, one focused question at a time.
|
|
37
|
+
2. Write the answers into `.refact-os.json` (create the file if it doesn't exist).
|
|
38
|
+
3. Tell the user to re-run their original `/refact` command.
|
|
39
|
+
|
|
40
|
+
`.refact-os.json` shape (`stack` is keyed by type; `ssh` is present only for SSH-push hosts like Kinsta/WP Engine and omitted for git-integration hosts like Vercel/Netlify):
|
|
41
|
+
|
|
42
|
+
```json
|
|
43
|
+
{
|
|
44
|
+
"stack": {
|
|
45
|
+
"wordpress": {
|
|
46
|
+
"hosting": "kinsta",
|
|
47
|
+
"runtime": "wp-env (PHP 8.2, MySQL 8)",
|
|
48
|
+
"environments": {
|
|
49
|
+
"production": { "url": "https://www.example.com/", "branch": "main", "ssh": { "user": "example", "host": "1.2.3.4", "port": 12345, "path": "/www/example_123/public" } },
|
|
50
|
+
"staging": { "url": "https://stg-example.kinsta.cloud/", "branch": "stage", "ssh": { "user": "example", "host": "1.2.3.4", "port": 54321, "path": "/www/example_123/public" } }
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"nextjs": {
|
|
54
|
+
"hosting": "vercel",
|
|
55
|
+
"runtime": "Node 20 + pnpm",
|
|
56
|
+
"environments": {
|
|
57
|
+
"production": { "url": "https://app.example.com/", "branch": "main" },
|
|
58
|
+
"staging": { "url": "https://staging.example.com/", "branch": "develop" }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"asana": {
|
|
63
|
+
"projectId": "1209712345678901",
|
|
64
|
+
"projectUrl": "https://app.asana.com/0/1209712345678901"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Secret credentials — `ASANA_TOKEN`, SSH **private keys**, deploy tokens — belong in `.env` or the CI secret store, never in `.refact-os.json`. The config holds only non-secret routing (hosts, ports, paths, branches, URLs).
|
|
70
|
+
|
|
71
|
+
## Intent Routing
|
|
72
|
+
|
|
73
|
+
This is an explicit command router: it maps a typed `/refact <action>` to the skill that does the work and **delegates** to it — it does not reimplement that skill's steps. Every target below carries its own `when_to_use`, so the agent can also select it directly without `/refact`; this table just makes the operations discoverable as typed commands.
|
|
74
|
+
|
|
75
|
+
1. Parse the requested action from the user message.
|
|
76
|
+
2. Route to the matching skill (load its `SKILL.md`):
|
|
77
|
+
- init / initialize / setup / bootstrap / "check what's left to configure" -> `agent/skills/setup-project/SKILL.md`
|
|
78
|
+
- package update / bump / reinstall requests -> `agent/skills/update-package/SKILL.md`
|
|
79
|
+
- chat history import requests -> `agent/skills/import-chat-history/SKILL.md`
|
|
80
|
+
- process docs / ingest docs / digest new inputs -> `agent/skills/process-docs/SKILL.md`
|
|
81
|
+
- status / what's pending / what's unprocessed -> `agent/skills/project-status/SKILL.md`
|
|
82
|
+
- git it / set up the repo / create the remote / first commit / publish to GitHub -> `agent/skills/git-it/SKILL.md`
|
|
83
|
+
- install wp skills / add WordPress skills / pull Gutenberg skills / vendor WP agent skills -> `agent/skills/install-wp-skills/SKILL.md` *(WordPress engagements only)*
|
|
84
|
+
- add codebase / clone repo into apps / scaffold app -> `agent/skills/add-codebase/SKILL.md` *(code overlay only)*
|
|
85
|
+
- sync asana / get asana tickets / pull asana / sync asana ticket <gid> -> `agent/skills/sync-asana/SKILL.md`
|
|
86
|
+
- setup kinsta auto-deploy / add kinsta deploy / enable kinsta auto-deploy / create kinsta workflows -> `agent/skills/setup-kinsta-deploy/SKILL.md` *(WordPress engagements only)*
|
|
87
|
+
- wp-env setup / start the local wp env / spin up wordpress locally / wp-env pull [plugins|mu-plugins|db] / mirror staging locally / wp-env reset / wp-env domain set <host> / wp-env domain clear / custom local domain / website.local instead of localhost -> `agent/skills/wp-env/SKILL.md` *(WordPress engagements only)*
|
|
88
|
+
- setup nextjs app / add Next.js app / create a Next.js app / adopt existing Next.js codebase -> `agent/skills/setup-nextjs-app/SKILL.md` *(Next.js engagements only)*
|
|
89
|
+
- nextjs dev / run the Next.js app / fix Next.js bug / update a Next.js route, component, server action, or API endpoint -> `agent/skills/nextjs-dev/SKILL.md` *(Next.js engagements only)*
|
|
90
|
+
- setup vercel deploy / deploy Next.js to Vercel / link this Next.js app to Vercel -> `agent/skills/setup-vercel-deploy/SKILL.md` *(Next.js + Vercel only)*
|
|
91
|
+
- setup netlify deploy / deploy Next.js to Netlify / link this Next.js app to Netlify -> `agent/skills/setup-netlify-deploy/SKILL.md` *(Next.js + Netlify only)*
|
|
92
|
+
|
|
93
|
+
> The project-type skills ship only in their overlays. WordPress skills exist when `stack` has a `wordpress` entry; Next.js skills exist when `stack` has a `nextjs` entry. If the referenced skill folder is absent, tell the user to re-run `npx refact-os init --type <type>` or add the matching overlay.
|
|
94
|
+
|
|
95
|
+
3. Load and follow the matched skill exactly, execute the needed commands, and report results. Each target is a standalone skill — the agent may also select it directly from its own `when_to_use` without going through `/refact`.
|
|
96
|
+
|
|
97
|
+
## Examples
|
|
98
|
+
|
|
99
|
+
- `/refact init`
|
|
100
|
+
- `/refact initialize`
|
|
101
|
+
- `/refact setup`
|
|
102
|
+
- `/refact bootstrap`
|
|
103
|
+
- `/refact update the package`
|
|
104
|
+
- `/refact bump refact-os`
|
|
105
|
+
- `/refact get chat history`
|
|
106
|
+
- `/refact import chats`
|
|
107
|
+
- `/refact process docs`
|
|
108
|
+
- `/refact ingest new emails`
|
|
109
|
+
- `/refact status`
|
|
110
|
+
- `/refact what's unprocessed`
|
|
111
|
+
- `/refact git it`
|
|
112
|
+
- `/refact set up the repo`
|
|
113
|
+
- `/refact create the remote`
|
|
114
|
+
- `/refact publish to GitHub`
|
|
115
|
+
- `/refact install wp skills`
|
|
116
|
+
- `/refact add WordPress agent skills`
|
|
117
|
+
- `/refact pull Gutenberg/block skills`
|
|
118
|
+
- `/refact add codebase https://github.com/foo/bar`
|
|
119
|
+
- `/refact add codebase wordpress`
|
|
120
|
+
- `/refact add codebase seo`
|
|
121
|
+
- `/refact sync asana`
|
|
122
|
+
- `/refact get asana tickets`
|
|
123
|
+
- `/refact sync asana ticket 1209712345678901`
|
|
124
|
+
- `/refact setup kinsta auto-deploy`
|
|
125
|
+
- `/refact add kinsta deploy`
|
|
126
|
+
- `/refact create kinsta workflows`
|
|
127
|
+
- `/refact wp-env setup`
|
|
128
|
+
- `/refact wp-env pull`
|
|
129
|
+
- `/refact wp-env pull plugins`
|
|
130
|
+
- `/refact wp-env pull mu-plugins`
|
|
131
|
+
- `/refact wp-env pull db`
|
|
132
|
+
- `/refact wp-env reset`
|
|
133
|
+
- `/refact wp-env domain set website.local`
|
|
134
|
+
- `/refact wp-env domain clear`
|
|
135
|
+
|
|
136
|
+
## If Unclear
|
|
137
|
+
|
|
138
|
+
- Ask one focused clarifying question only when action cannot be inferred.
|
|
139
|
+
- Otherwise proceed directly using the best matching reference.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: setup-project
|
|
3
|
+
description: Post-scaffold setup checklist — complete .refact-os.json (stack types, hosting, runtime, environments) and Asana, create .env, set up git/GitHub, and scaffold project-type slots.
|
|
4
|
+
pattern: procedure
|
|
5
|
+
when_to_use: /refact init | initialize | setup | bootstrap, or "check what's left to configure" after scaffolding.
|
|
6
|
+
when_not_to_use: Routine code work (use code-development) or regenerating adapters (use refact-os sync).
|
|
7
|
+
next_skills:
|
|
8
|
+
- git-it
|
|
9
|
+
sub_agents: []
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Init Reference
|
|
13
|
+
|
|
14
|
+
Use this reference when the user invokes any of:
|
|
15
|
+
|
|
16
|
+
- `/refact init`
|
|
17
|
+
- `/refact initialize`
|
|
18
|
+
- `/refact setup`
|
|
19
|
+
- `/refact bootstrap`
|
|
20
|
+
|
|
21
|
+
## What this does
|
|
22
|
+
|
|
23
|
+
Walks an **idempotent checklist** that brings a freshly-scaffolded project to a fully-configured state. Each checkbox is verified independently. If a checkbox is already met, skip it silently. If it isn't, handle that one item — by asking the user, editing files, or delegating to another reference — then re-verify and move on.
|
|
24
|
+
|
|
25
|
+
The checklist is safe to re-run any time. Running `/refact init` on a fully-configured project should report "all checks pass" and do nothing.
|
|
26
|
+
|
|
27
|
+
## Checklist
|
|
28
|
+
|
|
29
|
+
Run each check in order. After handling any unmet item, re-check it before moving on.
|
|
30
|
+
|
|
31
|
+
### 1. Project stack (`.refact-os.json` › `stack`)
|
|
32
|
+
|
|
33
|
+
**Check:** `.refact-os.json` exists at the project root and `stack` names at least one project type. `stack` is an object **keyed by project type** — its keys *are* the type list. There is no separate `projectType`/`projectTypes`.
|
|
34
|
+
|
|
35
|
+
| Field | Required | Value |
|
|
36
|
+
|---|---|---|
|
|
37
|
+
| `stack.<type>` | yes (≥1) | One key per type the repo is: `wordpress`, `nextjs`, and/or `blank` |
|
|
38
|
+
| `asana.projectId` | optional | Numeric Asana project ID, or `null` to mark as not used |
|
|
39
|
+
|
|
40
|
+
**Handle (if unmet):** Ask which project type(s) this engagement is (`wordpress`, `nextjs`, `blank`, or a hybrid like `wordpress,nextjs`). For each, ensure a `stack.<type>` entry exists with the shape `{ "hosting": null, "runtime": null, "environments": {} }` (detail is filled in step 2). For `asana.projectId`, accept `null` / "skip" / blank as an explicit opt-out — never leave the key absent. Prefer `npx refact-os init --type <type>` (or `--overlay <type>`) so the matching overlays get applied too.
|
|
41
|
+
|
|
42
|
+
### 2. Stack details (`.refact-os.json` › `stack.<type>`)
|
|
43
|
+
|
|
44
|
+
**Check:** Each `stack.<type>` entry has its `hosting`, `runtime`, and `environments` filled — or an explicit `null` / deliberate `{}` where not applicable. This is the **single home** for stack, hosting, and deploy facts; they are no longer duplicated in `agent/AGENTS.md`.
|
|
45
|
+
|
|
46
|
+
**Per-type fields:**
|
|
47
|
+
|
|
48
|
+
| Field | Example | Notes |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `hosting` | `"kinsta"`, `"wpengine"`, `"vercel"`, `"netlify"` | Deploy provider for this type. |
|
|
51
|
+
| `runtime` | `"wp-env (PHP 8.2, MySQL 8)"`, `"Node 20 + pnpm"` | Local dev / runtime stack. |
|
|
52
|
+
| `environments.<env>` | keys like `production`, `staging` | One block per deployable environment; add others (e.g. `preview`) as needed. |
|
|
53
|
+
|
|
54
|
+
**Per-environment fields** (`stack.<type>.environments.<env>`):
|
|
55
|
+
|
|
56
|
+
| Field | Example | Notes |
|
|
57
|
+
|---|---|---|
|
|
58
|
+
| `url` | `"https://www.example.com/"` | Full URL including `https://`. |
|
|
59
|
+
| `branch` | `"main"`, `"stage"`, `"develop"` | Git branch that auto-deploys to this environment. |
|
|
60
|
+
| `ssh` | `{ "user": "example", "host": "1.2.3.4", "port": 12345, "path": "/www/<env>/public" }` | **SSH-push hosts only** (Kinsta, WP Engine). Omit entirely for git-integration hosts (Vercel, Netlify). Never store the private **key** here — that's a CI secret. |
|
|
61
|
+
|
|
62
|
+
**Handle (if unmet):** Ask the user, one focused question at a time, for each type's `hosting` + `runtime` and at least its `production` (usually also `staging`) environment. Accept "skip" — leave the field `null` (or omit `ssh`) so it stays visibly outstanding without blocking init. Write directly into `.refact-os.json` and show the proposed change first. Collect **non-secret routing only** — SSH keys, tokens, and passwords belong in `.env` or the CI secret store, never here.
|
|
63
|
+
|
|
64
|
+
### 3. `.env` file
|
|
65
|
+
|
|
66
|
+
**Check:** `.env` exists at the project root. (`.env.example` is always shipped; we just want the local copy.)
|
|
67
|
+
|
|
68
|
+
**Handle (if unmet):** Copy `.env.example` to `.env` (do not overwrite if `.env` already exists). Tell the user `.env` is gitignored and they should fill in any required tokens (e.g. `ASANA_TOKEN` if `.refact-os.json` › `asana.projectId` is set to a real ID).
|
|
69
|
+
|
|
70
|
+
### 4. Git repository + GitHub remote
|
|
71
|
+
|
|
72
|
+
**Check:**
|
|
73
|
+
|
|
74
|
+
- `.git/` exists at the project root.
|
|
75
|
+
- There is at least one commit (`git rev-parse --verify HEAD` succeeds).
|
|
76
|
+
- A remote named `origin` exists and points at a GitHub URL (`git remote get-url origin` returns a github.com URL).
|
|
77
|
+
|
|
78
|
+
**Handle (if unmet):** Delegate to `agent/skills/git-it/SKILL.md`. Run that flow exactly as documented there. Do not duplicate its prompts here — re-use the four questions (project name, slug, visibility, owner).
|
|
79
|
+
|
|
80
|
+
### 5. WordPress app slot (WordPress projects only)
|
|
81
|
+
|
|
82
|
+
**Skip this check** if `.refact-os.json` › `stack` has no `wordpress` entry.
|
|
83
|
+
|
|
84
|
+
**Check:** `apps/wordpress/` exists and contains `wp-content/plugins/`, `wp-content/themes/`, and `wp-content/mu-plugins/`.
|
|
85
|
+
|
|
86
|
+
**Handle (if unmet):** Delegate to `agent/skills/add-codebase/SKILL.md` with the argument `wordpress` (i.e. follow Flow B in that reference). After it runs, re-check the directory layout.
|
|
87
|
+
|
|
88
|
+
### 6. WordPress agent skills (WordPress projects only)
|
|
89
|
+
|
|
90
|
+
**Skip this check** if `.refact-os.json` › `stack` has no `wordpress` entry.
|
|
91
|
+
|
|
92
|
+
**Check:** `.cursor/skills/wp-block-development/SKILL.md` exists. (Presence of this one is the cheap proxy for "the WP curated set has been installed at least once.")
|
|
93
|
+
|
|
94
|
+
**Handle (if unmet):** Ask the user whether they want to install the curated WP skills now — it's optional and they may prefer to defer. If yes, delegate to `agent/skills/install-wp-skills/SKILL.md`. If no, mark the checkbox as user-deferred and move on; do not re-prompt on the next init run unless the user re-asks.
|
|
95
|
+
|
|
96
|
+
### 7. Kinsta auto-deploy workflows (WordPress + Kinsta only)
|
|
97
|
+
|
|
98
|
+
**Skip this check** if `.refact-os.json` › `stack` has no `wordpress` entry, **or** if `stack.wordpress.hosting` is not `kinsta`.
|
|
99
|
+
|
|
100
|
+
**Check:** Both `.github/workflows/wordpress-deploy-stage.yml` and `.github/workflows/wordpress-deploy-main.yml` exist at the repo root.
|
|
101
|
+
|
|
102
|
+
**Handle (if unmet):** Ask the user whether they want to create the Kinsta workflows now — it requires Kinsta-side SSH keys and GitHub Actions secrets, so they may want to defer. If yes, delegate to `agent/skills/setup-kinsta-deploy/SKILL.md`. If no, mark as user-deferred and move on.
|
|
103
|
+
|
|
104
|
+
### 8. agent/AGENTS.md drift warning (post-update only)
|
|
105
|
+
|
|
106
|
+
**Check:** The most recent scaffold run did **not** emit `⚠ agent/AGENTS.md template has changed upstream.`. (This warning is documented in `update-package.md` and stored hash-wise in `.refact-os.json` › `_scaffold.templateHashes`.)
|
|
107
|
+
|
|
108
|
+
This check is informational — there's nothing to "fix". If the warning fired during a recent `/refact update the package` run and the user hasn't yet reviewed the diff, remind them: read `node_modules/refact-os/templates/AGENTS.md`, diff against the project's `agent/AGENTS.md`, and merge new sections by hand.
|
|
109
|
+
|
|
110
|
+
## Output shape
|
|
111
|
+
|
|
112
|
+
After running through the checklist, print a single summary:
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
init checklist:
|
|
116
|
+
[x] .refact-os.json stack + asana
|
|
117
|
+
[x] stack details (hosting/runtime/envs)
|
|
118
|
+
[x] .env file
|
|
119
|
+
[x] git + GitHub remote
|
|
120
|
+
[x] apps/wordpress/ (wordpress only)
|
|
121
|
+
[-] WordPress agent skills (deferred by user)
|
|
122
|
+
[x] Kinsta auto-deploy workflows (wordpress + kinsta only)
|
|
123
|
+
[x] agent/AGENTS.md drift (no pending warning)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Mark items as:
|
|
127
|
+
- `[x]` met — handled successfully or already passing
|
|
128
|
+
- `[-]` user-deferred — user declined to handle now
|
|
129
|
+
- `[ ]` unmet and unresolved (only if the user aborted mid-step or a delegation failed)
|
|
130
|
+
|
|
131
|
+
Surface unresolved items at the bottom with the suggested next action.
|
|
132
|
+
|
|
133
|
+
## Guardrails
|
|
134
|
+
|
|
135
|
+
- **Idempotent.** Re-running init on a fully-configured project must do nothing. Never re-prompt for a value that is already set.
|
|
136
|
+
- **No silent edits.** Never write to `.refact-os.json` or `.env` without confirming with the user what is being set. Show the proposed change first.
|
|
137
|
+
- **Delegate, don't duplicate.** For git, WP skills, WordPress scaffold, and Kinsta setup, follow the existing references step-for-step. Do not reimplement their logic here.
|
|
138
|
+
- **Never** invent values for the user. If they don't know a value, accept "skip" and leave the field `null` (or omit an optional block like `ssh`) so it stays visibly outstanding.
|
|
139
|
+
- **Never** edit `REFACT.md` from this flow — it's agency-wide and not project-specific.
|
|
140
|
+
- If any single step fails, stop and report. Do not continue past a failed step — later checks may depend on it (e.g. `.env` before WP skills, git before any deploy setup).
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sync-asana
|
|
3
|
+
description: Pull Asana tickets (open + completed) into docs/task/ as one markdown file per task.
|
|
4
|
+
pattern: procedure
|
|
5
|
+
when_to_use: /refact sync asana | get asana tickets | sync asana ticket <gid>.
|
|
6
|
+
when_not_to_use: Opening a local ticket by hand (use open-ticket).
|
|
7
|
+
next_skills: []
|
|
8
|
+
sub_agents: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Asana Sync Reference
|
|
12
|
+
|
|
13
|
+
Use this reference when the user invokes any of:
|
|
14
|
+
|
|
15
|
+
- `/refact sync asana`
|
|
16
|
+
- `/refact get asana tickets`
|
|
17
|
+
- `/refact pull asana`
|
|
18
|
+
- `/refact sync asana ticket <gid>`
|
|
19
|
+
- `/refact get asana ticket <gid>`
|
|
20
|
+
|
|
21
|
+
The implementation is **read-only**. It never writes back to Asana. Do not extend it to post comments or create tickets without an explicit owner approval and a follow-up PR.
|
|
22
|
+
|
|
23
|
+
## What it does
|
|
24
|
+
|
|
25
|
+
`.cursor/scripts/sync-asana.mjs` calls the Asana REST API and mirrors the configured project locally:
|
|
26
|
+
|
|
27
|
+
- Walks every task in the Asana project (open **and** completed), paginated 100 at a time.
|
|
28
|
+
- For each task, fetches details, subtasks, attachments, and the full story/comments thread.
|
|
29
|
+
- Writes one markdown file per task into:
|
|
30
|
+
- `docs/task/open/<gid>.md` — open tasks
|
|
31
|
+
- `docs/task/closed/<gid>.md` — completed tasks
|
|
32
|
+
- If a task transitions from open → completed (or back) since the previous sync, the file is moved between those directories automatically.
|
|
33
|
+
- The script preserves the existing `processed: true|false` header value, so re-running does not undo work already done by `/refact process docs`.
|
|
34
|
+
|
|
35
|
+
## Prerequisites
|
|
36
|
+
|
|
37
|
+
| Requirement | Where it lives | Failure mode |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| Asana project ID | `.refact-os.json` → `asana.projectId` | Missing → the `preflight-metadata` hook blocks the prompt and asks for it (see `.cursor/skills/refact/SKILL.md` › Preflight). |
|
|
40
|
+
| Asana personal access token | `.env` → `ASANA_TOKEN` | Missing → the script exits with: `ASANA_TOKEN is not set. Add it to .env`. Generate one at https://app.asana.com/0/my-apps. |
|
|
41
|
+
|
|
42
|
+
If `asana.projectId` is `null` (the user explicitly skipped Asana during scaffolding), tell the user they need to set it to a real ID before this command can run, and offer to update `.refact-os.json` for them.
|
|
43
|
+
|
|
44
|
+
## How to invoke
|
|
45
|
+
|
|
46
|
+
Prefer the npm script wrappers — they keep the cwd correct and are the documented entry points:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
npm run asana:sync # full project sync
|
|
50
|
+
npm run asana:sync:dry # show what would change, write nothing
|
|
51
|
+
npm run asana:sync -- --ticket 1209712345678901 # one task only
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Direct invocation (equivalent):
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
node .cursor/scripts/sync-asana.mjs
|
|
58
|
+
node .cursor/scripts/sync-asana.mjs --dry-run
|
|
59
|
+
node .cursor/scripts/sync-asana.mjs --ticket 1209712345678901
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The single-ticket path does not need `asana.projectId` — only the token — so it works for ad-hoc fetches even before a project is configured.
|
|
63
|
+
|
|
64
|
+
## Workflow when the user invokes the skill
|
|
65
|
+
|
|
66
|
+
1. **Parse intent.** Decide whether this is a full sync or a single-ticket sync. If the user named a ticket ID, use `--ticket <gid>`. Otherwise full sync.
|
|
67
|
+
2. **Sanity check the prerequisites.** Read `.refact-os.json` and `.env` and confirm both `asana.projectId` (for full sync) and `ASANA_TOKEN` (always) are present. If either is missing, stop and tell the user what to do — do not run the script and hide the error.
|
|
68
|
+
3. **Run the script** via the appropriate npm command above. Stream its output to the user.
|
|
69
|
+
4. **Read the summary** the script prints on its last line, e.g. `Done. {"created":4,"updated":2,"moved":1,"unchanged":12}`.
|
|
70
|
+
5. **Report** to the user:
|
|
71
|
+
- Total tasks synced (sum of all counters).
|
|
72
|
+
- Created / updated / moved / unchanged / error counts.
|
|
73
|
+
- If there were errors, list the failing task GIDs and what each error said.
|
|
74
|
+
- Remind them that newly-fetched tickets are still `processed: false`, so the next `/refact process docs` will integrate them into `docs/context/`.
|
|
75
|
+
|
|
76
|
+
## Markdown layout produced
|
|
77
|
+
|
|
78
|
+
```yaml
|
|
79
|
+
---
|
|
80
|
+
source: asana
|
|
81
|
+
added-by: sync-asana.mjs
|
|
82
|
+
processed: false
|
|
83
|
+
asana-gid: 1209712345678901
|
|
84
|
+
asana-permalink: https://app.asana.com/0/1209.../1209712345678901
|
|
85
|
+
asana-modified-at: 2026-05-09T10:23:00.000Z
|
|
86
|
+
asana-completed: false
|
|
87
|
+
---
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Followed by:
|
|
91
|
+
|
|
92
|
+
- `# <task name>`
|
|
93
|
+
- Single-line status header (status / assignee / due / start / section / tags / parent / completed-at).
|
|
94
|
+
- `## Notes` (raw `task.notes` content).
|
|
95
|
+
- `## Custom fields` if any have display values.
|
|
96
|
+
- `## Subtasks (N)` — list with GIDs; subtasks are **not** synced as individual files in this version.
|
|
97
|
+
- `## Attachments (N)` — links only, no downloads.
|
|
98
|
+
- `## Comments / activity (N)` — every story (comments and system events).
|
|
99
|
+
|
|
100
|
+
## Guardrails
|
|
101
|
+
|
|
102
|
+
- **Never** edit a synced ticket file by hand expecting it to round-trip back to Asana. The script is one-way (Asana → local). Local edits are overwritten on the next sync.
|
|
103
|
+
- **Never** flip `asana-completed:` manually to move a file between `asana/` and `asana/closed/`. The script does that based on Asana's truth.
|
|
104
|
+
- **Never** commit `.env` or echo `ASANA_TOKEN` into chat / PR descriptions.
|
|
105
|
+
- If a fetch fails with `401`, the token is invalid or revoked — tell the user to regenerate it. If it fails with `403`, the token is valid but does not have access to that project.
|
|
106
|
+
- If the project has thousands of tasks, the first sync may take a couple of minutes. Don't add a flag to "skip closed tickets" — completed history is the whole reason to mirror locally.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-canonical-record
|
|
3
|
+
description: Make a surgical, cited edit to the project's canonical truth file (blueprint/proposal/spec/charter/brief) when synthesized knowledge changes.
|
|
4
|
+
pattern: procedure
|
|
5
|
+
when_to_use: New synthesized truth needs to be reflected in the canonical record — a confirmed decision, a scope change, a resolved open question.
|
|
6
|
+
when_not_to_use: For raw inbound material (use ingest-input) or volatile in-progress state (use docs/task/). Don't edit the canonical record from unverified evidence.
|
|
7
|
+
inputs:
|
|
8
|
+
- the canonical record file named in docs/index.md
|
|
9
|
+
- supporting evidence under docs/sources/ and entries in docs/decisions.md
|
|
10
|
+
outputs:
|
|
11
|
+
- a surgical edit to the canonical record, with a citation to the source
|
|
12
|
+
next_skills: []
|
|
13
|
+
sub_agents: []
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Update Canonical Record
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
1. Read `docs/index.md` to find which file is the canonical record (it varies by project: `blueprint.md`, `proposal.md`, `spec.md`, `charter.md`, `brief.md`).
|
|
21
|
+
2. Make the smallest edit that captures the new truth. Cite the source (evidence path, decision date, ticket).
|
|
22
|
+
3. If the change conflicts with existing canonical text, record the contradiction rather than silently overwriting — note both and flag for a human.
|
|
23
|
+
4. If this finalizes a decision, also append to `docs/decisions.md`.
|
|
24
|
+
|
|
25
|
+
## Hard rules
|
|
26
|
+
|
|
27
|
+
- Knowledge wins over evidence on conflict, but only *after* synthesis — don't promote an unverified source claim straight into the canonical record.
|
|
28
|
+
- Surgical edits only. Don't rewrite whole sections to make one change.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: update-package
|
|
3
|
+
description: Update/bump/reinstall the refact-os package from GitHub, refresh the agent payload (prune removed skills, regenerate adapters), and report what changed.
|
|
4
|
+
pattern: procedure
|
|
5
|
+
when_to_use: /refact update the package | bump refact-os | reinstall | "get the latest refact-os" | "are we on the latest standard".
|
|
6
|
+
when_not_to_use: Installing WordPress agent skills (use install-wp-skills). Bringing a drifted repo fully in line (after updating, use adopt).
|
|
7
|
+
next_skills: []
|
|
8
|
+
sub_agents: []
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Update Package Reference
|
|
12
|
+
|
|
13
|
+
Use this when the user asks to update / bump / refresh / reinstall `refact-os` in the current repo. Goal: pull the latest package, let it refresh the agent payload, and report what changed — including anything that needs a manual merge.
|
|
14
|
+
|
|
15
|
+
## Source
|
|
16
|
+
|
|
17
|
+
`refact-os` installs from GitHub (`github:refactco/refact-os`) — it is **not** on the public npm registry, so `npm install refact-os@latest` will fail. Use the GitHub specifier unless the user explicitly names a local checkout (e.g. `../refact-os` for development).
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
1. **Detect the package manager** from lockfiles: `pnpm-lock.yaml` → pnpm; `yarn.lock` → yarn; `package-lock.json` or none → npm.
|
|
22
|
+
2. **Bump the package** (show the command first; let the user override the source):
|
|
23
|
+
- npm: `npm install github:refactco/refact-os`
|
|
24
|
+
- pnpm: `pnpm add github:refactco/refact-os`
|
|
25
|
+
- yarn: `yarn add github:refactco/refact-os`
|
|
26
|
+
|
|
27
|
+
Installing as a devDependency does **not** auto-scaffold (postinstall skips when refact-os is a project dependency), so apply the refresh explicitly in the next step.
|
|
28
|
+
3. **Refresh the payload:** `npx refact-os init` (or `npm run refact:update`). It is idempotent and:
|
|
29
|
+
- force-copies package-managed files (the `agent/` skills, hooks, scripts, root pointers); your own files are preserved (`agent/AGENTS.md`, `README.md`, everything under `docs/`).
|
|
30
|
+
- **prunes** skills the package removed or renamed since your last update (tracked via `_scaffold.shippedSkills` in `.refact-os.json`); skills you authored are never pruned.
|
|
31
|
+
- regenerates `.cursor/` and `.claude/` from `agent/`.
|
|
32
|
+
- prints the version transition (`old → new`) and any pruned skills.
|
|
33
|
+
4. **Read the output** and surface to the user:
|
|
34
|
+
- the version transition — point them at `node_modules/refact-os/CHANGELOG.md` for what changed and whether anything needs manual action.
|
|
35
|
+
- any pruned skills.
|
|
36
|
+
- the **`agent/AGENTS.md` drift warning** if it fired (the upstream contract template changed; your copy is never overwritten).
|
|
37
|
+
5. **agent/AGENTS.md drift follow-up** (only if the warning fired): read the installed template at `node_modules/refact-os/templates/base/agent/AGENTS.md` and the project's `agent/AGENTS.md`, diff them, and surface the meaningful additions as *suggestions*. Wait for the user's go-ahead before editing; preserve project-specific values (stack, hosting, URLs, SSH) — never replace them with template placeholders.
|
|
38
|
+
6. **Validate:** run `npm run refact:validate` and report the result. If it surfaces structural gaps (common when the standard adds folders/roles), suggest `/adopt` to reconcile them.
|
|
39
|
+
7. **Report:** source used, installed version/SHA, version transition, files changed, pruned skills, whether the AGENTS.md drift fired, and follow-up steps (review the diff, run tests, commit).
|
|
40
|
+
|
|
41
|
+
## Local checkout (opt-in only)
|
|
42
|
+
|
|
43
|
+
If the user explicitly wants to install from a local clone (developing refact-os itself), use the path they name (e.g. `npm install ../refact-os`). Don't assume that layout exists.
|
|
44
|
+
|
|
45
|
+
## Guardrails
|
|
46
|
+
|
|
47
|
+
- Prefer package-manager commands over hand-editing `package.json`.
|
|
48
|
+
- Never reach for the npm registry as a fallback — the package isn't published there.
|
|
49
|
+
- Never run destructive git commands.
|
|
50
|
+
- If install fails, capture the exact error and suggest the smallest fix — don't silently retry with a different source.
|
|
51
|
+
- The refresh prunes only skills the package previously shipped. If the user customized a package skill in place (discouraged — fork it with a project prefix instead), warn them it will be overwritten or pruned.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
date: <TODO: yyyy-mm-dd>
|
|
3
|
+
status: active
|
|
4
|
+
description: Stable engagement context — who the client is, what we're building, and the working agreements that don't change week to week.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Project Context
|
|
8
|
+
|
|
9
|
+
> Stable engagement context. Volatile state lives in `docs/task/`; this file changes rarely.
|
|
10
|
+
|
|
11
|
+
## What this engagement is
|
|
12
|
+
|
|
13
|
+
<TODO: one paragraph — client name, scope, why this engagement exists.>
|
|
14
|
+
|
|
15
|
+
> Stack, hosting, and per-environment deploy config live in `.refact-os.json` (keyed by project type), not here.
|
|
16
|
+
|
|
17
|
+
## Working agreements
|
|
18
|
+
|
|
19
|
+
- Decisions are traceable: anything decided on the client's behalf is recorded in `docs/decisions.md` with the data it was based on.
|
|
20
|
+
- Open questions have an owner: pending calls live in `docs/context/open-decisions.md`, each tagged with a responsible person.
|
|
21
|
+
- Evidence is captured before it's used: emails, transcripts, and tickets land in `docs/sources/raw/` first — agents work from those files, not from chat memory.
|
|
22
|
+
- Secrets are local-only: per-user tokens live in `.env`, never committed.
|
|
23
|
+
|
|
24
|
+
## Source precedence (what wins on conflict)
|
|
25
|
+
|
|
26
|
+
1. Explicit current user instruction.
|
|
27
|
+
2. The canonical record (see `docs/index.md`).
|
|
28
|
+
3. Latest `docs/decisions.md` entry.
|
|
29
|
+
4. Latest call transcript / client artifact.
|
|
30
|
+
5. Older references.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Decisions
|
|
2
|
+
|
|
3
|
+
Finalized decisions — what was decided, why, and the data the decision was based on. Agents append here whenever they (or a human) make a non-trivial decision on the project.
|
|
4
|
+
|
|
5
|
+
Each entry **must** include the supporting data, so that weeks later we can answer "why did this happen?" without digging through chat logs.
|
|
6
|
+
|
|
7
|
+
> When this file gets unwieldy to scan, split it by **date range** (e.g. `docs/decisions/2026-Q1.md`), not by topic — chronology is unambiguous, topic classification isn't. Until then, one file greps fine.
|
|
8
|
+
|
|
9
|
+
## Entry format
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
## YYYY-MM-DD — One-line summary
|
|
13
|
+
|
|
14
|
+
- **Decision:** what was decided.
|
|
15
|
+
- **Why:** the reason. Link the request / ticket / email if there is one.
|
|
16
|
+
- **Data:** the inputs this decision was based on (IDs, file paths under docs/, ticket numbers, email subjects).
|
|
17
|
+
- **Owner:** who decided. If an agent decided autonomously, say "agent (autonomous)". If a human approved, add "approved by: <name>".
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Entries
|
|
21
|
+
|
|
22
|
+
<!-- newest first -->
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# docs/ — project index
|
|
2
|
+
|
|
3
|
+
Lazy catalog of this engagement's substrate. Agents read this first to know where to look. Update it when a new top-level doc earns its place.
|
|
4
|
+
|
|
5
|
+
## Canonical record
|
|
6
|
+
|
|
7
|
+
This project's canonical truth lives in `<TODO: blueprint.md | proposal.md | spec.md | charter.md | brief.md>`. Until that file is created, the canonical record is this index plus the most recent `decisions.md` entries. `/refact init` will help name and create it.
|
|
8
|
+
|
|
9
|
+
## Where things live (the seven roles)
|
|
10
|
+
|
|
11
|
+
| Role | Path | What's there |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| **Evidence** | `docs/sources/raw/` | Inbound material as received — `email/`, `call-transcripts/`, `agent-transcripts/`. Never edited. |
|
|
14
|
+
| **Knowledge** | `docs/context/`, `docs/decisions.md` | Curated truth: `project.md`, `people.md`, `open-decisions.md`, `learnings.md`, plus the decision log. `context/company/` (when synced) holds Refact-wide brand/team context from `refact-operation`. |
|
|
15
|
+
| **Task** | `docs/task/` | In-progress work: tickets in `open/`, completed under `closed/`. |
|
|
16
|
+
| **Output** | `docs/deliverables/` | Reviewed, ready-to-share artifacts only. |
|
|
17
|
+
| **Software** | `apps/`, `packages/` | Runnable code (created when the engagement has code). |
|
|
18
|
+
| **Agent** | `agent/` | Shared contract, skills, hooks, scripts. Canonical; `.cursor/` and `.claude/` are generated from it. |
|
|
19
|
+
|
|
20
|
+
## Read order for a new agent
|
|
21
|
+
|
|
22
|
+
1. `agent/AGENTS.md` — the contract: stack, hard rules, growth triggers.
|
|
23
|
+
2. This index.
|
|
24
|
+
3. The canonical record (once named).
|
|
25
|
+
4. Recent `decisions.md` entries.
|
|
26
|
+
|
|
27
|
+
## Update rules
|
|
28
|
+
|
|
29
|
+
- New top-level doc → add a row above.
|
|
30
|
+
- Evidence is read-only. Knowledge wins on conflict with evidence.
|
|
31
|
+
- Folders mark information *role*; status/owner/type are frontmatter, not folders.
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Per-user secrets. Copy this file to .env and fill in your own values.
|
|
2
|
+
# .env is gitignored — never commit it.
|
|
3
|
+
|
|
4
|
+
# Cursor API key — required for the extract-learnings hook (.cursor/hooks/extract-learnings.mjs).
|
|
5
|
+
# Get one from Cursor Dashboard → Integrations.
|
|
6
|
+
CURSOR_API_KEY=
|
|
7
|
+
|
|
8
|
+
# Owner name written into chat transcript meta files. Falls back to git user.name if unset.
|
|
9
|
+
CURSOR_CHAT_OWNER=
|
|
10
|
+
|
|
11
|
+
# Asana Personal Access Token — used when the agent ingests tickets via Asana's API.
|
|
12
|
+
# Generate one at: https://app.asana.com/0/my-apps → Personal Access Tokens.
|
|
13
|
+
# The non-secret Asana *project ID* lives in .refact-os.json, not here.
|
|
14
|
+
ASANA_TOKEN=
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Node
|
|
2
|
+
node_modules/
|
|
3
|
+
npm-debug.log*
|
|
4
|
+
yarn-debug.log*
|
|
5
|
+
yarn-error.log*
|
|
6
|
+
pnpm-debug.log*
|
|
7
|
+
|
|
8
|
+
# Build output / caches
|
|
9
|
+
**/build/
|
|
10
|
+
**/dist/
|
|
11
|
+
**/.cache/
|
|
12
|
+
**/.next/
|
|
13
|
+
|
|
14
|
+
# Editor / OS
|
|
15
|
+
.DS_Store
|
|
16
|
+
.idea/
|
|
17
|
+
.vscode/
|
|
18
|
+
*.swp
|
|
19
|
+
*.swo
|
|
20
|
+
|
|
21
|
+
# Agent tool personal overrides — the shared .claude/settings.json is committed
|
|
22
|
+
# (team-wide, generated by refact-os); per-user tweaks go here and stay local.
|
|
23
|
+
.claude/settings.local.json
|
|
24
|
+
|
|
25
|
+
# Secrets — keep .env.example
|
|
26
|
+
.env
|
|
27
|
+
.env.*
|
|
28
|
+
!.env.example
|
|
29
|
+
*.pem
|
|
30
|
+
*.key
|
|
31
|
+
|
|
32
|
+
# Database dumps
|
|
33
|
+
*.sql
|
|
34
|
+
*.sql.gz
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-deliverable
|
|
3
|
+
description: Promote a reviewed internal draft to docs/deliverables/ (information role Task -> Output), flipping status to sent and logging the event.
|
|
4
|
+
pattern: procedure
|
|
5
|
+
requires_approval: true
|
|
6
|
+
when_to_use: A draft in docs/internal/ has been reviewed and approved and is ready to leave the building.
|
|
7
|
+
when_not_to_use: For drafts still in progress (keep them in docs/internal/ with status frontmatter), or for raw evidence.
|
|
8
|
+
inputs:
|
|
9
|
+
- an approved draft in docs/internal/<type>/<slug>.md
|
|
10
|
+
outputs:
|
|
11
|
+
- docs/deliverables/<type>/<slug>.md with status sent
|
|
12
|
+
next_skills: []
|
|
13
|
+
sub_agents: []
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# Create Deliverable
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
1. Confirm the draft is approved (ask once if unclear).
|
|
21
|
+
2. Move it from `docs/internal/<type>/<slug>.md` to `docs/deliverables/<type>/<slug>.md` (create the destination folder on the fly). This is a *role change*, Task → Output, so it earns a file move.
|
|
22
|
+
3. Set frontmatter `status: sent` (or `signed` for contracts).
|
|
23
|
+
4. Log the event in `docs/decisions.md` or the linked ticket.
|
|
24
|
+
5. Report the deliverable path.
|
|
25
|
+
|
|
26
|
+
## Hard rules
|
|
27
|
+
|
|
28
|
+
- Only reviewed, ready-to-share artifacts land in `docs/deliverables/`. Drafts stay in `docs/internal/`.
|
|
29
|
+
- Sensitive outputs (signed contracts, NDAs) may need `.gitignore` rules — flag, don't auto-commit.
|
|
File without changes
|