|
| 1 | +# Claude Code Attribution Guidelines |
| 2 | + |
| 3 | +**Last Updated**: 2025-11-07 |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +This blueprint uses Claude Code for automation. Attribution is **automatically included** in all user-facing operations to credit the tool and provide transparency. |
| 10 | + |
| 11 | +--- |
| 12 | + |
| 13 | +## Attribution Format |
| 14 | + |
| 15 | +All automated operations include this footer: |
| 16 | + |
| 17 | +``` |
| 18 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 19 | +
|
| 20 | +Co-Authored-By: Claude <noreply@anthropic.com> |
| 21 | +``` |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Where Attribution MUST Appear ✅ |
| 26 | + |
| 27 | +### 1. Git Commits |
| 28 | + |
| 29 | +**Commit Template** (`.github/commit-template.txt`): |
| 30 | +- Attribution included in template automatically |
| 31 | +- All commits using the template will have attribution |
| 32 | + |
| 33 | +**Slash Commands** (`/commit-smart`, `/kill-switch`, `/release`): |
| 34 | +- When creating commits, append attribution to message: |
| 35 | + |
| 36 | +```bash |
| 37 | +git commit -m "$(cat <<'EOF' |
| 38 | +feat(feature): add new capability |
| 39 | +
|
| 40 | +Description of changes here. |
| 41 | +
|
| 42 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 43 | +
|
| 44 | +Co-Authored-By: Claude <noreply@anthropic.com> |
| 45 | +EOF |
| 46 | +)" |
| 47 | +``` |
| 48 | + |
| 49 | +### 2. Pull Requests |
| 50 | + |
| 51 | +**Slash Commands** (`/create-pr`, `/release`): |
| 52 | +- When creating PRs, append attribution to body: |
| 53 | + |
| 54 | +```bash |
| 55 | +gh pr create \ |
| 56 | + --title "feat: add feature" \ |
| 57 | + --body "$(cat <<'EOF' |
| 58 | +## Summary |
| 59 | +Description of changes |
| 60 | +
|
| 61 | +## Changes |
| 62 | +- Change 1 |
| 63 | +- Change 2 |
| 64 | +
|
| 65 | +--- |
| 66 | +
|
| 67 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 68 | +
|
| 69 | +Co-Authored-By: Claude <noreply@anthropic.com> |
| 70 | +EOF |
| 71 | +)" |
| 72 | +``` |
| 73 | + |
| 74 | +### 3. GitHub Issues |
| 75 | + |
| 76 | +**Workflows** (claude-plan-to-issues.yml): |
| 77 | +- When creating issues from plans, append attribution to body |
| 78 | + |
| 79 | +**Agents** (plan-converter.md): |
| 80 | +- When creating issues, append attribution to body: |
| 81 | + |
| 82 | +```bash |
| 83 | +gh issue create \ |
| 84 | + --title "Task title" \ |
| 85 | + --body "$(cat <<'EOF' |
| 86 | +Task description and acceptance criteria |
| 87 | +
|
| 88 | +--- |
| 89 | +
|
| 90 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 91 | +EOF |
| 92 | +)" |
| 93 | +``` |
| 94 | + |
| 95 | +### 4. PR/Issue Comments |
| 96 | + |
| 97 | +**Slash Commands** (`/review-pr`): |
| 98 | +- When posting review comments, include attribution at end |
| 99 | + |
| 100 | +**Agents** (workflow-manager.md): |
| 101 | +- When posting status updates, include attribution |
| 102 | + |
| 103 | +**Workflows** (pr-into-dev.yml, dev-to-main.yml): |
| 104 | +- When posting validation comments, include attribution |
| 105 | + |
| 106 | +```bash |
| 107 | +gh pr comment $PR_NUMBER --body "$(cat <<'EOF' |
| 108 | +Comment content here |
| 109 | +
|
| 110 | +--- |
| 111 | +
|
| 112 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 113 | +EOF |
| 114 | +)" |
| 115 | +``` |
| 116 | + |
| 117 | +### 5. Releases |
| 118 | + |
| 119 | +**Slash Commands** (`/release`): |
| 120 | +- When creating GitHub releases, include attribution in notes |
| 121 | + |
| 122 | +```bash |
| 123 | +gh release create v$VERSION \ |
| 124 | + --title "Release v$VERSION" \ |
| 125 | + --notes "$(cat <<'EOF' |
| 126 | +Release notes here |
| 127 | +
|
| 128 | +--- |
| 129 | +
|
| 130 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 131 | +EOF |
| 132 | +)" |
| 133 | +``` |
| 134 | + |
| 135 | +--- |
| 136 | + |
| 137 | +## Where Attribution Should NOT Appear ❌ |
| 138 | + |
| 139 | +### Claude's Manual Operations (During Development/Debugging) |
| 140 | + |
| 141 | +When **Claude (the AI assistant)** creates commits/PRs/comments manually during a conversation (not via commands/workflows), attribution should **NOT** be included: |
| 142 | + |
| 143 | +```bash |
| 144 | +# ❌ NO - Claude's manual commit during debugging |
| 145 | +git commit -m "fix: debug issue" |
| 146 | + |
| 147 | +# ❌ NO - Claude's manual PR during development |
| 148 | +gh pr create --title "WIP: test fix" --body "Testing changes" |
| 149 | + |
| 150 | +# ❌ NO - Claude's exploratory comments |
| 151 | +gh pr comment 123 --body "Investigating issue..." |
| 152 | +``` |
| 153 | + |
| 154 | +**Why?** These are development/debugging operations by Claude, not user-facing automated features. |
| 155 | + |
| 156 | +### Validation/Error Messages |
| 157 | + |
| 158 | +- Workflow validation failures |
| 159 | +- Quality gate error messages |
| 160 | +- Bootstrap warnings |
| 161 | +- General error output |
| 162 | + |
| 163 | +**Why?** These are system messages, not generated content. |
| 164 | + |
| 165 | +--- |
| 166 | + |
| 167 | +## Implementation Checklist |
| 168 | + |
| 169 | +### Commands (`.claude/commands/github/`) |
| 170 | + |
| 171 | +- [ ] `/commit-smart` - Add attribution to commit message instructions |
| 172 | +- [ ] `/create-pr` - Add attribution to PR body instructions |
| 173 | +- [ ] `/release` - Add attribution to release PR and notes |
| 174 | +- [ ] `/kill-switch` - Add attribution to emergency commits |
| 175 | +- [ ] `/review-pr` - Add attribution to review comments |
| 176 | +- [ ] `/sync-status` - Add attribution to status comments |
| 177 | + |
| 178 | +### Agents (`.claude/agents/`) |
| 179 | + |
| 180 | +- [ ] `plan-converter.md` - Add attribution to issue creation |
| 181 | +- [ ] `workflow-manager.md` - Add attribution to comments |
| 182 | +- [ ] `blueprint-setup.md` - Add attribution to setup commits |
| 183 | + |
| 184 | +### Workflows (`.github/workflows/`) |
| 185 | + |
| 186 | +- [ ] `claude-plan-to-issues.yml` - Add attribution to issues |
| 187 | +- [ ] `pr-into-dev.yml` - Add attribution to validation comments |
| 188 | +- [ ] `dev-to-main.yml` - Add attribution to gate comments |
| 189 | +- [ ] `create-branch-on-issue.yml` - Add attribution to branch comments |
| 190 | +- [ ] `pr-status-sync.yml` - Add attribution to status updates |
| 191 | +- [ ] `release-status-sync.yml` - Add attribution to release comments |
| 192 | + |
| 193 | +### Templates |
| 194 | + |
| 195 | +- [x] `.github/commit-template.txt` - Attribution included ✅ |
| 196 | + |
| 197 | +--- |
| 198 | + |
| 199 | +## Customization |
| 200 | + |
| 201 | +To modify or remove attribution: |
| 202 | + |
| 203 | +1. **Commit Template**: Edit `.github/commit-template.txt` |
| 204 | +2. **Commands**: Edit instructions in `.claude/commands/github/*.md` |
| 205 | +3. **Agents**: Edit templates in `.claude/agents/*.md` |
| 206 | +4. **Workflows**: Edit comment/issue/PR creation in `.github/workflows/*.yml` |
| 207 | + |
| 208 | +--- |
| 209 | + |
| 210 | +## Benefits |
| 211 | + |
| 212 | +- **Credits the Tool**: Acknowledges Claude Code's role in automation |
| 213 | +- **Transparency**: Team members know which operations are AI-assisted |
| 214 | +- **Discoverability**: Links to Claude Code for others to learn |
| 215 | +- **Accountability**: Clear distinction between automated and manual operations |
| 216 | +- **Consistency**: Standardized attribution across all automated operations |
| 217 | + |
| 218 | +--- |
| 219 | + |
| 220 | +## Examples |
| 221 | + |
| 222 | +### Good: Automated Command |
| 223 | + |
| 224 | +```bash |
| 225 | +# User runs: /commit-smart |
| 226 | +# Result: Commit with attribution |
| 227 | + |
| 228 | +feat(auth): implement SSO login |
| 229 | + |
| 230 | +Added single sign-on authentication using OAuth 2.0. |
| 231 | + |
| 232 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 233 | + |
| 234 | +Co-Authored-By: Claude <noreply@anthropic.com> |
| 235 | +``` |
| 236 | + |
| 237 | +### Good: Automated Workflow |
| 238 | + |
| 239 | +```yaml |
| 240 | +# Workflow creates issue from plan |
| 241 | +# Issue body includes attribution |
| 242 | + |
| 243 | +Task: Implement user dashboard |
| 244 | + |
| 245 | +Acceptance Criteria: |
| 246 | +- Display user statistics |
| 247 | +- Show recent activity |
| 248 | +- Include logout button |
| 249 | + |
| 250 | +--- |
| 251 | + |
| 252 | +🤖 Generated with [Claude Code](https://claude.com/claude-code) |
| 253 | +``` |
| 254 | + |
| 255 | +### Bad: Claude's Manual Operation (Don't Add) |
| 256 | + |
| 257 | +```bash |
| 258 | +# Claude debugging during conversation |
| 259 | +git commit -m "test: debug workflow" |
| 260 | +# ❌ NO attribution - this is Claude's development work |
| 261 | +``` |
| 262 | + |
| 263 | +--- |
| 264 | + |
| 265 | +## Questions? |
| 266 | + |
| 267 | +For questions about attribution: |
| 268 | +- See command/workflow source code |
| 269 | +- Check `.github/commit-template.txt` for commit attribution |
| 270 | +- Review this documentation for guidelines |
| 271 | + |
| 272 | +--- |
| 273 | + |
| 274 | +**Remember**: Attribution is for **user-facing automated operations**, not Claude's manual development/debugging activities. |
0 commit comments