From 185c72c9e3f66e70cac3a8113363fb7f8a262135 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 6 Jan 2026 16:34:29 +0900 Subject: [PATCH] feat(git-master): add configurable commit footer and co-author options Add git_master config with commit_footer and include_co_authored_by flags. Users can disable Sisyphus attribution in commits via oh-my-opencode.json. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- README.md | 21 +++++++++++++- assets/oh-my-opencode.schema.json | 16 ++++++++++- src/config/schema.ts | 9 ++++++ .../builtin-skills/git-master/SKILL.md | 28 +++++++++++++++++++ src/features/builtin-skills/skills.ts | 28 +++++++++++++++++++ 5 files changed, 100 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 40bd45e1..b0433742 100644 --- a/README.md +++ b/README.md @@ -917,6 +917,7 @@ Available agents: `oracle`, `librarian`, `explore`, `frontend-ui-ux-engineer`, ` Oh My OpenCode includes built-in skills that provide additional capabilities: - **playwright**: Browser automation with Playwright MCP. Use for web scraping, testing, screenshots, and browser interactions. +- **git-master**: Git expert for atomic commits, rebase/squash, and history search (blame, bisect, log -S). STRONGLY RECOMMENDED: Use with `sisyphus_task(category='quick', skills=['git-master'], ...)` to save context. Disable built-in skills via `disabled_skills` in `~/.config/opencode/oh-my-opencode.json` or `.opencode/oh-my-opencode.json`: @@ -926,7 +927,25 @@ Disable built-in skills via `disabled_skills` in `~/.config/opencode/oh-my-openc } ``` -Available built-in skills: `playwright` +Available built-in skills: `playwright`, `git-master` + +### Git Master + +Configure git-master skill behavior: + +```json +{ + "git_master": { + "commit_footer": true, + "include_co_authored_by": true + } +} +``` + +| Option | Default | Description | +| ------ | ------- | ----------- | +| `commit_footer` | `true` | Adds "Ultraworked with Sisyphus" footer to commit messages. | +| `include_co_authored_by` | `true` | Adds `Co-authored-by: Sisyphus ` trailer to commits. | ### Sisyphus Agent diff --git a/assets/oh-my-opencode.schema.json b/assets/oh-my-opencode.schema.json index adec16f3..6ae62f2b 100644 --- a/assets/oh-my-opencode.schema.json +++ b/assets/oh-my-opencode.schema.json @@ -37,7 +37,8 @@ "type": "string", "enum": [ "playwright", - "frontend-ui-ux" + "frontend-ui-ux", + "git-master" ] } }, @@ -1999,6 +2000,19 @@ "type": "boolean" } } + }, + "git_master": { + "type": "object", + "properties": { + "commit_footer": { + "default": true, + "type": "boolean" + }, + "include_co_authored_by": { + "default": true, + "type": "boolean" + } + } } } } \ No newline at end of file diff --git a/src/config/schema.ts b/src/config/schema.ts index aa89582c..f0e7fa46 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -30,6 +30,7 @@ export const BuiltinAgentNameSchema = z.enum([ export const BuiltinSkillNameSchema = z.enum([ "playwright", "frontend-ui-ux", + "git-master", ]) export const OverridableAgentNameSchema = z.enum([ @@ -283,6 +284,12 @@ export const NotificationConfigSchema = z.object({ force_enable: z.boolean().optional(), }) +export const GitMasterConfigSchema = z.object({ + /** Add "Ultraworked with Sisyphus" footer to commit messages (default: true) */ + commit_footer: z.boolean().default(true), + /** Add "Co-authored-by: Sisyphus" trailer to commit messages (default: true) */ + include_co_authored_by: z.boolean().default(true), +}) export const OhMyOpenCodeConfigSchema = z.object({ $schema: z.string().optional(), disabled_mcps: z.array(AnyMcpNameSchema).optional(), @@ -302,6 +309,7 @@ export const OhMyOpenCodeConfigSchema = z.object({ ralph_loop: RalphLoopConfigSchema.optional(), background_task: BackgroundTaskConfigSchema.optional(), notification: NotificationConfigSchema.optional(), + git_master: GitMasterConfigSchema.optional(), }) export type OhMyOpenCodeConfig = z.infer @@ -323,5 +331,6 @@ export type NotificationConfig = z.infer export type CategoryConfig = z.infer export type CategoriesConfig = z.infer export type BuiltinCategoryName = z.infer +export type GitMasterConfig = z.infer export { AnyMcpNameSchema, type AnyMcpName, McpNameSchema, type McpName } from "../mcp/types" diff --git a/src/features/builtin-skills/git-master/SKILL.md b/src/features/builtin-skills/git-master/SKILL.md index 0ce798bf..14566c0e 100644 --- a/src/features/builtin-skills/git-master/SKILL.md +++ b/src/features/builtin-skills/git-master/SKILL.md @@ -529,6 +529,34 @@ IF style == SHORT: 3. Is it similar to examples from git log? If ANY check fails -> REWRITE message. + +### 5.5 Commit Footer & Co-Author (Configurable) + +**Check oh-my-opencode.json for these flags:** +- `git_master.commit_footer` (default: true) - adds footer message +- `git_master.include_co_authored_by` (default: true) - adds co-author trailer + +If enabled, add Sisyphus attribution to EVERY commit: + +1. **Footer in commit body (if `commit_footer: true`):** +``` +Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) +``` + +2. **Co-authored-by trailer (if `include_co_authored_by: true`):** +``` +Co-authored-by: Sisyphus +``` + +**Example (both enabled):** +```bash +git commit -m "{Commit Message}" -m "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)" -m "Co-authored-by: Sisyphus " +``` + +**To disable:** Set in oh-my-opencode.json: +```json +{ "git_master": { "commit_footer": false, "include_co_authored_by": false } } +``` --- diff --git a/src/features/builtin-skills/skills.ts b/src/features/builtin-skills/skills.ts index c3663303..6106a98f 100644 --- a/src/features/builtin-skills/skills.ts +++ b/src/features/builtin-skills/skills.ts @@ -622,6 +622,34 @@ IF style == SHORT: 3. Is it similar to examples from git log? If ANY check fails -> REWRITE message. + +### 5.5 Commit Footer & Co-Author (Configurable) + +**Check oh-my-opencode.json for these flags:** +- \`git_master.commit_footer\` (default: true) - adds footer message +- \`git_master.include_co_authored_by\` (default: true) - adds co-author trailer + +If enabled, add Sisyphus attribution to EVERY commit: + +1. **Footer in commit body (if \`commit_footer: true\`):** +\`\`\` +Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) +\`\`\` + +2. **Co-authored-by trailer (if \`include_co_authored_by: true\`):** +\`\`\` +Co-authored-by: Sisyphus +\`\`\` + +**Example (both enabled):** +\`\`\`bash +git commit -m "{Commit Message}" -m "Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode)" -m "Co-authored-by: Sisyphus " +\`\`\` + +**To disable:** Set in oh-my-opencode.json: +\`\`\`json +{ "git_master": { "commit_footer": false, "include_co_authored_by": false } } +\`\`\` ---