|
1 | 1 | --- |
2 | 2 | name: typo3-core-contributions |
3 | | -description: "Agent Skill: Guide contributors through the complete TYPO3 Core contribution workflow from account setup to patch submission for both code and documentation contributions. Use when working with TYPO3 Forge issues, preparing patches for TYPO3 Core, contributing to TYPO3, submitting patches to Gerrit or GitHub PRs, fixing TYPO3 bugs, managing WIP state, or debugging CI failures. By Netresearch." |
| 3 | +description: "Agent Skill: TYPO3 Core contribution workflow. Use when working with Forge issues, submitting patches to Gerrit, or contributing docs. By Netresearch." |
4 | 4 | --- |
5 | 5 |
|
6 | 6 | # TYPO3 Core Contributions |
7 | 7 |
|
8 | | -Guide contributors through the complete TYPO3 Core contribution workflow for both code and documentation. |
| 8 | +Guide for TYPO3 Core contribution workflow from account setup to patch submission. |
9 | 9 |
|
10 | | -## When to Use This Skill |
| 10 | +## When to Use |
11 | 11 |
|
12 | | -Activate when: |
13 | | -- User provides a TYPO3 Forge issue URL (e.g., `https://forge.typo3.org/issues/105737`) |
14 | | -- Contributing to TYPO3 Core, submitting patches, or fixing TYPO3 bugs |
15 | | -- Help with Gerrit review workflow, rebasing, or patch updates |
16 | | -- Creating a new Forge issue for a bug or feature |
17 | | -- TYPO3 development environment setup |
18 | | -- TYPO3 commit message format or contribution guidelines |
19 | | - |
20 | | -## Scope |
21 | | - |
22 | | -| Repository | Submission | Workflow | |
23 | | -|------------|------------|----------| |
24 | | -| Core Code (typo3/typo3) | Gerrit (review.typo3.org) | This skill | |
25 | | -| Core Docs (TYPO3-Documentation/*) | GitHub PRs | This skill | |
26 | | - |
27 | | -**Related Skills**: |
28 | | -- `typo3-ddev-skill`: Development environment setup |
29 | | -- `typo3-docs-skill`: Documentation format validation |
30 | | -- `typo3-conformance-skill`: Code quality checks |
31 | | -- `typo3-testing-skill`: Test writing and execution |
32 | | - |
33 | | -## Workflow Decision Tree |
34 | | - |
35 | | -``` |
36 | | -User starts contribution |
37 | | -├─ Has Forge issue URL? |
38 | | -│ ├─ Yes → Prerequisites Check |
39 | | -│ └─ No → Guide to Issue Creation |
40 | | -├─ Prerequisites verified? |
41 | | -│ ├─ Yes → Development Phase |
42 | | -│ └─ No → Setup Phase |
43 | | -├─ Patch ready? |
44 | | -│ ├─ Yes → Submission Phase |
45 | | -│ └─ No → Development Phase |
46 | | -└─ Patch submitted? |
47 | | - ├─ Yes → Review & Update Phase |
48 | | - └─ No → Prepare for Gerrit |
49 | | -``` |
| 12 | +- Forge issue URLs (e.g., `https://forge.typo3.org/issues/105737`) |
| 13 | +- Contributing patches, fixing TYPO3 bugs |
| 14 | +- Gerrit review workflow, rebasing, CI failures |
50 | 15 |
|
51 | 16 | ## Prerequisites |
52 | 17 |
|
53 | | -Run `scripts/verify-prerequisites.sh` to check: |
54 | | - |
55 | | -1. **Accounts**: TYPO3.org, Gerrit SSH, Slack (#typo3-cms-coredev) |
56 | | -2. **Environment**: Git configured, TYPO3 Core cloned, DDEV setup |
57 | | -3. **Git Hooks**: commit-msg, pre-commit installed |
58 | | - |
59 | | -**Critical**: Git email MUST match Gerrit email or pushes will be rejected. |
60 | | - |
61 | | -## Phase Overview |
62 | | - |
63 | | -### Phase 1: Account Setup |
64 | | -- TYPO3.org account → Gerrit SSH → Slack access |
65 | | -- Details: `references/account-setup.md` |
66 | | - |
67 | | -### Phase 2: Environment Setup |
68 | | - |
69 | | -**Automated (recommended)**: |
70 | 18 | ```bash |
71 | | -./scripts/setup-typo3-coredev.sh |
| 19 | +scripts/verify-prerequisites.sh |
72 | 20 | ``` |
73 | 21 |
|
74 | | -**With typo3-ddev-skill**: Use for guided DDEV setup |
75 | | - |
76 | | -**Manual**: See `references/ddev-setup-workflow.md` |
| 22 | +Check: TYPO3.org account, Gerrit SSH, Git config (email must match Gerrit!) |
77 | 23 |
|
78 | | -### Phase 3: Issue Management |
| 24 | +## Workflow Overview |
79 | 25 |
|
80 | | -**Existing issue**: Fetch from Forge URL, determine commit type |
81 | | -**New issue**: Create at https://forge.typo3.org or via API (`scripts/create-forge-issue.sh`) |
| 26 | +1. **Setup**: Account → Environment (`scripts/setup-typo3-coredev.sh`) |
| 27 | +2. **Branch**: `git checkout -b feature/105737-fix-description` |
| 28 | +3. **Develop**: Implement, write tests, validate with typo3-conformance-skill |
| 29 | +4. **Commit**: Follow format, include `Resolves: #<issue>` + `Releases:` |
| 30 | +5. **Submit**: `git push origin HEAD:refs/for/main` |
| 31 | +6. **Update**: Amend + push (preserve Change-Id!) |
82 | 32 |
|
83 | | -### Phase 4: Development |
| 33 | +## Commit Format |
84 | 34 |
|
85 | | -```bash |
86 | | -git checkout main && git pull |
87 | | -git checkout -b feature/105737-fix-description |
88 | 35 | ``` |
89 | | - |
90 | | -1. Implement fix following TYPO3 patterns |
91 | | -2. Write tests → Use `typo3-testing-skill` |
92 | | -3. Validate quality → Use `typo3-conformance-skill` BEFORE commit |
93 | | -4. Build frontend assets if needed |
94 | | -5. Create changelog if breaking/new feature |
95 | | - |
96 | | -### Phase 5: Commit Creation |
97 | | - |
98 | | -**Format**: |
99 | | -``` |
100 | | -[TYPE] Subject line (max 52 chars, imperative) |
| 36 | +[TYPE] Subject line (imperative, max 52 chars) |
101 | 37 |
|
102 | 38 | Description explaining how and why. |
103 | 39 |
|
104 | 40 | Resolves: #12345 |
105 | 41 | Releases: main, 13.4, 12.4 |
106 | 42 | ``` |
107 | 43 |
|
108 | | -**Types**: `[BUGFIX]`, `[FEATURE]`, `[TASK]`, `[DOCS]`, `[SECURITY]`, `[!!!]` (breaking) |
109 | | - |
110 | | -**Required**: |
111 | | -- `Resolves: #<issue>` - Every commit MUST have this |
112 | | -- `Releases: main, 13.4, 12.4` - Target versions |
113 | | -- `Change-Id:` - Auto-generated, never modify |
114 | | - |
115 | | -Details: `references/commit-message-format.md` |
116 | | - |
117 | | -### Phase 6: Gerrit Submission |
118 | | - |
119 | | -```bash |
120 | | -git push origin HEAD:refs/for/main |
121 | | -``` |
122 | | - |
123 | | -Expected: `remote: https://review.typo3.org/c/Packages/TYPO3.CMS/+/12345 [NEW]` |
124 | | - |
125 | | -### Phase 7: Review & Update |
126 | | - |
127 | | -**Multiple revisions are NORMAL** - Real patches often have 7-24 patch sets. |
128 | | - |
129 | | -When feedback arrives: |
130 | | -```bash |
131 | | -git add . |
132 | | -git commit --amend # Preserve Change-Id! |
133 | | -git push origin HEAD:refs/for/main |
134 | | -``` |
135 | | - |
136 | | -**Rebasing**: |
137 | | -- Browser: Click "Rebase" on Gerrit |
138 | | -- CLI: `git fetch origin && git rebase origin/main && git push` |
139 | | - |
140 | | -Details: `references/gerrit-workflow.md`, `references/gerrit-review-patterns.md` |
141 | | - |
142 | | -### Phase 8: Merge & Completion |
143 | | - |
144 | | -After approval (+2 Code Review, +1 Verified): |
145 | | -```bash |
146 | | -git checkout main && git pull |
147 | | -git branch -D feature/105737-fix-description |
148 | | -``` |
149 | | - |
150 | | -## Common Scenarios |
151 | | - |
152 | | -| Scenario | Workflow | |
153 | | -|----------|----------| |
154 | | -| First contribution | Prerequisites → fetch issue → setup → develop → test → validate → commit → submit | |
155 | | -| Update patch | Make changes → typo3-conformance-skill → amend → push | |
156 | | -| Rebase needed | `references/gerrit-workflow.md` | |
157 | | -| CI failures | typo3-conformance-skill (CGL) or typo3-testing-skill (tests) | |
158 | | -| Dual-repo fix | Core via Gerrit + Docs via GitHub PR | |
| 44 | +**Types**: `[BUGFIX]`, `[FEATURE]`, `[TASK]`, `[DOCS]`, `[SECURITY]`, `[!!!]` |
159 | 45 |
|
160 | | -## Troubleshooting |
| 46 | +## Related Skills |
161 | 47 |
|
162 | | -| Issue | Solution | |
163 | | -|-------|----------| |
164 | | -| Permission denied (push) | Check SSH: `ssh -p 29418 <user>@review.typo3.org` | |
165 | | -| Missing Change-Id | Run `composer gerrit:setup` | |
166 | | -| Merge conflict | See `references/gerrit-workflow.md` | |
167 | | -| CI failing | Use typo3-conformance-skill or typo3-testing-skill | |
168 | | - |
169 | | -Full troubleshooting: `references/troubleshooting.md` |
170 | | - |
171 | | -## Scripts |
172 | | - |
173 | | -| Script | Purpose | |
174 | | -|--------|---------| |
175 | | -| `scripts/setup-typo3-coredev.sh` | Complete automated setup | |
176 | | -| `scripts/verify-prerequisites.sh` | Check accounts, git, environment | |
177 | | -| `scripts/create-commit-message.py` | Interactive commit message generator | |
178 | | -| `scripts/validate-commit-message.py` | Validate against TYPO3 format | |
179 | | -| `scripts/create-forge-issue.sh` | Create issues via API | |
| 48 | +- **typo3-ddev-skill**: Development environment |
| 49 | +- **typo3-testing-skill**: Test writing |
| 50 | +- **typo3-conformance-skill**: Code quality validation |
180 | 51 |
|
181 | 52 | ## References |
182 | 53 |
|
183 | 54 | | Topic | File | |
184 | 55 | |-------|------| |
185 | 56 | | Account setup | `references/account-setup.md` | |
186 | | -| DDEV setup workflow | `references/ddev-setup-workflow.md` | |
187 | | -| Commit message format | `references/commit-message-format.md` | |
188 | | -| Commit-msg hook details | `references/commit-msg-hook.md` | |
| 57 | +| Commit format | `references/commit-message-format.md` | |
189 | 58 | | Gerrit workflow | `references/gerrit-workflow.md` | |
190 | | -| Review patterns | `references/gerrit-review-patterns.md` | |
191 | | -| Forge API | `references/forge-api.md` | |
192 | 59 | | Troubleshooting | `references/troubleshooting.md` | |
193 | | -| Modern TYPO3 patterns | `references/modern-typo3-patterns.md` | |
194 | | - |
195 | | -## External Resources |
196 | | - |
197 | | -- [Contribution Guide](https://docs.typo3.org/m/typo3/guide-contributionworkflow/main/en-us/) |
198 | | -- [Forge](https://forge.typo3.org) |
199 | | -- [Gerrit](https://review.typo3.org) |
200 | | -- [Forger](https://forger.typo3.com) |
201 | | -- [Slack](https://typo3.slack.com) (#typo3-cms-coredev) |
202 | 60 |
|
203 | 61 | --- |
204 | 62 |
|
205 | | -> **Contributing:** Improvements to this skill should be submitted to the source repository: |
206 | | -> https://github.com/netresearch/typo3-core-contributions-skill |
| 63 | +> **Contributing:** https://github.com/netresearch/typo3-core-contributions-skill |
0 commit comments