ccjk 14.2.2 → 15.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +58 -341
- package/dist/cli.js +59 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/detect.js +15 -0
- package/dist/commands/detect.js.map +1 -0
- package/dist/commands/doctor.js +68 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/git-install.js +50 -0
- package/dist/commands/git-install.js.map +1 -0
- package/dist/commands/init.js +102 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/mcp.js +66 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/menu.js +33 -0
- package/dist/commands/menu.js.map +1 -0
- package/dist/core/detect.js +24 -0
- package/dist/core/detect.js.map +1 -0
- package/dist/core/lint.js +49 -0
- package/dist/core/lint.js.map +1 -0
- package/dist/core/mcp.js +41 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/paths.js +9 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/providers.js +53 -0
- package/dist/core/providers.js.map +1 -0
- package/dist/core/settings.js +31 -0
- package/dist/core/settings.js.map +1 -0
- package/dist/core/slash-templates.js +56 -0
- package/dist/core/slash-templates.js.map +1 -0
- package/dist/core/tools.js +27 -0
- package/dist/core/tools.js.map +1 -0
- package/package.json +43 -164
- package/README.HONEST.md +0 -176
- package/README.en.md +0 -67
- package/README.ja.md +0 -67
- package/README.ko.md +0 -67
- package/README.zh-CN.md +0 -86
- package/bin/ccjk.mjs +0 -5
- package/bin/ccjk.ts +0 -222
- package/dist/chunks/agent-teams.mjs +0 -145
- package/dist/chunks/agent.mjs +0 -1439
- package/dist/chunks/agents.mjs +0 -3783
- package/dist/chunks/api-cli.mjs +0 -135
- package/dist/chunks/api-config-selector.mjs +0 -159
- package/dist/chunks/api-providers.mjs +0 -144
- package/dist/chunks/api.mjs +0 -115
- package/dist/chunks/auto-bootstrap.mjs +0 -358
- package/dist/chunks/auto-fixer.mjs +0 -95
- package/dist/chunks/auto-updater.mjs +0 -507
- package/dist/chunks/banner.mjs +0 -173
- package/dist/chunks/bash.mjs +0 -187
- package/dist/chunks/boost.mjs +0 -474
- package/dist/chunks/brain-config.mjs +0 -75
- package/dist/chunks/brain-status.mjs +0 -89
- package/dist/chunks/ccjk-agents.mjs +0 -416
- package/dist/chunks/ccjk-all.mjs +0 -1046
- package/dist/chunks/ccjk-config.mjs +0 -445
- package/dist/chunks/ccjk-hooks.mjs +0 -1074
- package/dist/chunks/ccjk-mcp.mjs +0 -763
- package/dist/chunks/ccjk-setup.mjs +0 -765
- package/dist/chunks/ccjk-skills.mjs +0 -518
- package/dist/chunks/ccr.mjs +0 -109
- package/dist/chunks/ccu.mjs +0 -40
- package/dist/chunks/check-updates.mjs +0 -117
- package/dist/chunks/claude-code-incremental-manager.mjs +0 -761
- package/dist/chunks/claude-config.mjs +0 -606
- package/dist/chunks/claude-config2.mjs +0 -62
- package/dist/chunks/claude-wrapper.mjs +0 -85
- package/dist/chunks/clavue-config.mjs +0 -1454
- package/dist/chunks/cleanup-migration.mjs +0 -20
- package/dist/chunks/cli-hook.mjs +0 -4096
- package/dist/chunks/cloud-sync.mjs +0 -29
- package/dist/chunks/code-type-resolver.mjs +0 -880
- package/dist/chunks/codex-config-switch.mjs +0 -452
- package/dist/chunks/codex-provider-manager.mjs +0 -238
- package/dist/chunks/codex-uninstaller.mjs +0 -404
- package/dist/chunks/codex.mjs +0 -2141
- package/dist/chunks/commands.mjs +0 -108
- package/dist/chunks/commands2.mjs +0 -421
- package/dist/chunks/commit.mjs +0 -140
- package/dist/chunks/completion.mjs +0 -517
- package/dist/chunks/config-consolidator.mjs +0 -172
- package/dist/chunks/config-switch.mjs +0 -334
- package/dist/chunks/config.mjs +0 -558
- package/dist/chunks/config2.mjs +0 -484
- package/dist/chunks/config3.mjs +0 -486
- package/dist/chunks/constants.mjs +0 -323
- package/dist/chunks/context-opt.mjs +0 -444
- package/dist/chunks/context.mjs +0 -974
- package/dist/chunks/dashboard.mjs +0 -481
- package/dist/chunks/doctor.mjs +0 -1301
- package/dist/chunks/eval.mjs +0 -502
- package/dist/chunks/evolution.mjs +0 -322
- package/dist/chunks/features.mjs +0 -715
- package/dist/chunks/fish.mjs +0 -181
- package/dist/chunks/fs-operations.mjs +0 -180
- package/dist/chunks/health-alerts.mjs +0 -830
- package/dist/chunks/help.mjs +0 -341
- package/dist/chunks/hook-installer.mjs +0 -48
- package/dist/chunks/impact.mjs +0 -651
- package/dist/chunks/index.mjs +0 -23
- package/dist/chunks/index10.mjs +0 -19
- package/dist/chunks/index11.mjs +0 -1171
- package/dist/chunks/index12.mjs +0 -218
- package/dist/chunks/index13.mjs +0 -679
- package/dist/chunks/index14.mjs +0 -1009
- package/dist/chunks/index15.mjs +0 -194
- package/dist/chunks/index2.mjs +0 -7637
- package/dist/chunks/index3.mjs +0 -171
- package/dist/chunks/index4.mjs +0 -26
- package/dist/chunks/index5.mjs +0 -19
- package/dist/chunks/index6.mjs +0 -19092
- package/dist/chunks/index7.mjs +0 -616
- package/dist/chunks/index8.mjs +0 -1602
- package/dist/chunks/index9.mjs +0 -5384
- package/dist/chunks/init.mjs +0 -1911
- package/dist/chunks/installer.mjs +0 -757
- package/dist/chunks/installer2.mjs +0 -103
- package/dist/chunks/interview.mjs +0 -2927
- package/dist/chunks/json-config.mjs +0 -60
- package/dist/chunks/linux.mjs +0 -3863
- package/dist/chunks/macos.mjs +0 -69
- package/dist/chunks/main.mjs +0 -635
- package/dist/chunks/manager.mjs +0 -1048
- package/dist/chunks/marketplace.mjs +0 -265
- package/dist/chunks/mcp-cli.mjs +0 -205
- package/dist/chunks/mcp-performance.mjs +0 -187
- package/dist/chunks/mcp.mjs +0 -667
- package/dist/chunks/memory-check.mjs +0 -2973
- package/dist/chunks/memory-paths.mjs +0 -259
- package/dist/chunks/memory-sync.mjs +0 -209
- package/dist/chunks/memory.mjs +0 -354
- package/dist/chunks/metrics-display.mjs +0 -153
- package/dist/chunks/monitor.mjs +0 -1856
- package/dist/chunks/notification.mjs +0 -1864
- package/dist/chunks/onboarding.mjs +0 -386
- package/dist/chunks/package.mjs +0 -3
- package/dist/chunks/paradigm.mjs +0 -74
- package/dist/chunks/permission-manager.mjs +0 -250
- package/dist/chunks/permissions.mjs +0 -265
- package/dist/chunks/persistence-manager.mjs +0 -801
- package/dist/chunks/persistence.mjs +0 -707
- package/dist/chunks/platform.mjs +0 -395
- package/dist/chunks/plugin.mjs +0 -1936
- package/dist/chunks/powershell.mjs +0 -213
- package/dist/chunks/prompts.mjs +0 -244
- package/dist/chunks/providers.mjs +0 -263
- package/dist/chunks/quick-actions.mjs +0 -335
- package/dist/chunks/quick-provider.mjs +0 -755
- package/dist/chunks/quick-setup.mjs +0 -421
- package/dist/chunks/remote.mjs +0 -497
- package/dist/chunks/research.mjs +0 -1904
- package/dist/chunks/rollback.mjs +0 -38
- package/dist/chunks/session-manager.mjs +0 -1371
- package/dist/chunks/session.mjs +0 -878
- package/dist/chunks/sessions.mjs +0 -106
- package/dist/chunks/silent-updater.mjs +0 -396
- package/dist/chunks/simple-config.mjs +0 -122
- package/dist/chunks/skill.mjs +0 -117
- package/dist/chunks/skill2.mjs +0 -9052
- package/dist/chunks/skills-sync.mjs +0 -1343
- package/dist/chunks/skills.mjs +0 -577
- package/dist/chunks/slash-commands.mjs +0 -208
- package/dist/chunks/smart-guide.mjs +0 -247
- package/dist/chunks/snapshot.mjs +0 -58
- package/dist/chunks/startup.mjs +0 -487
- package/dist/chunks/stats.mjs +0 -191
- package/dist/chunks/status.mjs +0 -471
- package/dist/chunks/team.mjs +0 -63
- package/dist/chunks/thinking.mjs +0 -626
- package/dist/chunks/trace.mjs +0 -57
- package/dist/chunks/uninstall.mjs +0 -852
- package/dist/chunks/update.mjs +0 -174
- package/dist/chunks/upgrade-manager.mjs +0 -204
- package/dist/chunks/upgrade.mjs +0 -133
- package/dist/chunks/version-checker.mjs +0 -891
- package/dist/chunks/vim.mjs +0 -903
- package/dist/chunks/windows.mjs +0 -14
- package/dist/chunks/workflows.mjs +0 -633
- package/dist/chunks/wsl.mjs +0 -129
- package/dist/chunks/zero-config.mjs +0 -871
- package/dist/chunks/zsh.mjs +0 -182
- package/dist/cli.d.mts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.mjs +0 -2684
- package/dist/i18n/locales/en/agent-teams.json +0 -18
- package/dist/i18n/locales/en/agentBrowser.json +0 -80
- package/dist/i18n/locales/en/agents.json +0 -135
- package/dist/i18n/locales/en/api.json +0 -63
- package/dist/i18n/locales/en/ccjk-agents.json +0 -33
- package/dist/i18n/locales/en/ccjk-all.json +0 -23
- package/dist/i18n/locales/en/ccjk-skills.json +0 -22
- package/dist/i18n/locales/en/ccjk.json +0 -276
- package/dist/i18n/locales/en/ccr.json +0 -65
- package/dist/i18n/locales/en/claude-md.json +0 -73
- package/dist/i18n/locales/en/cli.json +0 -148
- package/dist/i18n/locales/en/cloud-setup.json +0 -31
- package/dist/i18n/locales/en/cloud-sync.json +0 -147
- package/dist/i18n/locales/en/cloud.json +0 -40
- package/dist/i18n/locales/en/cloudPlugins.json +0 -118
- package/dist/i18n/locales/en/codex.json +0 -184
- package/dist/i18n/locales/en/cometix.json +0 -29
- package/dist/i18n/locales/en/common.json +0 -68
- package/dist/i18n/locales/en/config.json +0 -108
- package/dist/i18n/locales/en/configuration.json +0 -236
- package/dist/i18n/locales/en/context.json +0 -85
- package/dist/i18n/locales/en/dashboard.json +0 -78
- package/dist/i18n/locales/en/errors.json +0 -26
- package/dist/i18n/locales/en/evolution.json +0 -54
- package/dist/i18n/locales/en/hooks.json +0 -74
- package/dist/i18n/locales/en/hooksSync.json +0 -133
- package/dist/i18n/locales/en/installation.json +0 -83
- package/dist/i18n/locales/en/interview.json +0 -104
- package/dist/i18n/locales/en/language.json +0 -19
- package/dist/i18n/locales/en/lsp.json +0 -78
- package/dist/i18n/locales/en/marketplace.json +0 -116
- package/dist/i18n/locales/en/mcp.json +0 -180
- package/dist/i18n/locales/en/memory.json +0 -23
- package/dist/i18n/locales/en/menu.json +0 -299
- package/dist/i18n/locales/en/multi-config.json +0 -79
- package/dist/i18n/locales/en/notification.json +0 -307
- package/dist/i18n/locales/en/permissions.json +0 -95
- package/dist/i18n/locales/en/persistence.json +0 -127
- package/dist/i18n/locales/en/plugins.json +0 -146
- package/dist/i18n/locales/en/quick-actions.json +0 -78
- package/dist/i18n/locales/en/registry.json +0 -54
- package/dist/i18n/locales/en/remote.json +0 -93
- package/dist/i18n/locales/en/sandbox.json +0 -44
- package/dist/i18n/locales/en/setup.json +0 -44
- package/dist/i18n/locales/en/shencha.json +0 -14
- package/dist/i18n/locales/en/skills.json +0 -100
- package/dist/i18n/locales/en/skillsSync.json +0 -74
- package/dist/i18n/locales/en/smartGuide.json +0 -49
- package/dist/i18n/locales/en/stats.json +0 -20
- package/dist/i18n/locales/en/subagent.json +0 -69
- package/dist/i18n/locales/en/superpowers.json +0 -117
- package/dist/i18n/locales/en/team.json +0 -7
- package/dist/i18n/locales/en/thinking.json +0 -65
- package/dist/i18n/locales/en/tools.json +0 -42
- package/dist/i18n/locales/en/uninstall.json +0 -56
- package/dist/i18n/locales/en/updater.json +0 -29
- package/dist/i18n/locales/en/vim.json +0 -169
- package/dist/i18n/locales/en/workflow.json +0 -55
- package/dist/i18n/locales/en/workspace.json +0 -108
- package/dist/i18n/locales/zh-CN/agent-teams.json +0 -18
- package/dist/i18n/locales/zh-CN/agentBrowser.json +0 -80
- package/dist/i18n/locales/zh-CN/agents.json +0 -135
- package/dist/i18n/locales/zh-CN/api.json +0 -63
- package/dist/i18n/locales/zh-CN/ccjk-agents.json +0 -33
- package/dist/i18n/locales/zh-CN/ccjk-all.json +0 -23
- package/dist/i18n/locales/zh-CN/ccjk-skills.json +0 -22
- package/dist/i18n/locales/zh-CN/ccjk.json +0 -276
- package/dist/i18n/locales/zh-CN/ccr.json +0 -65
- package/dist/i18n/locales/zh-CN/claude-md.json +0 -73
- package/dist/i18n/locales/zh-CN/cli.json +0 -148
- package/dist/i18n/locales/zh-CN/cloud-setup.json +0 -31
- package/dist/i18n/locales/zh-CN/cloud-sync.json +0 -147
- package/dist/i18n/locales/zh-CN/cloud.json +0 -40
- package/dist/i18n/locales/zh-CN/cloudPlugins.json +0 -118
- package/dist/i18n/locales/zh-CN/codex.json +0 -184
- package/dist/i18n/locales/zh-CN/cometix.json +0 -29
- package/dist/i18n/locales/zh-CN/common.json +0 -68
- package/dist/i18n/locales/zh-CN/config.json +0 -108
- package/dist/i18n/locales/zh-CN/configuration.json +0 -234
- package/dist/i18n/locales/zh-CN/context.json +0 -85
- package/dist/i18n/locales/zh-CN/dashboard.json +0 -78
- package/dist/i18n/locales/zh-CN/errors.json +0 -26
- package/dist/i18n/locales/zh-CN/evolution.json +0 -54
- package/dist/i18n/locales/zh-CN/hooks.json +0 -74
- package/dist/i18n/locales/zh-CN/hooksSync.json +0 -133
- package/dist/i18n/locales/zh-CN/installation.json +0 -83
- package/dist/i18n/locales/zh-CN/interview.json +0 -104
- package/dist/i18n/locales/zh-CN/language.json +0 -19
- package/dist/i18n/locales/zh-CN/lsp.json +0 -78
- package/dist/i18n/locales/zh-CN/marketplace.json +0 -116
- package/dist/i18n/locales/zh-CN/mcp.json +0 -180
- package/dist/i18n/locales/zh-CN/memory.json +0 -23
- package/dist/i18n/locales/zh-CN/menu.json +0 -299
- package/dist/i18n/locales/zh-CN/multi-config.json +0 -79
- package/dist/i18n/locales/zh-CN/notification.json +0 -307
- package/dist/i18n/locales/zh-CN/permissions.json +0 -95
- package/dist/i18n/locales/zh-CN/persistence.json +0 -127
- package/dist/i18n/locales/zh-CN/plugins.json +0 -146
- package/dist/i18n/locales/zh-CN/quick-actions.json +0 -78
- package/dist/i18n/locales/zh-CN/registry.json +0 -54
- package/dist/i18n/locales/zh-CN/remote.json +0 -93
- package/dist/i18n/locales/zh-CN/sandbox.json +0 -44
- package/dist/i18n/locales/zh-CN/setup.json +0 -44
- package/dist/i18n/locales/zh-CN/shencha.json +0 -14
- package/dist/i18n/locales/zh-CN/skills.json +0 -100
- package/dist/i18n/locales/zh-CN/skillsSync.json +0 -74
- package/dist/i18n/locales/zh-CN/smartGuide.json +0 -49
- package/dist/i18n/locales/zh-CN/stats.json +0 -20
- package/dist/i18n/locales/zh-CN/subagent.json +0 -69
- package/dist/i18n/locales/zh-CN/superpowers.json +0 -117
- package/dist/i18n/locales/zh-CN/team.json +0 -7
- package/dist/i18n/locales/zh-CN/thinking.json +0 -65
- package/dist/i18n/locales/zh-CN/tools.json +0 -42
- package/dist/i18n/locales/zh-CN/uninstall.json +0 -56
- package/dist/i18n/locales/zh-CN/updater.json +0 -29
- package/dist/i18n/locales/zh-CN/vim.json +0 -169
- package/dist/i18n/locales/zh-CN/workflow.json +0 -55
- package/dist/i18n/locales/zh-CN/workspace.json +0 -108
- package/dist/index.d.mts +0 -5658
- package/dist/index.d.ts +0 -5658
- package/dist/index.mjs +0 -3732
- package/dist/shared/ccjk.5bEolFrk.mjs +0 -254
- package/dist/shared/ccjk.8oaxX4iR.mjs +0 -90
- package/dist/shared/ccjk.B2U7DsPy.mjs +0 -31
- package/dist/shared/ccjk.B2f-cwUP.mjs +0 -468
- package/dist/shared/ccjk.BAGoDD49.mjs +0 -36
- package/dist/shared/ccjk.BBtCGd_g.mjs +0 -899
- package/dist/shared/ccjk.BFQ7yr5S.mjs +0 -16
- package/dist/shared/ccjk.BLsIiTqO.mjs +0 -449
- package/dist/shared/ccjk.BXv8aYs1.mjs +0 -170
- package/dist/shared/ccjk.BnsY5WxD.mjs +0 -171
- package/dist/shared/ccjk.BoApaI4j.mjs +0 -28
- package/dist/shared/ccjk.Bq8TqZG_.mjs +0 -189
- package/dist/shared/ccjk.BtrioX1Z.mjs +0 -25
- package/dist/shared/ccjk.Bx_rmYfN.mjs +0 -69
- package/dist/shared/ccjk.BzPbSEP2.mjs +0 -115
- package/dist/shared/ccjk.C0WLUnFV.mjs +0 -293
- package/dist/shared/ccjk.C1hANZTu.mjs +0 -19
- package/dist/shared/ccjk.C2jHOZVP.mjs +0 -52
- package/dist/shared/ccjk.CNhnT6uQ.mjs +0 -636
- package/dist/shared/ccjk.COweQ1RR.mjs +0 -5
- package/dist/shared/ccjk.CfKKcvWy.mjs +0 -126
- package/dist/shared/ccjk.Cjgrln_h.mjs +0 -297
- package/dist/shared/ccjk.CoCHVXl3.mjs +0 -3951
- package/dist/shared/ccjk.CwGZSTAK.mjs +0 -319
- package/dist/shared/ccjk.CxpGa6MC.mjs +0 -2724
- package/dist/shared/ccjk.D-magaEx.mjs +0 -763
- package/dist/shared/ccjk.D0g2ABGg.mjs +0 -171
- package/dist/shared/ccjk.D6ycHbak.mjs +0 -270
- package/dist/shared/ccjk.D75wivnp.mjs +0 -142
- package/dist/shared/ccjk.DDL-4C-k.mjs +0 -100
- package/dist/shared/ccjk.DFRPtmK_.mjs +0 -75
- package/dist/shared/ccjk.DMV3x5Sd.mjs +0 -299
- package/dist/shared/ccjk.DZ2LLOa-.mjs +0 -2195
- package/dist/shared/ccjk.DbigonEQ.mjs +0 -698
- package/dist/shared/ccjk.DcMvE7lf.mjs +0 -618
- package/dist/shared/ccjk.DeWpAShp.mjs +0 -1828
- package/dist/shared/ccjk.DhJ1kyDR.mjs +0 -30
- package/dist/shared/ccjk.DlTXS9rP.mjs +0 -224
- package/dist/shared/ccjk.DopKzo3z.mjs +0 -305
- package/dist/shared/ccjk.DsZsc4LR.mjs +0 -1280
- package/dist/shared/ccjk.DuzJZlgj.mjs +0 -418
- package/dist/shared/ccjk.Dxgd2vjc.mjs +0 -444
- package/dist/shared/ccjk.J8YiPsOw.mjs +0 -259
- package/dist/shared/ccjk.KfSWcGlE.mjs +0 -38
- package/dist/shared/ccjk.L7yC58_i.mjs +0 -225
- package/dist/shared/ccjk.MwtjAULc.mjs +0 -1447
- package/dist/shared/ccjk.OJKHVSOb.mjs +0 -2005
- package/dist/shared/ccjk.OTnevPNE.mjs +0 -225
- package/dist/shared/ccjk.RyizuzOI.mjs +0 -21
- package/dist/shared/ccjk.T_cX87dY.mjs +0 -15
- package/dist/shared/ccjk.bQ7Dh1g4.mjs +0 -249
- package/dist/shared/ccjk.gDEDGD_t.mjs +0 -38
- package/dist/shared/ccjk.hoqrwWdN.mjs +0 -333
- package/dist/shared/ccjk.i_vn-9C3.mjs +0 -317
- package/dist/shared/ccjk.lG3ccFjm.mjs +0 -885
- package/dist/shared/ccjk.wLJHO0Af.mjs +0 -244
- package/dist/shared/ccjk.y-a_1vK4.mjs +0 -5127
- package/dist/templates/agents/README.md +0 -78
- package/dist/templates/agents/fullstack-developer.json +0 -70
- package/dist/templates/agents/go-expert.json +0 -69
- package/dist/templates/agents/index.json +0 -64
- package/dist/templates/agents/python-expert.json +0 -69
- package/dist/templates/agents/react-specialist.json +0 -69
- package/dist/templates/agents/testing-automation-expert.json +0 -70
- package/dist/templates/agents/typescript-architect.json +0 -69
- package/dist/templates/claude-code/common/settings.json +0 -109
- package/dist/templates/common/error-prevention.md +0 -267
- package/dist/templates/common/karpathy-baseline.md +0 -83
- package/dist/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
- package/dist/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
- package/dist/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
- package/dist/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
- package/dist/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
- package/dist/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
- package/dist/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
- package/dist/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
- package/dist/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
- package/dist/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
- package/dist/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
- package/dist/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
- package/dist/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
- package/dist/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
- package/dist/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
- package/dist/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
- package/dist/templates/common/workflow/essential/en/feat.md +0 -92
- package/dist/templates/common/workflow/essential/en/goal.md +0 -147
- package/dist/templates/common/workflow/essential/en/init-project.md +0 -53
- package/dist/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
- package/dist/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
- package/dist/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
- package/dist/templates/common/workflow/essential/zh-CN/feat.md +0 -315
- package/dist/templates/common/workflow/essential/zh-CN/goal.md +0 -146
- package/dist/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
- package/dist/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
- package/dist/templates/common/workflow/git/en/git-commit.md +0 -205
- package/dist/templates/common/workflow/git/en/git-rollback.md +0 -90
- package/dist/templates/common/workflow/git/en/git-worktree.md +0 -276
- package/dist/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
- package/dist/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
- package/dist/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
- package/dist/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
- package/dist/templates/common/workflow/interview/en/interview.md +0 -67
- package/dist/templates/common/workflow/interview/zh-CN/interview.md +0 -67
- package/dist/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
- package/dist/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
- package/dist/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
- package/dist/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
- package/dist/templates/common/workflow/sixStep/en/workflow.md +0 -83
- package/dist/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
- package/dist/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
- package/dist/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
- package/dist/templates/hooks/README.md +0 -212
- package/dist/templates/hooks/git-workflow-hooks.md +0 -551
- package/dist/templates/hooks/post-test/coverage.json +0 -21
- package/dist/templates/hooks/post-test/summary.json +0 -21
- package/dist/templates/hooks/post-test-coverage.md +0 -434
- package/dist/templates/hooks/pre-commit/eslint.json +0 -22
- package/dist/templates/hooks/pre-commit/prettier.json +0 -22
- package/dist/templates/hooks/pre-commit-black.md +0 -274
- package/dist/templates/hooks/pre-commit-eslint.md +0 -153
- package/dist/templates/hooks/pre-commit-gofmt.md +0 -284
- package/dist/templates/hooks/pre-commit-prettier.md +0 -212
- package/dist/templates/hooks/pre-commit-type-check.md +0 -377
- package/dist/templates/skills/ccjk-init.md +0 -154
- package/dist/templates/skills/ccjk-mcp-setup.md +0 -205
- package/dist/templates/skills/ccjk-troubleshoot.md +0 -228
- package/dist/templates/skills/django-patterns.md +0 -1016
- package/dist/templates/skills/git-workflow.md +0 -748
- package/dist/templates/skills/go-idioms.md +0 -963
- package/dist/templates/skills/index.json +0 -132
- package/dist/templates/skills/nextjs-optimization.md +0 -694
- package/dist/templates/skills/python-pep8.md +0 -852
- package/dist/templates/skills/react-patterns.md +0 -686
- package/dist/templates/skills/rust-patterns.md +0 -1057
- package/dist/templates/skills/security-best-practices.md +0 -1413
- package/dist/templates/skills/testing-best-practices.md +0 -1315
- package/dist/templates/skills/ts-best-practices.md +0 -354
- package/templates/agents/README.md +0 -78
- package/templates/agents/fullstack-developer.json +0 -70
- package/templates/agents/go-expert.json +0 -69
- package/templates/agents/index.json +0 -64
- package/templates/agents/python-expert.json +0 -69
- package/templates/agents/react-specialist.json +0 -69
- package/templates/agents/testing-automation-expert.json +0 -70
- package/templates/agents/typescript-architect.json +0 -69
- package/templates/claude-code/common/settings.json +0 -109
- package/templates/common/error-prevention.md +0 -267
- package/templates/common/karpathy-baseline.md +0 -83
- package/templates/common/output-styles/zh-CN/carmack-mode.md +0 -381
- package/templates/common/output-styles/zh-CN/codex-rigor-mode.md +0 -114
- package/templates/common/output-styles/zh-CN/dhh-mode.md +0 -265
- package/templates/common/output-styles/zh-CN/evan-you-mode.md +0 -539
- package/templates/common/output-styles/zh-CN/jobs-mode.md +0 -369
- package/templates/common/output-styles/zh-CN/linus-mode.md +0 -135
- package/templates/common/output-styles/zh-CN/uncle-bob-mode.md +0 -221
- package/templates/common/workflow/continuousDelivery/en/continuous-delivery.md +0 -628
- package/templates/common/workflow/continuousDelivery/zh-CN/continuous-delivery.md +0 -628
- package/templates/common/workflow/essential/en/agents/ccjk-config-agent.md +0 -187
- package/templates/common/workflow/essential/en/agents/ccjk-mcp-agent.md +0 -191
- package/templates/common/workflow/essential/en/agents/ccjk-skill-agent.md +0 -249
- package/templates/common/workflow/essential/en/agents/ccjk-workflow-agent.md +0 -277
- package/templates/common/workflow/essential/en/agents/get-current-datetime.md +0 -29
- package/templates/common/workflow/essential/en/agents/init-architect.md +0 -115
- package/templates/common/workflow/essential/en/agents/ui-ux-designer.md +0 -91
- package/templates/common/workflow/essential/en/feat.md +0 -92
- package/templates/common/workflow/essential/en/goal.md +0 -147
- package/templates/common/workflow/essential/en/init-project.md +0 -53
- package/templates/common/workflow/essential/zh-CN/agents/get-current-datetime.md +0 -29
- package/templates/common/workflow/essential/zh-CN/agents/init-architect.md +0 -115
- package/templates/common/workflow/essential/zh-CN/agents/ui-ux-designer.md +0 -91
- package/templates/common/workflow/essential/zh-CN/feat.md +0 -315
- package/templates/common/workflow/essential/zh-CN/goal.md +0 -146
- package/templates/common/workflow/essential/zh-CN/init-project.md +0 -53
- package/templates/common/workflow/git/en/git-cleanBranches.md +0 -102
- package/templates/common/workflow/git/en/git-commit.md +0 -205
- package/templates/common/workflow/git/en/git-rollback.md +0 -90
- package/templates/common/workflow/git/en/git-worktree.md +0 -276
- package/templates/common/workflow/git/zh-CN/git-cleanBranches.md +0 -102
- package/templates/common/workflow/git/zh-CN/git-commit.md +0 -205
- package/templates/common/workflow/git/zh-CN/git-rollback.md +0 -90
- package/templates/common/workflow/git/zh-CN/git-worktree.md +0 -276
- package/templates/common/workflow/interview/en/interview.md +0 -67
- package/templates/common/workflow/interview/zh-CN/interview.md +0 -67
- package/templates/common/workflow/linearMethod/en/linear-method.md +0 -651
- package/templates/common/workflow/linearMethod/zh-CN/linear-method.md +0 -752
- package/templates/common/workflow/refactoringMaster/en/refactoring-master.md +0 -516
- package/templates/common/workflow/refactoringMaster/zh-CN/refactoring-master.md +0 -812
- package/templates/common/workflow/sixStep/en/workflow.md +0 -83
- package/templates/common/workflow/sixStep/zh-CN/workflow.md +0 -359
- package/templates/common/workflow/specFirstTDD/en/spec-first-tdd.md +0 -364
- package/templates/common/workflow/specFirstTDD/zh-CN/spec-first-tdd.md +0 -366
- package/templates/hooks/README.md +0 -212
- package/templates/hooks/git-workflow-hooks.md +0 -551
- package/templates/hooks/post-test/coverage.json +0 -21
- package/templates/hooks/post-test/summary.json +0 -21
- package/templates/hooks/post-test-coverage.md +0 -434
- package/templates/hooks/pre-commit/eslint.json +0 -22
- package/templates/hooks/pre-commit/prettier.json +0 -22
- package/templates/hooks/pre-commit-black.md +0 -274
- package/templates/hooks/pre-commit-eslint.md +0 -153
- package/templates/hooks/pre-commit-gofmt.md +0 -284
- package/templates/hooks/pre-commit-prettier.md +0 -212
- package/templates/hooks/pre-commit-type-check.md +0 -377
- package/templates/skills/basic.hbs +0 -72
- package/templates/skills/ccjk-init.md +0 -154
- package/templates/skills/ccjk-mcp-setup.md +0 -205
- package/templates/skills/ccjk-troubleshoot.md +0 -228
- package/templates/skills/code-refactor.hbs +0 -133
- package/templates/skills/code-review.hbs +0 -141
- package/templates/skills/django-patterns.md +0 -1016
- package/templates/skills/git-workflow.md +0 -748
- package/templates/skills/go-idioms.md +0 -963
- package/templates/skills/index.json +0 -132
- package/templates/skills/nextjs-optimization.md +0 -694
- package/templates/skills/python-pep8.md +0 -852
- package/templates/skills/react-patterns.md +0 -686
- package/templates/skills/rust-patterns.md +0 -1057
- package/templates/skills/security-best-practices.md +0 -1413
- package/templates/skills/testing-best-practices.md +0 -1315
- package/templates/skills/ts-best-practices.md +0 -354
- package/templates/skills/type-fix.hbs +0 -132
|
@@ -1,748 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: git-workflow
|
|
3
|
-
description: Git flow strategies, commit conventions, branch management, and PR guidelines
|
|
4
|
-
description_zh: Git 流程策略、提交约定、分支管理和 PR 指南
|
|
5
|
-
version: 1.0.0
|
|
6
|
-
category: development
|
|
7
|
-
triggers: ['/git-workflow', '/git', '/branching', '/commit-conventions']
|
|
8
|
-
use_when:
|
|
9
|
-
- Setting up Git workflows and branching strategies
|
|
10
|
-
- Implementing commit message conventions
|
|
11
|
-
- Managing pull requests and code reviews
|
|
12
|
-
- Establishing team Git practices
|
|
13
|
-
use_when_zh:
|
|
14
|
-
- 设置 Git 工作流和分支策略
|
|
15
|
-
- 实现提交消息约定
|
|
16
|
-
- 管理拉取请求和代码审查
|
|
17
|
-
- 建立团队 Git 实践
|
|
18
|
-
auto_activate: true
|
|
19
|
-
priority: 8
|
|
20
|
-
agents: [git-expert, devops-engineer]
|
|
21
|
-
tags: [git, workflow, branching, commits, collaboration]
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
# Git Workflow | Git 工作流
|
|
25
|
-
|
|
26
|
-
## Context | 上下文
|
|
27
|
-
|
|
28
|
-
Use this skill when establishing Git workflows, implementing branching strategies, and setting up team collaboration practices. Essential for maintaining clean project history and efficient team development.
|
|
29
|
-
|
|
30
|
-
在建立 Git 工作流、实现分支策略和设置团队协作实践时使用此技能。对于维护清洁的项目历史和高效的团队开发至关重要。
|
|
31
|
-
|
|
32
|
-
## Branching Strategies | 分支策略
|
|
33
|
-
|
|
34
|
-
### 1. Git Flow | Git 流程
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
# ✅ Good: Git Flow branching model
|
|
38
|
-
|
|
39
|
-
# Initialize git flow
|
|
40
|
-
git flow init
|
|
41
|
-
|
|
42
|
-
# Feature development
|
|
43
|
-
git flow feature start new-user-authentication
|
|
44
|
-
# Work on feature...
|
|
45
|
-
git add .
|
|
46
|
-
git commit -m "feat: implement user authentication with JWT"
|
|
47
|
-
git flow feature finish new-user-authentication
|
|
48
|
-
|
|
49
|
-
# Release preparation
|
|
50
|
-
git flow release start 1.2.0
|
|
51
|
-
# Bug fixes and version updates...
|
|
52
|
-
git add .
|
|
53
|
-
git commit -m "chore: bump version to 1.2.0"
|
|
54
|
-
git flow release finish 1.2.0
|
|
55
|
-
|
|
56
|
-
# Hotfix for production
|
|
57
|
-
git flow hotfix start critical-security-fix
|
|
58
|
-
# Fix the issue...
|
|
59
|
-
git add .
|
|
60
|
-
git commit -m "fix: resolve critical security vulnerability"
|
|
61
|
-
git flow hotfix finish critical-security-fix
|
|
62
|
-
|
|
63
|
-
# Branch structure:
|
|
64
|
-
# main (production-ready)
|
|
65
|
-
# ├── develop (integration branch)
|
|
66
|
-
# ├── feature/new-user-authentication
|
|
67
|
-
# ├── release/1.2.0
|
|
68
|
-
# └── hotfix/critical-security-fix
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
### 2. GitHub Flow | GitHub 流程
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
# ✅ Good: GitHub Flow (simpler alternative)
|
|
75
|
-
|
|
76
|
-
# Create feature branch from main
|
|
77
|
-
git checkout main
|
|
78
|
-
git pull origin main
|
|
79
|
-
git checkout -b feature/user-profile-page
|
|
80
|
-
|
|
81
|
-
# Work on feature with frequent commits
|
|
82
|
-
git add src/components/UserProfile.js
|
|
83
|
-
git commit -m "feat: add user profile component structure"
|
|
84
|
-
|
|
85
|
-
git add src/components/UserProfile.css
|
|
86
|
-
git commit -m "style: add user profile styling"
|
|
87
|
-
|
|
88
|
-
git add tests/UserProfile.test.js
|
|
89
|
-
git commit -m "test: add user profile component tests"
|
|
90
|
-
|
|
91
|
-
# Push branch and create PR
|
|
92
|
-
git push origin feature/user-profile-page
|
|
93
|
-
|
|
94
|
-
# After PR approval and merge, cleanup
|
|
95
|
-
git checkout main
|
|
96
|
-
git pull origin main
|
|
97
|
-
git branch -d feature/user-profile-page
|
|
98
|
-
git push origin --delete feature/user-profile-page
|
|
99
|
-
|
|
100
|
-
# Branch structure (simpler):
|
|
101
|
-
# main (always deployable)
|
|
102
|
-
# ├── feature/user-profile-page
|
|
103
|
-
# ├── feature/payment-integration
|
|
104
|
-
# └── hotfix/login-bug-fix
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
### 3. GitLab Flow | GitLab 流程
|
|
108
|
-
|
|
109
|
-
```bash
|
|
110
|
-
# ✅ Good: GitLab Flow with environment branches
|
|
111
|
-
|
|
112
|
-
# Feature development
|
|
113
|
-
git checkout main
|
|
114
|
-
git pull origin main
|
|
115
|
-
git checkout -b feature/shopping-cart
|
|
116
|
-
|
|
117
|
-
# Development work...
|
|
118
|
-
git add .
|
|
119
|
-
git commit -m "feat: implement shopping cart functionality"
|
|
120
|
-
git push origin feature/shopping-cart
|
|
121
|
-
|
|
122
|
-
# Create merge request to main
|
|
123
|
-
# After merge, deploy to staging
|
|
124
|
-
git checkout staging
|
|
125
|
-
git pull origin staging
|
|
126
|
-
git merge main
|
|
127
|
-
git push origin staging
|
|
128
|
-
|
|
129
|
-
# After staging validation, deploy to production
|
|
130
|
-
git checkout production
|
|
131
|
-
git pull origin production
|
|
132
|
-
git merge main
|
|
133
|
-
git push origin production
|
|
134
|
-
|
|
135
|
-
# Branch structure:
|
|
136
|
-
# main (development)
|
|
137
|
-
# ├── staging (pre-production)
|
|
138
|
-
# ├── production (live environment)
|
|
139
|
-
# └── feature branches
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
## Commit Conventions | 提交约定
|
|
143
|
-
|
|
144
|
-
### 1. Conventional Commits | 约定式提交
|
|
145
|
-
|
|
146
|
-
```bash
|
|
147
|
-
# ✅ Good: Conventional commit format
|
|
148
|
-
# <type>[optional scope]: <description>
|
|
149
|
-
# [optional body]
|
|
150
|
-
# [optional footer(s)]
|
|
151
|
-
|
|
152
|
-
# Feature commits
|
|
153
|
-
git commit -m "feat: add user authentication system"
|
|
154
|
-
git commit -m "feat(auth): implement JWT token validation"
|
|
155
|
-
git commit -m "feat(api): add user registration endpoint"
|
|
156
|
-
|
|
157
|
-
# Bug fixes
|
|
158
|
-
git commit -m "fix: resolve login form validation issue"
|
|
159
|
-
git commit -m "fix(database): handle connection timeout errors"
|
|
160
|
-
git commit -m "fix(ui): correct button alignment on mobile devices"
|
|
161
|
-
|
|
162
|
-
# Documentation
|
|
163
|
-
git commit -m "docs: update API documentation for user endpoints"
|
|
164
|
-
git commit -m "docs(readme): add installation instructions"
|
|
165
|
-
|
|
166
|
-
# Styling and formatting
|
|
167
|
-
git commit -m "style: format code according to ESLint rules"
|
|
168
|
-
git commit -m "style(css): improve responsive design for tablets"
|
|
169
|
-
|
|
170
|
-
# Refactoring
|
|
171
|
-
git commit -m "refactor: extract user validation logic to separate module"
|
|
172
|
-
git commit -m "refactor(components): simplify UserProfile component structure"
|
|
173
|
-
|
|
174
|
-
# Performance improvements
|
|
175
|
-
git commit -m "perf: optimize database queries for user search"
|
|
176
|
-
git commit -m "perf(images): implement lazy loading for gallery"
|
|
177
|
-
|
|
178
|
-
# Tests
|
|
179
|
-
git commit -m "test: add unit tests for authentication service"
|
|
180
|
-
git commit -m "test(integration): add API endpoint integration tests"
|
|
181
|
-
|
|
182
|
-
# Build and CI/CD
|
|
183
|
-
git commit -m "build: update webpack configuration for production"
|
|
184
|
-
git commit -m "ci: add automated testing workflow"
|
|
185
|
-
|
|
186
|
-
# Chores and maintenance
|
|
187
|
-
git commit -m "chore: update dependencies to latest versions"
|
|
188
|
-
git commit -m "chore(release): bump version to 2.1.0"
|
|
189
|
-
|
|
190
|
-
# Breaking changes
|
|
191
|
-
git commit -m "feat!: change user API response format
|
|
192
|
-
|
|
193
|
-
BREAKING CHANGE: User API now returns user data in 'data' field instead of root level"
|
|
194
|
-
|
|
195
|
-
# Multi-line commit with body and footer
|
|
196
|
-
git commit -m "fix: resolve memory leak in image processing
|
|
197
|
-
|
|
198
|
-
The image processing module was not properly disposing of canvas elements
|
|
199
|
-
after processing, leading to memory accumulation over time.
|
|
200
|
-
|
|
201
|
-
Fixes #123
|
|
202
|
-
Reviewed-by: @john-doe"
|
|
203
|
-
|
|
204
|
-
# ❌ Bad: Non-descriptive commits
|
|
205
|
-
git commit -m "fix stuff"
|
|
206
|
-
git commit -m "update"
|
|
207
|
-
git commit -m "changes"
|
|
208
|
-
git commit -m "wip"
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### 2. Commit Message Templates | 提交消息模板
|
|
212
|
-
|
|
213
|
-
```bash
|
|
214
|
-
# ✅ Good: Set up commit message template
|
|
215
|
-
|
|
216
|
-
# Create commit template file
|
|
217
|
-
cat > ~/.gitmessage << EOF
|
|
218
|
-
# <type>[optional scope]: <description>
|
|
219
|
-
# |<---- Using a Maximum Of 50 Characters ---->|
|
|
220
|
-
|
|
221
|
-
# Explain why this change is being made
|
|
222
|
-
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
|
|
223
|
-
|
|
224
|
-
# Provide links or keys to any relevant tickets, articles or other resources
|
|
225
|
-
# Example: Github issue #23
|
|
226
|
-
|
|
227
|
-
# --- COMMIT END ---
|
|
228
|
-
# Type can be
|
|
229
|
-
# feat (new feature)
|
|
230
|
-
# fix (bug fix)
|
|
231
|
-
# refactor (refactoring production code)
|
|
232
|
-
# style (formatting, missing semi colons, etc; no code change)
|
|
233
|
-
# docs (changes to documentation)
|
|
234
|
-
# test (adding or refactoring tests; no production code change)
|
|
235
|
-
# chore (updating grunt tasks etc; no production code change)
|
|
236
|
-
# perf (performance improvements)
|
|
237
|
-
# ci (continuous integration related)
|
|
238
|
-
# build (build system or external dependencies)
|
|
239
|
-
# --------------------
|
|
240
|
-
# Remember to
|
|
241
|
-
# Capitalize the subject line
|
|
242
|
-
# Use the imperative mood in the subject line
|
|
243
|
-
# Do not end the subject line with a period
|
|
244
|
-
# Separate subject from body with a blank line
|
|
245
|
-
# Use the body to explain what and why vs. how
|
|
246
|
-
# Can use multiple lines with "-" for bullet points in body
|
|
247
|
-
EOF
|
|
248
|
-
|
|
249
|
-
# Configure git to use the template
|
|
250
|
-
git config --global commit.template ~/.gitmessage
|
|
251
|
-
|
|
252
|
-
# ✅ Good: Pre-commit hooks for commit message validation
|
|
253
|
-
# .git/hooks/commit-msg
|
|
254
|
-
#!/bin/sh
|
|
255
|
-
|
|
256
|
-
commit_regex='^(feat|fix|docs|style|refactor|test|chore|perf|ci|build)(\(.+\))?: .{1,50}'
|
|
257
|
-
|
|
258
|
-
error_msg="Aborting commit. Your commit message is missing either a type of change or the description of changes."
|
|
259
|
-
|
|
260
|
-
if ! grep -qE "$commit_regex" "$1"; then
|
|
261
|
-
echo "$error_msg" >&2
|
|
262
|
-
exit 1
|
|
263
|
-
fi
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
## Branch Management | 分支管理
|
|
267
|
-
|
|
268
|
-
### 1. Branch Naming Conventions | 分支命名约定
|
|
269
|
-
|
|
270
|
-
```bash
|
|
271
|
-
# ✅ Good: Descriptive branch names
|
|
272
|
-
|
|
273
|
-
# Feature branches
|
|
274
|
-
git checkout -b feature/user-authentication
|
|
275
|
-
git checkout -b feature/payment-integration
|
|
276
|
-
git checkout -b feature/admin-dashboard
|
|
277
|
-
|
|
278
|
-
# Bug fix branches
|
|
279
|
-
git checkout -b fix/login-validation-error
|
|
280
|
-
git checkout -b fix/memory-leak-in-image-processor
|
|
281
|
-
git checkout -b fix/responsive-design-mobile
|
|
282
|
-
|
|
283
|
-
# Hotfix branches
|
|
284
|
-
git checkout -b hotfix/critical-security-patch
|
|
285
|
-
git checkout -b hotfix/production-database-issue
|
|
286
|
-
|
|
287
|
-
# Release branches
|
|
288
|
-
git checkout -b release/v2.1.0
|
|
289
|
-
git checkout -b release/v2.1.1-hotfix
|
|
290
|
-
|
|
291
|
-
# Experimental branches
|
|
292
|
-
git checkout -b experiment/new-ui-framework
|
|
293
|
-
git checkout -b spike/performance-optimization
|
|
294
|
-
|
|
295
|
-
# Personal/WIP branches
|
|
296
|
-
git checkout -b john/wip-refactor-auth
|
|
297
|
-
git checkout -b jane/prototype-new-feature
|
|
298
|
-
|
|
299
|
-
# ❌ Bad: Non-descriptive branch names
|
|
300
|
-
git checkout -b fix-stuff
|
|
301
|
-
git checkout -b new-branch
|
|
302
|
-
git checkout -b temp
|
|
303
|
-
git checkout -b john-branch
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
### 2. Branch Protection and Policies | 分支保护和策略
|
|
307
|
-
|
|
308
|
-
```bash
|
|
309
|
-
# ✅ Good: Branch protection rules (GitHub/GitLab settings)
|
|
310
|
-
|
|
311
|
-
# Protect main branch
|
|
312
|
-
# - Require pull request reviews before merging
|
|
313
|
-
# - Require status checks to pass before merging
|
|
314
|
-
# - Require branches to be up to date before merging
|
|
315
|
-
# - Require conversation resolution before merging
|
|
316
|
-
# - Restrict pushes that create files larger than 100MB
|
|
317
|
-
# - Restrict force pushes
|
|
318
|
-
# - Restrict deletions
|
|
319
|
-
|
|
320
|
-
# Example GitHub CLI commands for branch protection
|
|
321
|
-
gh api repos/:owner/:repo/branches/main/protection \
|
|
322
|
-
--method PUT \
|
|
323
|
-
--field required_status_checks='{"strict":true,"contexts":["ci/tests","ci/lint"]}' \
|
|
324
|
-
--field enforce_admins=true \
|
|
325
|
-
--field required_pull_request_reviews='{"required_approving_review_count":2,"dismiss_stale_reviews":true}' \
|
|
326
|
-
--field restrictions=null
|
|
327
|
-
|
|
328
|
-
# ✅ Good: Automated branch cleanup
|
|
329
|
-
# .github/workflows/cleanup-branches.yml
|
|
330
|
-
name: Cleanup Merged Branches
|
|
331
|
-
on:
|
|
332
|
-
pull_request:
|
|
333
|
-
types: [closed]
|
|
334
|
-
|
|
335
|
-
jobs:
|
|
336
|
-
cleanup:
|
|
337
|
-
if: github.event.pull_request.merged == true
|
|
338
|
-
runs-on: ubuntu-latest
|
|
339
|
-
steps:
|
|
340
|
-
- name: Delete merged branch
|
|
341
|
-
run: |
|
|
342
|
-
git push origin --delete ${{ github.event.pull_request.head.ref }}
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
## Pull Request Guidelines | 拉取请求指南
|
|
346
|
-
|
|
347
|
-
### 1. PR Best Practices | PR 最佳实践
|
|
348
|
-
|
|
349
|
-
```markdown
|
|
350
|
-
<!-- ✅ Good: PR template -->
|
|
351
|
-
<!-- .github/pull_request_template.md -->
|
|
352
|
-
|
|
353
|
-
## Description
|
|
354
|
-
Brief description of changes and motivation.
|
|
355
|
-
|
|
356
|
-
## Type of Change
|
|
357
|
-
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
358
|
-
- [ ] New feature (non-breaking change which adds functionality)
|
|
359
|
-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
360
|
-
- [ ] Documentation update
|
|
361
|
-
- [ ] Performance improvement
|
|
362
|
-
- [ ] Code refactoring
|
|
363
|
-
|
|
364
|
-
## Testing
|
|
365
|
-
- [ ] Unit tests pass
|
|
366
|
-
- [ ] Integration tests pass
|
|
367
|
-
- [ ] Manual testing completed
|
|
368
|
-
- [ ] New tests added for new functionality
|
|
369
|
-
|
|
370
|
-
## Screenshots (if applicable)
|
|
371
|
-
Before:
|
|
372
|
-
[Screenshot]
|
|
373
|
-
|
|
374
|
-
After:
|
|
375
|
-
[Screenshot]
|
|
376
|
-
|
|
377
|
-
## Checklist
|
|
378
|
-
- [ ] My code follows the project's style guidelines
|
|
379
|
-
- [ ] I have performed a self-review of my own code
|
|
380
|
-
- [ ] I have commented my code, particularly in hard-to-understand areas
|
|
381
|
-
- [ ] I have made corresponding changes to the documentation
|
|
382
|
-
- [ ] My changes generate no new warnings
|
|
383
|
-
- [ ] I have added tests that prove my fix is effective or that my feature works
|
|
384
|
-
- [ ] New and existing unit tests pass locally with my changes
|
|
385
|
-
|
|
386
|
-
## Related Issues
|
|
387
|
-
Fixes #123
|
|
388
|
-
Closes #456
|
|
389
|
-
Related to #789
|
|
390
|
-
|
|
391
|
-
## Additional Notes
|
|
392
|
-
Any additional information that reviewers should know.
|
|
393
|
-
```
|
|
394
|
-
|
|
395
|
-
### 2. Code Review Process | 代码审查流程
|
|
396
|
-
|
|
397
|
-
```bash
|
|
398
|
-
# ✅ Good: Code review workflow
|
|
399
|
-
|
|
400
|
-
# 1. Create feature branch and implement changes
|
|
401
|
-
git checkout -b feature/user-notifications
|
|
402
|
-
# ... implement feature ...
|
|
403
|
-
git add .
|
|
404
|
-
git commit -m "feat: implement real-time user notifications"
|
|
405
|
-
|
|
406
|
-
# 2. Push branch and create PR
|
|
407
|
-
git push origin feature/user-notifications
|
|
408
|
-
gh pr create --title "feat: implement real-time user notifications" \
|
|
409
|
-
--body "Adds WebSocket-based real-time notifications for users"
|
|
410
|
-
|
|
411
|
-
# 3. Address review feedback
|
|
412
|
-
git add .
|
|
413
|
-
git commit -m "fix: address code review feedback
|
|
414
|
-
|
|
415
|
-
- Extract notification logic to separate service
|
|
416
|
-
- Add error handling for WebSocket connections
|
|
417
|
-
- Improve test coverage for edge cases"
|
|
418
|
-
|
|
419
|
-
git push origin feature/user-notifications
|
|
420
|
-
|
|
421
|
-
# 4. Squash commits before merge (if needed)
|
|
422
|
-
git rebase -i HEAD~3 # Interactive rebase to squash commits
|
|
423
|
-
|
|
424
|
-
# 5. Merge PR (different strategies)
|
|
425
|
-
# Merge commit (preserves branch history)
|
|
426
|
-
git checkout main
|
|
427
|
-
git merge --no-ff feature/user-notifications
|
|
428
|
-
|
|
429
|
-
# Squash and merge (clean linear history)
|
|
430
|
-
git checkout main
|
|
431
|
-
git merge --squash feature/user-notifications
|
|
432
|
-
git commit -m "feat: implement real-time user notifications"
|
|
433
|
-
|
|
434
|
-
# Rebase and merge (linear history without merge commit)
|
|
435
|
-
git checkout feature/user-notifications
|
|
436
|
-
git rebase main
|
|
437
|
-
git checkout main
|
|
438
|
-
git merge feature/user-notifications
|
|
439
|
-
|
|
440
|
-
# ✅ Good: Review checklist for reviewers
|
|
441
|
-
# Code Review Checklist:
|
|
442
|
-
# - [ ] Code follows project conventions and style guide
|
|
443
|
-
# - [ ] Logic is clear and well-documented
|
|
444
|
-
# - [ ] Error handling is appropriate
|
|
445
|
-
# - [ ] Security considerations are addressed
|
|
446
|
-
# - [ ] Performance implications are considered
|
|
447
|
-
# - [ ] Tests are comprehensive and meaningful
|
|
448
|
-
# - [ ] Documentation is updated if needed
|
|
449
|
-
# - [ ] No sensitive information is exposed
|
|
450
|
-
# - [ ] Breaking changes are clearly marked
|
|
451
|
-
# - [ ] Code is maintainable and follows SOLID principles
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
## Advanced Git Techniques | 高级 Git 技术
|
|
455
|
-
|
|
456
|
-
### 1. Interactive Rebase | 交互式变基
|
|
457
|
-
|
|
458
|
-
```bash
|
|
459
|
-
# ✅ Good: Clean up commit history before PR
|
|
460
|
-
|
|
461
|
-
# View commit history
|
|
462
|
-
git log --oneline -10
|
|
463
|
-
|
|
464
|
-
# Interactive rebase to clean up last 5 commits
|
|
465
|
-
git rebase -i HEAD~5
|
|
466
|
-
|
|
467
|
-
# In the editor, you can:
|
|
468
|
-
# pick = use commit as-is
|
|
469
|
-
# reword = use commit, but edit the commit message
|
|
470
|
-
# edit = use commit, but stop for amending
|
|
471
|
-
# squash = use commit, but meld into previous commit
|
|
472
|
-
# fixup = like squash, but discard this commit's log message
|
|
473
|
-
# drop = remove commit
|
|
474
|
-
|
|
475
|
-
# Example interactive rebase session:
|
|
476
|
-
pick 1234567 feat: add user authentication
|
|
477
|
-
squash 2345678 fix typo in auth service
|
|
478
|
-
squash 3456789 add missing tests
|
|
479
|
-
reword 4567890 refactor: improve auth logic
|
|
480
|
-
drop 5678901 debug: temporary logging
|
|
481
|
-
|
|
482
|
-
# Result: Clean, meaningful commit history
|
|
483
|
-
```
|
|
484
|
-
|
|
485
|
-
### 2. Git Hooks | Git 钩子
|
|
486
|
-
|
|
487
|
-
```bash
|
|
488
|
-
# ✅ Good: Pre-commit hook for code quality
|
|
489
|
-
# .git/hooks/pre-commit
|
|
490
|
-
#!/bin/sh
|
|
491
|
-
|
|
492
|
-
echo "Running pre-commit checks..."
|
|
493
|
-
|
|
494
|
-
# Run linter
|
|
495
|
-
npm run lint
|
|
496
|
-
if [ $? -ne 0 ]; then
|
|
497
|
-
echo "❌ Linting failed. Please fix errors before committing."
|
|
498
|
-
exit 1
|
|
499
|
-
fi
|
|
500
|
-
|
|
501
|
-
# Run tests
|
|
502
|
-
npm test
|
|
503
|
-
if [ $? -ne 0 ]; then
|
|
504
|
-
echo "❌ Tests failed. Please fix failing tests before committing."
|
|
505
|
-
exit 1
|
|
506
|
-
fi
|
|
507
|
-
|
|
508
|
-
# Check for TODO/FIXME comments in staged files
|
|
509
|
-
if git diff --cached --name-only | xargs grep -l "TODO\|FIXME" > /dev/null; then
|
|
510
|
-
echo "⚠️ Warning: Found TODO/FIXME comments in staged files."
|
|
511
|
-
echo "Consider addressing these before committing:"
|
|
512
|
-
git diff --cached --name-only | xargs grep -n "TODO\|FIXME"
|
|
513
|
-
echo ""
|
|
514
|
-
fi
|
|
515
|
-
|
|
516
|
-
echo "✅ Pre-commit checks passed!"
|
|
517
|
-
|
|
518
|
-
# ✅ Good: Pre-push hook
|
|
519
|
-
# .git/hooks/pre-push
|
|
520
|
-
#!/bin/sh
|
|
521
|
-
|
|
522
|
-
protected_branch='main'
|
|
523
|
-
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
|
|
524
|
-
|
|
525
|
-
if [ $protected_branch = $current_branch ]; then
|
|
526
|
-
echo "❌ Direct push to main branch is not allowed."
|
|
527
|
-
echo "Please create a feature branch and submit a pull request."
|
|
528
|
-
exit 1
|
|
529
|
-
fi
|
|
530
|
-
|
|
531
|
-
echo "✅ Push allowed to $current_branch"
|
|
532
|
-
|
|
533
|
-
# ✅ Good: Commit message hook
|
|
534
|
-
# .git/hooks/commit-msg
|
|
535
|
-
#!/bin/sh
|
|
536
|
-
|
|
537
|
-
commit_regex='^(feat|fix|docs|style|refactor|test|chore|perf|ci|build)(\(.+\))?: .{1,50}'
|
|
538
|
-
|
|
539
|
-
if ! grep -qE "$commit_regex" "$1"; then
|
|
540
|
-
echo "❌ Invalid commit message format!"
|
|
541
|
-
echo "Format: <type>[optional scope]: <description>"
|
|
542
|
-
echo "Example: feat(auth): add user login functionality"
|
|
543
|
-
exit 1
|
|
544
|
-
fi
|
|
545
|
-
|
|
546
|
-
echo "✅ Commit message format is valid"
|
|
547
|
-
```
|
|
548
|
-
|
|
549
|
-
### 3. Git Aliases and Configuration | Git 别名和配置
|
|
550
|
-
|
|
551
|
-
```bash
|
|
552
|
-
# ✅ Good: Useful Git aliases
|
|
553
|
-
git config --global alias.co checkout
|
|
554
|
-
git config --global alias.br branch
|
|
555
|
-
git config --global alias.ci commit
|
|
556
|
-
git config --global alias.st status
|
|
557
|
-
|
|
558
|
-
# Advanced aliases
|
|
559
|
-
git config --global alias.unstage 'reset HEAD --'
|
|
560
|
-
git config --global alias.last 'log -1 HEAD'
|
|
561
|
-
git config --global alias.visual '!gitk'
|
|
562
|
-
|
|
563
|
-
# Pretty log formats
|
|
564
|
-
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
|
|
565
|
-
|
|
566
|
-
git config --global alias.lga "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all"
|
|
567
|
-
|
|
568
|
-
# Useful shortcuts
|
|
569
|
-
git config --global alias.amend 'commit --amend --no-edit'
|
|
570
|
-
git config --global alias.force 'push --force-with-lease'
|
|
571
|
-
git config --global alias.cleanup 'branch --merged | grep -v "\*\|main\|develop" | xargs -n 1 git branch -d'
|
|
572
|
-
|
|
573
|
-
# ✅ Good: Global Git configuration
|
|
574
|
-
git config --global user.name "Your Name"
|
|
575
|
-
git config --global user.email "your.email@example.com"
|
|
576
|
-
|
|
577
|
-
# Editor and diff tool
|
|
578
|
-
git config --global core.editor "code --wait"
|
|
579
|
-
git config --global merge.tool vscode
|
|
580
|
-
git config --global mergetool.vscode.cmd 'code --wait $MERGED'
|
|
581
|
-
|
|
582
|
-
# Line ending handling
|
|
583
|
-
git config --global core.autocrlf input # Linux/Mac
|
|
584
|
-
git config --global core.autocrlf true # Windows
|
|
585
|
-
|
|
586
|
-
# Default branch name
|
|
587
|
-
git config --global init.defaultBranch main
|
|
588
|
-
|
|
589
|
-
# Push behavior
|
|
590
|
-
git config --global push.default simple
|
|
591
|
-
git config --global push.followTags true
|
|
592
|
-
|
|
593
|
-
# Rebase by default when pulling
|
|
594
|
-
git config --global pull.rebase true
|
|
595
|
-
|
|
596
|
-
# Better diff algorithm
|
|
597
|
-
git config --global diff.algorithm histogram
|
|
598
|
-
```
|
|
599
|
-
|
|
600
|
-
## Workflow Automation | 工作流自动化
|
|
601
|
-
|
|
602
|
-
### 1. GitHub Actions for Git Workflow | GitHub Actions Git 工作流
|
|
603
|
-
|
|
604
|
-
```yaml
|
|
605
|
-
# ✅ Good: Automated workflow
|
|
606
|
-
# .github/workflows/pr-workflow.yml
|
|
607
|
-
name: PR Workflow
|
|
608
|
-
|
|
609
|
-
on:
|
|
610
|
-
pull_request:
|
|
611
|
-
branches: [main, develop]
|
|
612
|
-
|
|
613
|
-
jobs:
|
|
614
|
-
validate:
|
|
615
|
-
runs-on: ubuntu-latest
|
|
616
|
-
steps:
|
|
617
|
-
- uses: actions/checkout@v3
|
|
618
|
-
with:
|
|
619
|
-
fetch-depth: 0
|
|
620
|
-
|
|
621
|
-
- name: Setup Node.js
|
|
622
|
-
uses: actions/setup-node@v3
|
|
623
|
-
with:
|
|
624
|
-
node-version: '18'
|
|
625
|
-
cache: 'npm'
|
|
626
|
-
|
|
627
|
-
- name: Install dependencies
|
|
628
|
-
run: npm ci
|
|
629
|
-
|
|
630
|
-
- name: Lint code
|
|
631
|
-
run: npm run lint
|
|
632
|
-
|
|
633
|
-
- name: Run tests
|
|
634
|
-
run: npm test -- --coverage
|
|
635
|
-
|
|
636
|
-
- name: Check commit messages
|
|
637
|
-
run: |
|
|
638
|
-
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
|
|
639
|
-
|
|
640
|
-
- name: Check for breaking changes
|
|
641
|
-
run: |
|
|
642
|
-
if git log --format=%B ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | grep -q "BREAKING CHANGE"; then
|
|
643
|
-
echo "⚠️ Breaking changes detected in this PR"
|
|
644
|
-
echo "breaking_changes=true" >> $GITHUB_OUTPUT
|
|
645
|
-
fi
|
|
646
|
-
|
|
647
|
-
auto-merge:
|
|
648
|
-
needs: validate
|
|
649
|
-
runs-on: ubuntu-latest
|
|
650
|
-
if: github.actor == 'dependabot[bot]'
|
|
651
|
-
steps:
|
|
652
|
-
- name: Enable auto-merge for Dependabot PRs
|
|
653
|
-
run: gh pr merge --auto --merge "$PR_URL"
|
|
654
|
-
env:
|
|
655
|
-
PR_URL: ${{github.event.pull_request.html_url}}
|
|
656
|
-
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
657
|
-
```
|
|
658
|
-
|
|
659
|
-
### 2. Semantic Release | 语义化发布
|
|
660
|
-
|
|
661
|
-
```yaml
|
|
662
|
-
# ✅ Good: Automated versioning and releases
|
|
663
|
-
# .github/workflows/release.yml
|
|
664
|
-
name: Release
|
|
665
|
-
|
|
666
|
-
on:
|
|
667
|
-
push:
|
|
668
|
-
branches: [main]
|
|
669
|
-
|
|
670
|
-
jobs:
|
|
671
|
-
release:
|
|
672
|
-
runs-on: ubuntu-latest
|
|
673
|
-
steps:
|
|
674
|
-
- uses: actions/checkout@v3
|
|
675
|
-
with:
|
|
676
|
-
fetch-depth: 0
|
|
677
|
-
token: ${{ secrets.GITHUB_TOKEN }}
|
|
678
|
-
|
|
679
|
-
- name: Setup Node.js
|
|
680
|
-
uses: actions/setup-node@v3
|
|
681
|
-
with:
|
|
682
|
-
node-version: '18'
|
|
683
|
-
cache: 'npm'
|
|
684
|
-
|
|
685
|
-
- name: Install dependencies
|
|
686
|
-
run: npm ci
|
|
687
|
-
|
|
688
|
-
- name: Run tests
|
|
689
|
-
run: npm test
|
|
690
|
-
|
|
691
|
-
- name: Build
|
|
692
|
-
run: npm run build
|
|
693
|
-
|
|
694
|
-
- name: Semantic Release
|
|
695
|
-
run: npx semantic-release
|
|
696
|
-
env:
|
|
697
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
698
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
699
|
-
|
|
700
|
-
# .releaserc.json
|
|
701
|
-
{
|
|
702
|
-
"branches": ["main"],
|
|
703
|
-
"plugins": [
|
|
704
|
-
"@semantic-release/commit-analyzer",
|
|
705
|
-
"@semantic-release/release-notes-generator",
|
|
706
|
-
"@semantic-release/changelog",
|
|
707
|
-
"@semantic-release/npm",
|
|
708
|
-
"@semantic-release/github",
|
|
709
|
-
[
|
|
710
|
-
"@semantic-release/git",
|
|
711
|
-
{
|
|
712
|
-
"assets": ["CHANGELOG.md", "package.json"],
|
|
713
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
714
|
-
}
|
|
715
|
-
]
|
|
716
|
-
]
|
|
717
|
-
}
|
|
718
|
-
```
|
|
719
|
-
|
|
720
|
-
## Git Workflow Checklist | Git 工作流检查清单
|
|
721
|
-
|
|
722
|
-
- [ ] Branching strategy is defined and documented
|
|
723
|
-
- [ ] Commit message conventions are established
|
|
724
|
-
- [ ] Branch protection rules are configured
|
|
725
|
-
- [ ] PR templates and review process are in place
|
|
726
|
-
- [ ] Git hooks are set up for quality checks
|
|
727
|
-
- [ ] Automated testing runs on all PRs
|
|
728
|
-
- [ ] Release process is automated
|
|
729
|
-
- [ ] Team members are trained on Git workflow
|
|
730
|
-
- [ ] Documentation includes Git workflow guidelines
|
|
731
|
-
- [ ] Regular cleanup of merged branches
|
|
732
|
-
- [ ] Sensitive information is never committed
|
|
733
|
-
- [ ] Large files are handled with Git LFS if needed
|
|
734
|
-
|
|
735
|
-
## Git 工作流检查清单
|
|
736
|
-
|
|
737
|
-
- [ ] 定义并记录分支策略
|
|
738
|
-
- [ ] 建立提交消息约定
|
|
739
|
-
- [ ] 配置分支保护规则
|
|
740
|
-
- [ ] 建立 PR 模板和审查流程
|
|
741
|
-
- [ ] 设置 Git 钩子进行质量检查
|
|
742
|
-
- [ ] 在所有 PR 上运行自动化测试
|
|
743
|
-
- [ ] 自动化发布流程
|
|
744
|
-
- [ ] 团队成员接受 Git 工作流培训
|
|
745
|
-
- [ ] 文档包含 Git 工作流指南
|
|
746
|
-
- [ ] 定期清理已合并的分支
|
|
747
|
-
- [ ] 永远不提交敏感信息
|
|
748
|
-
- [ ] 如需要,使用 Git LFS 处理大文件
|