MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / show_summary

Method show_summary

atomic-cli/src/commands/agent/attest.rs:357–389  ·  view source on GitHub ↗

Print a project-level AI provenance summary. Reads each change's embedded provenance (independent of attestations) and classifies as AI / Human / Needs-attention / System. The headline metric is `ai_authored_pct = AI / (AI + Human)`. Default output is terse and product-facing: the headline %, the human count, and the AI source / tool breakdown. Implementation detail (system/bootstrap exclusions,

(&self, repo: &Repository)

Source from the content-addressed store, hash-verified

355 /// lines) is shown only under `--verbose`. Non-zero data-quality
356 /// conditions (needs-attention, unreadable) always surface as warnings.
357 fn show_summary(&self, repo: &Repository) -> CliResult<()> {
358 let view_name = self
359 .view
360 .clone()
361 .unwrap_or_else(|| repo.current_view().to_string());
362
363 let (summary, pending_parent) = if let Some(parent_view) = self.pending.as_deref() {
364 let s = repo
365 .provenance_summary_pending(&view_name, parent_view)
366 .map_err(CliError::Repository)?;
367 (s, Some(parent_view.to_string()))
368 } else {
369 let s = repo
370 .provenance_summary(&view_name)
371 .map_err(CliError::Repository)?;
372 (s, None)
373 };
374 // The draft-view hint source: the view's recorded parent, read
375 // the same way the routed path reads it off the wire's bundle.
376 let view_parent = repo
377 .get_view_info(&view_name)
378 .ok()
379 .and_then(|info| info.parent_name);
380
381 Self::render_summary(
382 &summary,
383 &view_name,
384 pending_parent.as_deref(),
385 view_parent.as_deref(),
386 self.verbose,
387 );
388 Ok(())
389 }
390
391 /// List all attestations in the repository.
392 fn list_all(&self, repo: &Repository) -> CliResult<()> {

Callers 1

runMethod · 0.80

Calls 6

provenance_summaryMethod · 0.80
get_view_infoMethod · 0.80
cloneMethod · 0.45
current_viewMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected