Skip to content

armgit / cogit

Public Imported from GitHub
0

Git for the intent behind agent-written code. Records what your coding agent decided and why, and links every commit to it.

12.9 KB
Raw Blame
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "schema": {
      "type": "number",
      "const": 1
    },
    "sessionId": {
      "type": "string",
      "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
    },
    "agent": {
      "default": "claude-code",
      "type": "string",
      "minLength": 1,
      "maxLength": 64
    },
    "title": {
      "default": "",
      "type": "string",
      "maxLength": 200
    },
    "startedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "status": {
      "default": {
        "goal": "",
        "done": [],
        "pending": [],
        "next": ""
      },
      "type": "object",
      "properties": {
        "goal": {
          "default": "",
          "type": "string",
          "maxLength": 500
        },
        "done": {
          "default": [],
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 500
          }
        },
        "pending": {
          "default": [],
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "text": {
                "type": "string",
                "minLength": 1,
                "maxLength": 500
              },
              "needsUser": {
                "default": false,
                "type": "boolean"
              }
            },
            "required": [
              "text",
              "needsUser"
            ],
            "additionalProperties": false
          }
        },
        "next": {
          "default": "",
          "type": "string",
          "maxLength": 500
        }
      },
      "required": [
        "goal",
        "done",
        "pending",
        "next"
      ],
      "additionalProperties": false
    },
    "leftOff": {
      "type": "string",
      "maxLength": 400
    },
    "nodes": {
      "default": [],
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$"
          },
          "parent": {
            "default": null,
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}(:[A-Za-z0-9][A-Za-z0-9_.-]{0,127})?$"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "phase",
              "message",
              "step",
              "decision",
              "question"
            ]
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "summary": {
            "type": "string",
            "maxLength": 2000
          },
          "why": {
            "type": "string",
            "maxLength": 2000
          },
          "at": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "decidedBy": {
            "type": "string",
            "enum": [
              "user",
              "agent",
              "agreed"
            ]
          },
          "alternatives": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "option": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "why": {
                  "default": "",
                  "type": "string",
                  "maxLength": 500
                }
              },
              "required": [
                "option",
                "why"
              ],
              "additionalProperties": false
            }
          },
          "commits": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9a-f]{7,40}$"
            }
          },
          "files": {
            "maxItems": 30,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          },
          "links": {
            "maxItems": 5,
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}(:[A-Za-z0-9][A-Za-z0-9_.-]{0,127})?$"
            }
          },
          "branch": {
            "type": "object",
            "properties": {
              "title": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "asked": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300
              },
              "outcome": {
                "type": "string",
                "minLength": 1,
                "maxLength": 600
              },
              "open": {
                "default": "",
                "type": "string",
                "maxLength": 300
              }
            },
            "required": [
              "title",
              "asked",
              "outcome",
              "open"
            ],
            "additionalProperties": false
          },
          "work": {
            "maxItems": 20,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            }
          },
          "agentDecisions": {
            "maxItems": 10,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "why": {
                  "default": "",
                  "type": "string",
                  "maxLength": 500
                },
                "alternatives": {
                  "maxItems": 10,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "option": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 200
                      },
                      "why": {
                        "default": "",
                        "type": "string",
                        "maxLength": 500
                      }
                    },
                    "required": [
                      "option",
                      "why"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "title",
                "why"
              ],
              "additionalProperties": false
            }
          },
          "shape": {
            "type": "object",
            "properties": {
              "tools": {
                "default": [],
                "maxItems": 3,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 40
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 4000
                    },
                    "valid": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "kind",
                    "text"
                  ],
                  "additionalProperties": false
                }
              },
              "by": {
                "type": "string",
                "enum": [
                  "agent",
                  "side"
                ]
              },
              "commits": {
                "default": [],
                "maxItems": 20,
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{7,40}$"
                }
              },
              "at": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "tools",
              "commits"
            ],
            "additionalProperties": false
          },
          "by": {
            "type": "object",
            "propertyNames": {
              "type": "string",
              "maxLength": 40
            },
            "additionalProperties": {
              "type": "string",
              "enum": [
                "agent",
                "side"
              ]
            }
          },
          "addedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "touchedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "change": {
            "type": "object",
            "properties": {
              "added": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "removed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "files": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "added",
              "removed",
              "files"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "parent",
          "kind",
          "title"
        ],
        "additionalProperties": false
      }
    },
    "worktree": {
      "type": "object",
      "properties": {
        "path": {
          "type": "string",
          "minLength": 1
        },
        "branch": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "path",
        "branch"
      ],
      "additionalProperties": false
    },
    "author": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "authorEmail": {
      "type": "string",
      "minLength": 3,
      "maxLength": 320
    },
    "lastRecordedBy": {
      "type": "string",
      "enum": [
        "agent",
        "side"
      ]
    }
  },
  "required": [
    "schema",
    "sessionId",
    "agent",
    "title",
    "startedAt",
    "updatedAt",
    "status",
    "nodes"
  ],
  "additionalProperties": false
}