feat(context): named-flow view — collect a flow's scattered functions (closes #309)#310
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…closes #309) `context --check flow --name X` collects every function carrying @flow: X into one view, from the tags an agent already wrote — the scattered chain reads as a single list. Bare `--check flow` lists all flows. Read-only, deterministic (regex, no LLM); command count stays 12. Architecture (per Wolfvin): not auto-detection — the agent authors the tag (source of truth), CodeLens stores the graph and serves the query. This ships the read-only compose over tag_audit_engine (MVP); persisting tags into graph nodes at scan time is the phase-2 backend piece to delegate. Members carry the enclosing symbol, resolved for three idioms: docstring tag (nearest def above), comment-above-def (def within 3 lines below, blank line ends the run), and file-header tag (falls back to the file). Language-agnostic declaration regex; a miss falls back to the file so it need not be exhaustive. tag_audit_engine flows[] gains `members`; `locations` retained for #305/#306 compat. ai gains `members`/`flows` as item sources. Verified: PAYMENT flow collected across .py + .js; docstring/comment-above/ file-header idioms each resolve correctly (tests); markdown + ai render via the #306 envelope; full suite 19 failures = 19 on main. Found, not fixed (Tier 2): tests/test_docs_registry_sync.py matches sub-check names as substrings, so a name like `flow` (already in "dataflow"/"workflow") passes without a real doc entry. Word-boundary matching would close it. `flow` is documented properly here regardless. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Closes #309.
Yang dibangun
context --check flow --name Xmengumpulkan semua fungsi ber-@FLOW: Xjadi satu tampilan — rantai yang tersebar terbaca sebagai satu daftar. Tanpa--name→ daftar semua flow. Persis framing Wolfvin: "1 flow, 1 command, semua function muncul dari yang tersebar."Arsitektur (arahan Wolfvin: agent tulis, CodeLens simpan + sajikan)
Bukan auto-detect. Agent menulis
@FLOW: NAME(sumber kebenaran); CodeLens menyimpan graph & menyajikan query. PR ini = paruh serve read-only di atastag_audit_engine(#305), tak menyentuh scan/parser. Persist tag ke node graph (query SQL + join call-edge) = fase 2 backend → delegate worker. Dua tafsir "simpan" + alasan pilih MVP-compose ada di design doc.Resolusi enclosing-symbol (3 idiom)
Anggota tampil sebagai nama fungsi, bukan lokasi telanjang:
def f():lalu@FLOWdi body) → def terdekat di atas// @FLOWlaluexport function charge) → def dalam 3 baris bawah; baris kosong mengakhiri (memisahkan dari header file).d.tsdi atas) → fallback ke fileRegex deklarasi lintas bahasa; miss → fallback file (tak perlu exhaustive).
Verifikasi (dijalankan)
.py+.js(demo nyata + test).--namefound + not-found (kasih daftar flow); inventory bare.test_named_flow.py) + 1 ai-flow guard; 19 gagal = 19 di main — nol regresi.Found, not fixed (Tier 2)
tests/test_docs_registry_sync.pymencocokkan nama sub-check sebagai substring, jadi nama sepertiflow(sudah ada di "dataflow"/"workflow") lolos tanpa entri docs nyata. Word-boundary match akan menutupnya.flowtetap didokumentasikan benar di PR ini.🤖 Generated with Claude Code