Repository navigation
Expand file tree
/
Copy pathsource-control.schema.json
More file actions
156 lines (156 loc) · 8.58 KB
/
Copy pathsource-control.schema.json
File metadata and controls
156 lines (156 loc) · 8.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://raw.githubusercontent.com/melodic-software/claude-code-plugins/main/plugins/source-control/schemas/source-control.schema.json",
"title": "source-control team config",
"description": "Schema for a repository's docs/conventions/source-control.yaml, the team layer of the source-control plugin's YAML settings. Each key here wins over the plugin's userConfig value of the same name. Resolution: plugins/source-control/reference/config-resolution.md.",
"type": "object",
"additionalProperties": false,
"properties": {
"$schema": { "type": "string" },
"pr_open_state": {
"enum": ["draft", "ready"],
"default": "ready",
"description": "State /source-control:pull-request create leaves a pull request in. ready runs /source-control:pull-request ready on the new pull request, which flips it after its gates; draft leaves it a draft for that action to flip later."
},
"subject_pattern": {
"type": "string",
"minLength": 1,
"description": "The commit-subject convention: the literal keyword Conventional Commits, or one anchored regex. Exactly one value, never a list; several accepted shapes are alternation inside the one regex. Unset falls through to the repository's own CLAUDE.md, rules or commit-msg hook, then the bundled Conventional Commits default."
},
"type_list": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 },
"description": "The commit type vocabulary. Meaningful only when subject_pattern is Conventional-Commits-shaped; a list inherited from a lower layer is dropped when the effective subject_pattern is a custom regex. A closed list: the winning layer's list is taken whole."
},
"pr_title_pattern": {
"type": "string",
"minLength": 1,
"description": "The pull-request title shape: an anchored regex, or the deferral marker spelled exactly Same as `subject_pattern`. (capital S, backticked key, trailing period)."
},
"trailer_policy": {
"type": "string",
"minLength": 1,
"description": "The attribution-trailer template /source-control:commit appends, or none. Unset applies the skill's default trailer."
},
"pr_body_attribution": {
"type": "string",
"minLength": 1,
"description": "The attribution line /source-control:pull-request create appends to the PR body, or none. Unset applies the default Generated with Claude Code line. Separate from trailer_policy on purpose: a commit trailer and a PR-body line are different surfaces."
},
"pr_body_required_sections": {
"description": "The PR-body section scaffold /source-control:pull-request create drafts and pre-checks before gh pr create: a list of H2 headings, or one keyword. briefing drafts Why, What changed, Scope, Tradeoffs, Risk and Verification and requires Why, What changed, Scope and Verification. summary-test-plan requires Summary and Test plan. none requires nothing. Unset falls through to briefing. A closed list: the winning layer's list is taken whole, never unioned.",
"oneOf": [
{ "enum": ["briefing", "summary-test-plan", "none"] },
{
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": { "type": "string", "minLength": 1 }
}
]
},
"babysit_loop_stop_mode": {
"enum": ["standing", "drain"],
"default": "standing",
"description": "The /source-control:babysit-loop lane's stop shape: standing keeps watching, drain stops once the target repository has no open pull requests and no open issues (exclusions: the babysit-loop skill's Stop modes). An invocation argument overrides it. For one release a key absent here is read from the ## babysit_loop_stop_mode section of .claude/source-control.md."
},
"babysit_loop_tier": {
"enum": ["safe", "worker", "autopilot"],
"default": "safe",
"description": "The babysit-prs tier the loop lane runs, the named preset over the autonomy dimensions. Never widens the merge dimension. An invocation argument overrides it. For one release a key absent here is read from the ## babysit_loop_tier section of .claude/source-control.md."
},
"babysit_loop_merge": {
"enum": ["human-only", "c2-mechanical", "c3-autonomous", "full-autonomy"],
"description": "The loop lane's standing merge rung, ordered human-only < c2-mechanical < c3-autonomous < full-autonomy. A raise binds from this team layer only; every other source may only lower it. Absent, it is human-only while the team layer carries no babysit_loop_* key and c2-mechanical once it does. For one release a key absent here is read from the ## babysit_loop_merge section of .claude/source-control.md. The unattended merge gate reads both and takes the lower, so a raise needs both files while the legacy file exists."
},
"babysit_loop_grace_window_minutes": {
"type": "integer",
"minimum": 1,
"default": 30,
"description": "The loop lane's concurrency-safety activity grace window, in minutes. An invocation argument overrides it. For one release a key absent here is read from the ## babysit_loop_grace_window_minutes section of .claude/source-control.md."
},
"branch_issue_pattern": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "A POSIX ERE /source-control:pull-request create uses to parse the work-item reference from the branch name; its last capture group holds the reference, an issue number or a tracker key. At most 200 characters, every repetition bound at most 16, no quantifier on a group that already holds one, no backreference. Unset falls through to the deprecated userConfig value, then the built-in <type>/<N>-<slug> convention."
},
"pre_ready": {
"type": "array",
"maxItems": 5,
"allOf": [
{
"contains": {
"properties": { "step": { "const": "base-merge" } },
"required": ["step"]
},
"minContains": 0,
"maxContains": 1
},
{
"contains": {
"properties": { "step": { "const": "plan-evidence" } },
"required": ["step"]
},
"minContains": 0,
"maxContains": 1
},
{
"contains": {
"properties": { "step": { "const": "code-review" } },
"required": ["step"]
},
"minContains": 0,
"maxContains": 1
},
{
"contains": {
"properties": { "step": { "const": "security-review" } },
"required": ["step"]
},
"minContains": 0,
"maxContains": 1
},
{
"contains": {
"properties": { "step": { "const": "verify" } },
"required": ["step"]
},
"minContains": 0,
"maxContains": 1
}
],
"description": "Which pre-flip steps /source-control:pull-request ready runs, read at the pull request's base branch and honored only when that base is the base repository's default branch. A list of {step, enabled} mappings rather than a mapping keyed by step, so the shared YAML-subset reader reads each item by index. A step the list leaves out runs. The hold checks, the push and the flip are not steps here and always run. Each step appears at most once (the allOf maxContains entries); the reader runs every step when one repeats, names an unknown step, or the list does not parse.",
"default": [
{ "step": "base-merge", "enabled": true },
{ "step": "plan-evidence", "enabled": true },
{ "step": "code-review", "enabled": true },
{ "step": "security-review", "enabled": true },
{ "step": "verify", "enabled": true }
],
"items": {
"type": "object",
"additionalProperties": false,
"required": ["step", "enabled"],
"properties": {
"step": {
"enum": [
"base-merge",
"plan-evidence",
"code-review",
"security-review",
"verify"
],
"description": "base-merge: merge the base into the head. plan-evidence: gather the review evidence a plan's Review: value asks for. code-review and security-review: the fresh-context reviews of the pull request's diff. verify: the verify gate on the merged head."
},
"enabled": {
"type": "boolean",
"description": "false skips the step and reports it as disabled by pre_ready at the base branch, never as passing."
}
}
}
}
}
}