Complete ClassFacts: entry?, routes_to, holds_state?, calls, and write facts to the output #1412
Labels
No labels
P0
P1
P2
P3
bug
category/code-change
category/cross-repo
category/eval-run
category/investigation
category/no-test-target
category/owner-ruling
category/prose-artifact
category/recurring-chore
category/structure
category/umbrella
crc-refactor
create
delete
enhancement
filed-by/agent
filed-by/user
frozen
lint-rule
needs-info
needs-triage
next
plugin/cc-architect
plugin/os
plugin/os-adr
plugin/os-aidd-lint
plugin/os-backlog
plugin/os-context
plugin/os-doc-hygiene
plugin/os-sdlc
plugin/os-vault
project/cc-os
ready-for-agent
ready-for-human
recurring
review
rule-proposal
update
waiting
wayfinder:grilling
wayfinder:map
wayfinder:map
wayfinder:research
wayfinder:task
wayfinder:task
wontfix
worklist/deviations
worklist/lint-rule
worklist/new-implement-build
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jared/cc-os#1412
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
#1403 shipped
ClassFactswith one field,io, andpure?. The #1403 Approach listed six fields:io,pure?,entry?,routes_to,holds_state?,calls. Its acceptance criteria tested onlyio, so the pipeline built onlyio. #1404 writes the pattern catalog as Role predicates over these facts. The Layers, Command, and Ports-and-adapters predicates needentry?,routes_to,holds_state?, andcalls.Reproduce
Output:
ClassFacts = Data.define(:io), withpure?andmergeonly.Approach
Add the four missing fields to
ClassFacts, fill each one in the extractor, and write the facts as data in the generated output. Definitions are indocs/system-design-format/pattern-matching.mdsection 2:entry?: the class is called frombin/*, a hook, or a task. A Thor CLI class that abin/script starts is an entry.routes_to: the classes this class selects between by request name (a CLI command dispatching to one command class per command).holds_state?: the class assigns an instance variable outsideinitialize.calls: the classes this class sends messages to. A call to another class is acallsedge, not I/O.The extractor today is
ExtractorplusExtractor::IoLedgerand the Prism visitorExtractor::IoScan.IoLedger#factsbuildsClassFacts.new(io: entries). The writers (Writer,Writer::DirectoryFile,Writer::JourneyFile) emit.c4text only and do not write facts.One item per field; each check names a distinct symbol.
Required work:
entry?toClassFactsand fill it frombin/*, hook, and task callers — check: presententryinplugins/os-sdlc/lib/os_sdlc/system_model/class_facts.rbroutes_toand fill it from request-name dispatch — check: presentroutes_toinplugins/os-sdlc/lib/os_sdlc/system_model/class_facts.rbholds_state?and fill it from instance-variable assignment outsideinitialize— check: presentholds_stateinplugins/os-sdlc/lib/os_sdlc/system_model/class_facts.rbcallsand fill it from constant-receiver message sends — check: presentcallsinplugins/os-sdlc/lib/os_sdlc/system_model/class_facts.rbModel#factsas one data file in the generated output — check: presentfactsinplugins/os-sdlc/lib/os_sdlc/system_model/writer.rbAcceptance criteria
One criterion per Approach item, each with a positive and a negative case where the field has one.
plugins/os, when facts are generated, then the facts forWorktree::CLIshowentry?true.plugins/os, when facts are generated, then the facts forHandoff::Documentshowentry?false.plugins/os, when facts are generated, then the facts forWorktree::CLIlistWorktree::FinishCommandinroutes_to.plugins/os, when facts are generated, then the facts forHandoff::Documentshow an emptyroutes_to.plugins/os, when facts are generated, then the facts forWorktree::FinishCommand(assigns@pre_merge_headinmerge_into_base) showholds_state?true.initialize, when facts are generated, thenholds_state?is false.plugins/os, when facts are generated, then the facts forHandoff::CLIlistHandoff::Storeincalls.plugins/os, when facts are generated, then nocallsentry appears inio.system-modelgeneration for a target, when it finishes, then the output directory holds one facts data file with an entry per class, and each entry carriesio,entry?,routes_to,holds_state?, andcalls.Owner sketch
OsSdlc::SystemModel::ClassFacts(value),OsSdlc::SystemModel::Extractorand its ledger and scan collaborators (fill it),OsSdlc::SystemModel::Writer(writes the facts file).Origin
Blocks: #1404
VERDICT: CREATE
Work started on branch ticket-1412 via /os-sdlc:implement (session 47f54f99).
Resolution
Done: ClassFacts now carries io, entry?, routes_to, holds_state?, calls; FactScan/FactLedger fill them, EntryScripts detects bin/hook/task entries, Writer writes facts.json per target.
Evidence: Implementation 180 complete, commit
da26a371on branch ticket-1412; 15 dispatches, suite green twice, behavior-verifier passed all nine criteria; new tests system_model_class_facts_fields_test.rb and system_model_writer_facts_test.rb.Follow-ups: none; the contract-auditor LENS line (A8, IoLedger/IoScan naming) was resolved in-run by the refactorer's rename to FactLedger/FactScan.