Self-assembly and structure transformations in living polymers forming fibrils