Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
3.1 KiB
3.1 KiB
name: maintain description: SDLC maintenance stage. Gate on capability tags enforced in code by sdlc-gate (maintenance requires no specific tag, but the actual model id must be determinable from the transcript), read projects still inside their maintenance window from MAINTAIN_CONTENTS, then run one sub agent per project: switch to develop or master, propose at least five maintenance actions, commit to a new branch, push, and PR. Update the last-maintained timestamp afterward. Use for periodic upkeep of delivered projects inside their maintenance window; not for projects still mid-implementation or not yet registered in MAINTAIN_CONTENTS.
maintain
Goal: run routine maintenance for every project in the maintenance contents page.
All wiki reads and writes go through jsc-gitea:wiki.
Steps
- Model gate and stage lock (capability tags, enforced in code — never self-assessed):
- Run
jsc-cli/tools/model-tags.sh syncto refresh$JSC_HOME/model-tags.tsvfromjsc-cli/references/model-tags.md. - Run
jsc-hooks/hooks/sdlc-gate.sh lock maintain. The script reads the actual model id from the transcript and checks it against this stage's required tags — maintenance requires no specific tag, so the gate passes as long as the actual model can be determined at all. - Never claim a capability tag you have not verified with that script, and never substitute your own judgement for its verdict. Non-zero exit = blocked: relay the script's message verbatim, stop the skill, do nothing else this turn. Do not run
unlockto get past the gate; only the user may decide that. - Exit 0 means the stage is locked. Run this gate only when the stage changes; inside the maintenance stage the lock already covers every project, so never re-gate between projects.
- Run
- Read
MAINTAIN_CONTENTSviajsc-gitea:wikiand filter projects still inside their maintenance window: start date ≤ today, and (end date is NULL or ≥ today). - Every project MUST run as a sub agent with this flow:
- Run
git fetch --prune origin, then switch the project todevelop, falling back tomaster, and bring it up toorigin/{該分支}— the remote is the basis, never the local branch. Local and remote diverged → report and skip that project; neverpull --rebase,resetor discard anything on your own. - Propose at least five maintenance methods and apply the ones that fit the project, for example:
- dependency updates (reuse
jsc-pkg:pkg-update) - security vulnerability scan and patching
- dead code and stale comment cleanup
- test coverage reinforcement
- docs and README synchronization
- build warning elimination
- dependency updates (reuse
- Commit the changes to a new branch per
jsc-git:commit, push, then open a PR back to develop or master perjsc-git:pr. - Update the project's last-maintained field (the zh-TW column 「前次維護時間」) in
MAINTAIN_CONTENTSto today.
- Run
- The main agent reports the summary: maintenance methods applied per project, PR links, and failure reasons. The report and all generated wiki content, commits, and PR descriptions stay Traditional Chinese per the STE100 rule.