Repository navigation
feat(skills): dokimi-fix-opportunities Agent Skill (stacked on #1082) - #1129
Conversation
…Lightsage-inspired proposal Prototype only, not wired into the CLI: dokimi.opportunities turns novelty, repo_static and llms.txt findings into a ranked impact x effort queue with stable source keys and execution prompts; dokimi.llms_txt statically checks an llms.txt. docs/proposals/lightsage-inspired-features.md maps the competitor's features, ranks the gaps and lists next steps. Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
Inputs are detected by content (novelty JSON, repo_static.v1, llms.txt); --format json writes an opportunities.v1 artifact (new schema + fixture), markdown prints the ranked table. Proposal next steps updated. Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
…s an input error, escape table cells Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
…s by check, links by message Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
…hot uses the Linux type hash Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
…ure-ideas-2aea58 Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com> # Conflicts: # dokimi/docs/reference/cli-interface.json
…b.com/napetrov/dokimi into claude/lightsage-feature-ideas-2aea58
…nities Tells a coding agent to take the top three act_now items of report opportunities --format json, apply each execution_prompt, re-run the producing check and report before/after by source_key. Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
…n regression claim Signed-off-by: Petrov, Nikolay A <nikolay.a.petrov@intel.com>
CLI interface change detectedThis PR changes dokimi's user-facing CLI surface (commands and/or options): + added command `dokimi report opportunities`
+ argument `inputs`
+ option `--format`
+ option `--help/-h`
+ option `--out`
+ option `--top-n`
~ `dokimi runs list` parameters changed:
~ changed option `--kind`: choices: ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"] -> ["'answers'", "'arms'", "'baseline_manifest'", "'catalog_eval'", "'checklist'", "'cli_routes'", "'cross_judge'", "'dashboard'", "'docling_sources'", "'docs_run'", "'dokimi_config'", "'effective_instructions'", "'eval'", "'eval_coverage'", "'explore_runs'", "'grounding'", "'guidance_reach'", "'headroom'", "'judge_validity'", "'judge_wording'", "'leak'", "'matrix_rollup'", "'need_graph'", "'novelty'", "'novelty_atoms'", "'novelty_retest'", "'opportunities'", "'pairwise'", "'persona_analysis'", "'personas'", "'plan'", "'plugin_delta'", "'question_panel'", "'question_quality'", "'questions'", "'ragas'", "'reach_matrix'", "'redteam'", "'repo_budget'", "'repo_environment'", "'repo_hits_judged'", "'repo_ledger'", "'repo_readiness'", "'report_qa'", "'report_summary'", "'result'", "'run_context'", "'security_report'", "'skill_coverage'", "'skill_discovery'", "'skill_evidence'", "'subject_scorecard'", "'task_inspect'", "'task_runs'", "'tool_preference'"]Updated on every push; the |
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 5 selected item(s). CI at Review limit reached. This PR has had 6 reviews, so it will only be reviewed again when you ask. Review details
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1129 +/- ##
==========================================
- Coverage 96.07% 96.07% -0.01%
==========================================
Files 495 495
Lines 65225 65263 +38
Branches 11314 11320 +6
==========================================
+ Hits 62668 62701 +33
- Misses 1582 1584 +2
- Partials 975 978 +3 🚀 New features to boost your workflow:
|
vchamarthi
left a comment
There was a problem hiding this comment.
@napetrov: fix the 3 must-fix items in the line comments and fix what the bot's thread on docs/proposals/lightsage-inspired-features.md:67, the bot's thread on dokimi/dokimi/commands/opportunities.py:25, the bot's thread on dokimi/dokimi/commands/opportunities.py:30, the bot's thread on dokimi/dokimi/commands/opportunities.py:35, the bot's thread on dokimi/dokimi/commands/opportunities.py:62, the bot's thread on dokimi/dokimi/llms_txt.py:21, the bot's thread on dokimi/dokimi/llms_txt.py:81, the bot's thread on dokimi/dokimi/llms_txt.py:87, the bot's thread on dokimi/dokimi/opportunities.py:90, the bot's thread on dokimi/dokimi/opportunities.py:99 and the bot's thread on dokimi/tests/test_opportunities_command.py:19 still find, then push for a re-review. 1 nit in line comments is optional.
Reviewed at c6714fd:
- Not passed: 2 of 12 broken variants of the changed code not caught by the tests (10 caught)
- Changed tests: 292 passed, fail on main
- Full suite with main merged in: 31973 passed, its only failures are main's too
- Merges onto main
- 3 mutations and 16 edge inputs tried
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 Changes needed · reviewed c6714fd
To fix: following the skill, an agent can edit correct guidance or misread the before/after result (line comments); the two step-4 gaps there are small. Also answer the @exai-bot and @vchamarthi threads below; they are on #1082's code, so the fixes there land here too.
✅ make ci-local --offline: 25,981 passed · ✅ a repo_static.v1 file with only unresolved_* claims ranks first as act_now "2 failing claims", "Fix or delete each claim"
The skill's steps are short and its rule that a key still present is not fixed is the right one.
Agreed with @exai-bot: novelty rates divided by n_paired again, a repo_static.v1 without claims read as an empty queue, the llms.txt link checks (images, code fences, several links on a line), and 6 more.
Agreed with @vchamarthi: * and numbered list links not checked; a link with a quoted title not found; the when_not_to_use test not checking the severity, and the as_dict nit.
PRRT_kwDOVBg7g866n51o PRRT_kwDOVBg7g866n51r PRRT_kwDOVBg7g866n51t PRRT_kwDOVBg7g866n51v PRRT_kwDOVBg7g866n51x PRRT_kwDOVBg7g866n51y PRRT_kwDOVBg7g866n51z PRRT_kwDOVBg7g866n510 PRRT_kwDOVBg7g866n512 PRRT_kwDOVBg7g866n515 PRRT_kwDOVBg7g866q-Pg PRRT_kwDOVBg7g866q-Pl PRRT_kwDOVBg7g866q-P0 PRRT_kwDOVBg7g866yAKP PRRT_kwDOVBg7g866yAKX PRRT_kwDOVBg7g866yAKd PRRT_kwDOVBg7g866yAKi Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
PRRT_kwDOVBg7g866n51m PRRT_kwDOVBg7g866q-Po PRR_kwDOVBg7g88AAAABZpJ-cA PRR_kwDOVBg7g88AAAABZssK4A Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
2c69899 removes the implementation proposal, asserts warning severity, and explains repeated evidence in the skill. |
|
136995a validates each supported input and uses paired novelty rates when ranking gaps. The focused tests cover malformed inputs and the revised scores. |
vchamarthi
left a comment
There was a problem hiding this comment.
🔴 Changes needed: 4 must-fixes, 1 nit · re-reviewed 2c69899
Next: @napetrov: fix the 4 must-fix findings, answer 6 open threads from exai-bot and settle 2 open questions; then push for a re-review. 1 nit optional.
Blocking
- Still holds on this head: thread by exai-bot –
[Documentation][docs]with[docs]: https://example.com/docsbelow it givesInputError(not valid JSON) on the head. - Still holds on this head: thread by exai-bot –
{"paired":{}}gives an empty queue with no error on the head. - Still holds on this head: thread by exai-bot –
- [API](https://example.test/API_(v2)): reference documentationgets alinkswarning on the head. - Still holds on this head: thread by exai-bot – An index whose only links are inline code gets no
linksfailure on the head. - Still holds on this head: thread by exai-bot –
{"paired":{"strict":{}}}gives an empty queue with no error on the head. - Still holds on this head: thread by exai-bot – Two
repo_staticinputs with the same claim and norepokey get the samesource_keyon the head. - Open question for @napetrov:
_readtakes the identity of a repo_static input from arepokey, whichrepo_static.v1does not declare. Declarerepoas an optional string inrepo_static.v1and in the docs, or key repo_static findings on the input path. - Open question for @napetrov: Step 4 of the skill still re-runs
skill novelty analyzewith the original settings, a model call, without asking the user. State in the skill that the novelty re-run happens only when the user asks, or drop it from step 4.
Verified on 2c69899: ✅ changed tests: 299 passed, fail on main · ✅ full suite with main merged in: 33019 passed · ✅ merges onto main ·
13 checks behind it, each with its evidence
| Area | What holds | How |
|---|---|---|
| Changed tests | The changed test files pass on the head: 299 passed and 1 skipped, across the seven test files the PR changes | tests on the head |
| Changed tests on main | On main the same test files fail to import, because the modules they test are new in the PR | same tests on main |
| Full suite | The full check suite with main merged in passes: 33019 passed, 0 failed | full suite, main merged in |
| Merge | The PR merges onto main with no conflict | merge onto main |
| Mutation caught | Changing the when_not_to_use severity from warn to fail is caught by tests/test_llms_txt.py |
broke the code, tests caught it |
| Dead raise | The added raise at commands/opportunities.py:30 changes nothing: it follows the return in _read, so the suite still passes and the behaviour is the same |
broke the code, tests caught it |
| Empty index | An empty or whitespace-only index fails the title and links checks, with no crash |
ran it, edge input (text) |
| Unusable json | {}, [], null and truncated JSON are refused as bad input that names the file |
ran it, edge input (structured) |
| Missing paths | A missing file, a missing directory and a dangling symlink are input errors that name the path | ran it, edge input (paths) |
| Empty and duplicate claims | An empty claims list gives no item, and two identical claims give one item listing both lines | ran it, edge input (collections) |
| Cli usage | report opportunities with no inputs exits with code 2 |
ran it, edge input (cli) |
| Non-rate numbers | NaN, Infinity and a fractional n_paired are refused as bad input |
ran it, edge input (numbers) |
| None values | A null repository falls back to repository, and a null claim status is refused as bad input |
ran it, edge input (none) |
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Review: PRRT_kwDOVBg7g8669vM2 Review: PRRT_kwDOVBg7g8669vM8 Review: PRRT_kwDOVBg7g8669vNE Review: PRRT_kwDOVBg7g8669vNR Review: PRRT_kwDOVBg7g8669vNb Review: PRRT_kwDOVBg7g8669vNm Review: PRRT_kwDOVBg7g867MZOY Review: PRRT_kwDOVBg7g867MZOd Review: PRRT_kwDOVBg7g867MZOf Review: PRRT_kwDOVBg7g867MZOl Review: PRRT_kwDOVBg7g867MZOr Review: PRR_kwDOVBg7g88AAAABZ6LXeg Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
|
The updated branch includes |
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 Changes needed · re-checked e961aea
To fix: the skill still has the agent start a paid novelty re-run without asking, and llms.txt keys change with the path spelling (reply in our thread). Also answer the @exai-bot threads below and @vchamarthi's question on the repo key. To answer: the fixes are only in this branch, so #1082 now conflicts with it in 6 files. Should #1082 be closed in favour of this PR?
✅ make ci-local --offline: 27,136 passed · ✅ the earlier bad inputs now give input errors, and novelty impacts are 0.25 / 0.2 / 0.15 · ❌ llms.txt vs ./llms.txt: all 3 keys differ
The earlier points are fixed except one; the unresolved-claims split and the per-kind re-check read well.
Agreed with @exai-bot: missing novelty rates give an empty queue; <!-- in a code span hides the rest; a link inside a link title, and 1 more. On <!- - the author is right: replied in its thread.
Agreed with @vchamarthi: repo is not in repo_static.v1; the novelty re-run question (same as ours).
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Review: PRRT_kwDOVBg7g867N10h Review: PRRT_kwDOVBg7g867N10o Review: PRRT_kwDOVBg7g867N10s Review: PRRT_kwDOVBg7g867N100 Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Review: PRRT_kwDOVBg7g866yAKd Review: PRR_kwDOVBg7g88AAAABZ-7eDg Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Re: review by vlad-perevezentsev
|
| data = json.loads(text) | ||
| except ValueError as e: | ||
| if Path(path).suffix.lower() == ".json" or text.lstrip().startswith("{") or ( | ||
| text.lstrip().startswith("[") and not re.match(r"\[[^\n\]]+\](?:\(|\[|:)", text.lstrip()) |
There was a problem hiding this comment.
Must-fix: shortcut reference links still fail input detection.
Impact: valid link-first Markdown is rejected before discovery findings can be generated.
Trigger: an llms.txt containing [Docs]\n\n[Docs]: docs.md\n.
Evidence: JSON decoding fails, and this regex requires (, [ or : immediately after [Docs], so the command raises not valid JSON. The earlier full-reference regression covers [Documentation][docs], not this valid shortcut form. Recognize shortcut references too and add a regression while preserving malformed .json rejection.
Workaround: prepend a heading or use [Docs][Docs].
Severity justification: medium because this blocks a bounded class of supported Markdown inputs.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c3.py
What the proof does: Calls _read on a file starting with a shortcut reference link and checks it is read as llms.txt instead of raising.
The problem shows as the output SHORTCUT_REF_REJECTED.
Script: dokimi/proof_c3.py (12 lines).
SHORTCUT_REF_REJECTED: /tmp/tmpbimfnk9d/llms.txt: not valid JSON (Expecting value: line 1 column 2 (char 1))
There was a problem hiding this comment.
I reproduced the rejection on main. The exact shortcut-first input is accepted by the dispatch fix in #1131, which also rejects malformed .json input.
|
|
||
|
|
||
| def _links(line: str) -> Iterator[tuple[str, str, int]]: | ||
| visible = replace_code_spans(line, lambda span: " " * (span.end() - span.start()), not_after="\\") |
There was a problem hiding this comment.
Impact: an index whose only documentation link is inside a multiline inline-code example falsely passes the links check, suppressing its repair opportunity.
Trigger: replace GOOD's documentation entry with "example\n[Start](start.md)\n"; the checker returns no findings instead of a missing-links failure.
Evidence: Markdown code spans can cross newlines, but _links masks spans one physical line at a time. The middle line contains no backticks, so its example link is counted as real navigation.
Workaround: keep inline-code examples on one line or use a top-level fenced block. Mask code spans across their complete paragraph before per-line link detection, retaining physical line numbers, and cover this input.
Severity justification: medium because this creates a bounded but material false-clean discovery verdict.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c5.py
What the proof does: Runs llms_txt.check on an index whose only link is inside a multi-line code span and checks a links finding is reported.
The problem shows as the output MULTILINE_CODE_SPAN_LINK_COUNTED.
dokimi/proof_c5.py
import sys
from dokimi import llms_txt
t = '# P\n\n> s\n\n## Docs\n\n- Example: `example\n[Start](start.md)\n`\n\n## When to use\n\n- x\n\n## When not to use\n\n- y\n'
f = llms_txt.check(t)
if not any(x.check == 'links' for x in f):
print('MULTILINE_CODE_SPAN_LINK_COUNTED: %r' % f)
sys.exit(1)MULTILINE_CODE_SPAN_LINK_COUNTED: []
There was a problem hiding this comment.
This now belongs to the shared checker in #1132. I verified its checker flags the missing documentation link when the only example is in the multiline code span.
| depth = 0 | ||
| for mark in _DESTINATION_MARK.finditer(line, destination): |
There was a problem hiding this comment.
Impact: valid Markdown documentation links produce a false missing-links failure and an unnecessary repair opportunity.
Trigger: replace GOOD's URL with <https://example.test/function(a>, producing - [Quickstart](<https://example.test/function(a>): first charge in five minutes.
Evidence: parentheses need not balance inside an angle-bracket destination, but this loop increments depth for the URL's '(' and consumes the link's closing ')' as its balancing character without yielding a link.
Fix: Handle angle-bracket destinations separately and add a regression asserting no findings.
Workaround: percent-encode the unmatched parenthesis and use a bare destination.
Severity justification: medium, a bounded incorrect validation result for valid Markdown input.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c2.py
What the proof does: Runs llms_txt.check on an index with an angle-bracket link destination containing ( and checks there are no findings.
The problem shows as the output ANGLE_DESTINATION_NOT_A_LINK.
dokimi/proof_c2.py
import sys
from dokimi import llms_txt
t = '# P\n\n> s\n\n## Docs\n\n- [Quickstart](<https://example.test/function(a>): first charge in five minutes\n\n## When to use\n\n- x\n\n## When not to use\n\n- y\n'
f = llms_txt.check(t)
if f:
print('ANGLE_DESTINATION_NOT_A_LINK: %r' % f)
sys.exit(1)ANGLE_DESTINATION_NOT_A_LINK: [Finding(check='links', severity='fail', line=0, message='no Markdown links to the documentation', fix='List key pages as `- [Title](url): one-line description`.', identity='')]
There was a problem hiding this comment.
I verified the CommonMark checker in #1132 accepts the described link with the unmatched parenthesis inside the angle destination.
| fence = "" | ||
| in_comment = False | ||
| for line in text.removeprefix("\ufeff").splitlines(): | ||
| marker = re.match(r"^ {0,3}(`{3,}|~{3,})(.*)$", line) |
There was a problem hiding this comment.
Must-fix. Impact: a code example can count as the only documentation link, suppressing the missing-links repair opportunity. Trigger: replace GOOD's documentation entry with "- Example:\n\n markdown\n [Start](start.md)\n ". Evidence: this regex misses the list-contained fence's four-space indentation; _prose_lines then accepts its contents because four columns is below the list item's code threshold of six, so check returns []. Recognize fences relative to their containing list and add this regression while preserving physical line numbers. Workaround: put example fences at the document margin. Severity justification: medium, a bounded but material false-clean validation result.
Shown by running: exit 1 (at the head) · exit 1 (at the merge base, which cannot run it) · exit 0 (at the head with the fix)
python proof_c1.py
What the proof does: Runs llms_txt.check on an index whose only link sits in a list-nested fenced example and checks that a links finding is reported.
The problem shows as the output FENCED_EXAMPLE_COUNTED_AS_LINK.
dokimi/proof_c1.py
import sys
from dokimi import llms_txt
t = '# P\n\n> s\n\n## Docs\n\n- Example:\n\n ```markdown\n [Start](start.md)\n ```\n\n## When to use\n\n- x\n\n## When not to use\n\n- y\n'
f = llms_txt.check(t)
if not any(x.check == 'links' for x in f):
print('FENCED_EXAMPLE_COUNTED_AS_LINK: %r' % f)
sys.exit(1)FENCED_EXAMPLE_COUNTED_AS_LINK: []
There was a problem hiding this comment.
I verified the checker in #1132 excludes the list-contained fenced example and reports a missing documentation link.
vlad-perevezentsev
left a comment
There was a problem hiding this comment.
🟡 Changes needed · re-checked 120f76f
To fix: the llms.txt checker keeps missing Markdown cases each round; please choose a parser or a documented limit (line comment). Also answer the @exai-bot threads below.
✅ make ci-local --offline: 28,309 passed · ✅ the skill asks before a paid novelty re-run and keeps the llms.txt path · ✅ missing novelty rates now give an input error
The earlier points are fixed; the skill now reads correctly for all three input kinds.
Agreed with @exai-bot: a shortcut reference read as broken JSON; a link in a multi-line code span counted; a fence inside a list item read as prose, and 1 more.
Fine with the repo key falling back to the report's directory, as the author explained.
| This check uses no network or LLM. It checks the structure the llms.txt convention asks for and the | ||
| positioning sections agents use to decide when a tool applies and when it does not. |
There was a problem hiding this comment.
Each round finds new CommonMark cases this checker reads differently from a Markdown renderer.
On 120f76f alone: a multi-line code span, an <...(> destination, a fence inside a list item and a shortcut reference ([Docs] then [Docs]: docs.md) all give the wrong result. The line-based parser now has to handle fences, comments, code spans, list indentation and nesting, and it will keep missing cases.
Suggestion: pick one of two. Parse with markdown-it-py (a CommonMark parser; it would be a new runtime dependency), or say in this docstring and in the docs that the check is a line-based heuristic and does not cover nested or multi-line Markdown.
vchamarthi
left a comment
There was a problem hiding this comment.
@napetrov, could you fix the 2 new problems I found (in the line comments), fix what the bot's thread on dokimi/dokimi/commands/opportunities.py:32, the bot's thread on dokimi/dokimi/llms_txt.py:89, the bot's thread on dokimi/dokimi/llms_txt.py:95 and the bot's thread on dokimi/dokimi/llms_txt.py:168 still point out and answer my 2 questions below? Then push and I'll take another look.
My questions before I approve:
- What the
repokey of a repo_static file means. Declarerepoas an optional string inrepo_static.v1and in the docs, or stop reading it and key on the input directory. - Which identity a repo_static finding keeps across runs. Say in the skill and the command help that keys depend on the directory, or key on the file's path inside the repository.
What I checked on 120f76f:
- Not passing: When I broke the changed code on purpose, the tests missed 1 of 12 breakages.
- The 322 changed tests pass, and fail on main as expected.
- The full test suite passes with main merged in (34,842 tests), apart from failures main has too.
- It merges cleanly onto main.
| if marker and marker[1].startswith(fence) and not marker[2].strip(): | ||
| fence = "" | ||
| lines.append("") | ||
| elif marker and not in_comment and (marker[1][0] == "~" or "`" not in marker[2]): |
There was a problem hiding this comment.
Must fix: A line that opens a code fence inside an HTML comment hides the rest of the index, and no test covers that case.
I tried an index with <!--, a line of three backticks, -->, then - [Start](start.md): begin and the usual sections.
Suggestion: Add a case to dokimi/tests/test_llms_txt.py with the commented-out fence above, asserting that check returns an empty list.
Details
The latest commit returns no findings. If I remove not in_comment and from line 173, the backtick line opens a fence, the rest of the file is blanked, and the check reports both missing sections and no links. The tests still pass with that change, so nothing checks the comment gate on this line.
There was a problem hiding this comment.
Main reports missing sections and links on this input. I verified #1132 accepts the commented-out fence and reads the sections and link after it.
| starts.append(mark.start()) | ||
| elif mark[0] == "]" and starts: | ||
| start = starts.pop() | ||
| if line.startswith("(", mark.end()) and (not start or line[start - 1] != "!"): |
There was a problem hiding this comment.
Must fix: A full reference link such as [Quickstart][start] with a [start]: definition is not read as a link, so the index fails the links check.
I tried an index whose docs entry is - [Quickstart][start]: first charge in five minutes, with the definition [start]: https://acme.test/quickstart.md below it.
Suggestion: Resolve reference definitions ([label]: url) before the link scan, and accept [label][ref] with a matching definition, keeping the physical line numbers.
I tested this patch: it fixes the problem, and the tests still pass.
Patch
--- a/dokimi/dokimi/llms_txt.py
+++ b/dokimi/dokimi/llms_txt.py
@@ -104,6 +104,8 @@
consumed = end.end()
yield line[label_start:destination - 2], line[destination:mark.start()], consumed
break
+ for mark in re.finditer(r"(?<!!)\[([^\[\]]+)\]\[([^\[\]]+)\]", visible):
+ yield mark[1], mark[2], mark.end()
def _prose_lines(lines: list[str]) -> Iterator[tuple[int, str]]:
--- a/dokimi/tests/test_llms_txt.py
+++ b/dokimi/tests/test_llms_txt.py
@@ -124,3 +124,8 @@
def test_comment_opener_inside_inline_code_keeps_later_sections_visible():
assert llms_txt.check(GOOD.replace("## Docs", "`<!--`\n\n## Docs")) == []
+
+
+def test_full_reference_link_with_a_definition_is_a_link():
+ text = GOOD.replace("(https://acme.test/quickstart.md)", "[start]")
+ assert llms_txt.check(text + "\n[start]: https://acme.test/quickstart.md\n") == []Details
The latest commit reports no Markdown links to the documentation and fails the check. _link_labels only accepts a label followed directly by (, so the reference is never resolved. I'd expect no findings, since the full reference is valid Markdown with a description.
There was a problem hiding this comment.
I verified that #1132 resolves the full reference when its definition is present and accepts the described documentation link.
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com> # Conflicts: # dokimi/changelog.d/20261120_120000_napetrov_report-opportunities.md # dokimi/dokimi/commands/opportunities.py # dokimi/dokimi/llms_txt.py # dokimi/dokimi/opportunities.py # dokimi/dokimi/schemas/opportunities.v1.json # dokimi/tests/test_llms_txt.py # dokimi/tests/test_opportunities.py # dokimi/tests/test_opportunities_command.py
Thread: PRR_kwDOVBg7g88AAAABaVzHbw Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
Signed-off-by: Nikolay Petrov <nikolay.a.petrov@intel.com>
|
Re: review by vlad-perevezentsev
|
|
xaleryb
left a comment
There was a problem hiding this comment.
Approved on 3715114. Ran the head merged with current main: catalog check --strict passes on the skill and on data/skills, the bundled-skill, docs-code-refs and opportunities tests pass (126), and the full suite fails only where main fails on that machine; ruff, mypy, bandit, docs check --strict and the growth and comment-block gates are clean. Every command and flag the skill names exists in the CLI (report opportunities --format json --out, skill novelty analyze), and each claim in SKILL.md holds against the real output of report opportunities: keys with and without repo, a partial fix keeps the key, fail to unresolved gives a new key, llms.txt and ./llms.txt give different keys. The diff carries none of #1082's code now; the unresolved threads point at code already on main, so they belong with #1131 and #1132. Minor: the title still says 'stacked on #1082'. CI is green.
Summary
Adds the
dokimi-fix-opportunitiesAgent Skill for working throughreport opportunitiesoutput. It takes up to three eligibleact_nowitems, guides the agent through a source edit and compares before and after bysource_key. It requires a user request for any paid novelty re-run and explains how to preserve source identity when comparing reports.The skill uses the report command already on main from #1082.
Evidence
catalog checkpassed with one skill, zero warnings and zero errors.repo_static.v1reports in different directories with and withoutrepo. The skill describes the target and the key identity observed on main.Merge Danger
Door Two-way.
Blast Radius The bundled skill and its documentation.