@caddis/cli 0.4.115 → 0.4.117
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/bundles/antigravity-plugin/plugin.json +1 -1
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_exit.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_file_lock.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_frontmatter.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_redact.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_roadmap.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_rows.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_status.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_tidy.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_todo.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_workstreams.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc +0 -0
- package/bundles/antigravity-plugin/scripts/caddis_guide.json +4 -3
- package/bundles/antigravity-plugin/scripts/caddis_stories.py +18 -3
- package/bundles/antigravity-plugin/skills/feature-plan/SKILL.md +12 -0
- package/bundles/antigravity-plugin/skills/graph-email/SKILL.md +5 -4
- package/bundles/antigravity-plugin/skills/send-email/SKILL.md +16 -5
- package/bundles/antigravity-plugin/skills/send-email/email.toml.example +4 -0
- package/bundles/antigravity-plugin/skills/send-email/scripts/send_email.py +10 -3
- package/bundles/codex/.codex/skills/devops/send-email/SKILL.md +16 -5
- package/bundles/codex/.codex/skills/devops/send-email/email.toml.example +4 -0
- package/bundles/codex/.codex/skills/devops/send-email/scripts/send_email.py +10 -3
- package/bundles/manifest.json +2 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bundles/antigravity-plugin/scripts/__pycache__/caddis_worktree_safety.cpython-311.pyc
CHANGED
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schema": 1,
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"generated": "2026-11-
|
|
3
|
+
"version": "1.3.200",
|
|
4
|
+
"generated": "2026-11-15 01:51 UTC",
|
|
5
5
|
"commands": [
|
|
6
6
|
{
|
|
7
7
|
"name": "add-rules",
|
|
@@ -341,7 +341,8 @@
|
|
|
341
341
|
"caddis_lanes.py",
|
|
342
342
|
"caddis_routing.py",
|
|
343
343
|
"caddis_spend.py",
|
|
344
|
-
"caddis_status.py"
|
|
344
|
+
"caddis_status.py",
|
|
345
|
+
"caddis_stories.py"
|
|
345
346
|
],
|
|
346
347
|
"noArgs": false,
|
|
347
348
|
"stage": "plan",
|
|
@@ -93,6 +93,7 @@ class PlanInfo:
|
|
|
93
93
|
epic: str | None
|
|
94
94
|
parent: str | None
|
|
95
95
|
stories: list[Story]
|
|
96
|
+
status: str | None = None
|
|
96
97
|
|
|
97
98
|
|
|
98
99
|
# ---------------------------------------------------------------- plan reading
|
|
@@ -138,12 +139,25 @@ def phase_headings(text: str) -> list[tuple[str, str, str | None]]:
|
|
|
138
139
|
|
|
139
140
|
|
|
140
141
|
def plain(text: str) -> str:
|
|
141
|
-
"""Short plain text: no links, bold or backticks, no `(...)` group, no dash with spaces, one space between words.
|
|
142
|
+
"""Short plain text: no links, bold or backticks, no `(...)` group, no dash with spaces, one space between words.
|
|
143
|
+
A code span keeps its brackets and dashes; only its backticks go. A `(...)` group that holds a code span still goes."""
|
|
144
|
+
code: list[str] = []
|
|
145
|
+
|
|
146
|
+
def hold(m: re.Match) -> str:
|
|
147
|
+
span = m.group(2)
|
|
148
|
+
if len(span) >= 2 and span[0] == span[-1] == " " and span.strip(" "):
|
|
149
|
+
span = span[1:-1] # CommonMark: one padding space each side
|
|
150
|
+
code.append(span)
|
|
151
|
+
return f"\x00{len(code) - 1}\x00"
|
|
152
|
+
|
|
153
|
+
text = text.replace("\x00", "")
|
|
154
|
+
text = re.sub(r"(?<!`)(`+)(?!`)(.*?)(?<!`)\1(?!`)", hold, text, flags=re.DOTALL)
|
|
142
155
|
text = re.sub(r"\[([^\]]*)\]\([^)]*\)", r"\1", text)
|
|
143
156
|
text = text.replace("**", "").replace("`", "")
|
|
144
157
|
text = re.sub(r"\([^()]*\)", "", text)
|
|
145
158
|
text = re.sub(r"\s*[—–]\s*", " ", text)
|
|
146
159
|
text = re.sub(r"\s+([,;:])(?=\s|$)", r"\1", text)
|
|
160
|
+
text = re.sub(r"\x00(\d+)\x00", lambda m: code[int(m.group(1))], text)
|
|
147
161
|
return re.sub(r"\s+", " ", text).strip()
|
|
148
162
|
|
|
149
163
|
|
|
@@ -285,7 +299,7 @@ def read_plan(path: Path) -> PlanInfo:
|
|
|
285
299
|
))
|
|
286
300
|
previous = pid
|
|
287
301
|
return PlanInfo(path=path, slug=slug, title=title, epic=_meta_text(meta, "jira_epic"),
|
|
288
|
-
parent=_meta_text(meta, "confluence_parent"), stories=out)
|
|
302
|
+
parent=_meta_text(meta, "confluence_parent"), stories=out, status=_meta_text(meta, "status"))
|
|
289
303
|
|
|
290
304
|
|
|
291
305
|
# ---------------------------------------------------------------- rendering
|
|
@@ -320,7 +334,8 @@ def _esc(text: str) -> str:
|
|
|
320
334
|
|
|
321
335
|
def storage_section(info: PlanInfo) -> str:
|
|
322
336
|
"""The plan's section in Confluence storage format: start marker (with the hash), heading, intro, table, end marker."""
|
|
323
|
-
|
|
337
|
+
status = f" (plan status: {info.status})" if info.status else ""
|
|
338
|
+
parts = [f"<h2>Development stories: {_esc(info.title + status)}</h2>",
|
|
324
339
|
f"<p>caddis writes this section from the plan file {_esc(info.path.name)}. Do not edit it. "
|
|
325
340
|
f"The next sync replaces it.</p>",
|
|
326
341
|
"<table><tbody><tr>" + "".join(f"<th>{_esc(c)}</th>" for c in COLUMNS) + "</tr>"]
|
|
@@ -508,6 +508,18 @@ Small work that does not meet a trigger skips its block.
|
|
|
508
508
|
|
|
509
509
|
**Trigger: The plan records a decision.** Record it with `/caddis:decide`.
|
|
510
510
|
|
|
511
|
+
## Step 3b — Offer to publish the stories (interactive only)
|
|
512
|
+
Skip this step in headless mode, and skip it when the plan frontmatter lacks either `jira_epic` or `confluence_parent`.
|
|
513
|
+
Run `python "${CLAUDE_PLUGIN_ROOT}/scripts/caddis_stories.py" sync --plan "<plan path>" --dry-run`.
|
|
514
|
+
- Exit 0: show the `ACTION:` and `PAGE:` lines, then ask one AskUserQuestion: "Publish the stories to the Epic page now?
|
|
515
|
+
The page shows the plan status, for example draft. `/caddis:implement` re-syncs them after each phase." On yes, run
|
|
516
|
+
the same command without `--dry-run`. On no, print `Stories: not published - run /caddis:stories <plan path> later`.
|
|
517
|
+
- Any non-zero exit, of the dry run or of the write (3 = no Confluence keys or the network failed; 1 or 4 = see
|
|
518
|
+
`/caddis:stories`): print `Stories: not published - exit <n> - <first output line>` and go on to Step 4. Never print
|
|
519
|
+
the token. The plan is still done.
|
|
520
|
+
|
|
521
|
+
The plan is a draft and may change after preflight. Publish only on the user's yes.
|
|
522
|
+
|
|
511
523
|
## Step 4 — Report
|
|
512
524
|
Output the plan path (`.caddis/plans/<feature-slug>.md`), the phase list (one line each, with each
|
|
513
525
|
phase's model tier + lane + execution), confirm the local-coder gate passed (or list the phases that need
|
|
@@ -10,7 +10,8 @@ Arguments: $ARGUMENTS
|
|
|
10
10
|
1. Read the skill `send-email` first and follow it.
|
|
11
11
|
2. If `~/.caddis/email.toml` is missing, or `--check` fails, tell the owner to type `! caddis email setup` in the prompt, then stop. The `!` runs it in their own terminal, so the secret never enters the chat. Name what is missing (setting names only, never values). Do not guess values and do not ask for a secret in the chat.
|
|
12
12
|
3. The first argument is the Markdown file. If there is none, ask which file, or offer to write one in the project's `comms/` folder.
|
|
13
|
-
4.
|
|
14
|
-
5.
|
|
15
|
-
6.
|
|
16
|
-
7.
|
|
13
|
+
4. Body: write it for its final reader, ready to forward with no edits (`Hi,` or `Hi DBA team,`, never `Hi <owner>, below is...`). Keep it short: the answer, one small table or a few bullets, the ask. Long detail goes in an attachment.
|
|
14
|
+
5. Subject: for a note to the owner alone, `caddis-<app-name> <subject>` (app name from the project folder). For a note to forward to another team, a plain subject with no prefix. If the owner gave subject words, use them.
|
|
15
|
+
6. Sign-off: `Thanks,` on one line, then the `signature` value from `~/.caddis/email.toml` (when unset, the first word of `git config user.name`) on the next line. Never sign as Claude, an agent, a session name or the mailbox.
|
|
16
|
+
7. Recipient: the owner's own address unless `--to` is given. If `--to` is any other address, confirm with the owner before sending.
|
|
17
|
+
8. Run a dry run, check the preview, then send. Report the provider, status, recipient and subject. Keep a copy of the file in `comms/`.
|
|
@@ -37,13 +37,23 @@ For a local test relay only, set `allow_insecure_auth = true` (a boolean) in the
|
|
|
37
37
|
## Steps
|
|
38
38
|
|
|
39
39
|
1. Write the email as a Markdown file in the project's `comms/` folder (a copy stays in the repo).
|
|
40
|
+
- **Write it for its final reader, ready to forward with no edits.** The owner receives it, but a note meant
|
|
41
|
+
for a team is written to that team: `Hi,` or `Hi DBA team,`, never `Hi <owner>, below is the note...`.
|
|
42
|
+
Write to the owner only when the note is for the owner alone.
|
|
43
|
+
- **Keep it short:** the answer first, then one small table or a few bullets, then the ask. Put long detail
|
|
44
|
+
in an attachment (`--attach`), not in the body.
|
|
40
45
|
- Put `<!-- email-start -->` before the greeting and `<!-- email-end -->` after the sign-off. Only that part is sent.
|
|
41
46
|
- Write plain, short sentences. No em dashes, no arrows, no emoji, no check marks.
|
|
42
|
-
- Sign off with the owner's
|
|
43
|
-
|
|
47
|
+
- Sign off with `Thanks,` on one line and the owner's name on the next line. The name is the `signature` value
|
|
48
|
+
in `~/.caddis/email.toml`; when it is not set, the first word of `git config user.name`. Never sign as
|
|
49
|
+
Claude, an agent, a bot, a session name or the sender mailbox.
|
|
44
50
|
- Write a list as `1.` or `-` lines, one item per line. Wrapped lines join into one paragraph. To force a new
|
|
45
51
|
line inside a paragraph, end the line with `\`. The sign-off line keeps its break by itself.
|
|
46
|
-
|
|
52
|
+
- A table needs a header row and a separator row (`|---|---|` or `--- | ---`). Outer pipes are optional.
|
|
53
|
+
Raw HTML is escaped, so write tables in Markdown.
|
|
54
|
+
2. Subject line:
|
|
55
|
+
- A note for the owner alone: `caddis-<app-name> <short subject>`, for example `caddis-myapp Weekly report check`.
|
|
56
|
+
- A note to forward to another team: a plain subject with no prefix, for example `Data request for the weekly report`.
|
|
47
57
|
3. Dry run. It sends nothing, needs no credentials and writes `<file>.preview.html`:
|
|
48
58
|
`python -I scripts/send_email.py --dry-run --to x@example.com --subject t --body-file <file.md>`
|
|
49
59
|
Read the preview, then delete it.
|
|
@@ -55,8 +65,9 @@ For a local test relay only, set `allow_insecure_auth = true` (a boolean) in the
|
|
|
55
65
|
|
|
56
66
|
## Rules
|
|
57
67
|
|
|
58
|
-
- **Default recipient is the owner's own address.** The owner forwards it
|
|
59
|
-
in this request. Sending to any other address is an
|
|
68
|
+
- **Default recipient is the owner's own address.** The owner forwards it, so the body is written for the final
|
|
69
|
+
reader (Step 1). Send to a team only when the owner says so in this request. Sending to any other address is an
|
|
70
|
+
outward action: confirm first.
|
|
60
71
|
- Never put personal data, secrets, payment data or customer text in the body.
|
|
61
72
|
- Errors show the provider, the HTTP or SMTP status code and the error name. Do not retry in a loop.
|
|
62
73
|
- Exit codes: 0 done, 1 provider error, 2 missing or invalid setting.
|
|
@@ -17,6 +17,10 @@ sender = ""
|
|
|
17
17
|
# Env var: CADDIS_EMAIL_ENV_FILE. Flag: --env-file.
|
|
18
18
|
env_file = ""
|
|
19
19
|
|
|
20
|
+
# The name under "Thanks," at the end of every email, for example "Junaid".
|
|
21
|
+
# Leave empty to use the first word of `git config user.name`. The script does not read it; the skill does.
|
|
22
|
+
signature = ""
|
|
23
|
+
|
|
20
24
|
[graph]
|
|
21
25
|
# The NAMES of the keys in the env file (or environment) that hold the values.
|
|
22
26
|
# These are the defaults. Change them only if your env file uses other names.
|
|
@@ -80,7 +80,14 @@ def md_to_html(md: str) -> str:
|
|
|
80
80
|
para.clear()
|
|
81
81
|
|
|
82
82
|
def cells(row):
|
|
83
|
-
return [c.strip() for c in row.strip("|").split("|")]
|
|
83
|
+
return [c.strip() for c in row.strip().strip("|").split("|")]
|
|
84
|
+
|
|
85
|
+
def is_table_start(n):
|
|
86
|
+
# A header row with a "|", then a separator row such as "|---|:---:|" or "--- | ---" (outer pipes optional).
|
|
87
|
+
if "|" not in lines[n] or n + 1 >= len(lines):
|
|
88
|
+
return False
|
|
89
|
+
sep = lines[n + 1].strip()
|
|
90
|
+
return "|" in sep and re.match(r"^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?$", sep) is not None
|
|
84
91
|
|
|
85
92
|
while i < len(lines):
|
|
86
93
|
s = lines[i].strip()
|
|
@@ -93,11 +100,11 @@ def md_to_html(md: str) -> str:
|
|
|
93
100
|
flush()
|
|
94
101
|
n = min(len(s) - len(s.lstrip("#")), 4)
|
|
95
102
|
out.append(f"<h{n}>{inline(s.lstrip('#').strip())}</h{n}>")
|
|
96
|
-
elif
|
|
103
|
+
elif is_table_start(i):
|
|
97
104
|
flush()
|
|
98
105
|
rows = [s]
|
|
99
106
|
i += 2
|
|
100
|
-
while i < len(lines) and lines[i].strip()
|
|
107
|
+
while i < len(lines) and "|" in lines[i] and lines[i].strip():
|
|
101
108
|
rows.append(lines[i].strip())
|
|
102
109
|
i += 1
|
|
103
110
|
i -= 1
|
|
@@ -37,13 +37,23 @@ For a local test relay only, set `allow_insecure_auth = true` (a boolean) in the
|
|
|
37
37
|
## Steps
|
|
38
38
|
|
|
39
39
|
1. Write the email as a Markdown file in the project's `comms/` folder (a copy stays in the repo).
|
|
40
|
+
- **Write it for its final reader, ready to forward with no edits.** The owner receives it, but a note meant
|
|
41
|
+
for a team is written to that team: `Hi,` or `Hi DBA team,`, never `Hi <owner>, below is the note...`.
|
|
42
|
+
Write to the owner only when the note is for the owner alone.
|
|
43
|
+
- **Keep it short:** the answer first, then one small table or a few bullets, then the ask. Put long detail
|
|
44
|
+
in an attachment (`--attach`), not in the body.
|
|
40
45
|
- Put `<!-- email-start -->` before the greeting and `<!-- email-end -->` after the sign-off. Only that part is sent.
|
|
41
46
|
- Write plain, short sentences. No em dashes, no arrows, no emoji, no check marks.
|
|
42
|
-
- Sign off with the owner's
|
|
43
|
-
|
|
47
|
+
- Sign off with `Thanks,` on one line and the owner's name on the next line. The name is the `signature` value
|
|
48
|
+
in `~/.caddis/email.toml`; when it is not set, the first word of `git config user.name`. Never sign as
|
|
49
|
+
Claude, an agent, a bot, a session name or the sender mailbox.
|
|
44
50
|
- Write a list as `1.` or `-` lines, one item per line. Wrapped lines join into one paragraph. To force a new
|
|
45
51
|
line inside a paragraph, end the line with `\`. The sign-off line keeps its break by itself.
|
|
46
|
-
|
|
52
|
+
- A table needs a header row and a separator row (`|---|---|` or `--- | ---`). Outer pipes are optional.
|
|
53
|
+
Raw HTML is escaped, so write tables in Markdown.
|
|
54
|
+
2. Subject line:
|
|
55
|
+
- A note for the owner alone: `caddis-<app-name> <short subject>`, for example `caddis-myapp Weekly report check`.
|
|
56
|
+
- A note to forward to another team: a plain subject with no prefix, for example `Data request for the weekly report`.
|
|
47
57
|
3. Dry run. It sends nothing, needs no credentials and writes `<file>.preview.html`:
|
|
48
58
|
`python -I scripts/send_email.py --dry-run --to x@example.com --subject t --body-file <file.md>`
|
|
49
59
|
Read the preview, then delete it.
|
|
@@ -55,8 +65,9 @@ For a local test relay only, set `allow_insecure_auth = true` (a boolean) in the
|
|
|
55
65
|
|
|
56
66
|
## Rules
|
|
57
67
|
|
|
58
|
-
- **Default recipient is the owner's own address.** The owner forwards it
|
|
59
|
-
in this request. Sending to any other address is an
|
|
68
|
+
- **Default recipient is the owner's own address.** The owner forwards it, so the body is written for the final
|
|
69
|
+
reader (Step 1). Send to a team only when the owner says so in this request. Sending to any other address is an
|
|
70
|
+
outward action: confirm first.
|
|
60
71
|
- Never put personal data, secrets, payment data or customer text in the body.
|
|
61
72
|
- Errors show the provider, the HTTP or SMTP status code and the error name. Do not retry in a loop.
|
|
62
73
|
- Exit codes: 0 done, 1 provider error, 2 missing or invalid setting.
|
|
@@ -17,6 +17,10 @@ sender = ""
|
|
|
17
17
|
# Env var: CADDIS_EMAIL_ENV_FILE. Flag: --env-file.
|
|
18
18
|
env_file = ""
|
|
19
19
|
|
|
20
|
+
# The name under "Thanks," at the end of every email, for example "Junaid".
|
|
21
|
+
# Leave empty to use the first word of `git config user.name`. The script does not read it; the skill does.
|
|
22
|
+
signature = ""
|
|
23
|
+
|
|
20
24
|
[graph]
|
|
21
25
|
# The NAMES of the keys in the env file (or environment) that hold the values.
|
|
22
26
|
# These are the defaults. Change them only if your env file uses other names.
|
|
@@ -80,7 +80,14 @@ def md_to_html(md: str) -> str:
|
|
|
80
80
|
para.clear()
|
|
81
81
|
|
|
82
82
|
def cells(row):
|
|
83
|
-
return [c.strip() for c in row.strip("|").split("|")]
|
|
83
|
+
return [c.strip() for c in row.strip().strip("|").split("|")]
|
|
84
|
+
|
|
85
|
+
def is_table_start(n):
|
|
86
|
+
# A header row with a "|", then a separator row such as "|---|:---:|" or "--- | ---" (outer pipes optional).
|
|
87
|
+
if "|" not in lines[n] or n + 1 >= len(lines):
|
|
88
|
+
return False
|
|
89
|
+
sep = lines[n + 1].strip()
|
|
90
|
+
return "|" in sep and re.match(r"^\|?\s*:?-+:?\s*(\|\s*:?-+:?\s*)*\|?$", sep) is not None
|
|
84
91
|
|
|
85
92
|
while i < len(lines):
|
|
86
93
|
s = lines[i].strip()
|
|
@@ -93,11 +100,11 @@ def md_to_html(md: str) -> str:
|
|
|
93
100
|
flush()
|
|
94
101
|
n = min(len(s) - len(s.lstrip("#")), 4)
|
|
95
102
|
out.append(f"<h{n}>{inline(s.lstrip('#').strip())}</h{n}>")
|
|
96
|
-
elif
|
|
103
|
+
elif is_table_start(i):
|
|
97
104
|
flush()
|
|
98
105
|
rows = [s]
|
|
99
106
|
i += 2
|
|
100
|
-
while i < len(lines) and lines[i].strip()
|
|
107
|
+
while i < len(lines) and "|" in lines[i] and lines[i].strip():
|
|
101
108
|
rows.append(lines[i].strip())
|
|
102
109
|
i += 1
|
|
103
110
|
i -= 1
|
package/bundles/manifest.json
CHANGED
package/package.json
CHANGED