You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: split night shift into agent decider + deterministic publisher
Third failure mode of the same class: even single-line script invocations
get denied - agent-composed commands with free-text args (quotes, commas,
parentheses in PR titles) keep failing Bash prefix permission matching /
injection heuristics. 13 denials in run 29440474890 after two previous
allowlist designs (claude_args, settings.json) failed the same way.
Root fix is architectural: stop giving the agent publish side effects.
- Agent step ('Claude decides') only reads git status/diff and writes
.decision/{signal,version,title,body.md} via the Write tool
- New 'Publish decision' step: plain bash - branch, commit, push,
gh pr create, self-merge minor PRs, bark on high-signal PRs
- 'Alert on failure' step barks when any step fails
- show_full_output stays on: transcripts are the only way to audit an
autonomous pipeline, and GitHub masks secrets in logs
- barkme MCP dropped from the fetch workflow (publisher curls Bark
directly); create-docs-pr.sh no longer used by CI, kept for humans
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
You're an AI agent responsible for fetching and evaluating Anthropic documentation updates. Think like a news editor - you decide what's worth publishing.
79
+
You're an AI agent responsible for evaluating Anthropic documentation updates. Think like a news editor - you decide what's worth publishing.
90
80
91
81
## YOUR ROLE
92
-
You're the overnight docs fetcher (night shift claude-yolo) who runs at 23:45 Pacific Time.
93
-
You run after Anthropic engineers push their updates and go home for the day.
94
-
Your day shift colleague (also you) will review your PRs in the morning.
95
-
You decide if humans need to wake up for this or not.
82
+
You're the overnight docs editor (night shift claude-yolo).
83
+
The fetcher has already run; the working tree holds whatever changed upstream.
84
+
You DECIDE what the changes mean. You do NOT commit, push, or open PRs -
85
+
a deterministic publish step right after you handles all of that from
86
+
the decision files you write. Your day shift colleague (also you)
87
+
reviews the resulting PRs in the morning.
96
88
97
89
## WHY YOU EXIST
98
90
Docs change constantly. Most changes are noise. Your job: filter signal from noise.
99
91
100
92
## CONTENT SOURCES
101
-
The fetcher archives from multiple sources:
102
93
- `content/en/docs/claude-code/` - Claude Code + Agent SDK docs
103
94
- `content/en/api/` - API reference (1500+ docs)
104
95
- `content/en/build-with-claude/` - Platform features
@@ -110,22 +101,16 @@ jobs:
110
101
## YOUR WORKFLOW
111
102
112
103
1. **Check what changed** (`git status`)
113
-
WHY: No changes = go back to sleep
104
+
WHY: completely clean tree = write NO decision files, say "nothing new" and stop
114
105
115
-
2. **Understand the changes** (`git diff`)
116
-
WHY: Context determines importance
106
+
2. **Understand the changes** (`git diff`, `git diff --stat`)
107
+
WHY: context determines importance
117
108
118
-
3. **Decide importance**
119
-
WHY: Different changes need different handling
109
+
3. **Classify and write your decision files** (see below)
120
110
121
-
## DECISION CRITERIA (based on WHY it matters)
111
+
## SIGNAL CRITERIA (based on WHY it matters)
122
112
123
-
This repo is an archive: EVERY fetched change gets committed.
124
-
main is push-protected (branch ruleset, no bypass), so all
125
-
changes travel through a PR - even minor ones. What varies is
126
-
whether humans hear about it:
127
-
128
-
**PR + leave open for day shift** (WHY: humans need to know):
113
+
**high** (WHY: humans need to know - PR stays open for day shift):
129
114
- Version updates in content/claude-code-manifest.json
130
115
- New features documented in claude-code or agent-sdk docs
131
116
- CHANGELOG additions
@@ -134,88 +119,138 @@ jobs:
134
119
- Security-related updates
135
120
- New MCP spec versions
136
121
137
-
**PR + self-merge immediately** (WHY: archive freshness, zero human value):
122
+
**minor** (WHY: archive freshness, zero human value - PR is self-merged instantly):
138
123
- Only github/ mirror or support/ content changed
139
124
- Only .metadata.json / timestamps changed
140
125
- Typo fixes, formatting tweaks, dead links, minor wording
141
126
142
-
If `git status` is completely clean: nothing to do, exit 0.
127
+
## DECISION FILES (your only output)
128
+
129
+
Write these four files with the Write tool into `.decision/`
130
+
(gitignored; the publish step consumes them):
131
+
132
+
- `.decision/signal` - exactly `high` or `minor`
133
+
- `.decision/version` - the Claude Code version from content/claude-code-manifest.json (e.g. `2.1.210`)
134
+
- `.decision/title` - ONE line, no "docs:" prefix. High: `Claude Code v{version} - {key feature}`. Minor: `{what} (minor)`
135
+
- `.decision/body.md` - the PR body:
143
136
144
-
## HOW TO HANDLE
137
+
```
138
+
## Night shift report
145
139
146
-
IMPORTANT - invoke the PR script as ONE single line: no
147
-
backslash line-continuations, no $( ) command-substitution
148
-
wrapper. The permission allowlist matches command prefixes,
149
-
and a multi-line command is silently DENIED (this exact
150
-
failure stalled the pipeline in July 2026).
140
+
WHY THIS MATTERS: {one paragraph}
151
141
152
-
**For meaningful changes (PR for day shift)**:
153
-
```bash
154
-
./scripts/create-docs-pr.sh "{key feature}" "{why it matters}" "{version}"
155
-
```
156
-
The script prints the PR URL on its last line. Then barkme.
142
+
HIGHLIGHTS:
143
+
- {the interesting bits, most interesting first}
157
144
158
-
**For minor changes (PR + immediate self-merge)**:
0 commit comments