Class NarrativeTraceExtension

java.lang.Object
ai.narrativetrace.gradle.NarrativeTraceExtension

public abstract class NarrativeTraceExtension extends Object
Top-level Gradle DSL extension for the NarrativeTrace plugin.

INTENT: This is the configuration surface build scripts use to choose mode, scope, output, clarity gates, and optional integration modules.

  • Constructor Summary

    Constructors
    Constructor
    Description
    NarrativeTraceExtension(org.gradle.api.model.ObjectFactory objects)
    Sets up defaults and creates nested extension objects.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    agent(org.gradle.api.Action<? super AgentExtension> action)
    Configures Java-agent-specific settings.
    void
    clarity(org.gradle.api.Action<? super ClarityExtension> action)
    Configures clarity score thresholds and failure behavior.
    Returns the nested Java-agent block.
    abstract org.gradle.api.provider.Property<Boolean>
    Approval mode for structural narratives: when true, a test whose traced structure differs from its committed *.approved.nt baseline fails with a readable diff, and a *.received.nt file is left beside the baseline for review.
    abstract org.gradle.api.file.DirectoryProperty
    Directory of committed narrative baselines, <dir>/<TestClass>/<scenario>.approved.nt.
    Returns the nested clarity-check block.
    abstract org.gradle.api.provider.Property<Boolean>
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.Property<Boolean>
    Whether the test suite harvests the domain glossary (ADR-012).
    abstract org.gradle.api.provider.Property<String>
    Overrides the version used for every managed NarrativeTrace dependency.
    abstract org.gradle.api.provider.Property<String>
     
    Returns the nested module-toggle block.
    abstract org.gradle.api.file.DirectoryProperty
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.Property<String>
     
    abstract org.gradle.api.provider.Property<String>
     
    void
    modules(org.gradle.api.Action<? super ModulesExtension> action)
    Configures optional integration-module toggles.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NarrativeTraceExtension

      @Inject public NarrativeTraceExtension(org.gradle.api.model.ObjectFactory objects)
      Sets up defaults and creates nested extension objects.
  • Method Details

    • getEnabled

      public abstract org.gradle.api.provider.Property<Boolean> getEnabled()
    • getMode

      public abstract org.gradle.api.provider.Property<String> getMode()
    • getTestFramework

      public abstract org.gradle.api.provider.Property<String> getTestFramework()
    • getScope

      public abstract org.gradle.api.provider.Property<String> getScope()
    • getFormat

      public abstract org.gradle.api.provider.Property<String> getFormat()
    • getTracingLevel

      public abstract org.gradle.api.provider.Property<String> getTracingLevel()
    • getLibraryVersion

      public abstract org.gradle.api.provider.Property<String> getLibraryVersion()
      Overrides the version used for every managed NarrativeTrace dependency. Unset by default, in which case the plugin uses the version embedded in its own JAR. Set it to consume a different release or a local -SNAPSHOT (e.g. libraryVersion.set("0.2.0-SNAPSHOT")) without hand-pinning each dependency — the paved path for snapshot dogfooding, where the plugin's embedded version otherwise lags the libraries under development.
    • getGlossary

      public abstract org.gradle.api.provider.Property<Boolean> getGlossary()
      Whether the test suite harvests the domain glossary (ADR-012). Off by default: harvesting rewrites glossary.json / glossary.md at the repository root, outside the build directory, which no build may do unasked.
    • getApproval

      public abstract org.gradle.api.provider.Property<Boolean> getApproval()
      Approval mode for structural narratives: when true, a test whose traced structure differs from its committed *.approved.nt baseline fails with a readable diff, and a *.received.nt file is left beside the baseline for review. Off by default; accept changes with the approveNarratives task.
    • getApprovedDir

      public abstract org.gradle.api.file.DirectoryProperty getApprovedDir()
      Directory of committed narrative baselines, <dir>/<TestClass>/<scenario>.approved.nt. Default: src/test/narratives.
    • getOutputDir

      public abstract org.gradle.api.file.DirectoryProperty getOutputDir()
    • getModules

      public ModulesExtension getModules()
      Returns the nested module-toggle block.
    • modules

      public void modules(org.gradle.api.Action<? super ModulesExtension> action)
      Configures optional integration-module toggles.
    • getAgent

      public AgentExtension getAgent()
      Returns the nested Java-agent block.
    • agent

      public void agent(org.gradle.api.Action<? super AgentExtension> action)
      Configures Java-agent-specific settings.
    • getClarity

      public ClarityExtension getClarity()
      Returns the nested clarity-check block.
    • clarity

      public void clarity(org.gradle.api.Action<? super ClarityExtension> action)
      Configures clarity score thresholds and failure behavior.