9.1 KiB
| name | description |
|---|---|
| platform-feature-finish | Commit, push, and create a Gitea pull request from the current TenantPilot platform feature branch into platform-dev. |
Skill: platform-feature-finish
Purpose
Automate the TenantPilot platform feature completion workflow.
Trigger this skill when the user says something like:
- "alles committen pushen und PR gegen platform-dev"
- "feature fertig, bitte PR erstellen"
- "platform feature abschließen"
- "commit push PR mit Gitea MCP"
- "mach PR gegen platform-dev"
- "finish platform feature"
This skill handles:
- Validate current Git branch
- Commit all feature changes
- Push current feature branch
- Create a Gitea pull request into
platform-dev - Report the PR link and next integration step
Branch Model
TenantPilot uses area branches:
dev = shared integration branch
platform-dev = platform/application area integration branch
website-dev = website/marketing area integration branch
For platform features:
platform-dev
↓
feature branch
↓
PR back to platform-dev
↓
platform-dev → dev integration PR
Rules:
- Platform feature branches MUST target
platform-dev. - Do NOT target
devdirectly unless the user explicitly asks. - Do NOT use
website-devfor platform features. platform-devis the default PR base for TenantPilot platform/application work.devis the shared integration branch.
Preconditions
Before committing:
- Confirm repository root.
- Confirm current branch is not protected.
Protected branches:
dev
platform-dev
website-dev
main
master
If the current branch is protected, STOP and report:
Ich bin auf einem geschützten Branch. Bitte zuerst einen Feature-Branch auschecken.
- Confirm remote exists.
- Confirm there are local changes, untracked files, or unpushed commits.
- Confirm there are no unresolved conflicts.
Do not ask for confirmation unless:
- The current branch is protected.
- Git status indicates unresolved conflicts.
- There is no remote configured.
.envor other local secret/config files would be committed.- Commit fails.
- Push fails.
- Gitea MCP PR creation fails.
Required Tools
Use terminal for Git operations.
Use Gitea MCP for pull request creation.
Preferred Gitea MCP operation:
create_pull_request
Required PR parameters:
{
"owner": "ahmido",
"repo": "TenantAtlas",
"head": "<current-feature-branch>",
"base": "platform-dev",
"title": "<generated-title>",
"body": "<generated-body>"
}
Workflow
Step 1 — Inspect Git state
Run:
git rev-parse --show-toplevel
git rev-parse --abbrev-ref HEAD
git status --porcelain
git status -sb
git config --get remote.origin.url
git log --oneline --max-count=5
Determine:
- repository root
- current branch
- changed files
- untracked files
- remote URL
- whether there are unpushed commits
- whether unresolved conflicts exist
If the current branch is protected, stop.
If unresolved conflicts exist, stop.
If no remote exists, stop.
Step 2 — Check for local environment files
Before git add -A, check whether local environment/config files are modified or untracked:
git status --porcelain | grep -E '(^.. \.env$|^.. apps/platform/\.env$|^.. .*\.env$)' || true
If .env or another environment file is included, STOP and report:
Achtung: Eine .env-/Environment-Datei ist geändert oder untracked. Ich committe das nicht automatisch. Bitte prüfen oder aus dem Commit entfernen.
Do not commit secrets or local runtime configuration.
Step 3 — Build commit message
Use the current branch name.
If branch starts with a spec number, for example:
256-external-support-desk-handoff
Generate:
feat(specs/256): external support desk handoff
If branch does not contain a spec number, generate:
feat(platform): complete <branch-name>
Rules:
- Use lowercase subject.
- Use feature-style subject.
- Do not include
WIP. - Do not include
final. - Do not include overly generic
updates.
Examples:
feat(specs/256): external support desk handoff
feat(specs/252): platform localization v1
feat(platform): improve tenant review workspace
Step 4 — Commit all changes
Run:
git add -A
git commit -m "<commit-message>"
If there are no local changes to commit, continue only if the branch has unpushed commits.
Check unpushed commits with:
git status -sb
git log --oneline origin/<current-branch>..HEAD
If there are no local changes and no unpushed commits, report:
Es gibt keine lokalen Änderungen und keine unpushed commits. Ich erstelle keinen leeren Commit.
Then continue to PR creation only if the branch already exists remotely or can be pushed.
Step 5 — Push branch
Run:
git push --set-upstream origin <current-branch>
If the upstream already exists, this is acceptable.
Never force-push unless the user explicitly requests it.
Step 6 — Create PR into platform-dev via Gitea MCP
Use Gitea MCP to create a pull request:
{
"owner": "ahmido",
"repo": "TenantAtlas",
"head": "<current-feature-branch>",
"base": "platform-dev",
"title": "<commit-message>",
"body": "Implements platform feature branch `<current-feature-branch>`.\n\nTarget branch: `platform-dev`.\n\nFollow-up integration path after merge:\n\n`platform-dev` → `dev`."
}
If a PR already exists for the same branch and base, do not create a duplicate.
Report the existing PR if available.
Optional Step — Check platform-dev to dev PR
After creating the feature PR, check whether an open integration PR exists:
platform-dev → dev
If a Gitea MCP list/search pull request function is available, use it.
If one exists, report:
Der Folge-PR `platform-dev` → `dev` existiert bereits: <url>
If none exists, report:
Nach dem Merge dieses Feature-PRs sollte der Integrations-PR `platform-dev` → `dev` erstellt oder aktualisiert werden.
Do not automatically create the platform-dev → dev PR unless the user explicitly asks for it.
Reason: before the feature PR is merged into platform-dev, the integration PR may not include the new feature yet.
Full Integration Mode
Only if the user explicitly says one of the following:
- "auch platform-dev nach dev"
- "und danach platform-dev nach dev"
- "full integration"
- "kompletten platform-dev zu dev PR machen"
- "folge-pr erstellen"
Then create or report the integration PR:
{
"owner": "ahmido",
"repo": "TenantAtlas",
"head": "platform-dev",
"base": "dev",
"title": "chore(platform): merge platform-dev into dev",
"body": "Integrates latest TenantPilot platform changes from `platform-dev` into `dev`."
}
Do not merge automatically unless explicitly requested.
Reporting Format
Final response must be concise and include:
Fertig.
- Branch: <branch>
- Commit: <commit-sha or "keine neuen Änderungen">
- Push: origin/<branch>
- PR: <url>
- Base: platform-dev
- Nächster Schritt: Nach Merge `platform-dev` → `dev` PR aktualisieren/erstellen
If tests were not run, say:
Tests wurden in diesem Skill nicht automatisch ausgeführt.
Do not claim tests passed unless they were actually executed.
Safety Rules
- Never commit directly to
dev,platform-dev,website-dev,main, ormaster. - Never force-push unless explicitly requested.
- Never auto-merge PRs unless explicitly requested.
- Never target
devdirectly for platform feature PRs unless explicitly requested. - Never delete branches unless explicitly requested.
- Never claim tests were run unless the tool actually ran them.
- Never commit
.env, secrets, local tokens, local mock-server configuration, or temporary runtime-only changes. - If migrations were created, mention that the target environment needs migration execution after deployment.
- If unresolved conflicts exist, stop.
Useful Commands
Inspect:
git rev-parse --show-toplevel
git rev-parse --abbrev-ref HEAD
git status --porcelain
git status -sb
git config --get remote.origin.url
Detect protected branch:
branch="$(git rev-parse --abbrev-ref HEAD)"
case "$branch" in
dev|platform-dev|website-dev|main|master)
echo "PROTECTED_BRANCH:$branch"
exit 2
;;
esac
Detect unresolved conflicts:
git diff --name-only --diff-filter=U
Detect .env changes:
git status --porcelain | grep -E '(^.. \.env$|^.. apps/platform/\.env$|^.. .*\.env$)' || true
Commit:
git add -A
git commit -m "<message>"
Push:
git push --set-upstream origin "$(git rev-parse --abbrev-ref HEAD)"
Latest commit:
git rev-parse --short HEAD
git log -1 --pretty=%s
Example User Request
User:
alles committen pushen und pr gegen platform-dev mit gitea mcp
Assistant should:
- Check current branch.
- Stop if branch is protected.
- Stop if
.envor secrets would be committed. - Commit all changes.
- Push current branch.
- Create PR into
platform-devwith Gitea MCP. - Report result.
Do not ask unnecessary follow-up questions.