ai-spector 0.9.21 → 0.9.25

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.
Files changed (99) hide show
  1. package/contracts/bootstrap/config/prototype-screen-map.json +25 -0
  2. package/contracts/bootstrap/config/prototype.config.json +17 -0
  3. package/contracts/bootstrap/config/review-queue-pending.json +4 -0
  4. package/contracts/bootstrap/config/review-queue-registry.json +4 -0
  5. package/contracts/bootstrap/config/review.config.json +5 -0
  6. package/contracts/bootstrap/docs/ENTITY_REGISTRY_MIGRATION.md +192 -0
  7. package/contracts/bootstrap/docs/MIGRATION.md +463 -0
  8. package/contracts/bootstrap/docs/README.md +48 -0
  9. package/contracts/bootstrap/docs/adapters/README.md +32 -0
  10. package/contracts/bootstrap/docs/guides/COMMENTS_ENTITY_MIGRATION.md +195 -0
  11. package/contracts/bootstrap/docs/guides/DOCOPS_MANUAL_FALLBACK.md +177 -0
  12. package/contracts/bootstrap/docs/guides/PROJECT_LAYOUT.md +84 -0
  13. package/contracts/bootstrap/docs/modules/comments.md +77 -0
  14. package/contracts/bootstrap/docs/modules/generate.md +25 -0
  15. package/contracts/bootstrap/docs/modules/graph.md +31 -0
  16. package/contracts/bootstrap/docs/modules/prototype.md +26 -0
  17. package/contracts/bootstrap/docs/modules/review.md +25 -0
  18. package/contracts/bootstrap/docs/modules/translate.md +26 -0
  19. package/contracts/bootstrap/scripts/migrate-entity-registry.sh +55 -0
  20. package/contracts/bootstrap/templates/basic-design/db-design-template.md +177 -0
  21. package/contracts/bootstrap/templates/basic-design/detail-api-template.md +278 -0
  22. package/contracts/bootstrap/templates/basic-design/detail-screen-template.md +281 -0
  23. package/contracts/bootstrap/templates/basic-design/list-api-template.md +130 -0
  24. package/contracts/bootstrap/templates/basic-design/list-screen-template.md +242 -0
  25. package/contracts/bootstrap/templates/detail-design/common/architecture-overview-template.md +302 -0
  26. package/contracts/bootstrap/templates/detail-design/common/deployment-infrastructure-template.md +461 -0
  27. package/contracts/bootstrap/templates/detail-design/common/error-handling-patterns-template.md +460 -0
  28. package/contracts/bootstrap/templates/detail-design/common/integration-patterns-template.md +410 -0
  29. package/contracts/bootstrap/templates/detail-design/common/performance-standards-template.md +406 -0
  30. package/contracts/bootstrap/templates/detail-design/common/security-patterns-template.md +395 -0
  31. package/contracts/bootstrap/templates/detail-design/feature-detail-design-template.md +773 -0
  32. package/contracts/bootstrap/templates/detail-design/feature-list-template.md +39 -0
  33. package/contracts/bootstrap/templates/srs/1-introduction.md +58 -0
  34. package/contracts/bootstrap/templates/srs/2-overall-description.md +91 -0
  35. package/contracts/bootstrap/templates/srs/3-use-case-detail-template.md +142 -0
  36. package/contracts/bootstrap/templates/srs/3-use-cases.md +53 -0
  37. package/contracts/bootstrap/templates/srs/4-system-feature-detail-template.md +131 -0
  38. package/contracts/bootstrap/templates/srs/4-system-features-list-template.md +39 -0
  39. package/contracts/bootstrap/templates/srs/5-data-requirements.md +59 -0
  40. package/contracts/bootstrap/templates/srs/6-external-interfaces.md +56 -0
  41. package/contracts/bootstrap/templates/srs/7-quality-attributes.md +74 -0
  42. package/contracts/bootstrap/templates/srs/8-internationalization.md +36 -0
  43. package/contracts/bootstrap/templates/srs/9-other-requirements.md +46 -0
  44. package/contracts/examples/full-docops.config.json +54 -0
  45. package/contracts/examples/migrate-lifecycle.json +18 -0
  46. package/contracts/examples/minimal-comment-thread/comment-root.json +10 -0
  47. package/contracts/examples/minimal-comment-thread/meta_data.json +22 -0
  48. package/contracts/examples/minimal-docops.config.json +33 -0
  49. package/contracts/examples/minimal-lifecycle.json +17 -0
  50. package/contracts/examples/minimal-prototype.config.json +18 -0
  51. package/contracts/examples/minimal-screen-map.json +25 -0
  52. package/contracts/examples/registry/minimal-document.entity.json +15 -0
  53. package/contracts/examples/registry/minimal-manifest.json +7 -0
  54. package/contracts/examples/registry/minimal-screen.entity.json +11 -0
  55. package/contracts/examples/review/minimal-pending.json +14 -0
  56. package/contracts/examples/review/minimal-registry.json +31 -0
  57. package/contracts/examples/review/minimal-review.config.json +7 -0
  58. package/contracts/schemas/comments/comment_body.schema.json +19 -0
  59. package/contracts/schemas/comments/meta_data.schema.json +59 -0
  60. package/contracts/schemas/docops.config.schema.json +97 -0
  61. package/contracts/schemas/lifecycle.schema.json +43 -0
  62. package/contracts/schemas/prototype/config.schema.json +56 -0
  63. package/contracts/schemas/prototype/screen-map.schema.json +51 -0
  64. package/contracts/schemas/registry/document.entity.schema.json +38 -0
  65. package/contracts/schemas/registry/manifest.schema.json +18 -0
  66. package/contracts/schemas/registry/screen.entity.schema.json +28 -0
  67. package/contracts/schemas/review/registry.schema.json +72 -0
  68. package/contracts/schemas/review/review.config.schema.json +42 -0
  69. package/dist/cli.js +26 -1
  70. package/dist/cli.js.map +1 -1
  71. package/dist/core/docops/bootstrap.d.ts +4 -1
  72. package/dist/core/docops/bootstrap.d.ts.map +1 -1
  73. package/dist/core/docops/bootstrap.js +16 -9
  74. package/dist/core/docops/bootstrap.js.map +1 -1
  75. package/dist/core/docops/guide.d.ts +78 -0
  76. package/dist/core/docops/guide.d.ts.map +1 -0
  77. package/dist/core/docops/guide.js +554 -0
  78. package/dist/core/docops/guide.js.map +1 -0
  79. package/dist/core/docops/migrate.d.ts.map +1 -1
  80. package/dist/core/docops/migrate.js +40 -6
  81. package/dist/core/docops/migrate.js.map +1 -1
  82. package/dist/core/operations/docops.d.ts +8 -0
  83. package/dist/core/operations/docops.d.ts.map +1 -1
  84. package/dist/core/operations/docops.js +40 -0
  85. package/dist/core/operations/docops.js.map +1 -1
  86. package/dist/core/upgrade/checklist.json +2 -2
  87. package/package.json +2 -1
  88. package/scaffold/claude/.claude/skills/_skill-router.md +11 -8
  89. package/scaffold/claude/.claude/skills/ai-spector/references/cli-failures.md +3 -3
  90. package/scaffold/claude/.claude/skills/ai-spector/references/docops-migrate.md +112 -0
  91. package/scaffold/claude/.claude/skills/ai-spector/references/help.md +1 -1
  92. package/scaffold/claude/.claude/skills/ai-spector/references/runbook.md +49 -26
  93. package/scaffold/claude/.claude/skills/ai-spector/skill.md +3 -2
  94. package/scaffold/cursor/skills/_skill-router.md +11 -8
  95. package/scaffold/cursor/skills/ai-spector/SKILL.md +3 -2
  96. package/scaffold/cursor/skills/ai-spector/references/cli-failures.md +3 -3
  97. package/scaffold/cursor/skills/ai-spector/references/docops-migrate.md +112 -0
  98. package/scaffold/cursor/skills/ai-spector/references/help.md +1 -1
  99. package/scaffold/cursor/skills/ai-spector/references/runbook.md +49 -26
@@ -0,0 +1,74 @@
1
+ ## 7. Non-Functional Requirements (Quality Attributes)
2
+
3
+ > This section specifies the non-functional requirements that define the quality attributes, constraints, and performance characteristics of the system. These requirements describe how the system should behave rather than what functions it should perform.
4
+
5
+ ### 7.1 Usability
6
+
7
+ > Specify any requirements regarding characteristics that will make the software appear to be "user-friendly."
8
+
9
+ **Requirements:**
10
+ - **Ease of Use:** <Requirement>
11
+ - **Ease of Learning:** <Requirement>
12
+ - **Accessibility:** <Requirement>
13
+ - **Error Handling:** <Requirement>
14
+
15
+ **UI Design Standards:**
16
+ - <Standard 1>
17
+ - <Standard 2>
18
+
19
+ ### 7.2 Performance
20
+
21
+ > State specific performance requirements for various system operations.
22
+
23
+ | Operation | Response Time Requirement |
24
+ |-----------|---------------------------|
25
+ | <Operation 1> | <Time requirement> |
26
+ | <Operation 2> | <Time requirement> |
27
+
28
+ **Throughput Requirements:**
29
+ - <Requirement 1>
30
+ - <Requirement 2>
31
+
32
+ ### 7.3 Security
33
+
34
+ > Specify any requirements regarding security or privacy issues.
35
+
36
+ **Requirements:**
37
+ - **Access Control:** <Requirement>
38
+ - **Authentication:** <Requirement>
39
+ - **Authorization:** <Requirement>
40
+ - **Data Security:** <Requirement>
41
+ - **Privacy:** <Requirement>
42
+
43
+ **Compliance:**
44
+ - <Compliance requirement 1>
45
+ - <Compliance requirement 2>
46
+
47
+ ### 7.4 Safety
48
+
49
+ > Specify requirements that are concerned with possible loss, damage, or harm.
50
+
51
+ **Requirements:**
52
+ - <Requirement 1>
53
+ - <Requirement 2>
54
+
55
+ **Safeguards:**
56
+ - <Safeguard 1>
57
+ - <Safeguard 2>
58
+
59
+ ### 7.5 Others as relevant
60
+
61
+ > Create a separate section for each additional product quality attribute.
62
+
63
+ **Availability:**
64
+ - <Requirement 1>
65
+ - <Requirement 2>
66
+
67
+ **Reliability:**
68
+ - <Requirement 1>
69
+ - <Requirement 2>
70
+
71
+ **Maintainability:**
72
+ - <Requirement 1>
73
+ - <Requirement 2>
74
+
@@ -0,0 +1,36 @@
1
+ ## 8. Internationalization and Localization Requirements
2
+
3
+ > Internationalization and localization requirements ensure that the product will be suitable for use in nations, cultures, and geographic locations other than those in which it was created.
4
+
5
+ **Supported Languages:**
6
+
7
+ - <Language 1>
8
+ - <Language 2>
9
+
10
+ **Supported Locales:**
11
+
12
+ - <Locale 1>
13
+ - <Locale 2>
14
+
15
+ **Formatting Requirements:**
16
+
17
+ - **Currency:**
18
+ - **Date/Time:**
19
+ - **Numbers:**
20
+ - **Addresses:**
21
+
22
+ **Character Sets:**
23
+
24
+ - <Requirement 1>
25
+ - <Requirement 2>
26
+
27
+ **Cultural Considerations:**
28
+
29
+ - <Consideration 1>
30
+ - <Consideration 2>
31
+
32
+ **Regulatory Compliance:**
33
+
34
+ - <Regulation 1>
35
+ - <Regulation 2>
36
+
@@ -0,0 +1,46 @@
1
+ ## 9. Other Requirements
2
+
3
+ > Examples are: legal, regulatory or financial compliance, and standards requirements; requirements for product installation, configuration, startup, and shutdown; and logging, monitoring and audit trail requirements.
4
+
5
+ ### 9.1 Legal and Regulatory Compliance
6
+
7
+ **Legal Requirements:**
8
+ - <Requirement 1>
9
+ - <Requirement 2>
10
+
11
+ **Regulatory Compliance:**
12
+ - <Compliance requirement 1>
13
+ - <Compliance requirement 2>
14
+
15
+ **Standards Compliance:**
16
+ - <Standard 1>
17
+ - <Standard 2>
18
+
19
+ ### 9.2 Installation and Configuration
20
+
21
+ **Installation Requirements:**
22
+ - <Requirement 1>
23
+ - <Requirement 2>
24
+
25
+ **Configuration Requirements:**
26
+ - <Requirement 1>
27
+ - <Requirement 2>
28
+
29
+ **Startup/Shutdown Requirements:**
30
+ - <Requirement 1>
31
+ - <Requirement 2>
32
+
33
+ ### 9.3 Logging and Monitoring
34
+
35
+ **Logging Requirements:**
36
+ - <Requirement 1>
37
+ - <Requirement 2>
38
+
39
+ **Monitoring Requirements:**
40
+ - <Requirement 1>
41
+ - <Requirement 2>
42
+
43
+ **Audit Trail Requirements:**
44
+ - <Requirement 1>
45
+ - <Requirement 2>
46
+
@@ -0,0 +1,54 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "layout": "docops",
4
+ "docsRoot": "docs",
5
+ "languages": [
6
+ { "code": "en", "label": "English", "path": "en" },
7
+ { "code": "vi", "label": "Vietnamese", "path": "vi" },
8
+ { "code": "jp", "label": "Japanese", "path": "jp" }
9
+ ],
10
+ "primaryLanguage": "en",
11
+ "internalLanguage": "vi",
12
+ "clientLanguage": "jp",
13
+ "docTypes": {
14
+ "srs": {
15
+ "enabled": true,
16
+ "path": "docs/srs",
17
+ "label": "SRS",
18
+ "templatesPath": ".docops/templates/srs"
19
+ },
20
+ "basicDesign": {
21
+ "enabled": true,
22
+ "path": "docs/basic-design",
23
+ "label": "Basic Design",
24
+ "templatesPath": ".docops/templates/basic-design"
25
+ },
26
+ "detailDesign": {
27
+ "enabled": false,
28
+ "path": "docs/detail-design",
29
+ "label": "Detail Design",
30
+ "templatesPath": ".docops/templates/detail-design"
31
+ },
32
+ "otherDocument": {
33
+ "enabled": false,
34
+ "path": "docs/other",
35
+ "label": "Other Document"
36
+ }
37
+ },
38
+ "paths": {
39
+ "registry": ".docops/registry",
40
+ "comments": ".docops/comments",
41
+ "reviewConfig": ".docops/review.config.json",
42
+ "reviewQueue": ".docops/review-queue",
43
+ "prototypeConfig": ".docops/prototype/config.json",
44
+ "prototypeScreenMap": ".docops/prototype/screen-map.json"
45
+ },
46
+ "capabilities": {
47
+ "review": true,
48
+ "comments": true,
49
+ "prototype": true,
50
+ "graph": false,
51
+ "generate": false,
52
+ "translate": false
53
+ }
54
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "version": 1,
3
+ "intent": "migrate",
4
+ "adapter": "ai-spector",
5
+ "updatedAt": "2026-06-29T10:00:00Z",
6
+ "updatedBy": "kari-writer",
7
+ "steps": [
8
+ { "id": "project-created", "status": "done", "completedAt": "2026-06-29T10:00:00Z" },
9
+ { "id": "git-connected", "status": "done", "completedAt": "2026-06-29T10:00:00Z" },
10
+ { "id": "docops-init", "status": "done", "completedAt": "2026-06-29T10:00:00Z" },
11
+ { "id": "legacy-aligned", "status": "in_progress", "helpRef": "guide/MIGRATION.md" },
12
+ { "id": "registry-synced", "status": "pending", "helpRef": "guide/ENTITY_REGISTRY_MIGRATION.md" },
13
+ { "id": "local-adapter-ready", "status": "pending" },
14
+ { "id": "first-docs-generated", "status": "pending" },
15
+ { "id": "review-queue-synced", "status": "pending", "helpRef": "guide/modules/review.md" },
16
+ { "id": "first-push-synced", "status": "pending" }
17
+ ]
18
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "commentId": "comment-root",
3
+ "threadId": "thread-001",
4
+ "body": "Please clarify the login flow requirements.",
5
+ "authorId": 42,
6
+ "createdAt": "2026-06-15T10:00:00.000Z",
7
+ "parentCommentId": null,
8
+ "editedAt": null,
9
+ "deletedAt": null
10
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "threadId": "thread-001",
3
+ "filePath": "srs/01-overview.md",
4
+ "originBranch": "main",
5
+ "commentType": "document",
6
+ "status": "open",
7
+ "version": 1,
8
+ "createdAt": "2026-06-15T10:00:00.000Z",
9
+ "updatedAt": "2026-06-15T10:00:00.000Z",
10
+ "createdBy": 42,
11
+ "resolvedAt": null,
12
+ "resolvedBy": null,
13
+ "resolvedInCommitSha": null,
14
+ "anchor": {
15
+ "branchName": "main",
16
+ "filePath": "srs/01-overview.md",
17
+ "anchorState": "active",
18
+ "startLine": 10,
19
+ "endLine": 12,
20
+ "baseCommitSha": "abc123"
21
+ }
22
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "layout": "docops",
4
+ "docsRoot": "docs",
5
+ "languages": [
6
+ { "code": "en", "label": "English", "path": "en" }
7
+ ],
8
+ "primaryLanguage": "en",
9
+ "docTypes": {
10
+ "srs": {
11
+ "enabled": true,
12
+ "path": "docs/srs",
13
+ "label": "SRS",
14
+ "templatesPath": ".docops/templates/srs"
15
+ }
16
+ },
17
+ "paths": {
18
+ "registry": ".docops/registry",
19
+ "comments": ".docops/comments",
20
+ "reviewConfig": ".docops/review.config.json",
21
+ "reviewQueue": ".docops/review-queue",
22
+ "prototypeConfig": ".docops/prototype/config.json",
23
+ "prototypeScreenMap": ".docops/prototype/screen-map.json"
24
+ },
25
+ "capabilities": {
26
+ "review": false,
27
+ "comments": true,
28
+ "prototype": true,
29
+ "graph": false,
30
+ "generate": false,
31
+ "translate": false
32
+ }
33
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "version": 1,
3
+ "intent": "greenfield",
4
+ "adapter": "ai-spector",
5
+ "updatedAt": "2026-06-29T10:00:00Z",
6
+ "updatedBy": "kari-writer",
7
+ "steps": [
8
+ { "id": "project-created", "status": "done", "completedAt": "2026-06-29T10:00:00Z" },
9
+ { "id": "git-connected", "status": "done", "completedAt": "2026-06-29T10:00:00Z" },
10
+ { "id": "docops-init", "status": "in_progress", "helpRef": "guide/modules/generate.md" },
11
+ { "id": "local-adapter-ready", "status": "pending", "helpRef": "course/en/02-get-started/01-setup-via-chat" },
12
+ { "id": "data-source-added", "status": "pending" },
13
+ { "id": "first-docs-generated", "status": "pending" },
14
+ { "id": "review-queue-synced", "status": "pending", "helpRef": "guide/modules/review.md" },
15
+ { "id": "first-push-synced", "status": "pending" }
16
+ ]
17
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "version": 1,
4
+ "buildMode": "static",
5
+ "techStack": "html",
6
+ "prototypeDir": "prototype",
7
+ "srcDir": "prototype/src",
8
+ "defaultTheme": "vercel",
9
+ "htpasswdFile": "prototype/.htpasswd",
10
+ "basicAuth": {
11
+ "username": "reviewer",
12
+ "password": "change-me",
13
+ "setAt": "2026-06-15T10:00:00.000Z"
14
+ },
15
+ "reviewHost": "https://preview.example.com",
16
+ "projectId": "my-project",
17
+ "deployVersion": "1.0.0"
18
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "buildMode": "static",
4
+ "defaultScreenId": "SCR-001",
5
+ "defaultScreen": {
6
+ "screenId": "SCR-001",
7
+ "displayName": "Login",
8
+ "screenDocPath": "basic-design/screens/login.md",
9
+ "prototypePath": "",
10
+ "route_exists": false
11
+ },
12
+ "screens": [
13
+ {
14
+ "screenId": "SCR-001",
15
+ "displayName": "Login",
16
+ "screenDocPath": "basic-design/screens/login.md",
17
+ "screenDocs": {
18
+ "en": "docs/basic-design/en/screens/login.md"
19
+ },
20
+ "prototypePath": "",
21
+ "route_exists": false,
22
+ "reviewUrl": null
23
+ }
24
+ ]
25
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "entityId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
4
+ "kind": "document",
5
+ "docType": "SRS",
6
+ "logicalPath": "srs/01-overview.md",
7
+ "repoDocs": {
8
+ "en": "docs/srs/en/01-overview.md",
9
+ "vi": "docs/srs/vi/01-overview.md"
10
+ },
11
+ "displayName": "01-overview",
12
+ "aliases": [],
13
+ "createdAt": "2026-06-01T00:00:00.000Z",
14
+ "updatedAt": "2026-06-26T12:00:00.000Z"
15
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "buildMode": "static",
4
+ "defaultScreenId": "SCR-001",
5
+ "themeName": "default",
6
+ "directReviewUrl": false
7
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "screenId": "SCR-001",
4
+ "kind": "prototype_screen",
5
+ "displayName": "Login",
6
+ "documentEntityId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
7
+ "prototypePath": "src/login.html",
8
+ "route_exists": true,
9
+ "reviewUrl": null,
10
+ "updatedAt": "2026-06-26T12:00:00.000Z"
11
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 2,
3
+ "jobs": [
4
+ {
5
+ "id": "srs/01-overview:internal",
6
+ "logicalPath": "srs/01-overview",
7
+ "track": "internal",
8
+ "reason": "first_review",
9
+ "queuedAt": "2026-06-15T10:00:00.000Z",
10
+ "baselineHash": null,
11
+ "currentHash": "abc123def456ef78"
12
+ }
13
+ ]
14
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "version": 3,
3
+ "documents": {
4
+ "srs/01-overview": {
5
+ "logicalPath": "srs/01-overview",
6
+ "docPath": "docs/srs/en/01-overview.md",
7
+ "contentHash": "abc123def456ef78",
8
+ "overallStatus": "pending_internal",
9
+ "internal": {
10
+ "status": "pending",
11
+ "votes": [],
12
+ "quorumMetAt": null,
13
+ "closedAt": null,
14
+ "closedBy": null,
15
+ "closeReason": null,
16
+ "reopenedAt": null,
17
+ "invalidatedAt": null
18
+ },
19
+ "client": {
20
+ "status": "pending",
21
+ "votes": [],
22
+ "quorumMetAt": null,
23
+ "closedAt": null,
24
+ "closedBy": null,
25
+ "closeReason": null,
26
+ "reopenedAt": null
27
+ },
28
+ "lastEventAt": "2026-06-15T10:00:00.000Z"
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "schemaVersion": "1.0",
3
+ "extends": "kaopiz-default",
4
+ "meta": {
5
+ "source": "agent"
6
+ }
7
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://kari-writer.local/contracts/schemas/comments/comment_body.schema.json",
4
+ "title": "CommentBody",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["commentId", "threadId", "body", "authorId", "createdAt"],
8
+ "properties": {
9
+ "commentId": { "type": "string", "minLength": 1 },
10
+ "threadId": { "type": "string", "minLength": 1 },
11
+ "body": { "type": "string" },
12
+ "authorId": { "type": "integer" },
13
+ "createdAt": { "type": "string" },
14
+ "parentCommentId": { "type": ["string", "null"] },
15
+ "editedAt": { "type": ["string", "null"] },
16
+ "deletedAt": { "type": ["string", "null"] },
17
+ "anchor": { "type": "object", "additionalProperties": true }
18
+ }
19
+ }
@@ -0,0 +1,59 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://kari-writer.local/contracts/schemas/comments/meta_data.schema.json",
4
+ "title": "CommentThreadMeta",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "threadId",
9
+ "commentType",
10
+ "status",
11
+ "version",
12
+ "createdAt",
13
+ "anchor"
14
+ ],
15
+ "properties": {
16
+ "threadId": { "type": "string", "minLength": 1 },
17
+ "targetId": { "type": "string", "minLength": 1 },
18
+ "filePath": { "type": "string", "minLength": 1 },
19
+ "originBranch": { "type": "string" },
20
+ "commentType": {
21
+ "type": "string",
22
+ "enum": ["document", "prototype"]
23
+ },
24
+ "status": {
25
+ "type": "string",
26
+ "enum": ["open", "resolved"]
27
+ },
28
+ "version": {
29
+ "type": "integer",
30
+ "minimum": 1,
31
+ "description": "Concurrency token — bump on each thread mutation"
32
+ },
33
+ "createdAt": { "type": "string" },
34
+ "updatedAt": { "type": "string" },
35
+ "createdBy": { "type": "integer" },
36
+ "resolvedAt": { "type": ["string", "null"] },
37
+ "resolvedBy": { "type": ["integer", "null"] },
38
+ "resolvedInCommitSha": { "type": ["string", "null"] },
39
+ "anchor": { "$ref": "#/$defs/anchor" }
40
+ },
41
+ "$defs": {
42
+ "anchor": {
43
+ "type": "object",
44
+ "additionalProperties": true,
45
+ "required": ["filePath"],
46
+ "properties": {
47
+ "branchName": { "type": "string" },
48
+ "filePath": { "type": "string", "minLength": 1 },
49
+ "anchorState": {
50
+ "type": "string",
51
+ "enum": ["active", "stale", "orphaned"]
52
+ },
53
+ "startLine": { "type": "integer", "minimum": 1 },
54
+ "endLine": { "type": "integer", "minimum": 1 },
55
+ "baseCommitSha": { "type": "string" }
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,97 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://kari-writer.local/contracts/schemas/docops.config.schema.json",
4
+ "title": "DocopsConfig",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["schemaVersion"],
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "type": "string",
11
+ "const": "1.0"
12
+ },
13
+ "layout": {
14
+ "type": "string",
15
+ "enum": ["docops"],
16
+ "description": "When set to docops, Writer reads comments/review/prototype from .docops/ paths only. Omit for legacy ai-spector layout."
17
+ },
18
+ "docsRoot": {
19
+ "type": "string",
20
+ "default": "docs",
21
+ "minLength": 1
22
+ },
23
+ "languages": {
24
+ "type": "array",
25
+ "items": {
26
+ "type": "object",
27
+ "additionalProperties": true,
28
+ "required": ["code", "label"],
29
+ "properties": {
30
+ "code": { "type": "string", "minLength": 1 },
31
+ "label": { "type": "string", "minLength": 1 },
32
+ "path": { "type": "string", "minLength": 1 }
33
+ }
34
+ }
35
+ },
36
+ "primaryLanguage": { "type": "string", "minLength": 1 },
37
+ "internalLanguage": { "type": "string", "minLength": 1 },
38
+ "clientLanguage": { "type": "string", "minLength": 1 },
39
+ "docTypes": {
40
+ "type": "object",
41
+ "additionalProperties": {
42
+ "type": "object",
43
+ "additionalProperties": true,
44
+ "required": ["enabled", "path"],
45
+ "properties": {
46
+ "enabled": { "type": "boolean" },
47
+ "path": { "type": "string", "minLength": 1 },
48
+ "label": { "type": "string" },
49
+ "templatesPath": { "type": "string", "minLength": 1 }
50
+ }
51
+ },
52
+ "properties": {
53
+ "srs": { "$ref": "#/$defs/docType" },
54
+ "basicDesign": { "$ref": "#/$defs/docType" },
55
+ "detailDesign": { "$ref": "#/$defs/docType" },
56
+ "otherDocument": { "$ref": "#/$defs/docType" }
57
+ }
58
+ },
59
+ "paths": {
60
+ "type": "object",
61
+ "additionalProperties": { "type": "string", "minLength": 1 },
62
+ "properties": {
63
+ "comments": { "type": "string", "minLength": 1 },
64
+ "reviewConfig": { "type": "string", "minLength": 1 },
65
+ "reviewQueue": { "type": "string", "minLength": 1 },
66
+ "registry": { "type": "string", "minLength": 1 },
67
+ "prototypeConfig": { "type": "string", "minLength": 1 },
68
+ "prototypeScreenMap": { "type": "string", "minLength": 1 }
69
+ }
70
+ },
71
+ "capabilities": {
72
+ "type": "object",
73
+ "additionalProperties": { "type": "boolean" },
74
+ "properties": {
75
+ "review": { "type": "boolean" },
76
+ "comments": { "type": "boolean" },
77
+ "prototype": { "type": "boolean" },
78
+ "graph": { "type": "boolean" },
79
+ "generate": { "type": "boolean" },
80
+ "translate": { "type": "boolean" }
81
+ }
82
+ }
83
+ },
84
+ "$defs": {
85
+ "docType": {
86
+ "type": "object",
87
+ "additionalProperties": true,
88
+ "required": ["enabled", "path"],
89
+ "properties": {
90
+ "enabled": { "type": "boolean" },
91
+ "path": { "type": "string", "minLength": 1 },
92
+ "label": { "type": "string" },
93
+ "templatesPath": { "type": "string", "minLength": 1 }
94
+ }
95
+ }
96
+ }
97
+ }