Skip to content

Commit 7391d10

Browse files
Merge pull request #35 from jentic:complexity-comfort-refinement
fix(spec): refactor complexity_comfort signal
2 parents 8e47695 + 0ef9890 commit 7391d10

3 files changed

Lines changed: 29 additions & 11 deletions

File tree

docs/publishing/overview-template.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,12 @@ The framework works with OpenAPI 3.x and 2.x specifications. It's implementation
9898
- **[Full Specification](specification.md)** — Complete technical specification with normative requirements
9999
- **[Framework Repository](https://github.com/jentic/api-ai-readiness-framework)** — full source specification, contribution guidelines, and issue tracking
100100
- **[Jentic Public APIs](https://github.com/jentic/jentic-public-apis)** — Collection of scored API specifications demonstrating the framework in practice
101-
- **Blog Posts**:
102-
- [Why Most APIs Fail in AI Systems and How to Fix It](https://thenewstack.io/why-most-apis-fail-in-ai-systems-and-how-to-fix-it/) (The New Stack)
103-
- [Is Your OpenAPI AI-Ready?](https://jentic.com/blog/is-your-open-api-ai-ready) (Jentic)
104-
- [Scoring APIs for AI](https://jentic.com/blog/scoring-apis-for-ai) (Jentic)
101+
102+
**Blog Posts**:
103+
104+
- [Why Most APIs Fail in AI Systems and How to Fix It](https://thenewstack.io/why-most-apis-fail-in-ai-systems-and-how-to-fix-it/) (The New Stack)
105+
- [Is Your OpenAPI AI-Ready?](https://jentic.com/blog/is-your-open-api-ai-ready) (Jentic)
106+
- [Scoring APIs for AI](https://jentic.com/blog/scoring-apis-for-ai) (Jentic)
105107

106108
## Contributing
107109

docs/specification/spec.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Jentic API AI-Readiness Framework (JAIRF) Specification
22

3-
## Version 0.2.0
3+
## Version 1.0.0
44

55
This document uses the key words MUST, MUST NOT, SHOULD, SHOULD NOT, and MAY as defined in [BCP 14](https://tools.ietf.org/html/bcp14) [RFC2119](https://tools.ietf.org/html/rfc2119) [RFC8174](https://tools.ietf.org/html/rfc8174) when, and only when, they appear in all capitals, as shown here.
66

@@ -587,14 +587,20 @@ API usability for agents degrades as endpoint count grows — but only after a c
587587
**Formula:**
588588

589589
```text
590-
normalised_endpoint_count = min(1, total_operations / endpoint_baseline)
590+
normalised_endpoint_count = max(0, min(1, (total_operations - 50) / 150))
591591
```
592592

593593
Where:
594594

595595
- `total_operations` is the count of unique forward-callable operations (method + path pairs). [Callbacks](https://spec.openapis.org/oas/v3.2.0.html#callback-object) and [webhooks](https://spec.openapis.org/oas/v3.2.0.html#oas-webhooks) MUST NOT be counted as endpoints.
596-
- `endpoint_baseline` is set at `50`.
596+
- Penalties begin at 50 operations and reach maximum at 200 operations, with linear interpolation between these thresholds.
597597

598+
Examples:
599+
600+
- 50 operations: 0% penalty (comfort zone boundary)
601+
- 100 operations: 33% penalty (moderate complexity)
602+
- 150 operations: 67% penalty (substantial complexity)
603+
- 200+ operations: 100% penalty (monolithic)
598604

599605

600606
##### Normalised Schema Depth (normalised_schema_depth)
@@ -606,20 +612,30 @@ Agent reasoning difficulty can be correlated to object depth, degree of polymorp
606612
**Formula:**
607613

608614
```text
609-
normalised_schema_depth = min(1, max_schema_depth / depth_baseline)
615+
normalised_schema_depth = min(1, (max_schema_depth / depth_baseline) × pct_schemas_exceeding)
610616
```
611617

612618
Where:
613619

614620
- `max_schema_depth` is the deepest nesting found across all schemas
615-
- `depth_baseline` is set at `8`.
621+
- `pct_schemas_exceeding` is the proportion of schemas exceeding the depth threshold:
622+
pct_schemas_exceeding = count(schemas with depth > depth_baseline) / total_schemas
623+
- `depth_baseline` is set at `18`
616624

617625
Schemas referenced by callbacks/webhooks MUST be included in `normalised_schema_depth`, because they contribute to the overall semantic model complexity.
618626

627+
The penalty is proportional to schema depth prevalence, not just maximum depth. An API where 1% of schemas exceed the threshold (outliers) receives 1% of the maximum penalty, while an API where 80% of schemas exceed (uniform complexity) receives 80% of the maximum penalty. This directly models agent operational experience. Agents encounter complexity proportional to its prevalence in the schema set, not based solely on the existence of a single deep schema.
628+
629+
Examples:
630+
631+
- 1% of schemas exceed threshold: 1% of max penalty applied (outlier case)
632+
- 50% of schemas exceed threshold: 50% of max penalty applied
633+
- 80% of schemas exceed threshold: 80% of max penalty applied (uniform complexity)
634+
619635
#### Distinctiveness (distinctiveness)
620636

621637
```text
622-
distinctiveness = 1- avg_semantic_similarity
638+
distinctiveness = 1 - avg_semantic_similarity
623639
```
624640

625641
#### Pagination (pagination)

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "api-ai-readiness-framework",
3-
"version": "0.1.0",
3+
"version": "1.0.0",
44
"description": "A technical specification for the Jentic API AI-Readiness Framework (JAIRF). Defines the signals, dimensions, scoring model, and normalisation rules used to evaluate how interpretable, operable, and trustworthy APIs are for AI systems and autonomous agents.",
55
"main": "index.js",
66
"directories": {

0 commit comments

Comments
 (0)