pub struct OpenSpec;Expand description
The OpenSpec adapter.
Trait Implementations§
Source§impl Adapter for OpenSpec
impl Adapter for OpenSpec
Source§fn scenarios(&self, snapshot: &ProjectSnapshot, _task: &str) -> Vec<ScenarioRef>
fn scenarios(&self, snapshot: &ProjectSnapshot, _task: &str) -> Vec<ScenarioRef>
Every scenario of the change’s ADDED and MODIFIED requirements: the format does not link a task to a requirement.
Source§fn oracle_requirements(
&self,
snapshot: &ProjectSnapshot,
) -> Vec<OracleRequirement>
fn oracle_requirements( &self, snapshot: &ProjectSnapshot, ) -> Vec<OracleRequirement>
Each ADDED or MODIFIED delta requirement with its scenarios, keyed
<capability>: <requirement>.
Source§fn acceptance_testable(&self, bundle: &Bundle) -> bool
fn acceptance_testable(&self, bundle: &Bundle) -> bool
A delta with a #### Scenario:: the scenarios are the examples.
Source§fn is_convergence(&self, phase: &str) -> bool
fn is_convergence(&self, phase: &str) -> bool
A Convergence group, appended by converge.
Source§fn blocking<'s>(&self, snapshot: &'s ProjectSnapshot) -> Vec<&'s Diagnostic>
fn blocking<'s>(&self, snapshot: &'s ProjectSnapshot) -> Vec<&'s Diagnostic>
Errors of the change itself — preflight, task list, configuration — stop a run before any model call. A selection problem is the selection’s; a dependency problem blocks only the tasks involved.
Source§fn init_steps(&self, choices: &FormatInit) -> Vec<InitStep>
fn init_steps(&self, choices: &FormatInit) -> Vec<InitStep>
The commands of the format’s own init that make a folder a project
of it (New Project); empty: speccoder cannot initialise
this format, the person does (
Messages::make_project).Source§fn tool(&self) -> Option<(&'static str, &'static str)>
fn tool(&self) -> Option<(&'static str, &'static str)>
The format’s own command-line tool and how to install it, for
doctor (None: the format has none).Source§fn kind(&self) -> FormatKind
fn kind(&self) -> FormatKind
Which format.
Source§fn detect(&self, start: &Path) -> Option<PathBuf>
fn detect(&self, start: &Path) -> Option<PathBuf>
The project root containing
start, by the format’s marker.Source§fn inspect(
&self,
start: &Path,
feature: Option<&str>,
) -> Option<ProjectSnapshot>
fn inspect( &self, start: &Path, feature: Option<&str>, ) -> Option<ProjectSnapshot>
Discovers the project containing
start and selects feature.
Read-only.Source§fn parse_tasks(&self, path: &str, text: &str) -> (ParsedTasks, Vec<Diagnostic>)
fn parse_tasks(&self, path: &str, text: &str) -> (ParsedTasks, Vec<Diagnostic>)
Parses a task list.
Source§fn bundle(
&self,
snapshot: &ProjectSnapshot,
task_id: &str,
) -> Result<Bundle, BundleError>
fn bundle( &self, snapshot: &ProjectSnapshot, task_id: &str, ) -> Result<Bundle, BundleError>
The context bundle for
task of the selected unit.Source§fn convergence_texts(&self, root: &Path, unit_dir: &Path) -> [String; 4]
fn convergence_texts(&self, root: &Path, unit_dir: &Path) -> [String; 4]
What the convergence assessment reads, in order: the project’s rules,
the spec, the plan, the task list (each may be empty).
Source§fn crosscheck(
&self,
snapshot: &ProjectSnapshot,
runner: &dyn CommandRunner,
) -> Vec<Diagnostic>
fn crosscheck( &self, snapshot: &ProjectSnapshot, runner: &dyn CommandRunner, ) -> Vec<Diagnostic>
The format’s own tools’ opinion of the selected unit, when they are
installed (read-only commands through
runner).Source§fn checklists(&self, _root: &Path, _unit_dir: &str) -> Vec<ChecklistStatus>
fn checklists(&self, _root: &Path, _unit_dir: &str) -> Vec<ChecklistStatus>
The unit’s unfinished-checklist state.
Source§fn bug_unit(&self, _root: &Path) -> Result<BugHome, BugRefusal>
fn bug_unit(&self, _root: &Path) -> Result<BugHome, BugRefusal>
Where a bug lives: the format’s own bug structure when it
has one, else its standing bug-fix unit.
Err: neither
(BUG-NO-UNIT). Read moreSource§fn record_bug(
&self,
root: &Path,
_home: &BugHome,
triad: &Triad,
) -> Result<RecordedBug, BugRefusal>
fn record_bug( &self, root: &Path, _home: &BugHome, triad: &Triad, ) -> Result<RecordedBug, BugRefusal>
Records
triad as a story, an approved-to-be requirement and a task
in the standing bug-fix unit home names (appends only, verified at
write time). Read moreSource§fn read_bug(
&self,
root: &Path,
_home: &BugHome,
key: &str,
) -> Result<ReadBug, BugRefusal>
fn read_bug( &self, root: &Path, _home: &BugHome, key: &str, ) -> Result<ReadBug, BugRefusal>
The triad as the home holds it: the bug
key (a native home’s slug,
a standing unit’s requirement). Pure: no model, no tool. Read moreSource§fn tick(
&self,
tasks_file: &Path,
task: &str,
line_hash: &str,
) -> Result<(), String>
fn tick( &self, tasks_file: &Path, task: &str, line_hash: &str, ) -> Result<(), String>
Ticks
task (one byte, under the line-hash guard).Source§fn append(
&self,
tasks_file: &Path,
file_hash: &str,
items: &[String],
) -> Result<Vec<String>, String>
fn append( &self, tasks_file: &Path, file_hash: &str, items: &[String], ) -> Result<Vec<String>, String>
Appends convergence tasks (prefix-guarded); returns their IDs.
Source§fn commit_precondition(
&self,
root: &Path,
join: &dyn Fn(&str) -> String,
unit_dir: &str,
) -> CommitPrecondition
fn commit_precondition( &self, root: &Path, join: &dyn Fn(&str) -> String, unit_dir: &str, ) -> CommitPrecondition
What must be committed before a worktree is made; paths are
repository-relative,
join maps a project-relative path to one.Source§fn open(&self, start: &Path, feature: Option<&str>) -> Option<ProjectSnapshot>
fn open(&self, start: &Path, feature: Option<&str>) -> Option<ProjectSnapshot>
Adapter::inspect for a command a person ran: the format’s own
selection settings (its environment variables) apply.Source§fn plan_structure(&self, _snapshot: &ProjectSnapshot) -> Option<PlanStructure>
fn plan_structure(&self, _snapshot: &ProjectSnapshot) -> Option<PlanStructure>
The selected unit’s phases and stories, for the plan checks that
need them (
None: the format has no such structure).Source§fn doctor_checks(
&self,
_root: &Path,
_env: &dyn Fn(&str) -> Option<String>,
) -> Vec<DoctorCheck>
fn doctor_checks( &self, _root: &Path, _env: &dyn Fn(&str) -> Option<String>, ) -> Vec<DoctorCheck>
The format’s own checks of what its tool needs on this machine, as
doctor rows, given the person’s environment env.Source§fn prepare_init(&self, _choices: &FormatInit) -> Result<(), String>
fn prepare_init(&self, _choices: &FormatInit) -> Result<(), String>
Writes what
Adapter::init_steps names in speccoder’s state
before they run (Spec Kit: the bundled preset, extracted). Read moreSource§fn requirements_file(&self) -> Option<&'static str>
fn requirements_file(&self) -> Option<&'static str>
The unit’s document that defines its requirements (
spec.md in
Spec Kit), relative to the unit’s directory; None when the format
has no requirement identifiers.Source§fn requirements_in(&self, _text: &str) -> Vec<(String, String)>
fn requirements_in(&self, _text: &str) -> Vec<(String, String)>
The requirements
text (the requirements file) defines, each with
the line that defines it, in the document’s order.Source§fn record_change(
&self,
_root: &Path,
_request: &str,
_checks: &[String],
) -> Result<Recorded, String>
fn record_change( &self, _root: &Path, _request: &str, _checks: &[String], ) -> Result<Recorded, String>
Records a quick change:
request (with acceptance checks)
becomes a story, a requirement and a task in the format’s standing
unit for such changes. Err: the format has none.Source§fn extensions(&self, _root: &Path) -> Option<Inventory>
fn extensions(&self, _root: &Path) -> Option<Inventory>
The format’s installed extensions, from its own inventory (
None:
the format has none, or none could be read). The only reader of the
format’s extension files.Source§fn bug_dir(&self, _home: &BugHome, _slug: &str) -> Option<(String, String)>
fn bug_dir(&self, _home: &BugHome, _slug: &str) -> Option<(String, String)>
A native home’s directory for
slug, project-relative, and its
unit name.Source§fn bug_slug(&self, _root: &Path, _home: &BugHome, _title: &str) -> String
fn bug_slug(&self, _root: &Path, _home: &BugHome, _title: &str) -> String
A new slug for
title that no bug of home has yet.Source§fn requirement_ids(&self, root: &Path, unit_dir: &str) -> Vec<(String, String)>
fn requirement_ids(&self, root: &Path, unit_dir: &str) -> Vec<(String, String)>
The unit’s requirement identifiers, each with the hash of the line
that defines it (
FR-001, SC-002 in Spec Kit): the rows of the
trace matrix. None when the format has no such identifiers.Source§fn current_pointer(&self) -> Option<&'static str>
fn current_pointer(&self) -> Option<&'static str>
The format’s per-checkout pointer to the current unit
(repository-relative), if it has one.
Auto Trait Implementations§
impl Freeze for OpenSpec
impl RefUnwindSafe for OpenSpec
impl Send for OpenSpec
impl Sync for OpenSpec
impl Unpin for OpenSpec
impl UnsafeUnpin for OpenSpec
impl UnwindSafe for OpenSpec
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
Source§fn into_maybe_undefined(self) -> MaybeUndefined<T>
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Converts this value into a three-state builder argument.
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
Source§fn into_option(self) -> Option<T>
fn into_option(self) -> Option<T>
Converts this value into an optional builder argument.
Creates a shared type from an unshared type.