jekyll-agent-audit 0.1.0
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.
- checksums.yaml +7 -0
- data/CHANGELOG.md +8 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +17 -0
- data/README.md +180 -0
- data/Rakefile +38 -0
- data/doc/Jekyll/AgentAudit/BuildInventory.md +29 -0
- data/doc/Jekyll/AgentAudit/Configuration.md +42 -0
- data/doc/Jekyll/AgentAudit/ConfigurationError.md +6 -0
- data/doc/Jekyll/AgentAudit/Error.md +6 -0
- data/doc/Jekyll/AgentAudit/Extractor.md +20 -0
- data/doc/Jekyll/AgentAudit/Finding.md +30 -0
- data/doc/Jekyll/AgentAudit/InputError.md +6 -0
- data/doc/Jekyll/AgentAudit/LinkGraph.md +26 -0
- data/doc/Jekyll/AgentAudit/Registry.md +38 -0
- data/doc/Jekyll/AgentAudit/Report.md +27 -0
- data/doc/Jekyll/AgentAudit/ReportError.md +6 -0
- data/doc/Jekyll/AgentAudit/Reporters/Console.md +19 -0
- data/doc/Jekyll/AgentAudit/Reporters/JSON.md +9 -0
- data/doc/Jekyll/AgentAudit/Reporters.md +5 -0
- data/doc/Jekyll/AgentAudit/Rules/Provenance.md +127 -0
- data/doc/Jekyll/AgentAudit/Rules/Publication.md +73 -0
- data/doc/Jekyll/AgentAudit/Rules.md +5 -0
- data/doc/Jekyll/AgentAudit/Runner.md +13 -0
- data/doc/Jekyll/AgentAudit/UrlResolver.md +13 -0
- data/doc/Jekyll/AgentAudit.md +35 -0
- data/doc/Jekyll/Commands/AgentAudit/CommandParser.md +9 -0
- data/doc/Jekyll/Commands/AgentAudit/ParserErrors.md +9 -0
- data/doc/Jekyll/Commands/AgentAudit.md +13 -0
- data/doc/Jekyll/Commands.md +5 -0
- data/doc/Jekyll.md +5 -0
- data/doc/README.md +180 -0
- data/doc/index.csv +154 -0
- data/docs/example-report.json +281 -0
- data/docs/implementation-plan.md +26 -0
- data/docs/limitations.md +31 -0
- data/docs/verification.md +52 -0
- data/lib/jekyll/agent_audit/build_inventory.rb +196 -0
- data/lib/jekyll/agent_audit/command.rb +179 -0
- data/lib/jekyll/agent_audit/configuration.rb +196 -0
- data/lib/jekyll/agent_audit/errors.rb +10 -0
- data/lib/jekyll/agent_audit/extractor.rb +230 -0
- data/lib/jekyll/agent_audit/finding.rb +57 -0
- data/lib/jekyll/agent_audit/link_graph.rb +82 -0
- data/lib/jekyll/agent_audit/registry.rb +133 -0
- data/lib/jekyll/agent_audit/report.rb +79 -0
- data/lib/jekyll/agent_audit/reporters/console.rb +144 -0
- data/lib/jekyll/agent_audit/reporters/json.rb +16 -0
- data/lib/jekyll/agent_audit/rules/provenance.rb +412 -0
- data/lib/jekyll/agent_audit/rules/publication.rb +186 -0
- data/lib/jekyll/agent_audit/runner.rb +266 -0
- data/lib/jekyll/agent_audit/url_resolver.rb +98 -0
- data/lib/jekyll/agent_audit/version.rb +7 -0
- data/lib/jekyll-agent-audit.rb +24 -0
- data/llms.txt +35 -0
- data/schema/report-1.0.json +66 -0
- data/script/benchmark.rb +68 -0
- metadata +133 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# Module Jekyll::AgentAudit::Rules::Provenance <a id="module-Jekyll-AgentAudit-Rules-Provenance"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/jekyll/agent_audit/rules/provenance.rb |
|
|
6
|
+
|
|
7
|
+
## Constants
|
|
8
|
+
### `ARTICLE_TYPES` <a id="constant-ARTICLE_TYPES"></a> <a id="ARTICLE_TYPES-constant"></a>
|
|
9
|
+
Not documented.
|
|
10
|
+
|
|
11
|
+
### `INTENT_KEYS` <a id="constant-INTENT_KEYS"></a> <a id="INTENT_KEYS-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
14
|
+
## Public Class Methods
|
|
15
|
+
### `ambiguous_article?(document, context)` <a id="method-c-ambiguous_article-3F"></a> <a id="ambiguous_article?-class_method"></a>
|
|
16
|
+
- **@return** [Boolean]
|
|
17
|
+
|
|
18
|
+
### `article?(node)` <a id="method-c-article-3F"></a> <a id="article?-class_method"></a>
|
|
19
|
+
- **@return** [Boolean]
|
|
20
|
+
|
|
21
|
+
### `author_identity_kind(value)` <a id="method-c-author_identity_kind"></a> <a id="author_identity_kind-class_method"></a>
|
|
22
|
+
Not documented.
|
|
23
|
+
|
|
24
|
+
### `author_set(value)` <a id="method-c-author_set"></a> <a id="author_set-class_method"></a>
|
|
25
|
+
Not documented.
|
|
26
|
+
|
|
27
|
+
### `author_sources(document, context)` <a id="method-c-author_sources"></a> <a id="author_sources-class_method"></a>
|
|
28
|
+
Not documented.
|
|
29
|
+
|
|
30
|
+
### `canonical_urls(document, context)` <a id="method-c-canonical_urls"></a> <a id="canonical_urls-class_method"></a>
|
|
31
|
+
Not documented.
|
|
32
|
+
|
|
33
|
+
### `collect_nodes(value, result, line_number = nil)` <a id="method-c-collect_nodes"></a> <a id="collect_nodes-class_method"></a>
|
|
34
|
+
Not documented.
|
|
35
|
+
|
|
36
|
+
### `comparable_date(values, context)` <a id="method-c-comparable_date"></a> <a id="comparable_date-class_method"></a>
|
|
37
|
+
Not documented.
|
|
38
|
+
|
|
39
|
+
### `date_order(document, context)` <a id="method-c-date_order"></a> <a id="date_order-class_method"></a>
|
|
40
|
+
Not documented.
|
|
41
|
+
|
|
42
|
+
### `disjoint?(a, b)` <a id="method-c-disjoint-3F"></a> <a id="disjoint?-class_method"></a>
|
|
43
|
+
- **@return** [Boolean]
|
|
44
|
+
|
|
45
|
+
### `draft(document, message, observation, line = nil, related_locations = [])` <a id="method-c-draft"></a> <a id="draft-class_method"></a>
|
|
46
|
+
Not documented.
|
|
47
|
+
|
|
48
|
+
### `evaluate(id, document, context)` <a id="method-c-evaluate"></a> <a id="evaluate-class_method"></a>
|
|
49
|
+
Not documented.
|
|
50
|
+
|
|
51
|
+
### `explicit_sources(document, field)` <a id="method-c-explicit_sources"></a> <a id="explicit_sources-class_method"></a>
|
|
52
|
+
Not documented.
|
|
53
|
+
|
|
54
|
+
### `infer_seo_rendered_fallback!(values, document, context)` <a id="method-c-infer_seo_rendered_fallback-21"></a> <a id="infer_seo_rendered_fallback!-class_method"></a>
|
|
55
|
+
Not documented.
|
|
56
|
+
|
|
57
|
+
### `intent_value(data, field)` <a id="method-c-intent_value"></a> <a id="intent_value-class_method"></a>
|
|
58
|
+
Not documented.
|
|
59
|
+
|
|
60
|
+
### `interval_before?(a, b)` <a id="method-c-interval_before-3F"></a> <a id="interval_before?-class_method"></a>
|
|
61
|
+
- **@return** [Boolean]
|
|
62
|
+
|
|
63
|
+
### `invalid_dates(document, context)` <a id="method-c-invalid_dates"></a> <a id="invalid_dates-class_method"></a>
|
|
64
|
+
Not documented.
|
|
65
|
+
|
|
66
|
+
### `invalid_jsonld(document)` <a id="method-c-invalid_jsonld"></a> <a id="invalid_jsonld-class_method"></a>
|
|
67
|
+
Not documented.
|
|
68
|
+
|
|
69
|
+
### `jsonld_nodes(document)` <a id="method-c-jsonld_nodes"></a> <a id="jsonld_nodes-class_method"></a>
|
|
70
|
+
Not documented.
|
|
71
|
+
|
|
72
|
+
### `line(script)` <a id="method-c-line"></a> <a id="line-class_method"></a>
|
|
73
|
+
Not documented.
|
|
74
|
+
|
|
75
|
+
### `locations_for(sources)` <a id="method-c-locations_for"></a> <a id="locations_for-class_method"></a>
|
|
76
|
+
Not documented.
|
|
77
|
+
|
|
78
|
+
### `metadata_comparable?(document, context)` <a id="method-c-metadata_comparable-3F"></a> <a id="metadata_comparable?-class_method"></a>
|
|
79
|
+
- **@return** [Boolean]
|
|
80
|
+
|
|
81
|
+
### `metadata_conflict(document, context)` <a id="method-c-metadata_conflict"></a> <a id="metadata_conflict-class_method"></a>
|
|
82
|
+
Not documented.
|
|
83
|
+
|
|
84
|
+
### `metadata_sources(document, field)` <a id="method-c-metadata_sources"></a> <a id="metadata_sources-class_method"></a>
|
|
85
|
+
Not documented.
|
|
86
|
+
|
|
87
|
+
### `normalize_name(value)` <a id="method-c-normalize_name"></a> <a id="normalize_name-class_method"></a>
|
|
88
|
+
Not documented.
|
|
89
|
+
|
|
90
|
+
### `overlaps?(a, b)` <a id="method-c-overlaps-3F"></a> <a id="overlaps?-class_method"></a>
|
|
91
|
+
- **@return** [Boolean]
|
|
92
|
+
|
|
93
|
+
### `parse_date(value, context)` <a id="method-c-parse_date"></a> <a id="parse_date-class_method"></a>
|
|
94
|
+
Not documented.
|
|
95
|
+
|
|
96
|
+
### `primary_article(document, context)` <a id="method-c-primary_article"></a> <a id="primary_article-class_method"></a>
|
|
97
|
+
Not documented.
|
|
98
|
+
|
|
99
|
+
### `provenance_sources(document, context)` <a id="method-c-provenance_sources"></a> <a id="provenance_sources-class_method"></a>
|
|
100
|
+
Not documented.
|
|
101
|
+
|
|
102
|
+
### `publisher_sources(document, context)` <a id="method-c-publisher_sources"></a> <a id="publisher_sources-class_method"></a>
|
|
103
|
+
Not documented.
|
|
104
|
+
|
|
105
|
+
### `resolved_value(value, document, context)` <a id="method-c-resolved_value"></a> <a id="resolved_value-class_method"></a>
|
|
106
|
+
Not documented.
|
|
107
|
+
|
|
108
|
+
### `scripts(document)` <a id="method-c-scripts"></a> <a id="scripts-class_method"></a>
|
|
109
|
+
Not documented.
|
|
110
|
+
|
|
111
|
+
### `seo_fallback_date?(graph, document, context)` <a id="method-c-seo_fallback_date-3F"></a> <a id="seo_fallback_date?-class_method"></a>
|
|
112
|
+
- **@return** [Boolean]
|
|
113
|
+
|
|
114
|
+
### `seo_plugin_active?(context)` <a id="method-c-seo_plugin_active-3F"></a> <a id="seo_plugin_active?-class_method"></a>
|
|
115
|
+
- **@return** [Boolean]
|
|
116
|
+
|
|
117
|
+
### `source(value, origin, entity, line = nil)` <a id="method-c-source"></a> <a id="source-class_method"></a>
|
|
118
|
+
Not documented.
|
|
119
|
+
|
|
120
|
+
### `source_observation(source)` <a id="method-c-source_observation"></a> <a id="source_observation-class_method"></a>
|
|
121
|
+
Not documented.
|
|
122
|
+
|
|
123
|
+
### `timezone(context)` <a id="method-c-timezone"></a> <a id="timezone-class_method"></a>
|
|
124
|
+
Not documented.
|
|
125
|
+
|
|
126
|
+
### `timezone_free_timestamp?(value, context)` <a id="method-c-timezone_free_timestamp-3F"></a> <a id="timezone_free_timestamp?-class_method"></a>
|
|
127
|
+
- **@return** [Boolean]
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Module Jekyll::AgentAudit::Rules::Publication <a id="module-Jekyll-AgentAudit-Rules-Publication"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/jekyll/agent_audit/rules/publication.rb |
|
|
6
|
+
|
|
7
|
+
## Constants
|
|
8
|
+
### `IDS` <a id="constant-IDS"></a> <a id="IDS-constant"></a>
|
|
9
|
+
Not documented.
|
|
10
|
+
|
|
11
|
+
### `SEVERITIES` <a id="constant-SEVERITIES"></a> <a id="SEVERITIES-constant"></a>
|
|
12
|
+
Not documented.
|
|
13
|
+
|
|
14
|
+
## Public Class Methods
|
|
15
|
+
### `architecture_orphan(document, context)` <a id="method-c-architecture_orphan"></a> <a id="architecture_orphan-class_method"></a>
|
|
16
|
+
Not documented.
|
|
17
|
+
|
|
18
|
+
### `architecture_output_collision(_document, context)` <a id="method-c-architecture_output_collision"></a> <a id="architecture_output_collision-class_method"></a>
|
|
19
|
+
Not documented.
|
|
20
|
+
|
|
21
|
+
### `asset_target?(entry)` <a id="method-c-asset_target-3F"></a> <a id="asset_target?-class_method"></a>
|
|
22
|
+
- **@return** [Boolean]
|
|
23
|
+
|
|
24
|
+
### `collision(context)` <a id="method-c-collision"></a> <a id="collision-class_method"></a>
|
|
25
|
+
Not documented.
|
|
26
|
+
|
|
27
|
+
### `evaluate(id, document, context)` <a id="method-c-evaluate"></a> <a id="evaluate-class_method"></a>
|
|
28
|
+
Not documented.
|
|
29
|
+
|
|
30
|
+
### `finding(rule, document, message, observation, line = nil, related_locations = [])` <a id="method-c-finding"></a> <a id="finding-class_method"></a>
|
|
31
|
+
Not documented.
|
|
32
|
+
|
|
33
|
+
### `graph(context)` <a id="method-c-graph"></a> <a id="graph-class_method"></a>
|
|
34
|
+
Not documented.
|
|
35
|
+
|
|
36
|
+
### `identity_canonical_invalid(document, _context)` <a id="method-c-identity_canonical_invalid"></a> <a id="identity_canonical_invalid-class_method"></a>
|
|
37
|
+
Not documented.
|
|
38
|
+
|
|
39
|
+
### `identity_canonical_multiple(document, context)` <a id="method-c-identity_canonical_multiple"></a> <a id="identity_canonical_multiple-class_method"></a>
|
|
40
|
+
Not documented.
|
|
41
|
+
|
|
42
|
+
### `identity_canonical_target_missing(document, context)` <a id="method-c-identity_canonical_target_missing"></a> <a id="identity_canonical_target_missing-class_method"></a>
|
|
43
|
+
Not documented.
|
|
44
|
+
|
|
45
|
+
### `links(document, context)` <a id="method-c-links"></a> <a id="links-class_method"></a>
|
|
46
|
+
Not documented.
|
|
47
|
+
|
|
48
|
+
### `links_fragment_missing(document, context)` <a id="method-c-links_fragment_missing"></a> <a id="links_fragment_missing-class_method"></a>
|
|
49
|
+
Not documented.
|
|
50
|
+
|
|
51
|
+
### `links_target_missing(document, context)` <a id="method-c-links_target_missing"></a> <a id="links_target_missing-class_method"></a>
|
|
52
|
+
Not documented.
|
|
53
|
+
|
|
54
|
+
### `root?(document, context)` <a id="method-c-root-3F"></a> <a id="root?-class_method"></a>
|
|
55
|
+
- **@return** [Boolean]
|
|
56
|
+
|
|
57
|
+
### `structure_h1_absent(document, _context)` <a id="method-c-structure_h1_absent"></a> <a id="structure_h1_absent-class_method"></a>
|
|
58
|
+
Not documented.
|
|
59
|
+
|
|
60
|
+
### `structure_heading_empty(document, _context)` <a id="method-c-structure_heading_empty"></a> <a id="structure_heading_empty-class_method"></a>
|
|
61
|
+
Not documented.
|
|
62
|
+
|
|
63
|
+
### `structure_heading_jump(document, _context)` <a id="method-c-structure_heading_jump"></a> <a id="structure_heading_jump-class_method"></a>
|
|
64
|
+
Not documented.
|
|
65
|
+
|
|
66
|
+
### `structure_id_duplicate(document, _context)` <a id="method-c-structure_id_duplicate"></a> <a id="structure_id_duplicate-class_method"></a>
|
|
67
|
+
Not documented.
|
|
68
|
+
|
|
69
|
+
### `structure_link_unnamed(document, _context)` <a id="method-c-structure_link_unnamed"></a> <a id="structure_link_unnamed-class_method"></a>
|
|
70
|
+
Not documented.
|
|
71
|
+
|
|
72
|
+
### `structure_title_missing(document, _context)` <a id="method-c-structure_title_missing"></a> <a id="structure_title_missing-class_method"></a>
|
|
73
|
+
Not documented.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Class Jekyll::AgentAudit::Runner <a id="class-Jekyll-AgentAudit-Runner"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/jekyll/agent_audit/runner.rb |
|
|
7
|
+
|
|
8
|
+
## Public Instance Methods
|
|
9
|
+
### `initialize(options = {})` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
10
|
+
- **@return** [Runner] a new instance of Runner
|
|
11
|
+
|
|
12
|
+
### `run()` <a id="method-i-run"></a> <a id="run-instance_method"></a>
|
|
13
|
+
Not documented.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Class Jekyll::AgentAudit::UrlResolver <a id="class-Jekyll-AgentAudit-UrlResolver"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Object |
|
|
6
|
+
| **Defined in** | lib/jekyll/agent_audit/url_resolver.rb |
|
|
7
|
+
|
|
8
|
+
## Public Instance Methods
|
|
9
|
+
### `initialize(entries, site_config, configuration)` <a id="method-i-initialize"></a> <a id="initialize-instance_method"></a>
|
|
10
|
+
- **@return** [UrlResolver] a new instance of UrlResolver
|
|
11
|
+
|
|
12
|
+
### `resolve(href, document, base: = true)` <a id="method-i-resolve"></a> <a id="resolve-instance_method"></a>
|
|
13
|
+
Not documented.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Module Jekyll::AgentAudit <a id="module-Jekyll-AgentAudit"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/jekyll/agent_audit/errors.rb, lib/jekyll/agent_audit/report.rb, lib/jekyll/agent_audit/runner.rb, lib/jekyll/agent_audit/finding.rb, lib/jekyll/agent_audit/version.rb, lib/jekyll/agent_audit/registry.rb, lib/jekyll/agent_audit/extractor.rb, lib/jekyll/agent_audit/link_graph.rb, lib/jekyll/agent_audit/url_resolver.rb, lib/jekyll/agent_audit/configuration.rb, lib/jekyll/agent_audit/reporters/json.rb, lib/jekyll/agent_audit/build_inventory.rb, lib/jekyll/agent_audit/rules/provenance.rb, lib/jekyll/agent_audit/reporters/console.rb, lib/jekyll/agent_audit/rules/publication.rb |
|
|
6
|
+
|
|
7
|
+
## Constants
|
|
8
|
+
### `VERSION` <a id="constant-VERSION"></a> <a id="VERSION-constant"></a>
|
|
9
|
+
Not documented.
|
|
10
|
+
|
|
11
|
+
# Documentation
|
|
12
|
+
|
|
13
|
+
- [AgentAudit/BuildInventory.md](AgentAudit/BuildInventory.md)
|
|
14
|
+
- [AgentAudit/Configuration.md](AgentAudit/Configuration.md)
|
|
15
|
+
- [AgentAudit/ConfigurationError.md](AgentAudit/ConfigurationError.md)
|
|
16
|
+
- [AgentAudit/Error.md](AgentAudit/Error.md)
|
|
17
|
+
- [AgentAudit/Extractor.md](AgentAudit/Extractor.md)
|
|
18
|
+
- [AgentAudit/Finding.md](AgentAudit/Finding.md)
|
|
19
|
+
- [AgentAudit/InputError.md](AgentAudit/InputError.md)
|
|
20
|
+
- [AgentAudit/LinkGraph.md](AgentAudit/LinkGraph.md)
|
|
21
|
+
- [AgentAudit/Registry.md](AgentAudit/Registry.md)
|
|
22
|
+
- [AgentAudit/Report.md](AgentAudit/Report.md)
|
|
23
|
+
- [AgentAudit/ReportError.md](AgentAudit/ReportError.md)
|
|
24
|
+
- [AgentAudit/Reporters/Console.md](AgentAudit/Reporters/Console.md)
|
|
25
|
+
- [AgentAudit/Reporters/JSON.md](AgentAudit/Reporters/JSON.md)
|
|
26
|
+
- [AgentAudit/Reporters.md](AgentAudit/Reporters.md)
|
|
27
|
+
- [AgentAudit/Rules/Provenance.md](AgentAudit/Rules/Provenance.md)
|
|
28
|
+
- [AgentAudit/Rules/Publication.md](AgentAudit/Rules/Publication.md)
|
|
29
|
+
- [AgentAudit/Rules.md](AgentAudit/Rules.md)
|
|
30
|
+
- [AgentAudit/Runner.md](AgentAudit/Runner.md)
|
|
31
|
+
- [AgentAudit/UrlResolver.md](AgentAudit/UrlResolver.md)
|
|
32
|
+
- [Commands/AgentAudit/CommandParser.md](Commands/AgentAudit/CommandParser.md)
|
|
33
|
+
- [Commands/AgentAudit/ParserErrors.md](Commands/AgentAudit/ParserErrors.md)
|
|
34
|
+
- [Commands/AgentAudit.md](Commands/AgentAudit.md)
|
|
35
|
+
- [Commands.md](Commands.md)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Module Jekyll::Commands::AgentAudit::CommandParser <a id="module-Jekyll-Commands-AgentAudit-CommandParser"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/jekyll/agent_audit/command.rb |
|
|
6
|
+
|
|
7
|
+
## Public Instance Methods
|
|
8
|
+
### `go(arguments, parser, config)` <a id="method-i-go"></a> <a id="go-instance_method"></a>
|
|
9
|
+
Not documented.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Module Jekyll::Commands::AgentAudit::ParserErrors <a id="module-Jekyll-Commands-AgentAudit-ParserErrors"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/jekyll/agent_audit/command.rb |
|
|
6
|
+
|
|
7
|
+
## Public Instance Methods
|
|
8
|
+
### `parse!(*arguments)` <a id="method-i-parse-21"></a> <a id="parse!-instance_method"></a>
|
|
9
|
+
Not documented.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Class Jekyll::Commands::AgentAudit <a id="class-Jekyll-Commands-AgentAudit"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Inherits** | Jekyll::Command |
|
|
6
|
+
| **Defined in** | lib/jekyll/agent_audit/command.rb |
|
|
7
|
+
|
|
8
|
+
## Public Class Methods
|
|
9
|
+
### `init_with_program(prog)` <a id="method-c-init_with_program"></a> <a id="init_with_program-class_method"></a>
|
|
10
|
+
Not documented.
|
|
11
|
+
|
|
12
|
+
### `process(options)` <a id="method-c-process"></a> <a id="process-class_method"></a>
|
|
13
|
+
Not documented.
|
data/doc/Jekyll.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
# Module Jekyll <a id="module-Jekyll"></a>
|
|
2
|
+
|
|
3
|
+
| | |
|
|
4
|
+
| --- | --- |
|
|
5
|
+
| **Defined in** | lib/jekyll/agent_audit/errors.rb, lib/jekyll/agent_audit/report.rb, lib/jekyll/agent_audit/runner.rb, lib/jekyll/agent_audit/command.rb, lib/jekyll/agent_audit/finding.rb, lib/jekyll/agent_audit/version.rb, lib/jekyll/agent_audit/registry.rb, lib/jekyll/agent_audit/extractor.rb, lib/jekyll/agent_audit/link_graph.rb, lib/jekyll/agent_audit/url_resolver.rb, lib/jekyll/agent_audit/configuration.rb, lib/jekyll/agent_audit/reporters/json.rb, lib/jekyll/agent_audit/build_inventory.rb, lib/jekyll/agent_audit/rules/provenance.rb, lib/jekyll/agent_audit/reporters/console.rb, lib/jekyll/agent_audit/rules/publication.rb |
|
data/doc/README.md
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# jekyll-agent-audit
|
|
2
|
+
|
|
3
|
+
An offline audit of rendered Jekyll publications. It finds broken local references, conflicting document identity, structural markup problems, and observable metadata contradictions. It does not predict search rankings or AI citations, score pages, rewrite content, or check deployed HTTP behavior.
|
|
4
|
+
|
|
5
|
+
## Install and run
|
|
6
|
+
|
|
7
|
+
Add the gem to your site's **Gemfile**, in the command-loading group:
|
|
8
|
+
|
|
9
|
+
```ruby
|
|
10
|
+
group :jekyll_plugins do
|
|
11
|
+
gem "jekyll-agent-audit", "~> 0.1.0"
|
|
12
|
+
end
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For an unpublished local checkout, add `path: "/path/to/jekyll-agent-audit"` to that declaration. Run `bundle install`, then:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
bundle exec jekyll agent:audit
|
|
19
|
+
bundle exec jekyll agent:audit --format json --output tmp/agent-audit.json
|
|
20
|
+
bundle exec jekyll agent:audit --config _config.yml,_config.production.yml
|
|
21
|
+
bundle exec jekyll agent:audit --fail-on warning
|
|
22
|
+
bundle exec jekyll agent:audit --only links.target_missing,identity.canonical_multiple
|
|
23
|
+
bundle exec jekyll agent:audit --list-rules --format json
|
|
24
|
+
bundle exec jekyll agent:audit --explain identity.canonical_multiple
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Putting the gem only under `_config.yml`'s `plugins` setting is too late for initial command discovery. See [Jekyll's command integration documentation](https://jekyllrb.com/docs/plugins/commands/).
|
|
28
|
+
|
|
29
|
+
The command makes one full build in a temporary directory, with a separate temporary cache, and inspects the final output. Existing `_site` output is preserved. Build logs go to stderr; JSON stdout contains one report. `--output` writes atomically. Merely loading the gem does not audit an ordinary `jekyll build`.
|
|
30
|
+
|
|
31
|
+
The analyzer performs no network requests. Your site's ordinary build plugins retain their own behavior, including any network requests or custom filesystem writes they perform. Temporary build isolation cannot constrain arbitrary third-party plugin side effects.
|
|
32
|
+
|
|
33
|
+
## Findings and exit codes
|
|
34
|
+
|
|
35
|
+
The default release enables these 17 rules:
|
|
36
|
+
|
|
37
|
+
| Severity | Rules |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| Error | `architecture.output_collision`, `links.target_missing`, `links.fragment_missing`, `identity.canonical_invalid`, `identity.canonical_multiple`, `identity.canonical_target_missing`, `structure.id_duplicate`, `provenance.jsonld_invalid` |
|
|
40
|
+
| Warning | `architecture.orphan`, `structure.title_missing`, `structure.heading_empty`, `structure.link_unnamed`, `provenance.date_invalid`, `provenance.date_order`, `provenance.metadata_conflict` |
|
|
41
|
+
| Info | `structure.h1_absent`, `structure.heading_jump` |
|
|
42
|
+
|
|
43
|
+
`--explain RULE` gives applicability, evidence, limitations, and remediation. Deferred catalog rules cannot be selected. Multiple H1s, an external canonical, no modification date, long prose, and no external citations are acceptable by themselves.
|
|
44
|
+
|
|
45
|
+
| Exit | Meaning |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| 0 | Completed; no active findings meet the failure policy |
|
|
48
|
+
| 1 | Completed; active errors, or warnings with `--fail-on warning` |
|
|
49
|
+
| 2 | Invalid configuration/invocation, failed build/report write, resource limit, or incomplete supported-input analysis |
|
|
50
|
+
| 130 | Interrupted by SIGINT |
|
|
51
|
+
|
|
52
|
+
Default `fail_on: error` leaves warnings and info nonblocking. `none` disables finding-based failure; operational failures still return 2. A build with no HTML returns 2. Discovery always reports **not assessed**, owned by `jekyll-agent-discovery`.
|
|
53
|
+
|
|
54
|
+
## Configuration
|
|
55
|
+
|
|
56
|
+
These are the defaults, under `_config.yml`. CLI audit options override them after ordinary Jekyll config layering. Jekyll environment, drafts, future posts, URL, and baseurl retain the site's configuration.
|
|
57
|
+
|
|
58
|
+
```yaml
|
|
59
|
+
agent_audit:
|
|
60
|
+
fail_on: error
|
|
61
|
+
format: console
|
|
62
|
+
include: ["**/*"]
|
|
63
|
+
exclude: []
|
|
64
|
+
content:
|
|
65
|
+
selector: null
|
|
66
|
+
exclude_selectors: [nav, footer, aside, script, style, template]
|
|
67
|
+
metadata:
|
|
68
|
+
selectors:
|
|
69
|
+
author: null
|
|
70
|
+
publisher: null
|
|
71
|
+
published: null
|
|
72
|
+
modified: null
|
|
73
|
+
graph:
|
|
74
|
+
roots: ["/"]
|
|
75
|
+
routes:
|
|
76
|
+
directory_index: index.html
|
|
77
|
+
external_paths: []
|
|
78
|
+
aliases: {}
|
|
79
|
+
rules: {}
|
|
80
|
+
suppressions: []
|
|
81
|
+
limits:
|
|
82
|
+
max_html_bytes: 5242880
|
|
83
|
+
max_jsonld_bytes: 1048576
|
|
84
|
+
max_documents: 50000
|
|
85
|
+
max_edges: 1000000
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Unknown options, rules, invalid CSS selectors, alias cycles, and malformed limits are rejected. Disable a rule with `rules: {structure.heading_jump: {enabled: false}}`. `--only` intersects enabled rules and cannot re-enable one.
|
|
89
|
+
|
|
90
|
+
Include/exclude patterns match source-relative paths using Ruby `File.fnmatch?` pathname/glob semantics; exclusion wins. Excluded pages still supply links and targets to the graph. Generated HTML is included with a stable generated identity and a null source path when no source mapping is known.
|
|
91
|
+
|
|
92
|
+
Graph roots are site-relative: `/` becomes `/project/` when `baseurl: /project`. Roots must exist. Route aliases and `external_paths` use full public paths, including baseurl. For example:
|
|
93
|
+
|
|
94
|
+
```yaml
|
|
95
|
+
agent_audit:
|
|
96
|
+
routes:
|
|
97
|
+
external_paths: ["/project/api/**"]
|
|
98
|
+
aliases:
|
|
99
|
+
/project/old-guide/: /project/guide/
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
These declarations describe hosting assumptions; they do not create or verify redirects. Assets are valid local targets. Directory-index aliases are proven by the emitted index file; `/guide` is not automatically equivalent to `/guide/`. Query strings stay in observations while target existence uses the path.
|
|
103
|
+
|
|
104
|
+
Content selection uses page `agent_audit.content.selector`, site selector, unique `main`, unique main-role landmark, then unique `article`. Body fallback supports whole-document checks and skips content-sensitive headings. Ambiguous selectors produce coverage diagnostics. Metadata date selectors read machine `datetime` attributes, never free-form prose.
|
|
105
|
+
|
|
106
|
+
## Suppressions
|
|
107
|
+
|
|
108
|
+
Suppressions retain findings in JSON and require a reason. Site suppressions require source path scope and may specify a fingerprint. `until` is inclusive in the report's UTC reference date.
|
|
109
|
+
|
|
110
|
+
```yaml
|
|
111
|
+
agent_audit:
|
|
112
|
+
suppressions:
|
|
113
|
+
- rule: architecture.orphan
|
|
114
|
+
paths: ["landing/private-preview.md"]
|
|
115
|
+
reason: "Linked only from a customer email."
|
|
116
|
+
until: "2026-12-31"
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Page front matter can use:
|
|
120
|
+
|
|
121
|
+
```yaml
|
|
122
|
+
agent_audit:
|
|
123
|
+
suppress:
|
|
124
|
+
- rule: structure.h1_absent
|
|
125
|
+
reason: "The layout renders the title outside main."
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Expired suppressions do not hide findings. Unused suppressions generate notices. Collisions require a site suppression with primary-owner scope and a fingerprint. Disabling a rule appears as disabled coverage, never a clean result.
|
|
129
|
+
|
|
130
|
+
## Reports and interpretation
|
|
131
|
+
|
|
132
|
+
Console and JSON share one report. The [JSON schema](schema/report-1.0.json) is versioned `1.0`; consumers should tolerate additive fields and use rule IDs instead of parsing message text. Findings preserve evidence level, observation, rendered location, related locations, remediation, fingerprint, and suppression. Source lines are null unless an actual source mapping exists; rendered HTML lines are not Markdown source lines.
|
|
133
|
+
|
|
134
|
+
The [example JSON report](docs/example-report.json) was generated by a fixture with a broken local link, no H1, and an explicit modification date preceding publication.
|
|
135
|
+
|
|
136
|
+
Fingerprints exclude line numbers, temporary paths, message wording, and timestamps. Findings and coverage are deterministically ordered; run clocks and timings are volatile. Reports contain bounded observations, not article bodies. They can still reveal unpublished paths, so choose artifact access and retention accordingly.
|
|
137
|
+
|
|
138
|
+
For every rule, `candidate = evaluated + not_applicable + skipped`. Evaluated includes clean and finding-producing applications. Suppressing a finding does not change coverage. Counts describe local observations; there is no quality percentage.
|
|
139
|
+
|
|
140
|
+
## Development and release status
|
|
141
|
+
|
|
142
|
+
```sh
|
|
143
|
+
bundle install
|
|
144
|
+
bundle exec rake test
|
|
145
|
+
bundle exec rake lint
|
|
146
|
+
gem build jekyll-agent-audit.gemspec
|
|
147
|
+
ruby script/benchmark.rb
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
### Generated documentation
|
|
152
|
+
|
|
153
|
+
Generate Markdown API documentation and the LLM index from the Ruby source:
|
|
154
|
+
|
|
155
|
+
```sh
|
|
156
|
+
bundle exec rake docs
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
This replaces `doc/` with fresh YARD Markdown, updates the documentation index in
|
|
160
|
+
`doc/Jekyll/AgentAudit.md`, and writes `llms.txt` with links relative to the gem
|
|
161
|
+
root. Both namespaces are indexed: the library under `Jekyll::AgentAudit` and the
|
|
162
|
+
Jekyll subcommand under `Jekyll::Commands::AgentAudit`. The generated files are
|
|
163
|
+
checked in and shipped with the gem; `yard` and `yard-markdown` stay development
|
|
164
|
+
dependencies. Authored guides belong in `docs/`, not the generated `doc/`.
|
|
165
|
+
|
|
166
|
+
For the individual steps, run `bundle exec rake yard`, then
|
|
167
|
+
`ruby bin/generate_llm.rb`.
|
|
168
|
+
|
|
169
|
+
To verify everything, regenerate documentation, and build the versioned gem and
|
|
170
|
+
SHA-256 checksum in `pkg/`, run:
|
|
171
|
+
|
|
172
|
+
```sh
|
|
173
|
+
bin/prepare_release
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
It stops at the first failure and never commits, tags, pushes, or publishes.
|
|
177
|
+
|
|
178
|
+
The implementation targets Jekyll 4.4.x. See [verification and compatibility](docs/verification.md) for combinations actually tested and benchmark measurements. Do not infer native GitHub Pages compatibility. The runtime HTML parser is explicitly declared as Nokogiri; no optional SEO, sitemap, or Markdown plugin is required.
|
|
179
|
+
|
|
180
|
+
See [limitations and evidence](docs/limitations.md) before interpreting findings. The design specification in the parent workspace is the normative MVP catalog; deferred editorial and duplication analyses are not enabled.
|