Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions docs/HELP.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ This document contains the help content for the `detail` command-line program.
* [`detail bugs list`↴](#detail-bugs-list)
* [`detail bugs show`↴](#detail-bugs-show)
* [`detail bugs close`↴](#detail-bugs-close)
* [`detail rules`↴](#detail-rules)
* [`detail rules create`↴](#detail-rules-create)
* [`detail rules list`↴](#detail-rules-list)
* [`detail rules show`↴](#detail-rules-show)
* [`detail satisfying-sort`↴](#detail-satisfying-sort)
* [`detail repos`↴](#detail-repos)
* [`detail repos list`↴](#detail-repos-list)
Expand All @@ -36,6 +40,7 @@ Common workflow:

* `auth` — Manage login credentials
* `bugs` — List, show, and close bugs
* `rules` — Create and inspect rules
* `satisfying-sort` — Run a fun animation. Humans only
* `repos` — Manage repos tracked with Detail
* `skill` — Install the detail-bugs skill
Expand Down Expand Up @@ -171,6 +176,71 @@ Close a bug as resolved or dismissed



## `detail rules`

Create and inspect rules

**Usage:** `detail rules <COMMAND>`

###### **Subcommands:**

* `create` — Start an async rule creation job for a repository
* `list` — List rule creation requests for a repository
* `show` — Show the details or status of a rule creation request



## `detail rules create`

Start an async rule creation job for a repository

**Usage:** `detail rules create [OPTIONS] <REPO>`

###### **Arguments:**

* `<REPO>` — Repository by owner/repo (e.g., usedetail/cli) or repo name

###### **Options:**

* `--description <DESCRIPTION>` — Description of the rule to create
* `--bug-id <BUG_IDS>` — Bug ID to use as context (repeatable)
* `--commit-sha <COMMIT_SHAS>` — Commit SHA to examine for patterns (repeatable)



## `detail rules list`

List rule creation requests for a repository

**Usage:** `detail rules list [OPTIONS] <REPO>`

###### **Arguments:**

* `<REPO>` — Repository by owner/repo (e.g., usedetail/cli) or repo name

###### **Options:**

* `--format <FORMAT>` — Output format

Default value: `table`

Possible values: `table`, `json`




## `detail rules show`

Show the details or status of a rule creation request

**Usage:** `detail rules show <REQUEST_ID>`

###### **Arguments:**

* `<REQUEST_ID>` — Rule creation request ID (rcr_...)



## `detail satisfying-sort`

Run a fun animation. Humans only
Expand Down
287 changes: 287 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,102 @@
"message",
"statusCode"
]
},
"RuleCreationRequestId": {
"type": "string",
"pattern": "^rcr_.*"
},
"RuleStatus": {
"type": "string",
"enum": [
"pending",
"complete",
"failed"
]
},
"CreateRuleInput": {
"type": "object",
"properties": {
"description": {
"type": "string"
},
"bugIds": {
"type": "array",
"items": {
"type": "string"
}
},
"commitShas": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"RuleListItem": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/RuleCreationRequestId"
},
"status": {
"$ref": "#/components/schemas/RuleStatus"
},
"input": {
"$ref": "#/components/schemas/CreateRuleInput"
},
"ruleName": {
"type": "string",
"nullable": true
},
"createdAt": {
"type": "integer"
}
},
"required": [
"id",
"status",
"input",
"createdAt"
]
},
"Rule": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/RuleCreationRequestId"
},
"status": {
"$ref": "#/components/schemas/RuleStatus"
},
"input": {
"$ref": "#/components/schemas/CreateRuleInput"
},
"ruleName": {
"type": "string",
"nullable": true
},
"ruleFiles": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"nullable": true
},
"createdAt": {
"type": "integer"
},
"completedAt": {
"type": "integer"
}
},
"required": [
"id",
"status",
"input",
"createdAt"
]
}
}
},
Expand Down Expand Up @@ -527,6 +623,197 @@
}
}
},
"/public/v1/rules": {
"post": {
"operationId": "createRule",
"summary": "Create a rule",
"description": "Starts an async rule creation job for a repository. Returns a rule creation request ID to poll for the result.",
"security": [
{
"BearerAuth": []
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"repo_id": {
"$ref": "#/components/schemas/RepoId"
},
"input": {
"$ref": "#/components/schemas/CreateRuleInput"
}
},
"required": [
"repo_id",
"input"
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"ruleCreationRequestId": {
"$ref": "#/components/schemas/RuleCreationRequestId"
}
},
"required": [
"ruleCreationRequestId"
]
}
}
}
},
"4XX": {
"description": "Client error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
},
"get": {
"operationId": "listRules",
"summary": "List rules",
"description": "Returns all rule creation requests for a repository, including pending and completed.",
"security": [
{
"BearerAuth": []
}
],
"parameters": [
{
"name": "repo_id",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/RepoId"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"rules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RuleListItem"
}
}
},
"required": [
"rules"
]
}
}
}
},
"4XX": {
"description": "Client error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
}
},
"/public/v1/rules/{rule_creation_request_id}": {
"get": {
"operationId": "getRule",
"summary": "Get a rule",
"description": "Returns full details for a rule, including generated files when complete.",
"security": [
{
"BearerAuth": []
}
],
"parameters": [
{
"name": "rule_creation_request_id",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/RuleCreationRequestId"
}
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Rule"
}
}
}
},
"4XX": {
"description": "Client error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"5XX": {
"description": "Server error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}
}
},
"/public/v1/repos": {
"get": {
"operationId": "listPublicRepos",
Expand Down
Loading
Loading